* If the bus reset worked, but we are still unable to
* talk to the device, take it offline.
* FIXME(eric) - is this really the correct thing to do?
* 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(rtn!=SUCCESS){
printk(KERN_INFO"scsi: device set offline - not ready or command retry failed after bus reset: host %d channel %d id %d lun %d\n",SDloop->host->host_no,SDloop->channel,SDloop->id,SDloop->lun);
SDloop->online=FALSE;
SDloop->host->host_failed--;
scsi_eh_finish_command(&SCdone,SCloop);
}
}
}
if((scmd->cmnd[0]==TEST_UNIT_READY||
scmd->cmnd[0]==INQUIRY)){
returnSUCCESS;
}else{
returnFAILED;
}
caseDID_RESET:
/*
* in the normal case where we haven't initiated a reset,
* this is a failure.
*/
if(scmd->flags&IS_RESETTING){
scmd->flags&=~IS_RESETTING;
gotomaybe_retry;
}
returnSUCCESS;
default:
returnFAILED;
}
if(host->host_failed==0){
ourrtn=TRUE;
gotoleave;
}
/*
* If we ended up here, we have serious problems. The only thing left
* to try is a full host reset - perhaps the firmware on the device
* crashed, or something like that.
*
* It is assumed that a succesful host reset will cause *all* information
* about the command to be flushed from both the host adapter *and* the
* device.
*
* FIXME(eric) - it isn't clear that devices that implement the soft reset
* option can ever be cleared except via cycling the power. The problem is
* that sending the host reset command will cause the host to forget
* about the pending command, but the device won't forget. For now, we
* skip the host reset option if any of the failed devices are configured
printk(KERN_INFO"scsi: device set offline - not ready or command retry failed after host reset: host %d channel %d id %d lun %d\n",SDloop->host->host_no,SDloop->channel,SDloop->id,SDloop->lun);