Commit 797f49de authored by Darrick J. Wong's avatar Darrick J. Wong Committed by James Bottomley

[SCSI] aic94xx: SATA tag mask not set correctly

The aic94xx controller has a bitmask establishing which tags are ok to
use with a SATA NCQ disk.  When the queue depth is 32, however, the
expression that is used sets the mask to zero, not 0xFFFFFFFF.
This patch widens the width of the integer so that this case is handled
properly.
Signed-off-by: default avatarDarrick J. Wong <djwong@us.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 38e2f035
...@@ -126,7 +126,7 @@ static inline int asd_init_sata(struct domain_device *dev) ...@@ -126,7 +126,7 @@ static inline int asd_init_sata(struct domain_device *dev)
if (w76 & 0x100) /* NCQ? */ if (w76 & 0x100) /* NCQ? */
qdepth = (w75 & 0x1F) + 1; qdepth = (w75 & 0x1F) + 1;
asd_ddbsite_write_dword(asd_ha, ddb, SATA_TAG_ALLOC_MASK, asd_ddbsite_write_dword(asd_ha, ddb, SATA_TAG_ALLOC_MASK,
(1<<qdepth)-1); (1ULL<<qdepth)-1);
asd_ddbsite_write_byte(asd_ha, ddb, NUM_SATA_TAGS, qdepth); asd_ddbsite_write_byte(asd_ha, ddb, NUM_SATA_TAGS, qdepth);
} }
if (dev->dev_type == SATA_DEV || dev->dev_type == SATA_PM || if (dev->dev_type == SATA_DEV || dev->dev_type == SATA_PM ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment