/* reopening link to port */ zfcp_erp_port_reopen(unit->port, 0); 
zfcp_test_link(unit->port); 
zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req){	int retval = -EINVAL;	struct zfcp_unit *unit = new_fsf_req->data.abort_fcp_command.unit;	unsigned char status_qual =	    new_fsf_req->qtcb->header.fsf_status_qual.word[0];	del_timer(&new_fsf_req->adapter->scsi_er_timer);	if (new_fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) {		/* do not set ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED */		goto skip_fsfstatus;	}	/* evaluate FSF status in QTCB */	switch (new_fsf_req->qtcb->header.fsf_status) {	case FSF_PORT_HANDLE_NOT_VALID:		if (status_qual >> 4 != status_qual % 0xf) {			debug_text_event(new_fsf_req->adapter->erp_dbf, 3,					 "fsf_s_phand_nv0");			/*			 * In this case a command that was sent prior to a port			 * reopen was aborted (handles are different). This is			 * fine.			 */		} else {			ZFCP_LOG_INFO("Temporary port identifier 0x%x for "				      "port 0x%016Lx on adapter %s invalid. "				      "This may happen occasionally.\n",				      unit->port->handle,				      unit->port->wwpn,				      zfcp_get_busid_by_unit(unit));			ZFCP_LOG_INFO("status qualifier:\n");			ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO,				      (char *) &new_fsf_req->qtcb->header.				      fsf_status_qual,				      sizeof (union fsf_status_qual));			/* Let's hope this sorts out the mess */			debug_text_event(new_fsf_req->adapter->erp_dbf, 1,					 "fsf_s_phand_nv1");			zfcp_erp_adapter_reopen(unit->port->adapter, 0);			new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		}		break;	case FSF_LUN_HANDLE_NOT_VALID:		if (status_qual >> 4 != status_qual % 0xf) {			/* 2 */			debug_text_event(new_fsf_req->adapter->erp_dbf, 3,					 "fsf_s_lhand_nv0");			/*			 * In this case a command that was sent prior to a unit			 * reopen was aborted (handles are different).			 * This is fine.			 */		} else {			ZFCP_LOG_INFO			    ("Warning: Temporary LUN identifier 0x%x of LUN "			     "0x%016Lx on port 0x%016Lx on adapter %s is "			     "invalid. This may happen in rare cases. "			     "Trying to re-establish link.\n",			     unit->handle,			     unit->fcp_lun,			     unit->port->wwpn,			     zfcp_get_busid_by_unit(unit));			ZFCP_LOG_DEBUG("Status qualifier data:\n");			ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,				      (char *) &new_fsf_req->qtcb->header.				      fsf_status_qual,				      sizeof (union fsf_status_qual));			/* Let's hope this sorts out the mess */			debug_text_event(new_fsf_req->adapter->erp_dbf, 1,					 "fsf_s_lhand_nv1");			zfcp_erp_port_reopen(unit->port, 0);			new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		}		break;	case FSF_FCP_COMMAND_DOES_NOT_EXIST:		retval = 0;		debug_text_event(new_fsf_req->adapter->erp_dbf, 3,				 "fsf_s_no_exist");		new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED;		break;	case FSF_PORT_BOXED:		ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to "			      "be reopened\n", unit->port->wwpn,			      zfcp_get_busid_by_unit(unit));		debug_text_event(new_fsf_req->adapter->erp_dbf, 2,				 "fsf_s_pboxed");		zfcp_erp_port_reopen(unit->port, 0);		new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR		    | ZFCP_STATUS_FSFREQ_RETRY;		break;	case FSF_LUN_BOXED:                ZFCP_LOG_INFO(                        "unit 0x%016Lx on port 0x%016Lx on adapter %s needs "                        "to be reopened\n",                        unit->fcp_lun, unit->port->wwpn,                        zfcp_get_busid_by_unit(unit));                debug_text_event(new_fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed");                zfcp_erp_unit_reopen(unit, 0);                zfcp_cmd_dbf_event_fsf("unitbox", new_fsf_req,                        &new_fsf_req->qtcb->header.fsf_status_qual,                        sizeof(union fsf_status_qual));                new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR                        | ZFCP_STATUS_FSFREQ_RETRY;                break;	case FSF_ADAPTER_STATUS_AVAILABLE:		switch (new_fsf_req->qtcb->header.fsf_status_qual.word[0]) {		case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:			debug_text_event(new_fsf_req->adapter->erp_dbf, 1,					 "fsf_sq_ltest");			/* reopening link to port */			zfcp_erp_port_reopen(unit->port, 0);			new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;			break;		case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:			/* SCSI stack will escalate */			debug_text_event(new_fsf_req->adapter->erp_dbf, 1,					 "fsf_sq_ulp");			new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;			break;		default:			ZFCP_LOG_NORMAL			    ("bug: Wrong status qualifier 0x%x arrived.\n",			     new_fsf_req->qtcb->header.fsf_status_qual.word[0]);			debug_text_event(new_fsf_req->adapter->erp_dbf, 0,					 "fsf_sq_inval:");			debug_exception(new_fsf_req->adapter->erp_dbf, 0,					&new_fsf_req->qtcb->header.					fsf_status_qual.word[0], sizeof (u32));			break;		}		break;	case FSF_GOOD:		retval = 0;		new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ABORTSUCCEEDED;		break;	default:		ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "				"(debug info 0x%x)\n",				new_fsf_req->qtcb->header.fsf_status);		debug_text_event(new_fsf_req->adapter->erp_dbf, 0,				 "fsf_s_inval:");		debug_exception(new_fsf_req->adapter->erp_dbf, 0,				&new_fsf_req->qtcb->header.fsf_status,				sizeof (u32));		break;	} skip_fsfstatus:	return retval;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/65a8d4e1a3754f0bfaa62949ebe919930e3127a1/zfcp_fsf.c/clean/drivers/s390/scsi/zfcp_fsf.c