Commit ad0e74d3 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz
Browse files

ide: add missing checks for control register existence

Add missing checks for control register existence (some legacy m68k specific
IDE controllers don't have it).  Also use drive->ctl while at it.
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <>
parent 69ae6fee
......@@ -970,7 +970,8 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq)
if (rc)
printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name);
HWIF(drive)->OUTB(8, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]);
HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
rc = ide_wait_not_busy(HWIF(drive), 100000);
if (rc)
printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name);
......@@ -667,7 +667,8 @@ static int wait_hwif_ready(ide_hwif_t *hwif)
/* Ignore disks that we will not probe for later. */
if (!drive->noprobe || drive->present) {
hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
rc = ide_wait_not_busy(hwif, 35000);
if (rc)
Supports Markdown
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