struct Scsi_Host *scsi_host = scpnt->device->host; 
zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt){	int retval;	struct zfcp_unit *unit = (struct zfcp_unit *) scpnt->device->hostdata;	struct Scsi_Host *scsi_host = scpnt->device->host;	if (!unit) {		ZFCP_LOG_NORMAL("bug: Tried reset for nonexistent unit\n");		retval = SUCCESS;		goto out;	}	ZFCP_LOG_NORMAL("resetting unit 0x%016Lx\n", unit->fcp_lun);	/*	 * If we do not know whether the unit supports 'logical unit reset'	 * then try 'logical unit reset' and proceed with 'target reset'	 * if 'logical unit reset' fails.	 * If the unit is known not to support 'logical unit reset' then	 * skip 'logical unit reset' and try 'target reset' immediately.	 */	if (!atomic_test_mask(ZFCP_STATUS_UNIT_NOTSUPPUNITRESET,			      &unit->status)) {		retval =		    zfcp_task_management_function(unit, FCP_LOGICAL_UNIT_RESET);		if (retval) {			ZFCP_LOG_DEBUG("unit reset failed (unit=%p)\n", unit);			if (retval == -ENOTSUPP)				atomic_set_mask				    (ZFCP_STATUS_UNIT_NOTSUPPUNITRESET,				     &unit->status);			/* fall through and try 'target reset' next */		} else {			ZFCP_LOG_DEBUG("unit reset succeeded (unit=%p)\n",				       unit);			/* avoid 'target reset' */			retval = SUCCESS;			goto out;		}	}	retval = zfcp_task_management_function(unit, FCP_TARGET_RESET);	if (retval) {		ZFCP_LOG_DEBUG("target reset failed (unit=%p)\n", unit);		retval = FAILED;	} else {		ZFCP_LOG_DEBUG("target reset succeeded (unit=%p)\n", unit);		retval = SUCCESS;	} out:	return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3859f6a248cbdfbe7b41663f3a2b51f48e30b281/zfcp_scsi.c/clean/drivers/s390/scsi/zfcp_scsi.c