linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sata_inic162x: disable LBA48 devices
@ 2007-06-29  2:33 Tejun Heo
  2007-07-02 14:14 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2007-06-29  2:33 UTC (permalink / raw)
  To: Jeff Garzik, linux-ide@vger.kernel.org, Mark Lord, greg.freemyer

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>
---
 drivers/ata/sata_inic162x.c |    7 +++++++
 1 file changed, 7 insertions(+)

Index: work/drivers/ata/sata_inic162x.c
===================================================================
--- work.orig/drivers/ata/sata_inic162x.c
+++ work/drivers/ata/sata_inic162x.c
@@ -496,6 +496,13 @@ static void inic_dev_config(struct ata_d
 	/* 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] sata_inic162x: disable LBA48 devices
  2007-06-29  2:33 [PATCH] sata_inic162x: disable LBA48 devices Tejun Heo
@ 2007-07-02 14:14 ` Jeff Garzik
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Garzik @ 2007-07-02 14:14 UTC (permalink / raw)
  To: Tejun Heo; +Cc: linux-ide@vger.kernel.org, Mark Lord, greg.freemyer

Tejun Heo wrote:
> 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>
> ---
>  drivers/ata/sata_inic162x.c |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> Index: work/drivers/ata/sata_inic162x.c
> ===================================================================
> --- work.orig/drivers/ata/sata_inic162x.c
> +++ work/drivers/ata/sata_inic162x.c
> @@ -496,6 +496,13 @@ static void inic_dev_config(struct ata_d
>  	/* 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);
> +	}

applied



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-02 14:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29  2:33 [PATCH] sata_inic162x: disable LBA48 devices Tejun Heo
2007-07-02 14:14 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).