Gerard Roudier wrote:
>
> On Thu, 22 Jul 1999, D. Lance Robinson wrote:
>
> About the patch below, it should be fine, but NO_CONNECT is not the usual
> abbreviation used to designate SELECTION TIMEOUT. Perhaps something
> defined as DID_SEL_TIMEOUT and matching DID_NO_CONNECT would make driver
> code more readable.
>
> Regards,
> G�rard.
Looking at scsi_error.c, it has the following code that leads me to
think that using DID_NO_CONNECT is okay. My purpose for doing this is in
the case that someone hot-removes a scsi disk and it will get a select
timeout. Without being more specific about the timeout condition in the
low level return code, the error recovery code tries too hard to
recover.
Or, are there times when a device will lock-up and not even
select--times where a reset would slap it awake? If the device is that
much out-to-lunch, I'm not sure I want to reset and retry the operation
;-) Just say bye-bye to the drive.
In the code below, I don't think that SUCCESS is the best definition
for a select timeout action, but of all the available options, it is
okay. hopefully, the upper layer will see than nothing actually
happened.
Comments...
<>< Lance
Here is a snippet from scsi_error.c...
int scsi_decide_disposition( ?? ) {
...
...
case DID_NO_CONNECT:
case DID_BAD_TARGET:
case DID_ABORT:
/*
* Note - this means that we just report the status back to the
* top level driver, not that we actually think that it indicates
* success.
*/
return SUCCESS;
...
...
case DID_TIME_OUT:
/*
* When we scan the bus, we get timeout messages for
* these commands if there is no device available.
* Other hosts report DID_NO_CONNECT for the same thing.
*/
if( (SCpnt->cmnd[0] == TEST_UNIT_READY ||
SCpnt->cmnd[0] == INQUIRY) )
{
return SUCCESS;
}
...
...
> > ----MORE----------------
> > Related to the SEL_TIMEOUT subject, Following is a patch that lets the
> > upper drivers know about the select timeout. Is this patch correct usage
> > of the DID_NO_CONNECT state?
> >
> > --- sym53c8xx.c.orig Thu Jul 22 14:03:04 1999
> > +++ sym53c8xx.c Thu Jul 22 13:52:27 1999
> > @@ -6465,8 +6465,14 @@
> > */
> > SetScsiResult(cmd, DID_OK, cp->scsi_status);
> >
> > - } else if ((cp->host_status == HS_SEL_TIMEOUT)
> > - || (cp->host_status == HS_TIMEOUT)) {
> > + } else if (cp->host_status == HS_SEL_TIMEOUT) {
> > +
> > + /*
> > + ** No response
> > + */
> > + SetScsiResult(cmd, DID_NO_CONNECT, cp->scsi_status);
> > +
> > + } else if (cp->host_status == HS_TIMEOUT) {
> >
> > /*
> > ** No response
> >
> > Thanks for your time, <>< Lance.
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]