ZFCP_LOG_FLAGS(2, "FSF_PORT_HANDLE_NOT_VALID\n"); 
zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req){	struct zfcp_port *port;	struct zfcp_adapter *adapter;	struct zfcp_send_ct *send_ct;	struct fsf_qtcb_header *header;	struct fsf_qtcb_bottom_support *bottom;	int retval = -EINVAL;	u16 subtable, rule, counter;	adapter = fsf_req->adapter;	send_ct = fsf_req->data.send_ct;	port = send_ct->port;	header = &fsf_req->qtcb->header;	bottom = &fsf_req->qtcb->bottom.support;	if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR)		goto skip_fsfstatus;	/* evaluate FSF status in QTCB */	switch (header->fsf_status) {        case FSF_GOOD:                ZFCP_LOG_FLAGS(2,"FSF_GOOD\n");                retval = 0;		break;        case FSF_SERVICE_CLASS_NOT_SUPPORTED:		ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n");		if (adapter->fc_service_class <= 3) {			ZFCP_LOG_INFO("error: adapter %s does not support fc "				      "class %d.\n",				      zfcp_get_busid_by_port(port),				      adapter->fc_service_class);		} else {			ZFCP_LOG_INFO("bug: The fibre channel class at the "				      "adapter %s is invalid. "				      "(debug info %d)\n",				      zfcp_get_busid_by_port(port),				      adapter->fc_service_class);		}		/* stop operation for this adapter */		debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup");		zfcp_erp_adapter_shutdown(adapter, 0);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;        case FSF_ADAPTER_STATUS_AVAILABLE:                ZFCP_LOG_FLAGS(2, "FSF_ADAPTER_STATUS_AVAILABLE\n");                switch (header->fsf_status_qual.word[0]){                case FSF_SQ_INVOKE_LINK_TEST_PROCEDURE:			ZFCP_LOG_FLAGS(2,"FSF_SQ_INVOKE_LINK_TEST_PROCEDURE\n");			/* reopening link to port */			debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ltest");			zfcp_test_link(port);			fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;			break;                case FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED:			ZFCP_LOG_FLAGS(2,"FSF_SQ_ULP_DEPENDENT_ERP_REQUIRED\n");			/* ERP strategy will escalate */			debug_text_event(adapter->erp_dbf, 1, "fsf_sq_ulp");			fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;			break;                default:			ZFCP_LOG_INFO("bug: Wrong status qualifier 0x%x "				      "arrived.\n",				      header->fsf_status_qual.word[0]);			break;                }                break;	case FSF_ACCESS_DENIED:		ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");		ZFCP_LOG_NORMAL("access denied, cannot send generic service "				"command (adapter %s, port d_id=0x%08x)\n",				zfcp_get_busid_by_port(port), port->d_id);		for (counter = 0; counter < 2; counter++) {			subtable = header->fsf_status_qual.halfword[counter * 2];			rule = header->fsf_status_qual.halfword[counter * 2 + 1];			switch (subtable) {			case FSF_SQ_CFDC_SUBTABLE_OS:			case FSF_SQ_CFDC_SUBTABLE_PORT_WWPN:			case FSF_SQ_CFDC_SUBTABLE_PORT_DID:			case FSF_SQ_CFDC_SUBTABLE_LUN:       				ZFCP_LOG_INFO("Access denied (%s rule %d)\n",					zfcp_act_subtable_type[subtable], rule);				break;			}		}		debug_text_event(adapter->erp_dbf, 1, "fsf_s_access");		zfcp_erp_port_access_denied(port);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;        case FSF_GENERIC_COMMAND_REJECTED:		ZFCP_LOG_FLAGS(2, "FSF_GENERIC_COMMAND_REJECTED\n");		ZFCP_LOG_INFO("generic service command rejected "			      "(adapter %s, port d_id=0x%08x)\n",			      zfcp_get_busid_by_port(port), port->d_id);		ZFCP_LOG_INFO("status qualifier:\n");		ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO,			      (char *) &header->fsf_status_qual,			      sizeof (union fsf_status_qual));		debug_text_event(adapter->erp_dbf, 1, "fsf_s_gcom_rej");		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;        case FSF_PORT_HANDLE_NOT_VALID:		ZFCP_LOG_FLAGS(2, "FSF_PORT_HANDLE_NOT_VALID\n");		ZFCP_LOG_DEBUG("Temporary port identifier 0x%x for port "			       "0x%016Lx on adapter %s invalid. This may "			       "happen occasionally.\n", port->handle,			       port->wwpn, zfcp_get_busid_by_port(port));		ZFCP_LOG_INFO("status qualifier:\n");		ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO,			      (char *) &header->fsf_status_qual,			      sizeof (union fsf_status_qual));		debug_text_event(adapter->erp_dbf, 1, "fsf_s_phandle_nv");		zfcp_erp_adapter_reopen(adapter, 0);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;        case FSF_PORT_BOXED:		ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");		ZFCP_LOG_INFO("port needs to be reopened "			      "(adapter %s, port d_id=0x%08x)\n",			      zfcp_get_busid_by_port(port), port->d_id);		debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed");		zfcp_erp_port_reopen(port, 0);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR		    | ZFCP_STATUS_FSFREQ_RETRY;		break;	/* following states should never occure, all cases avoided	   in zfcp_fsf_send_ct - but who knows ... */	case FSF_PAYLOAD_SIZE_MISMATCH:		ZFCP_LOG_FLAGS(2, "FSF_PAYLOAD_SIZE_MISMATCH\n");		ZFCP_LOG_INFO("payload size mismatch (adapter: %s, "			      "req_buf_length=%d, resp_buf_length=%d)\n",			      zfcp_get_busid_by_adapter(adapter),			      bottom->req_buf_length, bottom->resp_buf_length);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;	case FSF_REQUEST_SIZE_TOO_LARGE:		ZFCP_LOG_FLAGS(2, "FSF_REQUEST_SIZE_TOO_LARGE\n");		ZFCP_LOG_INFO("request size too large (adapter: %s, "			      "req_buf_length=%d)\n",			      zfcp_get_busid_by_adapter(adapter),			      bottom->req_buf_length);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;	case FSF_RESPONSE_SIZE_TOO_LARGE:		ZFCP_LOG_FLAGS(2, "FSF_RESPONSE_SIZE_TOO_LARGE\n");		ZFCP_LOG_INFO("response size too large (adapter: %s, "			      "resp_buf_length=%d)\n",			      zfcp_get_busid_by_adapter(adapter),			      bottom->resp_buf_length);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;	case FSF_SBAL_MISMATCH:		ZFCP_LOG_FLAGS(2, "FSF_SBAL_MISMATCH\n");		ZFCP_LOG_INFO("SBAL mismatch (adapter: %s, req_buf_length=%d, "			      "resp_buf_length=%d)\n",			      zfcp_get_busid_by_adapter(adapter),			      bottom->req_buf_length, bottom->resp_buf_length);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;       default:		ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "				"(debug info 0x%x)\n", header->fsf_status);		debug_text_event(adapter->erp_dbf, 0, "fsf_sq_inval:");		debug_exception(adapter->erp_dbf, 0,				&header->fsf_status_qual.word[0], sizeof (u32));		break;	}skip_fsfstatus:	send_ct->status = retval;	if (send_ct->handler != NULL)		send_ct->handler(send_ct->handler_data);	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6bc9dace767f1fffdf975b3398b3c4e37cd5ae18/zfcp_fsf.c/clean/drivers/s390/scsi/zfcp_fsf.c