/* Notes: There is no timeout for this operation. if this operation is unreliable for a given host, then the host itself needs to put a timer on it, and set the host back to a consistent state prior to returning.  */
static int scsi_try_target_reset(struct scsi_cmnd *scmd)
/* Notes: There is no timeout for this operation. if this operation is unreliable for a given host, then the host itself needs to put a timer on it, and set the host back to a consistent state prior to returning.  */
static int scsi_try_target_reset(struct scsi_cmnd *scmd)
{
	unsigned long flags;
	int rtn;
	if (!scmd->device->host->hostt->eh_target_reset_handler)
		return FAILED;
	rtn = scmd->device->host->hostt->eh_target_reset_handler(scmd);
	if (rtn == SUCCESS) {
		spin_lock_irqsave(scmd->device->host->host_lock, flags);
		__starget_for_each_device(scsi_target(scmd->device), NULL,
					  __scsi_report_device_reset);
		spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
	}
	return rtn;
}