diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-11-05 17:58:58 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-11-05 18:10:28 -0500 |
commit | 6bbfd53d47abd1fb20d7c93a9b19a75970b66f49 (patch) | |
tree | 9c28b3b033e32dd5a03c08b61bdddcd79283791f /drivers/ata/libata-core.c | |
parent | 73946f9fc5be1433f1e182d11303188390ff242f (diff) |
libata: handle broken cable reporting
One or two ancient drives predated the cable spec and didn't sent the
valid bits for the field. I had hoped to leave this out of libata as a
piece of historical annoyance but a recent CD drive shows the same bug so
we have to import support for it.
Same concept as Bartlomiej's changes old IDE except that as we have
centralised blacklists we can avoid keeping another private table of stuff
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 3ed3cf2f5568..ec3ce120a517 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -4241,6 +4241,10 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
4241 | { "ST340823A", NULL, ATA_HORKAGE_HPA_SIZE, }, | 4241 | { "ST340823A", NULL, ATA_HORKAGE_HPA_SIZE, }, |
4242 | { "ST320413A", NULL, ATA_HORKAGE_HPA_SIZE, }, | 4242 | { "ST320413A", NULL, ATA_HORKAGE_HPA_SIZE, }, |
4243 | 4243 | ||
4244 | /* Devices which get the IVB wrong */ | ||
4245 | { "QUANTUM FIREBALLlct10 05", "A03.0900", ATA_HORKAGE_IVB, }, | ||
4246 | { "TSSTcorp CDDVDW SH-S202J", "SB00", ATA_HORKAGE_IVB, }, | ||
4247 | |||
4244 | /* End Marker */ | 4248 | /* End Marker */ |
4245 | { } | 4249 | { } |
4246 | }; | 4250 | }; |
@@ -4302,6 +4306,21 @@ static int ata_dma_blacklisted(const struct ata_device *dev) | |||
4302 | } | 4306 | } |
4303 | 4307 | ||
4304 | /** | 4308 | /** |
4309 | * ata_is_40wire - check drive side detection | ||
4310 | * @dev: device | ||
4311 | * | ||
4312 | * Perform drive side detection decoding, allowing for device vendors | ||
4313 | * who can't follow the documentation. | ||
4314 | */ | ||
4315 | |||
4316 | static int ata_is_40wire(struct ata_device *dev) | ||
4317 | { | ||
4318 | if (dev->horkage & ATA_HORKAGE_IVB) | ||
4319 | return ata_drive_40wire_relaxed(dev->id); | ||
4320 | return ata_drive_40wire(dev->id); | ||
4321 | } | ||
4322 | |||
4323 | /** | ||
4305 | * ata_dev_xfermask - Compute supported xfermask of the given device | 4324 | * ata_dev_xfermask - Compute supported xfermask of the given device |
4306 | * @dev: Device to compute xfermask for | 4325 | * @dev: Device to compute xfermask for |
4307 | * | 4326 | * |
@@ -4370,7 +4389,7 @@ static void ata_dev_xfermask(struct ata_device *dev) | |||
4370 | if (xfer_mask & (0xF8 << ATA_SHIFT_UDMA)) | 4389 | if (xfer_mask & (0xF8 << ATA_SHIFT_UDMA)) |
4371 | /* UDMA/44 or higher would be available */ | 4390 | /* UDMA/44 or higher would be available */ |
4372 | if ((ap->cbl == ATA_CBL_PATA40) || | 4391 | if ((ap->cbl == ATA_CBL_PATA40) || |
4373 | (ata_drive_40wire(dev->id) && | 4392 | (ata_is_40wire(dev) && |
4374 | (ap->cbl == ATA_CBL_PATA_UNK || | 4393 | (ap->cbl == ATA_CBL_PATA_UNK || |
4375 | ap->cbl == ATA_CBL_PATA80))) { | 4394 | ap->cbl == ATA_CBL_PATA80))) { |
4376 | ata_dev_printk(dev, KERN_WARNING, | 4395 | ata_dev_printk(dev, KERN_WARNING, |