ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); 
zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req){	int retval = -EINVAL;	struct zfcp_port *port;	struct zfcp_unit *unit;	struct fsf_qtcb_header *header;	u16 subtable, rule, counter;	port = fsf_req->data.close_physical_port.port;	header = &fsf_req->qtcb->header;	if (fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR) {		/* don't change port status in our bookkeeping */		goto skip_fsfstatus;	}	/* evaluate FSF status in QTCB */	switch (header->fsf_status) {	case FSF_PORT_HANDLE_NOT_VALID:		ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");		ZFCP_LOG_INFO("Temporary port identifier 0x%x invalid"			      "(adapter %s, port 0x%016Lx). "			      "This may happen occasionally.\n",			      port->handle,			      zfcp_get_busid_by_port(port),			      port->wwpn);		ZFCP_LOG_DEBUG("status qualifier:\n");		ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,			      (char *) &header->fsf_status_qual,			      sizeof (union fsf_status_qual));		debug_text_event(fsf_req->adapter->erp_dbf, 1,				 "fsf_s_phand_nv");		zfcp_erp_adapter_reopen(port->adapter, 0);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;	case FSF_ACCESS_DENIED:		ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");		ZFCP_LOG_NORMAL("Access denied, cannot close "				"physical port 0x%016Lx on adapter %s\n",				port->wwpn, zfcp_get_busid_by_port(port));		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(fsf_req->adapter->erp_dbf, 1, "fsf_s_access");		zfcp_erp_port_access_denied(port);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;		break;	case FSF_PORT_BOXED:		ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");		ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter "			       "%s needs to be reopened but it was attempted "			       "to close it physically.\n",			       port->wwpn,			       zfcp_get_busid_by_port(port));		debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_pboxed");		zfcp_erp_port_reopen(port, 0);		fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |			ZFCP_STATUS_FSFREQ_RETRY;		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");			debug_text_event(fsf_req->adapter->erp_dbf, 1,					 "fsf_sq_ltest");			/* This will now be escalated by ERP */			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(fsf_req->adapter->erp_dbf, 1,					 "fsf_sq_ulp");			fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;			break;		default:			ZFCP_LOG_NORMAL			    ("bug: Wrong status qualifier 0x%x arrived.\n",			     header->fsf_status_qual.word[0]);			debug_text_event(fsf_req->adapter->erp_dbf, 0,					 "fsf_sq_inval:");			debug_exception(				fsf_req->adapter->erp_dbf, 0,				&header->fsf_status_qual.word[0], sizeof (u32));			break;		}		break;	case FSF_GOOD:		ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");		ZFCP_LOG_DEBUG("Remote port 0x%016Lx via adapter %s "			       "physically closed, port handle 0x%x\n",			       port->wwpn,			       zfcp_get_busid_by_port(port), port->handle);		/* can't use generic zfcp_erp_modify_port_status because		 * ZFCP_STATUS_COMMON_OPEN must not be reset for the port		 */		atomic_clear_mask(ZFCP_STATUS_PORT_PHYS_OPEN, &port->status);		list_for_each_entry(unit, &port->unit_list_head, list)		    atomic_clear_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status);		retval = 0;		break;	default:		ZFCP_LOG_NORMAL("bug: An unknown FSF Status was presented "				"(debug info 0x%x)\n",				header->fsf_status);		debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf_s_inval:");		debug_exception(fsf_req->adapter->erp_dbf, 0,				&header->fsf_status, sizeof (u32));		break;	} skip_fsfstatus:	atomic_clear_mask(ZFCP_STATUS_PORT_PHYS_CLOSING, &port->status);	return retval;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/6bc9dace767f1fffdf975b3398b3c4e37cd5ae18/zfcp_fsf.c/clean/drivers/s390/scsi/zfcp_fsf.c