pata_hpt37x: Fix cable detect bug spotted by Sergei
authorAlan Cox <alan@lxorguk.ukuu.org.uk>
Mon, 19 Nov 2007 14:39:13 +0000 (14:39 +0000)
committerJeff Garzik <jeff@garzik.org>
Sat, 24 Nov 2007 00:33:27 +0000 (19:33 -0500)
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/pata_hpt37x.c

index 3816b8605e0d60631b5fe1c4496db8e7e8f1379e..46dc70e0dee7ee7d8add0e4541d28d64cc17f5ff 100644 (file)
@@ -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;