diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-10-10 14:28:11 -0700 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-12-01 22:40:25 -0500 |
commit | fc085150b491bfc186efbca90a14cf907a3060a9 (patch) | |
tree | b5bf8b6eb6d0dabd8699e6b41c239619590659e2 /drivers/ata/libata-core.c | |
parent | 2f27ce03628acdb81ead4abe914c713e04a3229e (diff) | |
download | linux-fc085150b491bfc186efbca90a14cf907a3060a9.tar.gz linux-fc085150b491bfc186efbca90a14cf907a3060a9.tar.bz2 linux-fc085150b491bfc186efbca90a14cf907a3060a9.zip |
[PATCH] libata: add 40pin "short" cable support, honour drive side speed detection
[deweerdt@free.fr: build fix]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Frederik Deweerdt <deweerdt@free.fr>
Cc: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r-- | drivers/ata/libata-core.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 915a55a6cc14..b896119cccd3 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3119,6 +3119,13 @@ static void ata_dev_xfermask(struct ata_device *dev) */ if (ap->cbl == ATA_CBL_PATA40) xfer_mask &= ~(0xF8 << ATA_SHIFT_UDMA); + /* Apply drive side cable rule. Unknown or 80 pin cables reported + * host side are checked drive side as well. Cases where we know a + * 40wire cable is used safely for 80 are not checked here. + */ + if (ata_drive_40wire(dev->id) && (ap->cbl == ATA_CBL_PATA_UNK || ap->cbl == ATA_CBL_PATA80)) + xfer_mask &= ~(0xF8 << ATA_SHIFT_UDMA); + xfer_mask &= ata_pack_xfermask(dev->pio_mask, dev->mwdma_mask, dev->udma_mask); |