aboutsummaryrefslogtreecommitdiff
path: root/drivers/ata/pata_hpt3x2n.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-11-19 18:38:11 +0100
committerJeff Garzik <jgarzik@redhat.com>2009-12-03 02:46:35 -0500
commitf3b1cf40d4012351d793793b2965aca57cc9fdd5 (patch)
tree19611838f13ff13218d6cd8db9a1fc08658d0cc5 /drivers/ata/pata_hpt3x2n.c
parent6a74463798bde03f849d8d82d97e4f8e4cf160f3 (diff)
pata_hpt3x2n: fix cable detection
The detection was reversed between primary and secondary ports. Fix it to match hpt366 and the vendor driver. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_hpt3x2n.c')
-rw-r--r--drivers/ata/pata_hpt3x2n.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c
index 3d59fe0a408..2ab9fd6c597 100644
--- a/drivers/ata/pata_hpt3x2n.c
+++ b/drivers/ata/pata_hpt3x2n.c
@@ -133,7 +133,7 @@ static int hpt3x2n_cable_detect(struct ata_port *ap)
/* Restore state */
pci_write_config_byte(pdev, 0x5B, scr2);
- if (ata66 & (1 << ap->port_no))
+ if (ata66 & (2 >> ap->port_no))
return ATA_CBL_PATA40;
else
return ATA_CBL_PATA80;