Commit 5649bb60 authored by Jeff Garzik's avatar Jeff Garzik

[libata sata_sil] remove incorrect limit on drive quirk

The original submittor of the quirk code noted that the errata
of a lockup creating when the condition "sector % 15 == 1" is
true only on chip revisions <= 1.  This is limitation on chip
revision is apparently not correct, therefore we apply to all
affected drives in the quirk list.

This is a sledgehammer fix, limiting max-sectors to 15.  A much better
fix would split the hardware request into two taskfiles, issuing
an additional command, thereby avoiding "sectors % 15 == 1"

Given the errata is limited to "sil 311x + <these drives>", it is hoped
that some janitor cares enough to do a real fix.
parent 1daaf03f
...@@ -244,13 +244,9 @@ static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) ...@@ -244,13 +244,9 @@ static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val)
static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
{ {
unsigned int n, quirks = 0; unsigned int n, quirks = 0;
u32 class_rev = 0;
const char *s = &dev->product[0]; const char *s = &dev->product[0];
unsigned int len = strnlen(s, sizeof(dev->product)); unsigned int len = strnlen(s, sizeof(dev->product));
pci_read_config_dword(ap->host_set->pdev, PCI_CLASS_REVISION, &class_rev);
class_rev &= 0xff;
/* ATAPI specifies that empty space is blank-filled; remove blanks */ /* ATAPI specifies that empty space is blank-filled; remove blanks */
while ((len > 0) && (s[len - 1] == ' ')) while ((len > 0) && (s[len - 1] == ' '))
len--; len--;
...@@ -263,7 +259,7 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) ...@@ -263,7 +259,7 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
} }
/* limit requests to 15 sectors */ /* limit requests to 15 sectors */
if ((class_rev <= 0x01) && (quirks & SIL_QUIRK_MOD15WRITE)) { if (quirks & SIL_QUIRK_MOD15WRITE) {
printk(KERN_INFO "ata%u(%u): applying Seagate errata fix\n", printk(KERN_INFO "ata%u(%u): applying Seagate errata fix\n",
ap->id, dev->devno); ap->id, dev->devno);
ap->host->max_sectors = 15; ap->host->max_sectors = 15;
...@@ -272,7 +268,6 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) ...@@ -272,7 +268,6 @@ static void sil_dev_config(struct ata_port *ap, struct ata_device *dev)
} }
/* limit to udma5 */ /* limit to udma5 */
/* is this for (class_rev <= 0x01) only, too? */
if (quirks & SIL_QUIRK_UDMA5MAX) { if (quirks & SIL_QUIRK_UDMA5MAX) {
printk(KERN_INFO "ata%u(%u): applying Maxtor errata fix %s\n", printk(KERN_INFO "ata%u(%u): applying Maxtor errata fix %s\n",
ap->id, dev->devno, s); ap->id, dev->devno, s);
......
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