* If the bus reset worked, but we are still unable to
* when we scan the bus, we get timeout messages for
* talk to the device, take it offline.
* these commands if there is no device available.
* FIXME(eric) - is this really the correct thing to do?
* other hosts report did_no_connect for the same thing.
*/
*/
if(rtn!=SUCCESS){
if((scmd->cmnd[0]==TEST_UNIT_READY||
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);
scmd->cmnd[0]==INQUIRY)){
returnSUCCESS;
SDloop->online=FALSE;
}else{
SDloop->host->host_failed--;
returnFAILED;
scsi_eh_finish_command(&SCdone,SCloop);
}
}
}
}
}
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
* next, check the message byte.
* to try is a full host reset - perhaps the firmware on the device
*/
* crashed, or something like that.
if(msg_byte(scmd->result)!=COMMAND_COMPLETE){
*
returnFAILED;
* 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);
returnFAILED;
SDloop->online=FALSE;
SDloop->host->host_failed--;
scsi_eh_finish_command(&SCdone,SCloop);
}
}
}
}
}
}
}
returnFAILED;
maybe_retry:
if((++scmd->retries)<scmd->allowed){
returnNEEDS_RETRY;
}else{
/*
/*
* If we solved all of the problems, then let's rev up the engines again.
* no more retries - report this one back to upper level.
*/
*/
if(host->host_failed==0){
returnSUCCESS;
ourrtn=TRUE;
gotoleave;
}
}
}
/**
* scsi_restart_operations - restart io operations to the specified host.
* @shost: Host we are restarting.
*
* Notes:
* When we entered the error handler, we blocked all further i/o to