Subject: Re: Problems with ccd (960413)
To: Charles M. Hannum <mycroft@mit.edu>
From: Noriyuki Soda <soda@sra.co.jp>
List: current-users
Date: 05/16/1996 05:36:32
I'm wondering why no one refer to following fix.
1. change scsi_scsi_cmd(,... SCSI_NOSLEEP) behavior into returning
EWOULDBLOCK (or something like that), when (*sc_link->adapter->scsi_cmd)()
returns TRY_AGAIN_LATOR.
(if SCSI_NOSLEEP is not specified,
or if (*sc_link->adapter->scsi_cmd)() doesn't return TRY_AGAIN_LATOR,
then scsi_scsi_cmd() behaves as it is.)
2. sdstart(), ststart() and cdstart() check return value of
scsi_scsi_cmd(), and these remove `struct buf' from sc->buf_queue,
only if scsi_scsi_cmd() does not return EWOULDBLOCK.
That is, if scsi_scsi_cmd() returns EWOULDBLOCK, we leave
sc->buf_queue as it is, and immediately returns from xxstart().
(xxstart() continues to use SCSI_NOSLEEP.)
This fix seems to be easy to implement, and doesn't change traditional
behavior of xxstart(). (xxstart() can be called from interrupt)
Probably I'm overlooking something, but what is that ?
--
soda@sra.co.jp Software Research Associates, Inc., Japan
(Noriyuki Soda) software tools and technology group