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>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2009-11-19 18:38:11 +01:00 committed by Jeff Garzik
parent 6a74463798
commit f3b1cf40d4
1 changed files with 1 additions and 1 deletions

View File

@ -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;