summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-29 04:33:08 +0200
committerJeff Garzik <jeff@garzik.org>2007-07-02 16:12:34 +0200
commit90c937853d792ea997d7fdec72dbbea4f92e12c4 (patch)
treefb2bfdc4b37ace392b28440b5b25973bb2a0d97f /drivers/ata
parentlibata: remove reading alt_status from ata_hsm_qc_complete() (diff)
downloadlinux-90c937853d792ea997d7fdec72dbbea4f92e12c4.tar.xz
linux-90c937853d792ea997d7fdec72dbbea4f92e12c4.zip
sata_inic162x: disable LBA48 devices
sata_inic162x can't do LBA48 properly yet and is likely to corrupt data on drives larger than LBA28 limit. Disable LBA48 devices during device configuration. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_inic162x.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 2d80c9d95e95..dc3bbce04676 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -496,6 +496,13 @@ static void inic_dev_config(struct ata_device *dev)
/* inic can only handle upto LBA28 max sectors */
if (dev->max_sectors > ATA_MAX_SECTORS)
dev->max_sectors = ATA_MAX_SECTORS;
+
+ if (dev->n_sectors >= 1 << 28) {
+ ata_dev_printk(dev, KERN_ERR,
+ "ERROR: This driver doesn't support LBA48 yet and may cause\n"
+ " data corruption on such devices. Disabling.\n");
+ ata_dev_disable(dev);
+ }
}
static void init_port(struct ata_port *ap)