Commit 22d5c760 authored by Alan Cox's avatar Alan Cox Committed by Jeff Garzik

pata_hpt37x: Fix cable detect bug spotted by Sergei

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
parent 498222f3
...@@ -329,7 +329,7 @@ static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline) ...@@ -329,7 +329,7 @@ static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline)
/* 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))
ap->cbl = ATA_CBL_PATA40; ap->cbl = ATA_CBL_PATA40;
else else
ap->cbl = ATA_CBL_PATA80; ap->cbl = 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