Commit f3b1cf40 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Jeff Garzik

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: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 6a744637
...@@ -133,7 +133,7 @@ static int hpt3x2n_cable_detect(struct ata_port *ap) ...@@ -133,7 +133,7 @@ static int hpt3x2n_cable_detect(struct ata_port *ap)
/* Restore state */ /* Restore state */
pci_write_config_byte(pdev, 0x5B, scr2); pci_write_config_byte(pdev, 0x5B, scr2);
if (ata66 & (1 << ap->port_no)) if (ata66 & (2 >> ap->port_no))
return ATA_CBL_PATA40; return ATA_CBL_PATA40;
else else
return ATA_CBL_PATA80; return ATA_CBL_PATA80;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment