queuecommand

Jakub Jelinek (jj@sunsite.ms.mff.cuni.cz)
Tue, 4 Nov 1997 16:10:41 +0100 (MET)


Hi!

I'm just wondering why is scsi host method queuecommand
declared to return int, when the return value is never used.
But apparently a lot of drivers do use it, but sometimes they
return 1 and sometimes 0 for success/failure.
I think the return value should be made common and scsi.c should cope with
that, in the sense that commands which couldn't be queued will be retried in
a short time. Several drivers in case of "request queue overflow" just
return that they couldn't queue it, but mid-layer doesn't care and just
assumes the command has been successfuly queued. The commands then never
actually go into any queue and cause timeouts, bus resets and often panics
because miriads of scsi errors that come from that.
Or the other solution could be to implement some internal queueing in the
drivers, so that they'd put the command which they cannot handle into some
software queue and after a while try to put it there again...

Ideas?

Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jj@sunsite.mff.cuni.cz | http://sunsite.mff.cuni.cz
Administrator of SunSITE Czech Republic, MFF, Charles University
___________________________________________________________________
Ultralinux - first 64bit OS to take full power of the UltraSparc
Linux version 2.0.30 on a sparc machine (291.64 BogoMips).
___________________________________________________________________