aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/ide-io.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index cc35d6dbd410..35b625882803 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1363,14 +1363,13 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1363 ide_drive_t *drive; 1363 ide_drive_t *drive;
1364 ide_handler_t *handler; 1364 ide_handler_t *handler;
1365 ide_startstop_t startstop; 1365 ide_startstop_t startstop;
1366 irqreturn_t irq_ret = IRQ_NONE;
1366 1367
1367 spin_lock_irqsave(&ide_lock, flags); 1368 spin_lock_irqsave(&ide_lock, flags);
1368 hwif = hwgroup->hwif; 1369 hwif = hwgroup->hwif;
1369 1370
1370 if (!ide_ack_intr(hwif)) { 1371 if (!ide_ack_intr(hwif))
1371 spin_unlock_irqrestore(&ide_lock, flags); 1372 goto out;
1372 return IRQ_NONE;
1373 }
1374 1373
1375 if ((handler = hwgroup->handler) == NULL || hwgroup->polling) { 1374 if ((handler = hwgroup->handler) == NULL || hwgroup->polling) {
1376 /* 1375 /*
@@ -1406,9 +1405,9 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1406 (void)hwif->tp_ops->read_status(hwif); 1405 (void)hwif->tp_ops->read_status(hwif);
1407#endif /* CONFIG_BLK_DEV_IDEPCI */ 1406#endif /* CONFIG_BLK_DEV_IDEPCI */
1408 } 1407 }
1409 spin_unlock_irqrestore(&ide_lock, flags); 1408 goto out;
1410 return IRQ_NONE;
1411 } 1409 }
1410
1412 drive = hwgroup->drive; 1411 drive = hwgroup->drive;
1413 if (!drive) { 1412 if (!drive) {
1414 /* 1413 /*
@@ -1417,10 +1416,10 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1417 * 1416 *
1418 * [Note - this can occur if the drive is hot unplugged] 1417 * [Note - this can occur if the drive is hot unplugged]
1419 */ 1418 */
1420 spin_unlock_irqrestore(&ide_lock, flags); 1419 goto out_handled;
1421 return IRQ_HANDLED;
1422 } 1420 }
1423 if (!drive_is_ready(drive)) { 1421
1422 if (!drive_is_ready(drive))
1424 /* 1423 /*
1425 * This happens regularly when we share a PCI IRQ with 1424 * This happens regularly when we share a PCI IRQ with
1426 * another device. Unfortunately, it can also happen 1425 * another device. Unfortunately, it can also happen
@@ -1428,9 +1427,8 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1428 * their status register is up to date. Hopefully we have 1427 * their status register is up to date. Hopefully we have
1429 * enough advance overhead that the latter isn't a problem. 1428 * enough advance overhead that the latter isn't a problem.
1430 */ 1429 */
1431 spin_unlock_irqrestore(&ide_lock, flags); 1430 goto out;
1432 return IRQ_NONE; 1431
1433 }
1434 if (!hwgroup->busy) { 1432 if (!hwgroup->busy) {
1435 hwgroup->busy = 1; /* paranoia */ 1433 hwgroup->busy = 1; /* paranoia */
1436 printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name); 1434 printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name);
@@ -1467,8 +1465,11 @@ irqreturn_t ide_intr (int irq, void *dev_id)
1467 "on exit\n", drive->name); 1465 "on exit\n", drive->name);
1468 } 1466 }
1469 } 1467 }
1468out_handled:
1469 irq_ret = IRQ_HANDLED;
1470out:
1470 spin_unlock_irqrestore(&ide_lock, flags); 1471 spin_unlock_irqrestore(&ide_lock, flags);
1471 return IRQ_HANDLED; 1472 return irq_ret;
1472} 1473}
1473 1474
1474/** 1475/**