From: Mark Haverkamp Daniel McNeil and I have been debugging a hang with the aacraid driver using the as I/O scheduler. We found that scsi_request_fn would de-queue a request and later re-queued it. This left the as_data->nr_dispatched variable in an inconsistent state (it was never being decremented back to zero). We added a call to elv_completed_request to clean up the state before re-adding the request. This has fixed our hang problem. 25-akpm/drivers/scsi/scsi_lib.c | 1 + 1 files changed, 1 insertion(+) diff -puN drivers/scsi/scsi_lib.c~aacraid-hang-fix drivers/scsi/scsi_lib.c --- 25/drivers/scsi/scsi_lib.c~aacraid-hang-fix Tue Jul 15 16:04:22 2003 +++ 25-akpm/drivers/scsi/scsi_lib.c Tue Jul 15 16:04:22 2003 @@ -1215,6 +1215,7 @@ static void scsi_request_fn(struct reque spin_lock_irq(q->queue_lock); if (blk_rq_tagged(req)) blk_queue_end_tag(q, req); + elv_completed_request(q, req); __elv_add_request(q, req, 0, 0); sdev->device_busy--; if(sdev->device_busy == 0) _