Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90c93785 authored by Tejun Heo's avatar Tejun Heo Committed by Jeff Garzik
Browse files

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: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 74cdbba4
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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)