aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 18e9b82e132c..9d9f1c6d602a 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -350,22 +350,19 @@ static int try_to_identify (ide_drive_t *drive, u8 cmd)
350 * the irq handler isn't expecting. 350 * the irq handler isn't expecting.
351 */ 351 */
352 if (IDE_CONTROL_REG) { 352 if (IDE_CONTROL_REG) {
353 u8 ctl = drive->ctl | 2;
354 if (!hwif->irq) { 353 if (!hwif->irq) {
355 autoprobe = 1; 354 autoprobe = 1;
356 cookie = probe_irq_on(); 355 cookie = probe_irq_on();
357 /* enable device irq */
358 ctl &= ~2;
359 } 356 }
360 hwif->OUTB(ctl, IDE_CONTROL_REG); 357 ide_set_irq(drive, autoprobe);
361 } 358 }
362 359
363 retval = actual_try_to_identify(drive, cmd); 360 retval = actual_try_to_identify(drive, cmd);
364 361
365 if (autoprobe) { 362 if (autoprobe) {
366 int irq; 363 int irq;
367 /* mask device irq */ 364
368 hwif->OUTB(drive->ctl|2, IDE_CONTROL_REG); 365 ide_set_irq(drive, 0);
369 /* clear drive IRQ */ 366 /* clear drive IRQ */
370 (void) hwif->INB(IDE_STATUS_REG); 367 (void) hwif->INB(IDE_STATUS_REG);
371 udelay(5); 368 udelay(5);
@@ -653,8 +650,7 @@ static int wait_hwif_ready(ide_hwif_t *hwif)
653 /* Ignore disks that we will not probe for later. */ 650 /* Ignore disks that we will not probe for later. */
654 if (!drive->noprobe || drive->present) { 651 if (!drive->noprobe || drive->present) {
655 SELECT_DRIVE(drive); 652 SELECT_DRIVE(drive);
656 if (IDE_CONTROL_REG) 653 ide_set_irq(drive, 1);
657 hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
658 mdelay(2); 654 mdelay(2);
659 rc = ide_wait_not_busy(hwif, 35000); 655 rc = ide_wait_not_busy(hwif, 35000);
660 if (rc) 656 if (rc)