Re: SCSI woes (followup)

Mike Anderson
2002-09-24T19:08:09Z

Patrick Mansfield [patmans@us.ibm.com] wrote:
> The problem is that we try to send a command via scsi_request_fn() to
> a device that has no command blocks allocated - it's initializatin
> is incomplete.
>
> Moving the empty check up sounds like good and simple fix for 2.4, or
> check if queue_depth == 0. Anything else would be difficult to get right.

Since error handling running during scan is kinda casuing the problem a
a patch like the one below to scsi_restart_operations sould also work.

-andmike
--
Michael Anderson
andmike@us.ibm.com

--- linux-2.4/drivers/scsi/scsi_error.c Thu Sep 19 09:08:50 2002
+++ linux-2.4-test/drivers/scsi/scsi_error.c Tue Sep 24 12:03:03 2002
@@ -1264,8 +1264,10 @@
|| (SDpnt->device_blocked)) {
break;
}
- q = &SDpnt->request_queue;
- q->request_fn(q);
+ if (SDpnt->has_cmdblocks) {
+ q = &SDpnt->request_queue;
+ q->request_fn(q);
+ }
}
spin_unlock_irqrestore(&io_request_lock, flags);
}