Commit 6809e730 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Jeff Garzik

pata_legacy: fix access to control register for QDI6580

We need to mask out the port offset from the port number
cached in ld_qdi->timing.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 43c7d17e
...@@ -672,7 +672,7 @@ static void qdi6580dp_set_piomode(struct ata_port *ap, struct ata_device *adev) ...@@ -672,7 +672,7 @@ static void qdi6580dp_set_piomode(struct ata_port *ap, struct ata_device *adev)
outb(timing, ld_qdi->timing + 2 * ap->port_no); outb(timing, ld_qdi->timing + 2 * ap->port_no);
/* Clear the FIFO */ /* Clear the FIFO */
if (adev->class != ATA_DEV_ATA) if (adev->class != ATA_DEV_ATA)
outb(0x5F, ld_qdi->timing + 3); outb(0x5F, (ld_qdi->timing & 0xFFF0) + 3);
} }
/** /**
...@@ -707,7 +707,7 @@ static void qdi6580_set_piomode(struct ata_port *ap, struct ata_device *adev) ...@@ -707,7 +707,7 @@ static void qdi6580_set_piomode(struct ata_port *ap, struct ata_device *adev)
outb(timing, ld_qdi->timing + 2 * adev->devno); outb(timing, ld_qdi->timing + 2 * adev->devno);
/* Clear the FIFO */ /* Clear the FIFO */
if (adev->class != ATA_DEV_ATA) if (adev->class != ATA_DEV_ATA)
outb(0x5F, ld_qdi->timing + 3); outb(0x5F, (ld_qdi->timing & 0xFFF0) + 3);
} }
/** /**
......
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