Date: Fri, 12 Jul 1996 09:02:08 -0700 From: "Justin T. Gibbs" <gibbs@freefall.freebsd.org> To: Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr> Cc: freebsd-scsi@freebsd.org Subject: Re: TRY_AGAIN_LATER return value Message-ID: <199607121602.JAA21617@freefall.freebsd.org> In-Reply-To: Your message of "Fri, 12 Jul 1996 15:51:58 %2B0200." <199607121351.PAA00186@angrand.prism.uvsq.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
Much of this has already changed in my local tree. My first pass over the SCSI system is almost complete, and I've removed quite a few bogons. TRY_AGAIN_LATER will most likely go away. Its current usage is to flag resource shortages when the driver cannot sleep for them. In the new scheme of things, these resources are requested in advance of queuing the command via two new entry points, get_cdb() and free_cdb(). Sleeping is usually not required since the buffers are on a queue anyway, so if you are told not to sleep in get_cdb() just return NULL. You will only get a call into your scsi_cmd() routine once get_cdb() is successful. HAD_ERROR has been removed. You should return COMPLETE with a valid error in the scsi_xfer structure. XS_BUSY means the target returned BUSY status, not that the driver is busy. (Hmmm... This should probably be determined by the upper level SCSI layer by looking at the status byte. Perhaps XS_BUSY can go away too.) XS_TIMEOUT is a generic target or command error. It should not be used to report resource shortages. I'll be sure to look into the deadlock you're seeing, but it sounds like you are using the return codes in a very different way. You should not be returning to the scsi system unless the buffer is filled or the drive has reported an error. >Another possibility on short resources is to return HAD_ERROR with >xs->error = XS_BUSY (XS_TIMEOUT is equivalent), then the bp structure >is updated like this in sc_done() after the last retry: Are you not able to sleep waiting for these resources as all the other driver do? >nicolas > >-- >Nicolas.Souchu@prism.uvsq.fr >Laboratoire PRiSM - Versailles, FRANCE > -- Justin T. Gibbs =========================================== FreeBSD: Turning PCs into workstations ===========================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607121602.JAA21617>