Subject: Re: Problems with ccd (960413)
To: Noriyuki Soda <soda@sra.co.jp>
From: Justin T. Gibbs <gibbs@freefall.freebsd.org>
List: current-users
Date: 05/15/1996 15:12:07
>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 ?
This will work fine, but is not as efficient as checking that the
resources are availible up front in the way that moving the calls
to getxs up one layer and having it retrieve the controller driver
resources would be.
>--
>soda@sra.co.jp Software Research Associates, Inc., Japan
>(Noriyuki Soda) software tools and technology group
--
Justin T. Gibbs
===========================================
FreeBSD: Turning PCs into workstations
===========================================