SILI - Fix embarassing bug for non-NCQ disk accesses > 128G
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 2 Jul 2009 02:48:22 +0000 (19:48 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 2 Jul 2009 02:48:22 +0000 (19:48 -0700)
Fix an embarassing bug for non-NCQ disk accesses > 128G.  This only
applied to non-NCQ accesses for disks and typically will not happen
with the SILI part since it can use NCQ for everything.  Non-NCQ
accesses for seek positions from 128G to 2TB were wrapping the LBA.

sys/dev/disk/sili/sili_cam.c

index 85431d7..61c51ff 100644 (file)
@@ -1138,7 +1138,7 @@ sili_xpt_scsi_disk_io(struct sili_port *ap, struct ata_port *atx,
                        fis->sector_count = xa->tag << 3;
                        fis->features = (u_int8_t)count;
                        fis->features_exp = (u_int8_t)(count >> 8);
-               } else if (count > 0x100 || lba > 0xFFFFFFFFU) {
+               } else if (count > 0x100 || lba > 0x0FFFFFFFU) {
                        /*
                         * Use LBA48
                         */