From: Alan Cox Date: Mon, 19 Nov 2007 14:39:13 +0000 (+0000) Subject: pata_hpt37x: Fix cable detect bug spotted by Sergei X-Git-Tag: v2.6.24-rc4~102^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=22d5c760c8bc2f146d5c31f69de7f52efd118992;p=karo-tx-linux.git pata_hpt37x: Fix cable detect bug spotted by Sergei Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 3816b8605e0d..46dc70e0dee7 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c @@ -329,7 +329,7 @@ static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline) /* Restore state */ pci_write_config_byte(pdev, 0x5B, scr2); - if (ata66 & (1 << ap->port_no)) + if (ata66 & (2 >> ap->port_no)) ap->cbl = ATA_CBL_PATA40; else ap->cbl = ATA_CBL_PATA80;