diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-10-20 18:21:33 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-10-20 18:21:33 +1000 |
commit | 312f5726055534be1dc9dd369be13aabd2943fcb (patch) | |
tree | 29394a3f83b4952a73b36a4aa962dfeda839e9db /drivers/ide/ide-io.c | |
parent | 3d5efad953c6d5ba11d5bcb584ef8e906f953a73 (diff) | |
parent | 93918e9afc76717176e9e114e79cdbb602a45ae8 (diff) | |
download | blackbird-op-linux-312f5726055534be1dc9dd369be13aabd2943fcb.tar.gz blackbird-op-linux-312f5726055534be1dc9dd369be13aabd2943fcb.zip |
merge Linus head tree into my drm tree and fix up conflicts
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 8 |
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) ide_hwif_t *hwif; struct request *rq; ide_startstop_t startstop; + int loops = 0; /* for atari only: POSSIBLY BROKEN HERE(?) */ ide_get_lock(ide_intr, hwgroup); @@ -1153,6 +1154,7 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq) /* no more work for this hwgroup (for now) */ return; } + again: hwif = HWIF(drive); if (hwgroup->hwif->sharing_irq && hwif != hwgroup->hwif && @@ -1192,8 +1194,14 @@ static void ide_do_request (ide_hwgroup_t *hwgroup, int masked_irq) * though. I hope that doesn't happen too much, hopefully not * unless the subdriver triggers such a thing in its own PM * state machine. + * + * We count how many times we loop here to make sure we service + * all drives in the hwgroup without looping for ever */ if (drive->blocked && !blk_pm_request(rq) && !(rq->flags & REQ_PREEMPT)) { + drive = drive->next ? drive->next : hwgroup->drive; + if (loops++ < 4 && !blk_queue_plugged(drive->queue)) + goto again; /* We clear busy, there should be no pending ATA command at this point. */ hwgroup->busy = 0; break; |