Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 123505
b: refs/heads/master
c: 3e0e29f
h: refs/heads/master
i:
  123503: 40f19a7
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Dec 29, 2008
1 parent ed35562 commit b9b0183
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0e63a588fc3d6a5e6bb66bacaeb11cd9093141f8
refs/heads/master: 3e0e29f7373ec96a1bd972790649524af7353f42
27 changes: 14 additions & 13 deletions trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,14 +1363,13 @@ irqreturn_t ide_intr (int irq, void *dev_id)
ide_drive_t *drive;
ide_handler_t *handler;
ide_startstop_t startstop;
irqreturn_t irq_ret = IRQ_NONE;

spin_lock_irqsave(&ide_lock, flags);
hwif = hwgroup->hwif;

if (!ide_ack_intr(hwif)) {
spin_unlock_irqrestore(&ide_lock, flags);
return IRQ_NONE;
}
if (!ide_ack_intr(hwif))
goto out;

if ((handler = hwgroup->handler) == NULL || hwgroup->polling) {
/*
Expand Down Expand Up @@ -1406,9 +1405,9 @@ irqreturn_t ide_intr (int irq, void *dev_id)
(void)hwif->tp_ops->read_status(hwif);
#endif /* CONFIG_BLK_DEV_IDEPCI */
}
spin_unlock_irqrestore(&ide_lock, flags);
return IRQ_NONE;
goto out;
}

drive = hwgroup->drive;
if (!drive) {
/*
Expand All @@ -1417,20 +1416,19 @@ irqreturn_t ide_intr (int irq, void *dev_id)
*
* [Note - this can occur if the drive is hot unplugged]
*/
spin_unlock_irqrestore(&ide_lock, flags);
return IRQ_HANDLED;
goto out_handled;
}
if (!drive_is_ready(drive)) {

if (!drive_is_ready(drive))
/*
* This happens regularly when we share a PCI IRQ with
* another device. Unfortunately, it can also happen
* with some buggy drives that trigger the IRQ before
* their status register is up to date. Hopefully we have
* enough advance overhead that the latter isn't a problem.
*/
spin_unlock_irqrestore(&ide_lock, flags);
return IRQ_NONE;
}
goto out;

if (!hwgroup->busy) {
hwgroup->busy = 1; /* paranoia */
printk(KERN_ERR "%s: ide_intr: hwgroup->busy was 0 ??\n", drive->name);
Expand Down Expand Up @@ -1467,8 +1465,11 @@ irqreturn_t ide_intr (int irq, void *dev_id)
"on exit\n", drive->name);
}
}
out_handled:
irq_ret = IRQ_HANDLED;
out:
spin_unlock_irqrestore(&ide_lock, flags);
return IRQ_HANDLED;
return irq_ret;
}

/**
Expand Down

0 comments on commit b9b0183

Please sign in to comment.