aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-12 00:43:32 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-12 00:43:32 -0400
commitb6ec995a21a9428aef620b5adf46d047a18d88b8 (patch)
tree6719121e6605cbca524b687f47336b9bbf3b8d41 /drivers/ide
parent3a5f8c5f788d68e325d9fe3c26f4df5a5aee838a (diff)
parentda64c6ee6bb71bfb3f09d9bb89ce1aa4b1ee7e89 (diff)
Merge from Linus' tree
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-io.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 9e9cf1407311..5275cbb1afe9 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -1101,6 +1101,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
1101 ide_hwif_t *hwif; 1101 ide_hwif_t *hwif;
1102 struct request *rq; 1102 struct request *rq;
1103 ide_startstop_t startstop; 1103 ide_startstop_t startstop;
1104 int loops = 0;
1104 1105
1105 /* for atari only: POSSIBLY BROKEN HERE(?) */ 1106 /* for atari only: POSSIBLY BROKEN HERE(?) */
1106 ide_get_lock(ide_intr, hwgroup); 1107 ide_get_lock(ide_intr, hwgroup);
@@ -1153,6 +1154,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
1153 /* no more work for this hwgroup (for now) */ 1154 /* no more work for this hwgroup (for now) */
1154 return; 1155 return;
1155 } 1156 }
1157 again:
1156 hwif = HWIF(drive); 1158 hwif = HWIF(drive);
1157 if (hwgroup->hwif->sharing_irq && 1159 if (hwgroup->hwif->sharing_irq &&
1158 hwif != hwgroup->hwif && 1160 hwif != hwgroup->hwif &&
@@ -1192,8 +1194,14 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq)
1192 * though. I hope that doesn't happen too much, hopefully not 1194 * though. I hope that doesn't happen too much, hopefully not
1193 * unless the subdriver triggers such a thing in its own PM 1195 * unless the subdriver triggers such a thing in its own PM
1194 * state machine. 1196 * state machine.
1197 *
1198 * We count how many times we loop here to make sure we service
1199 * all drives in the hwgroup without looping for ever
1195 */ 1200 */
1196 if (drive->blocked && !blk_pm_request(rq) && !(rq->flags & REQ_PREEMPT)) { 1201 if (drive->blocked && !blk_pm_request(rq) && !(rq->flags & REQ_PREEMPT)) {
1202 drive = drive->next ? drive->next : hwgroup->drive;
1203 if (loops++ < 4 && !blk_queue_plugged(drive->queue))
1204 goto again;
1197 /* We clear busy, there should be no pending ATA command at this point. */ 1205 /* We clear busy, there should be no pending ATA command at this point. */
1198 hwgroup->busy = 0; 1206 hwgroup->busy = 0;
1199 break; 1207 break;