diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-11-05 22:58:58 +0000 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-11-05 18:10:28 -0500 |
commit | 6bbfd53d47abd1fb20d7c93a9b19a75970b66f49 (patch) | |
tree | 9c28b3b033e32dd5a03c08b61bdddcd79283791f /include/linux/ata.h | |
parent | 73946f9fc5be1433f1e182d11303188390ff242f (diff) | |
download | blackbird-op-linux-6bbfd53d47abd1fb20d7c93a9b19a75970b66f49.tar.gz blackbird-op-linux-6bbfd53d47abd1fb20d7c93a9b19a75970b66f49.zip |
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 'include/linux/ata.h')
-rw-r--r-- | include/linux/ata.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/ata.h b/include/linux/ata.h index 304825b1c977..5c4e54a2a8d6 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -537,6 +537,15 @@ static inline int ata_drive_40wire(const u16 *dev_id) return 1; } +static inline int ata_drive_40wire_relaxed(const u16 *dev_id) +{ + if (ata_id_is_sata(dev_id)) + return 0; /* SATA */ + if ((dev_id[93] & 0x2000) == 0x2000) + return 0; /* 80 wire */ + return 1; +} + static inline int atapi_cdb_len(const u16 *dev_id) { u16 tmp = dev_id[0] & 0x3; |