Skip to content

Commit

Permalink
pata_hpt3x2n: fix cable detection
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartlomiej Zolnierkiewicz authored and Jeff Garzik committed Dec 3, 2009
1 parent 6a74463 commit f3b1cf4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ata/pata_hpt3x2n.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f3b1cf4

Please sign in to comment.