Commit 57f8dc81 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] s390: zfcp log messages part 2

From: Martin Schwidefsky <schwidefsky@de.ibm.com>

zfcp host adapter log message cleanup part 2:
 - Shorten log output.
 - Increase log level for some messages.
 - Always print leading zeroes for wwpn and fcp-lun.
parent 12c845ae
...@@ -255,8 +255,7 @@ zfcp_fsf_req_complete(struct zfcp_fsf_req *fsf_req) ...@@ -255,8 +255,7 @@ zfcp_fsf_req_complete(struct zfcp_fsf_req *fsf_req)
/* cleanup request if requested by initiator */ /* cleanup request if requested by initiator */
if (likely(cleanup)) { if (likely(cleanup)) {
ZFCP_LOG_TRACE("removing FSF request 0x%lx\n", ZFCP_LOG_TRACE("removing FSF request %p\n", fsf_req);
(unsigned long) fsf_req);
/* /*
* lock must not be held here since it will be * lock must not be held here since it will be
* grabed by the called routine, too * grabed by the called routine, too
...@@ -264,8 +263,7 @@ zfcp_fsf_req_complete(struct zfcp_fsf_req *fsf_req) ...@@ -264,8 +263,7 @@ zfcp_fsf_req_complete(struct zfcp_fsf_req *fsf_req)
zfcp_fsf_req_cleanup(fsf_req); zfcp_fsf_req_cleanup(fsf_req);
} else { } else {
/* notify initiator waiting for the requests completion */ /* notify initiator waiting for the requests completion */
ZFCP_LOG_TRACE("waking initiator of FSF request 0x%lx\n", ZFCP_LOG_TRACE("waking initiator of FSF request %p\n",fsf_req);
(unsigned long) fsf_req);
/* /*
* FIXME: Race! We must not access fsf_req here as it might have been * FIXME: Race! We must not access fsf_req here as it might have been
* cleaned up already due to the set ZFCP_STATUS_FSFREQ_COMPLETED * cleaned up already due to the set ZFCP_STATUS_FSFREQ_COMPLETED
...@@ -302,7 +300,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) ...@@ -302,7 +300,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
int retval = 0; int retval = 0;
struct zfcp_adapter *adapter = fsf_req->adapter; struct zfcp_adapter *adapter = fsf_req->adapter;
ZFCP_LOG_DEBUG("QTCB is at 0x%lx\n", (unsigned long) fsf_req->qtcb); ZFCP_LOG_DEBUG("QTCB is at %p\n", fsf_req->qtcb);
if (fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED) { if (fsf_req->status & ZFCP_STATUS_FSFREQ_DISMISSED) {
ZFCP_LOG_DEBUG("fsf_req 0x%lx has been dismissed\n", ZFCP_LOG_DEBUG("fsf_req 0x%lx has been dismissed\n",
...@@ -357,18 +355,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) ...@@ -357,18 +355,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
case FSF_PROT_QTCB_VERSION_ERROR: case FSF_PROT_QTCB_VERSION_ERROR:
ZFCP_LOG_FLAGS(0, "FSF_PROT_QTCB_VERSION_ERROR\n"); ZFCP_LOG_FLAGS(0, "FSF_PROT_QTCB_VERSION_ERROR\n");
/* DEBUG */
ZFCP_LOG_NORMAL("fsf_req=0x%lx, qtcb=0x%lx (0x%lx, 0x%lx)\n",
(unsigned long) fsf_req,
(unsigned long) fsf_req->qtcb,
((unsigned long) fsf_req) & 0xFFFFFF00,
(unsigned
long) ((struct zfcp_fsf_req
*) (((unsigned long) fsf_req) &
0xFFFFFF00))->qtcb);
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
(char *) (((unsigned long) fsf_req) & 0xFFFFFF00),
sizeof (struct zfcp_fsf_req));
ZFCP_LOG_NORMAL("error: The adapter %s contains " ZFCP_LOG_NORMAL("error: The adapter %s contains "
"microcode of version 0x%x, the device driver " "microcode of version 0x%x, the device driver "
"only supports 0x%x. Aborting.\n", "only supports 0x%x. Aborting.\n",
...@@ -417,17 +403,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) ...@@ -417,17 +403,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
"that used on adapter %s. " "that used on adapter %s. "
"Stopping all operations on this adapter.\n", "Stopping all operations on this adapter.\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
ZFCP_LOG_NORMAL("fsf_req=0x%lx, qtcb=0x%lx (0x%lx, 0x%lx)\n",
(unsigned long) fsf_req,
(unsigned long) fsf_req->qtcb,
((unsigned long) fsf_req) & 0xFFFFFF00,
(unsigned long) (
(struct zfcp_fsf_req *) (
((unsigned long)
fsf_req) & 0xFFFFFF00))->qtcb);
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
(char *) (((unsigned long) fsf_req) & 0xFFFFFF00),
sizeof (struct zfcp_fsf_req));
debug_text_exception(adapter->erp_dbf, 0, "prot_unsup_qtcb"); debug_text_exception(adapter->erp_dbf, 0, "prot_unsup_qtcb");
zfcp_erp_adapter_shutdown(adapter, 0); zfcp_erp_adapter_shutdown(adapter, 0);
zfcp_cmd_dbf_event_fsf("unsqtcbt", fsf_req, zfcp_cmd_dbf_event_fsf("unsqtcbt", fsf_req,
...@@ -459,13 +434,13 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) ...@@ -459,13 +434,13 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
req_handle), req_handle),
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
} else { } else {
ZFCP_LOG_NORMAL("bug: The request identifier 0x%lx " ZFCP_LOG_NORMAL("bug: The request identifier %p "
"to the adapter %s is ambiguous. " "to the adapter %s is ambiguous. "
"Stopping all operations on this " "Stopping all operations on this "
"adapter. " "adapter. "
"(bug: got this for an unsolicited " "(bug: got this for an unsolicited "
"status read request)\n", "status read request)\n",
(unsigned long) fsf_req, fsf_req,
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
} }
debug_text_exception(adapter->erp_dbf, 0, "prot_dup_id"); debug_text_exception(adapter->erp_dbf, 0, "prot_dup_id");
...@@ -584,19 +559,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) ...@@ -584,19 +559,6 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
"(debug info 0x%x).\n", "(debug info 0x%x).\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
fsf_req->qtcb->prefix.prot_status); fsf_req->qtcb->prefix.prot_status);
ZFCP_LOG_NORMAL("fsf_req=0x%lx, qtcb=0x%lx (0x%lx, 0x%lx)\n",
(unsigned long) fsf_req,
(unsigned long) fsf_req->qtcb,
((unsigned long) fsf_req) & 0xFFFFFF00,
(unsigned
long) ((struct zfcp_fsf_req
*) (((unsigned long) fsf_req) &
0xFFFFFF00))->qtcb);
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
(char *) (((unsigned long) fsf_req) & 0xFFFFFF00),
sizeof (struct zfcp_fsf_req));
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, (char *) fsf_req->qtcb,
sizeof(struct fsf_qtcb));
debug_text_event(adapter->erp_dbf, 0, "prot_inval:"); debug_text_event(adapter->erp_dbf, 0, "prot_inval:");
debug_exception(adapter->erp_dbf, 0, debug_exception(adapter->erp_dbf, 0,
&fsf_req->qtcb->prefix.prot_status, &fsf_req->qtcb->prefix.prot_status,
...@@ -779,9 +741,7 @@ zfcp_fsf_req_dispatch(struct zfcp_fsf_req *fsf_req) ...@@ -779,9 +741,7 @@ zfcp_fsf_req_dispatch(struct zfcp_fsf_req *fsf_req)
int retval = 0; int retval = 0;
if (unlikely(fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR)) { if (unlikely(fsf_req->status & ZFCP_STATUS_FSFREQ_ERROR)) {
ZFCP_LOG_TRACE("fsf_req=0x%lx, QTCB=0x%lx\n", ZFCP_LOG_TRACE("fsf_req=%p, QTCB=%p\n", fsf_req, fsf_req->qtcb);
(unsigned long) fsf_req,
(unsigned long) (fsf_req->qtcb));
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_TRACE, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_TRACE,
(char *) fsf_req->qtcb, sizeof(struct fsf_qtcb)); (char *) fsf_req->qtcb, sizeof(struct fsf_qtcb));
} }
...@@ -852,10 +812,8 @@ zfcp_fsf_req_dispatch(struct zfcp_fsf_req *fsf_req) ...@@ -852,10 +812,8 @@ zfcp_fsf_req_dispatch(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(2, "FSF_QTCB_UNKNOWN\n"); ZFCP_LOG_FLAGS(2, "FSF_QTCB_UNKNOWN\n");
fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
ZFCP_LOG_NORMAL("bug: Command issued by the device driver is " ZFCP_LOG_NORMAL("bug: Command issued by the device driver is "
"not supported by the adapter %s " "not supported by the adapter %s\n",
"(debug info 0x%lx 0x%x).\n", zfcp_get_busid_by_adapter(fsf_req->adapter));
zfcp_get_busid_by_adapter(fsf_req->adapter),
(unsigned long) fsf_req, fsf_req->fsf_command);
if (fsf_req->fsf_command != fsf_req->qtcb->header.fsf_command) if (fsf_req->fsf_command != fsf_req->qtcb->header.fsf_command)
ZFCP_LOG_NORMAL ZFCP_LOG_NORMAL
("bug: Command issued by the device driver differs " ("bug: Command issued by the device driver differs "
...@@ -898,9 +856,8 @@ zfcp_fsf_status_read(struct zfcp_adapter *adapter, int req_flags) ...@@ -898,9 +856,8 @@ zfcp_fsf_status_read(struct zfcp_adapter *adapter, int req_flags)
adapter->pool.fsf_req_status_read, adapter->pool.fsf_req_status_read,
&lock_flags, &fsf_req); &lock_flags, &fsf_req);
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("error: Out of resources. Could not create an " ZFCP_LOG_INFO("error: Could not create unsolicited status "
"unsolicited status buffer for " "buffer for adapter %s.\n",
"the adapter %s.\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
goto failed_req_create; goto failed_req_create;
} }
...@@ -932,8 +889,7 @@ zfcp_fsf_status_read(struct zfcp_adapter *adapter, int req_flags) ...@@ -932,8 +889,7 @@ zfcp_fsf_status_read(struct zfcp_adapter *adapter, int req_flags)
goto failed_req_send; goto failed_req_send;
} }
ZFCP_LOG_TRACE("Status Read request initiated " ZFCP_LOG_TRACE("Status Read request initiated (adapter%s)\n",
"(adapter busid=%s)\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
debug_text_event(adapter->req_dbf, 1, "unso"); debug_text_event(adapter->req_dbf, 1, "unso");
goto out; goto out;
...@@ -967,9 +923,9 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req) ...@@ -967,9 +923,9 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req)
read_unlock_irqrestore(&zfcp_data.config_lock, flags); read_unlock_irqrestore(&zfcp_data.config_lock, flags);
if (!port || (port->d_id != (status_buffer->d_id & ZFCP_DID_MASK))) { if (!port || (port->d_id != (status_buffer->d_id & ZFCP_DID_MASK))) {
ZFCP_LOG_NORMAL("bug: Re-open port indication received for the " ZFCP_LOG_NORMAL("bug: Reopen port indication received for"
"non-existing port with DID 0x%3.3x, on " "nonexisting port with d_id 0x%08x on "
"the adapter %s. Ignored.\n", "adapter %s. Ignored.\n",
status_buffer->d_id & ZFCP_DID_MASK, status_buffer->d_id & ZFCP_DID_MASK,
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
goto out; goto out;
...@@ -994,9 +950,9 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req) ...@@ -994,9 +950,9 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req)
debug_exception(adapter->erp_dbf, 0, debug_exception(adapter->erp_dbf, 0,
&status_buffer->status_subtype, sizeof (u32)); &status_buffer->status_subtype, sizeof (u32));
ZFCP_LOG_NORMAL("bug: Undefined status subtype received " ZFCP_LOG_NORMAL("bug: Undefined status subtype received "
"for a re-open indication on the port with " "for a reopen indication on port with "
"DID 0x%3.3x, on the adapter " "d_id 0x%08x on the adapter %s. "
"%s. Ignored. (debug info 0x%x)\n", "Ignored. (debug info 0x%x)\n",
status_buffer->d_id, status_buffer->d_id,
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
status_buffer->status_subtype); status_buffer->status_subtype);
...@@ -1064,9 +1020,8 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1064,9 +1020,8 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
case FSF_STATUS_READ_LINK_UP: case FSF_STATUS_READ_LINK_UP:
ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_LINK_UP\n"); ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_LINK_UP\n");
debug_text_event(adapter->erp_dbf, 2, "unsol_link_up:"); debug_text_event(adapter->erp_dbf, 2, "unsol_link_up:");
ZFCP_LOG_INFO("The local link to the adapter %s " ZFCP_LOG_INFO("Local link to adapter %s was replugged. "
"was re-plugged. " "Restarting operations on this adapter\n",
"Re-starting operations on this adapter..\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
/* All ports should be marked as ready to run again */ /* All ports should be marked as ready to run again */
zfcp_erp_modify_adapter_status(adapter, zfcp_erp_modify_adapter_status(adapter,
...@@ -1081,8 +1036,7 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1081,8 +1036,7 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
case FSF_STATUS_READ_CFDC_UPDATED: case FSF_STATUS_READ_CFDC_UPDATED:
ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_CFDC_UPDATED\n"); ZFCP_LOG_FLAGS(1, "FSF_STATUS_READ_CFDC_UPDATED\n");
debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_update:"); debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_update:");
ZFCP_LOG_NORMAL( ZFCP_LOG_INFO("CFDC has been updated on the adapter %s\n",
"CFDC has been updated on the adapter %s\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
break; break;
...@@ -1091,20 +1045,16 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1091,20 +1045,16 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_harden:"); debug_text_event(adapter->erp_dbf, 2, "unsol_cfdc_harden:");
switch (status_buffer->status_subtype) { switch (status_buffer->status_subtype) {
case FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE: case FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE:
ZFCP_LOG_NORMAL( ZFCP_LOG_INFO("CFDC of adapter %s saved on SE\n",
"CFDC of the adapter %s "
"has been saved on the SE\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
break; break;
case FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE2: case FSF_STATUS_READ_SUB_CFDC_HARDENED_ON_SE2:
ZFCP_LOG_NORMAL( ZFCP_LOG_INFO("CFDC of adapter %s has been copied "
"CFDC of the adapter %s " "to the secondary SE\n",
"has been copied to the secondary SE\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
break; break;
default: default:
ZFCP_LOG_NORMAL( ZFCP_LOG_INFO("CFDC of adapter %s has been hardened\n",
"CFDC of the adapter %s has been hardened\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
} }
break; break;
...@@ -1114,11 +1064,10 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1114,11 +1064,10 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
debug_exception(adapter->erp_dbf, 0, debug_exception(adapter->erp_dbf, 0,
&status_buffer->status_type, sizeof (u32)); &status_buffer->status_type, sizeof (u32));
ZFCP_LOG_NORMAL("bug: An unsolicited status packet of unknown " ZFCP_LOG_NORMAL("bug: An unsolicited status packet of unknown "
"type was received by the zfcp-driver " "type was received (debug info 0x%x)\n",
"(debug info 0x%x)\n",
status_buffer->status_type); status_buffer->status_type);
ZFCP_LOG_DEBUG("Dump of status_read_buffer 0x%lx:\n", ZFCP_LOG_DEBUG("Dump of status_read_buffer %p:\n",
(unsigned long) status_buffer); status_buffer);
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
(char *) status_buffer, (char *) status_buffer,
sizeof (struct fsf_status_read_buffer)); sizeof (struct fsf_status_read_buffer));
...@@ -1142,17 +1091,15 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1142,17 +1091,15 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
*/ */
retval = zfcp_fsf_status_read(adapter, 0); retval = zfcp_fsf_status_read(adapter, 0);
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("Outbound queue busy. " ZFCP_LOG_INFO("Failed to create unsolicited status read "
"Could not create use an " "request for the adapter %s.\n",
"unsolicited status read request for "
"the adapter %s.\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
/* temporary fix to avoid status read buffer shortage */ /* temporary fix to avoid status read buffer shortage */
adapter->status_read_failed++; adapter->status_read_failed++;
if ((ZFCP_STATUS_READS_RECOM - adapter->status_read_failed) if ((ZFCP_STATUS_READS_RECOM - adapter->status_read_failed)
< ZFCP_STATUS_READ_FAILED_THRESHOLD) { < ZFCP_STATUS_READ_FAILED_THRESHOLD) {
ZFCP_LOG_INFO("restart adapter due to status read " ZFCP_LOG_INFO("restart adapter %s due to status read "
"buffer shortage (busid %s)\n", "buffer shortage\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
zfcp_erp_adapter_reopen(adapter, 0); zfcp_erp_adapter_reopen(adapter, 0);
} }
...@@ -1188,11 +1135,9 @@ zfcp_fsf_abort_fcp_command(unsigned long old_req_id, ...@@ -1188,11 +1135,9 @@ zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
req_flags, adapter->pool.fsf_req_abort, req_flags, adapter->pool.fsf_req_abort,
&lock_flags, &fsf_req); &lock_flags, &fsf_req);
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("error: Out of resources. Could not create an " ZFCP_LOG_INFO("error: Failed to create an abort command "
"abort command request on the device with " "request for lun 0x%016Lx on port 0x%016Lx "
"the FCP-LUN 0x%Lx connected to " "on adapter %s.\n",
"the port with WWPN 0x%Lx connected to "
"the adapter %s.\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
...@@ -1218,9 +1163,8 @@ zfcp_fsf_abort_fcp_command(unsigned long old_req_id, ...@@ -1218,9 +1163,8 @@ zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
retval = zfcp_fsf_req_send(fsf_req, NULL); retval = zfcp_fsf_req_send(fsf_req, NULL);
if (retval) { if (retval) {
del_timer(&adapter->scsi_er_timer); del_timer(&adapter->scsi_er_timer);
ZFCP_LOG_INFO("error: Could not send an abort command request " ZFCP_LOG_INFO("error: Failed to send abort command request "
"for a command on the adapter %s, " "on adapter %s, port 0x%016Lx, unit 0x%016Lx\n",
"port WWPN 0x%Lx and unit LUN 0x%Lx\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
unit->port->wwpn, unit->fcp_lun); unit->port->wwpn, unit->fcp_lun);
zfcp_fsf_req_free(fsf_req); zfcp_fsf_req_free(fsf_req);
...@@ -1229,10 +1173,10 @@ zfcp_fsf_abort_fcp_command(unsigned long old_req_id, ...@@ -1229,10 +1173,10 @@ zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
} }
ZFCP_LOG_DEBUG("Abort FCP Command request initiated " ZFCP_LOG_DEBUG("Abort FCP Command request initiated "
"(adapter busid=%s, port d_id=0x%x, " "(adapter%s, port d_id=0x%08x, "
"unit fcp_lun=0x%Lx, old_req_id=0x%lx)\n", "unit x%016Lx, old_req_id=0x%lx)\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
(unsigned int) unit->port->d_id, unit->port->d_id,
unit->fcp_lun, old_req_id); unit->fcp_lun, old_req_id);
out: out:
write_unlock_irqrestore(&adapter->request_queue.queue_lock, lock_flags); write_unlock_irqrestore(&adapter->request_queue.queue_lock, lock_flags);
...@@ -1276,10 +1220,9 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) ...@@ -1276,10 +1220,9 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
*/ */
} else { } else {
ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
ZFCP_LOG_INFO("Temporary port identifier (handle) 0x%x " ZFCP_LOG_INFO("Temporary port identifier 0x%x for "
"for the port with WWPN 0x%Lx connected " "port 0x%016Lx on adapter %s invalid. "
"to the adapter %s is not valid. This " "This may happen occasionally.\n",
"may happen occasionally.\n",
unit->port->handle, unit->port->handle,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
...@@ -1310,11 +1253,9 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) ...@@ -1310,11 +1253,9 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
} else { } else {
ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n");
ZFCP_LOG_INFO ZFCP_LOG_INFO
("Warning: Temporary LUN identifier (handle) 0x%x " ("Warning: Temporary LUN identifier 0x%x of LUN "
"of the logical unit with FCP-LUN 0x%Lx at " "0x%016Lx on port 0x%016Lx on adapter %s is "
"the remote port with WWPN 0x%Lx connected " "invalid. This may happen in rare cases. "
"to the adapter %s is "
"not valid. This may happen in rare cases."
"Trying to re-establish link.\n", "Trying to re-establish link.\n",
unit->handle, unit->handle,
unit->fcp_lun, unit->fcp_lun,
...@@ -1348,10 +1289,9 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) ...@@ -1348,10 +1289,9 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
case FSF_PORT_BOXED: case FSF_PORT_BOXED:
/* 2 */ /* 2 */
ZFCP_LOG_FLAGS(0, "FSF_PORT_BOXED\n"); ZFCP_LOG_FLAGS(0, "FSF_PORT_BOXED\n");
ZFCP_LOG_DEBUG("The remote port " ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to "
"with WWPN 0x%Lx on the adapter %s " "be reopened\n", unit->port->wwpn,
"needs to be reopened\n", zfcp_get_busid_by_unit(unit));
unit->port->wwpn, zfcp_get_busid_by_unit(unit));
debug_text_event(new_fsf_req->adapter->erp_dbf, 2, debug_text_event(new_fsf_req->adapter->erp_dbf, 2,
"fsf_s_pboxed"); "fsf_s_pboxed");
zfcp_erp_port_reopen(unit->port, 0); zfcp_erp_port_reopen(unit->port, 0);
...@@ -1465,8 +1405,8 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool, ...@@ -1465,8 +1405,8 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool,
ZFCP_WAIT_FOR_SBAL | ZFCP_REQ_AUTO_CLEANUP, ZFCP_WAIT_FOR_SBAL | ZFCP_REQ_AUTO_CLEANUP,
pool, &lock_flags, &fsf_req); pool, &lock_flags, &fsf_req);
if (ret < 0) { if (ret < 0) {
ZFCP_LOG_INFO("error: out of memory. Could not create CT " ZFCP_LOG_INFO("error: Could not create CT request (FC-GS) for "
"request (FC-GS). (adapter: %s)\n", "adapter: %s\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
goto failed_req; goto failed_req;
} }
...@@ -1495,9 +1435,8 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool, ...@@ -1495,9 +1435,8 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool,
ct->req, ct->req_count, ct->req, ct->req_count,
ZFCP_MAX_SBALS_PER_CT_REQ); ZFCP_MAX_SBALS_PER_CT_REQ);
if (bytes <= 0) { if (bytes <= 0) {
ZFCP_LOG_INFO("error: out of resources (outbuf). " ZFCP_LOG_INFO("error: creation of CT request failed "
"Could not create CT request (FC-GS). " "on adapter %s\n",
"(adapter: %s)\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
if (bytes == 0) if (bytes == 0)
ret = -ENOMEM; ret = -ENOMEM;
...@@ -1513,9 +1452,8 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool, ...@@ -1513,9 +1452,8 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool,
ct->resp, ct->resp_count, ct->resp, ct->resp_count,
ZFCP_MAX_SBALS_PER_CT_REQ); ZFCP_MAX_SBALS_PER_CT_REQ);
if (bytes <= 0) { if (bytes <= 0) {
ZFCP_LOG_INFO("error: out of resources (inbuf). " ZFCP_LOG_INFO("error: creation of CT request failed "
"Could not create a CT request (FC-GS). " "on adapter %s\n",
"(adapter: %s)\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
if (bytes == 0) if (bytes == 0)
ret = -ENOMEM; ret = -ENOMEM;
...@@ -1528,8 +1466,8 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool, ...@@ -1528,8 +1466,8 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool,
} else { } else {
/* reject send generic request */ /* reject send generic request */
ZFCP_LOG_INFO( ZFCP_LOG_INFO(
"error: microcode does not support chained SBALs." "error: microcode does not support chained SBALs,"
"CT request (FC-GS) too big. (adapter: %s)\n", "CT request too big (adapter %s)\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
goto failed_send; goto failed_send;
...@@ -1544,14 +1482,13 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool, ...@@ -1544,14 +1482,13 @@ zfcp_fsf_send_ct(struct zfcp_send_ct *ct, mempool_t *pool,
/* start QDIO request for this FSF request */ /* start QDIO request for this FSF request */
ret = zfcp_fsf_req_send(fsf_req, ct->timer); ret = zfcp_fsf_req_send(fsf_req, ct->timer);
if (ret) { if (ret) {
ZFCP_LOG_DEBUG("error: out of resources. Could not send CT " ZFCP_LOG_DEBUG("error: initiation of CT request failed "
"request (FC-GS). (adapter: %s, " "(adapter %s, port 0x%016Lx)\n",
"port WWPN 0x%Lx)\n",
zfcp_get_busid_by_adapter(adapter), port->wwpn); zfcp_get_busid_by_adapter(adapter), port->wwpn);
goto failed_send; goto failed_send;
} }
ZFCP_LOG_DEBUG("CT request initiated. (adapter: %s, port WWPN 0x%Lx)\n", ZFCP_LOG_DEBUG("CT request initiated (adapter %s, port 0x%016Lx)\n",
zfcp_get_busid_by_adapter(adapter), port->wwpn); zfcp_get_busid_by_adapter(adapter), port->wwpn);
goto out; goto out;
...@@ -1609,8 +1546,8 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1609,8 +1546,8 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
case FSF_SERVICE_CLASS_NOT_SUPPORTED : case FSF_SERVICE_CLASS_NOT_SUPPORTED :
ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n"); ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n");
if (adapter->fc_service_class <= 3) { if (adapter->fc_service_class <= 3) {
ZFCP_LOG_INFO("error: The adapter %s does " ZFCP_LOG_INFO("error: adapter %s does not support fc "
"not support fibre-channel class %d.\n", "class %d.\n",
zfcp_get_busid_by_port(port), zfcp_get_busid_by_port(port),
adapter->fc_service_class); adapter->fc_service_class);
} else { } else {
...@@ -1653,8 +1590,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1653,8 +1590,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
case FSF_ACCESS_DENIED: case FSF_ACCESS_DENIED:
ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
ZFCP_LOG_NORMAL("Access denied, cannot send generic command " ZFCP_LOG_NORMAL("Access denied, cannot send generic command "
"to a port with WWPN 0x%Lx connected " "to port 0x%016Lx on adapter %s\n", port->wwpn,
"to the adapter %s\n", port->wwpn,
zfcp_get_busid_by_port(port)); zfcp_get_busid_by_port(port));
for (counter = 0; counter < 2; counter++) { for (counter = 0; counter < 2; counter++) {
subtable = header->fsf_status_qual.halfword[counter * 2]; subtable = header->fsf_status_qual.halfword[counter * 2];
...@@ -1675,8 +1611,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1675,8 +1611,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
case FSF_GENERIC_COMMAND_REJECTED : case FSF_GENERIC_COMMAND_REJECTED :
ZFCP_LOG_FLAGS(2, "FSF_GENERIC_COMMAND_REJECTED\n"); ZFCP_LOG_FLAGS(2, "FSF_GENERIC_COMMAND_REJECTED\n");
ZFCP_LOG_INFO("warning: The port with WWPN 0x%Lx connected to " ZFCP_LOG_INFO("warning: The port 0x%016Lx on adapter %s has "
"the adapter %s has "
"rejected a generic services command.\n", "rejected a generic services command.\n",
port->wwpn, zfcp_get_busid_by_port(port)); port->wwpn, zfcp_get_busid_by_port(port));
ZFCP_LOG_INFO("status qualifier:\n"); ZFCP_LOG_INFO("status qualifier:\n");
...@@ -1689,11 +1624,9 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1689,11 +1624,9 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_HANDLE_NOT_VALID : case FSF_PORT_HANDLE_NOT_VALID :
ZFCP_LOG_FLAGS(2, "FSF_PORT_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(2, "FSF_PORT_HANDLE_NOT_VALID\n");
ZFCP_LOG_DEBUG("Temporary port identifier (handle) 0x%x " ZFCP_LOG_DEBUG("Temporary port identifier 0x%x for port "
"for the port with WWPN 0x%Lx connected to " "0x%016Lx on adapter %s invalid. This may "
"the adapter %s is " "happen occasionally.\n", port->handle,
"not valid. This may happen occasionally.\n",
port->handle,
port->wwpn, zfcp_get_busid_by_port(port)); port->wwpn, zfcp_get_busid_by_port(port));
ZFCP_LOG_INFO("status qualifier:\n"); ZFCP_LOG_INFO("status qualifier:\n");
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO,
...@@ -1706,8 +1639,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1706,8 +1639,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
case FSF_REQUEST_BUF_NOT_VALID : case FSF_REQUEST_BUF_NOT_VALID :
ZFCP_LOG_FLAGS(2, "FSF_REQUEST_BUF_NOT_VALID\n"); ZFCP_LOG_FLAGS(2, "FSF_REQUEST_BUF_NOT_VALID\n");
ZFCP_LOG_NORMAL("error: The port with WWPN 0x%Lx connected to " ZFCP_LOG_NORMAL("error: The port 0x%016Lx on adapter %s has "
"the adapter %s has "
"rejected a generic services command " "rejected a generic services command "
"due to invalid request buffer.\n", "due to invalid request buffer.\n",
port->wwpn, zfcp_get_busid_by_port(port)); port->wwpn, zfcp_get_busid_by_port(port));
...@@ -1717,8 +1649,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1717,8 +1649,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
case FSF_RESPONSE_BUF_NOT_VALID : case FSF_RESPONSE_BUF_NOT_VALID :
ZFCP_LOG_FLAGS(2, "FSF_RESPONSE_BUF_NOT_VALID\n"); ZFCP_LOG_FLAGS(2, "FSF_RESPONSE_BUF_NOT_VALID\n");
ZFCP_LOG_NORMAL("error: The port with WWPN 0x%Lx connected to " ZFCP_LOG_NORMAL("error: The port 0x%016Lx on adapter %s has "
"the adapter %s has "
"rejected a generic services command " "rejected a generic services command "
"due to invalid response buffer.\n", "due to invalid response buffer.\n",
port->wwpn, zfcp_get_busid_by_port(port)); port->wwpn, zfcp_get_busid_by_port(port));
...@@ -1728,8 +1659,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1728,8 +1659,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_BOXED : case FSF_PORT_BOXED :
ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
ZFCP_LOG_DEBUG("The remote port " ZFCP_LOG_INFO("The remote port 0x%016Lx on adapter %s "
"with WWPN 0x%Lx on the adapter %s "
"needs to be reopened\n", "needs to be reopened\n",
port->wwpn, zfcp_get_busid_by_port(port)); port->wwpn, zfcp_get_busid_by_port(port));
debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed");
...@@ -1778,8 +1708,8 @@ zfcp_fsf_send_els(struct zfcp_send_els *els) ...@@ -1778,8 +1708,8 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
ZFCP_WAIT_FOR_SBAL|ZFCP_REQ_AUTO_CLEANUP, ZFCP_WAIT_FOR_SBAL|ZFCP_REQ_AUTO_CLEANUP,
NULL, &lock_flags, &fsf_req); NULL, &lock_flags, &fsf_req);
if (ret < 0) { if (ret < 0) {
ZFCP_LOG_INFO("error: out of memory. Could not create ELS " ZFCP_LOG_INFO("error: creation of ELS request failed "
"request. (adapter: %s, port did: 0x%06x)\n", "(adapter %s, port d_id: 0x%08x)\n",
zfcp_get_busid_by_adapter(adapter), port->d_id); zfcp_get_busid_by_adapter(adapter), port->d_id);
goto failed_req; goto failed_req;
} }
...@@ -1803,9 +1733,8 @@ zfcp_fsf_send_els(struct zfcp_send_els *els) ...@@ -1803,9 +1733,8 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
els->req, els->req_count, els->req, els->req_count,
ZFCP_MAX_SBALS_PER_ELS_REQ); ZFCP_MAX_SBALS_PER_ELS_REQ);
if (bytes <= 0) { if (bytes <= 0) {
ZFCP_LOG_INFO("error: out of resources (outbuf). " ZFCP_LOG_INFO("error: creation of ELS request failed "
"Could not create ELS request. " "(adapter %s, port d_id: 0x%08x)\n",
"(adapter: %s, port did: 0x%06x)\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
port->d_id); port->d_id);
if (bytes == 0) { if (bytes == 0) {
...@@ -1822,9 +1751,8 @@ zfcp_fsf_send_els(struct zfcp_send_els *els) ...@@ -1822,9 +1751,8 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
els->resp, els->resp_count, els->resp, els->resp_count,
ZFCP_MAX_SBALS_PER_ELS_REQ); ZFCP_MAX_SBALS_PER_ELS_REQ);
if (bytes <= 0) { if (bytes <= 0) {
ZFCP_LOG_INFO("error: out of resources (inbuf). " ZFCP_LOG_INFO("error: creation of ELS request failed "
"Could not create ELS request. " "(adapter %s, port d_id: 0x%08x)\n",
"(adapter: %s, port did: 0x%06x)\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
port->d_id); port->d_id);
if (bytes == 0) { if (bytes == 0) {
...@@ -1837,9 +1765,9 @@ zfcp_fsf_send_els(struct zfcp_send_els *els) ...@@ -1837,9 +1765,9 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
fsf_req->qtcb->bottom.support.resp_buf_length = bytes; fsf_req->qtcb->bottom.support.resp_buf_length = bytes;
} else { } else {
/* reject request */ /* reject request */
ZFCP_LOG_INFO("error: microcode does not support chained SBALs." ZFCP_LOG_INFO("error: microcode does not support chained SBALs"
"ELS request too big. " ", ELS request too big (adapter %s, "
"(adapter: %s, port did: 0x%06x)\n", "port d_id: 0x%08x)\n",
zfcp_get_busid_by_adapter(adapter), port->d_id); zfcp_get_busid_by_adapter(adapter), port->d_id);
ret = -EOPNOTSUPP; ret = -EOPNOTSUPP;
goto failed_send; goto failed_send;
...@@ -1856,13 +1784,13 @@ zfcp_fsf_send_els(struct zfcp_send_els *els) ...@@ -1856,13 +1784,13 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
/* start QDIO request for this FSF request */ /* start QDIO request for this FSF request */
ret = zfcp_fsf_req_send(fsf_req, NULL); ret = zfcp_fsf_req_send(fsf_req, NULL);
if (ret) { if (ret) {
ZFCP_LOG_DEBUG("error: out of resources. Could not send ELS " ZFCP_LOG_DEBUG("error: initiation of ELS request failed "
"request. (adapter: %s, port WWPN 0x%Lx)\n", "(adapter %s, port 0x%016Lx)\n",
zfcp_get_busid_by_adapter(adapter), port->wwpn); zfcp_get_busid_by_adapter(adapter), port->wwpn);
goto failed_send; goto failed_send;
} }
ZFCP_LOG_DEBUG("ELS request initiated (adapter: %s, port WWPN 0x%Lx)\n", ZFCP_LOG_DEBUG("ELS request initiated (adapter %s, port 0x%016Lx)\n",
zfcp_get_busid_by_adapter(adapter), port->wwpn); zfcp_get_busid_by_adapter(adapter), port->wwpn);
goto out; goto out;
...@@ -1915,12 +1843,12 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1915,12 +1843,12 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
case FSF_SERVICE_CLASS_NOT_SUPPORTED: case FSF_SERVICE_CLASS_NOT_SUPPORTED:
ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n"); ZFCP_LOG_FLAGS(2, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n");
if (adapter->fc_service_class <= 3) { if (adapter->fc_service_class <= 3) {
ZFCP_LOG_INFO("error: The adapter %s does " ZFCP_LOG_INFO("error: adapter %s does "
"not support fibre-channel class %d.\n", "not support fibrechannel class %d.\n",
zfcp_get_busid_by_port(port), zfcp_get_busid_by_port(port),
adapter->fc_service_class); adapter->fc_service_class);
} else { } else {
ZFCP_LOG_INFO("bug: The fibre channel class at the " ZFCP_LOG_INFO("bug: The fibrechannel class at "
"adapter %s is invalid. " "adapter %s is invalid. "
"(debug info %d)\n", "(debug info %d)\n",
zfcp_get_busid_by_port(port), zfcp_get_busid_by_port(port),
...@@ -1964,9 +1892,8 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) ...@@ -1964,9 +1892,8 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
case FSF_ELS_COMMAND_REJECTED: case FSF_ELS_COMMAND_REJECTED:
ZFCP_LOG_FLAGS(2, "FSF_ELS_COMMAND_REJECTED\n"); ZFCP_LOG_FLAGS(2, "FSF_ELS_COMMAND_REJECTED\n");
ZFCP_LOG_INFO("The ELS command has been rejected because " ZFCP_LOG_INFO("ELS has been rejected because command filter "
"a command filter in the FCP channel prohibited " "prohibited sending "
"sending of the ELS to the SAN "
"(adapter: %s, wwpn=0x%016Lx)\n", "(adapter: %s, wwpn=0x%016Lx)\n",
zfcp_get_busid_by_port(port), port->wwpn); zfcp_get_busid_by_port(port), port->wwpn);
...@@ -2084,9 +2011,8 @@ zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) ...@@ -2084,9 +2011,8 @@ zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action)
erp_action->adapter->pool.fsf_req_erp, erp_action->adapter->pool.fsf_req_erp,
&lock_flags, &(erp_action->fsf_req)); &lock_flags, &(erp_action->fsf_req));
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("error: Out of resources. Could not create an " ZFCP_LOG_INFO("error: Could not create exchange configuration "
"exchange configuration data request for" "data request for adapter %s.\n",
"the adapter %s.\n",
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
goto out; goto out;
} }
...@@ -2098,14 +2024,13 @@ zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) ...@@ -2098,14 +2024,13 @@ zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action)
erp_action->fsf_req->erp_action = erp_action; erp_action->fsf_req->erp_action = erp_action;
erp_action->fsf_req->qtcb->bottom.config.feature_selection = erp_action->fsf_req->qtcb->bottom.config.feature_selection =
FSF_FEATURE_CFDC | FSF_FEATURE_CFDC;
FSF_FEATURE_LOST_SAN_NOTIFICATION;
/* start QDIO request for this FSF request */ /* start QDIO request for this FSF request */
retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer); retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer);
if (retval) { if (retval) {
ZFCP_LOG_INFO ZFCP_LOG_INFO
("error: Could not send an exchange configuration data " ("error: Could not send exchange configuration data "
"command on the adapter %s\n", "command on the adapter %s\n",
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
zfcp_fsf_req_free(erp_action->fsf_req); zfcp_fsf_req_free(erp_action->fsf_req);
...@@ -2113,8 +2038,8 @@ zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) ...@@ -2113,8 +2038,8 @@ zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action)
goto out; goto out;
} }
ZFCP_LOG_DEBUG("Exchange Configuration Data request initiated " ZFCP_LOG_DEBUG("exchange configuration data request initiated "
"(adapter busid=%s)\n", "(adapter %s)\n",
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
out: out:
...@@ -2228,10 +2153,9 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2228,10 +2153,9 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
switch (adapter->fc_topology) { switch (adapter->fc_topology) {
case FSF_TOPO_P2P: case FSF_TOPO_P2P:
ZFCP_LOG_FLAGS(1, "FSF_TOPO_P2P\n"); ZFCP_LOG_FLAGS(1, "FSF_TOPO_P2P\n");
ZFCP_LOG_NORMAL("error: Point-to-point fibre-channel " ZFCP_LOG_NORMAL("error: Point-to-point fibrechannel "
"configuration detected " "configuration detected at adapter %s "
"at the adapter %s, not " "unsupported, shutting down adapter\n",
"supported, shutting down adapter\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
debug_text_event(fsf_req->adapter->erp_dbf, 0, debug_text_event(fsf_req->adapter->erp_dbf, 0,
"top-p-to-p"); "top-p-to-p");
...@@ -2239,10 +2163,9 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2239,10 +2163,9 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
return -EIO; return -EIO;
case FSF_TOPO_AL: case FSF_TOPO_AL:
ZFCP_LOG_FLAGS(1, "FSF_TOPO_AL\n"); ZFCP_LOG_FLAGS(1, "FSF_TOPO_AL\n");
ZFCP_LOG_NORMAL("error: Arbitrated loop fibre-channel " ZFCP_LOG_NORMAL("error: Arbitrated loop fibrechannel "
"topology detected " "topology detected at adapter %s "
"at the adapter %s, not " "unsupported, shutting down adapter\n",
"supported, shutting down adapter\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
debug_text_event(fsf_req->adapter->erp_dbf, 0, debug_text_event(fsf_req->adapter->erp_dbf, 0,
"top-al"); "top-al");
...@@ -2250,13 +2173,12 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2250,13 +2173,12 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
return -EIO; return -EIO;
case FSF_TOPO_FABRIC: case FSF_TOPO_FABRIC:
ZFCP_LOG_FLAGS(1, "FSF_TOPO_FABRIC\n"); ZFCP_LOG_FLAGS(1, "FSF_TOPO_FABRIC\n");
ZFCP_LOG_INFO("Switched fabric fibre-channel " ZFCP_LOG_INFO("Switched fabric fibrechannel "
"network detected " "network detected at adapter %s.\n",
"at the adapter %s.\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
break; break;
default: default:
ZFCP_LOG_NORMAL("bug: The fibre-channel topology " ZFCP_LOG_NORMAL("bug: The fibrechannel topology "
"reported by the exchange " "reported by the exchange "
"configuration command for " "configuration command for "
"the adapter %s is not " "the adapter %s is not "
...@@ -2332,10 +2254,8 @@ zfcp_fsf_open_port(struct zfcp_erp_action *erp_action) ...@@ -2332,10 +2254,8 @@ zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
erp_action->adapter->pool.fsf_req_erp, erp_action->adapter->pool.fsf_req_erp,
&lock_flags, &(erp_action->fsf_req)); &lock_flags, &(erp_action->fsf_req));
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("error: Out of resources. Could not create an " ZFCP_LOG_INFO("error: Could not create open port request "
"open port request for " "for port 0x%016Lx on adapter %s.\n",
"the port with WWPN 0x%Lx connected to "
"the adapter %s.\n",
erp_action->port->wwpn, erp_action->port->wwpn,
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
goto out; goto out;
...@@ -2354,10 +2274,8 @@ zfcp_fsf_open_port(struct zfcp_erp_action *erp_action) ...@@ -2354,10 +2274,8 @@ zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
/* start QDIO request for this FSF request */ /* start QDIO request for this FSF request */
retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer); retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer);
if (retval) { if (retval) {
ZFCP_LOG_INFO("error: Could not send an " ZFCP_LOG_INFO("error: Could not send open port request for "
"open port request for " "port 0x%016Lx on adapter %s.\n",
"the port with WWPN 0x%Lx connected to "
"the adapter %s.\n",
erp_action->port->wwpn, erp_action->port->wwpn,
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
zfcp_fsf_req_free(erp_action->fsf_req); zfcp_fsf_req_free(erp_action->fsf_req);
...@@ -2365,8 +2283,8 @@ zfcp_fsf_open_port(struct zfcp_erp_action *erp_action) ...@@ -2365,8 +2283,8 @@ zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
goto out; goto out;
} }
ZFCP_LOG_DEBUG("Open Port request initiated " ZFCP_LOG_DEBUG("open port request initiated "
"(adapter busid=%s, port wwpn=0x%Lx)\n", "(adapter %s, port 0x%016Lx)\n",
zfcp_get_busid_by_adapter(erp_action->adapter), zfcp_get_busid_by_adapter(erp_action->adapter),
erp_action->port->wwpn); erp_action->port->wwpn);
out: out:
...@@ -2404,8 +2322,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2404,8 +2322,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_ALREADY_OPEN: case FSF_PORT_ALREADY_OPEN:
ZFCP_LOG_FLAGS(0, "FSF_PORT_ALREADY_OPEN\n"); ZFCP_LOG_FLAGS(0, "FSF_PORT_ALREADY_OPEN\n");
ZFCP_LOG_NORMAL("bug: The remote port with WWPN=0x%Lx " ZFCP_LOG_NORMAL("bug: remote port 0x%016Lx on adapter %s "
"connected to the adapter %s "
"is already open.\n", "is already open.\n",
port->wwpn, zfcp_get_busid_by_port(port)); port->wwpn, zfcp_get_busid_by_port(port));
debug_text_exception(fsf_req->adapter->erp_dbf, 0, debug_text_exception(fsf_req->adapter->erp_dbf, 0,
...@@ -2418,8 +2335,8 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2418,8 +2335,8 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
case FSF_ACCESS_DENIED: case FSF_ACCESS_DENIED:
ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
ZFCP_LOG_NORMAL("Access denied, cannot open port " ZFCP_LOG_NORMAL("Access denied, cannot open port 0x%016Lx "
"with WWPN 0x%Lx connected to the adapter %s\n", "on adapter %s\n",
port->wwpn, zfcp_get_busid_by_port(port)); port->wwpn, zfcp_get_busid_by_port(port));
for (counter = 0; counter < 2; counter++) { for (counter = 0; counter < 2; counter++) {
subtable = header->fsf_status_qual.halfword[counter * 2]; subtable = header->fsf_status_qual.halfword[counter * 2];
...@@ -2442,8 +2359,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2442,8 +2359,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED: case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED:
ZFCP_LOG_FLAGS(1, "FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED\n"); ZFCP_LOG_FLAGS(1, "FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED\n");
ZFCP_LOG_INFO("error: The FSF adapter is out of resources. " ZFCP_LOG_INFO("error: The FSF adapter is out of resources. "
"The remote port with WWPN=0x%Lx " "The remote port 0x%016Lx on adapter %s "
"connected to the adapter %s "
"could not be opened. Disabling it.\n", "could not be opened. Disabling it.\n",
port->wwpn, zfcp_get_busid_by_port(port)); port->wwpn, zfcp_get_busid_by_port(port));
debug_text_event(fsf_req->adapter->erp_dbf, 1, debug_text_event(fsf_req->adapter->erp_dbf, 1,
...@@ -2471,9 +2387,9 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2471,9 +2387,9 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
break; break;
case FSF_SQ_NO_RETRY_POSSIBLE: case FSF_SQ_NO_RETRY_POSSIBLE:
ZFCP_LOG_FLAGS(0, "FSF_SQ_NO_RETRY_POSSIBLE\n"); ZFCP_LOG_FLAGS(0, "FSF_SQ_NO_RETRY_POSSIBLE\n");
ZFCP_LOG_NORMAL("The remote port with WWPN=0x%Lx " ZFCP_LOG_NORMAL("The remote port 0x%016Lx on "
"connected to the adapter %s " "adapter %s could not be opened. "
"could not be opened. Disabling it.\n", "Disabling it.\n",
port->wwpn, port->wwpn,
zfcp_get_busid_by_port(port)); zfcp_get_busid_by_port(port));
debug_text_exception(fsf_req->adapter->erp_dbf, 0, debug_text_exception(fsf_req->adapter->erp_dbf, 0,
...@@ -2499,11 +2415,9 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2499,11 +2415,9 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
/* save port handle assigned by FSF */ /* save port handle assigned by FSF */
port->handle = header->port_handle; port->handle = header->port_handle;
ZFCP_LOG_INFO("The remote port (WWPN=0x%Lx) via adapter " ZFCP_LOG_INFO("The remote port 0x%016Lx via adapter %s "
"(busid=%s) was opened, it's " "was opened, it's port handle is 0x%x\n",
"port handle is 0x%x\n", port->wwpn, zfcp_get_busid_by_port(port),
port->wwpn,
zfcp_get_busid_by_port(port),
port->handle); port->handle);
/* mark port as open */ /* mark port as open */
atomic_set_mask(ZFCP_STATUS_COMMON_OPEN | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN |
...@@ -2539,9 +2453,9 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2539,9 +2453,9 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req)
/* skip sanity check and assume wwpn is ok */ /* skip sanity check and assume wwpn is ok */
} else { } else {
if (plogi->serv_param.wwpn != port->wwpn) { if (plogi->serv_param.wwpn != port->wwpn) {
ZFCP_LOG_INFO("warning: D_ID of port " ZFCP_LOG_INFO("warning: d_id of port "
"with WWPN 0x%Lx changed " "0x%016Lx changed during "
"during open\n", port->wwpn); "open\n", port->wwpn);
debug_text_event( debug_text_event(
fsf_req->adapter->erp_dbf, 0, fsf_req->adapter->erp_dbf, 0,
"fsf_s_did_change:"); "fsf_s_did_change:");
...@@ -2591,9 +2505,8 @@ zfcp_fsf_close_port(struct zfcp_erp_action *erp_action) ...@@ -2591,9 +2505,8 @@ zfcp_fsf_close_port(struct zfcp_erp_action *erp_action)
erp_action->adapter->pool.fsf_req_erp, erp_action->adapter->pool.fsf_req_erp,
&lock_flags, &(erp_action->fsf_req)); &lock_flags, &(erp_action->fsf_req));
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("error: Out of resources. Could not create a " ZFCP_LOG_INFO("error: Could not create a close port request "
"close port request for WWPN 0x%Lx connected to " "for port 0x%016Lx on adapter %s.\n",
"the adapter %s.\n",
erp_action->port->wwpn, erp_action->port->wwpn,
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
goto out; goto out;
...@@ -2613,9 +2526,8 @@ zfcp_fsf_close_port(struct zfcp_erp_action *erp_action) ...@@ -2613,9 +2526,8 @@ zfcp_fsf_close_port(struct zfcp_erp_action *erp_action)
/* start QDIO request for this FSF request */ /* start QDIO request for this FSF request */
retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer); retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer);
if (retval) { if (retval) {
ZFCP_LOG_INFO("error: Could not send a " ZFCP_LOG_INFO("error: Could not send a close port request for "
"close port request for WWPN 0x%Lx connected to " "port 0x%016Lx on adapter %s.\n",
"the adapter %s.\n",
erp_action->port->wwpn, erp_action->port->wwpn,
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
zfcp_fsf_req_free(erp_action->fsf_req); zfcp_fsf_req_free(erp_action->fsf_req);
...@@ -2623,8 +2535,8 @@ zfcp_fsf_close_port(struct zfcp_erp_action *erp_action) ...@@ -2623,8 +2535,8 @@ zfcp_fsf_close_port(struct zfcp_erp_action *erp_action)
goto out; goto out;
} }
ZFCP_LOG_TRACE("Close Port request initiated " ZFCP_LOG_TRACE("close port request initiated "
"(adapter busid=%s, port wwpn=0x%Lx)\n", "(adapter %s, port 0x%016Lx)\n",
zfcp_get_busid_by_adapter(erp_action->adapter), zfcp_get_busid_by_adapter(erp_action->adapter),
erp_action->port->wwpn); erp_action->port->wwpn);
out: out:
...@@ -2658,11 +2570,9 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2658,11 +2570,9 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_HANDLE_NOT_VALID: case FSF_PORT_HANDLE_NOT_VALID:
ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
ZFCP_LOG_INFO("Temporary port identifier (handle) 0x%x " ZFCP_LOG_INFO("Temporary port identifier 0x%x for port "
"for the port with WWPN 0x%Lx connected to " "0x%016Lx on adapter %s invalid. This may happen "
"the adapter %s is " "occasionally.\n", port->handle,
"not valid. This may happen occasionally.\n",
port->handle,
port->wwpn, zfcp_get_busid_by_port(port)); port->wwpn, zfcp_get_busid_by_port(port));
ZFCP_LOG_DEBUG("status qualifier:\n"); ZFCP_LOG_DEBUG("status qualifier:\n");
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
...@@ -2684,11 +2594,9 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2684,11 +2594,9 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
case FSF_GOOD: case FSF_GOOD:
ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
ZFCP_LOG_TRACE("remote port (WWPN=0x%Lx) via adapter " ZFCP_LOG_TRACE("remote port 0x016%Lx on adapter %s closed, "
"(busid=%s) closed, port handle 0x%x\n", "port handle 0x%x\n", port->wwpn,
port->wwpn, zfcp_get_busid_by_port(port), port->handle);
zfcp_get_busid_by_port(port),
port->handle);
zfcp_erp_modify_port_status(port, zfcp_erp_modify_port_status(port,
ZFCP_STATUS_COMMON_OPEN, ZFCP_STATUS_COMMON_OPEN,
ZFCP_CLEAR); ZFCP_CLEAR);
...@@ -2732,12 +2640,11 @@ zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action) ...@@ -2732,12 +2640,11 @@ zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action)
erp_action->adapter->pool.fsf_req_erp, erp_action->adapter->pool.fsf_req_erp,
&lock_flags, &erp_action->fsf_req); &lock_flags, &erp_action->fsf_req);
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("error: Out of resources. Could not create a " ZFCP_LOG_INFO("error: Could not create close physical port "
"close physical port request for " "request (adapter %s, port 0x%016Lx)\n",
"the port with WWPN 0x%Lx connected to " zfcp_get_busid_by_adapter(erp_action->adapter),
"the adapter %s.\n", erp_action->port->wwpn);
erp_action->port->wwpn,
zfcp_get_busid_by_adapter(erp_action->adapter));
goto out; goto out;
} }
...@@ -2754,18 +2661,17 @@ zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action) ...@@ -2754,18 +2661,17 @@ zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action)
/* start QDIO request for this FSF request */ /* start QDIO request for this FSF request */
retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer); retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer);
if (retval) { if (retval) {
ZFCP_LOG_INFO("error: Could not send an close physical port " ZFCP_LOG_INFO("error: Could not send close physical port "
"request for the port with WWPN 0x%Lx connected " "request (adapter %s, port 0x%016Lx)\n",
"to the adapter %s.\n", zfcp_get_busid_by_adapter(erp_action->adapter),
erp_action->port->wwpn, erp_action->port->wwpn);
zfcp_get_busid_by_adapter(erp_action->adapter));
zfcp_fsf_req_free(erp_action->fsf_req); zfcp_fsf_req_free(erp_action->fsf_req);
erp_action->fsf_req = NULL; erp_action->fsf_req = NULL;
goto out; goto out;
} }
ZFCP_LOG_TRACE("Close Physical Port request initiated " ZFCP_LOG_TRACE("close physical port request initiated "
"(adapter busid=%s, port wwpn=0x%Lx)\n", "(adapter %s, port 0x%016Lx)\n",
zfcp_get_busid_by_adapter(erp_action->adapter), zfcp_get_busid_by_adapter(erp_action->adapter),
erp_action->port->wwpn); erp_action->port->wwpn);
out: out:
...@@ -2803,13 +2709,12 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2803,13 +2709,12 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_HANDLE_NOT_VALID: case FSF_PORT_HANDLE_NOT_VALID:
ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
ZFCP_LOG_INFO("Temporary port identifier (handle) 0x%x " ZFCP_LOG_INFO("Temporary port identifier 0x%x invalid"
"for the port with WWPN 0x%Lx connected to " "(adapter %s, port 0x%016Lx). "
"the adapter %s is not valid. This may happen " "This may happen occasionally.\n",
"occasionally.\n",
port->handle, port->handle,
port->wwpn, zfcp_get_busid_by_port(port),
zfcp_get_busid_by_port(port)); port->wwpn);
ZFCP_LOG_DEBUG("status qualifier:\n"); ZFCP_LOG_DEBUG("status qualifier:\n");
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
(char *) &header->fsf_status_qual, (char *) &header->fsf_status_qual,
...@@ -2823,8 +2728,8 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2823,8 +2728,8 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
case FSF_ACCESS_DENIED: case FSF_ACCESS_DENIED:
ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
ZFCP_LOG_NORMAL("Access denied, cannot close " ZFCP_LOG_NORMAL("Access denied, cannot close "
"physical port with WWPN 0x%Lx connected to " "physical port 0x%016Lx on "
"the adapter %s\n", port->wwpn, "adapter %s\n", port->wwpn,
zfcp_get_busid_by_port(port)); zfcp_get_busid_by_port(port));
for (counter = 0; counter < 2; counter++) { for (counter = 0; counter < 2; counter++) {
subtable = header->fsf_status_qual.halfword[counter * 2]; subtable = header->fsf_status_qual.halfword[counter * 2];
...@@ -2845,7 +2750,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2845,7 +2750,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_BOXED: case FSF_PORT_BOXED:
ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
ZFCP_LOG_DEBUG("The remote port with WWPN 0x%Lx on the adapter " ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter "
"%s needs to be reopened but it was attempted " "%s needs to be reopened but it was attempted "
"to close it physically.\n", "to close it physically.\n",
port->wwpn, port->wwpn,
...@@ -2890,9 +2795,8 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) ...@@ -2890,9 +2795,8 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
case FSF_GOOD: case FSF_GOOD:
ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
ZFCP_LOG_DEBUG("Remote port (WWPN=0x%Lx) via adapter " ZFCP_LOG_DEBUG("Remote port 0x%016Lx via adapter %s "
"(busid=%s) physically closed, " "physically closed, port handle 0x%x\n",
"port handle 0x%x\n",
port->wwpn, port->wwpn,
zfcp_get_busid_by_port(port), port->handle); zfcp_get_busid_by_port(port), port->handle);
/* can't use generic zfcp_erp_modify_port_status because /* can't use generic zfcp_erp_modify_port_status because
...@@ -2945,10 +2849,8 @@ zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action) ...@@ -2945,10 +2849,8 @@ zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
erp_action->adapter->pool.fsf_req_erp, erp_action->adapter->pool.fsf_req_erp,
&lock_flags, &(erp_action->fsf_req)); &lock_flags, &(erp_action->fsf_req));
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("error: Out of resources. Could not create an " ZFCP_LOG_INFO("error: Could not create open unit request for "
"open unit request for FCP-LUN 0x%Lx connected " "unit 0x%016Lx on port 0x%016Lx on adapter %s.\n",
"to the port with WWPN 0x%Lx connected to "
"the adapter %s.\n",
erp_action->unit->fcp_lun, erp_action->unit->fcp_lun,
erp_action->unit->port->wwpn, erp_action->unit->port->wwpn,
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
...@@ -2967,15 +2869,13 @@ zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action) ...@@ -2967,15 +2869,13 @@ zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
atomic_set_mask(ZFCP_STATUS_COMMON_OPENING, &erp_action->unit->status); atomic_set_mask(ZFCP_STATUS_COMMON_OPENING, &erp_action->unit->status);
erp_action->fsf_req->data.open_unit.unit = erp_action->unit; erp_action->fsf_req->data.open_unit.unit = erp_action->unit;
erp_action->fsf_req->erp_action = erp_action; erp_action->fsf_req->erp_action = erp_action;
// erp_action->fsf_req->qtcb->bottom.support.option =
// FSF_OPEN_LUN_UNSOLICITED_SENSE_DATA;
/* start QDIO request for this FSF request */ /* start QDIO request for this FSF request */
retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer); retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer);
if (retval) { if (retval) {
ZFCP_LOG_INFO("error: Could not send an open unit request " ZFCP_LOG_INFO("error: Could not send an open unit request "
"on the adapter %s, port WWPN 0x%Lx for " "on the adapter %s, port 0x%016Lx for "
"unit LUN 0x%Lx\n", "unit 0x%016Lx\n",
zfcp_get_busid_by_adapter(erp_action->adapter), zfcp_get_busid_by_adapter(erp_action->adapter),
erp_action->port->wwpn, erp_action->port->wwpn,
erp_action->unit->fcp_lun); erp_action->unit->fcp_lun);
...@@ -2984,8 +2884,8 @@ zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action) ...@@ -2984,8 +2884,8 @@ zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
goto out; goto out;
} }
ZFCP_LOG_TRACE("Open LUN request initiated (adapter busid=%s, " ZFCP_LOG_TRACE("Open LUN request initiated (adapter %s, "
"port wwpn=0x%Lx, unit fcp_lun=0x%Lx)\n", "port 0x%016Lx, unit 0x%016Lx)\n",
zfcp_get_busid_by_adapter(erp_action->adapter), zfcp_get_busid_by_adapter(erp_action->adapter),
erp_action->port->wwpn, erp_action->unit->fcp_lun); erp_action->port->wwpn, erp_action->unit->fcp_lun);
out: out:
...@@ -3026,10 +2926,9 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3026,10 +2926,9 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_HANDLE_NOT_VALID: case FSF_PORT_HANDLE_NOT_VALID:
ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
ZFCP_LOG_INFO("Temporary port identifier (handle) 0x%x " ZFCP_LOG_INFO("Temporary port identifier 0x%x "
"for the port with WWPN 0x%Lx connected to " "for port 0x%016Lx on adapter %s invalid "
"the adapter %s is " "This may happen occasionally\n",
"not valid. This may happen occasionally.\n",
unit->port->handle, unit->port->handle,
unit->port->wwpn, zfcp_get_busid_by_unit(unit)); unit->port->wwpn, zfcp_get_busid_by_unit(unit));
ZFCP_LOG_DEBUG("status qualifier:\n"); ZFCP_LOG_DEBUG("status qualifier:\n");
...@@ -3043,10 +2942,8 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3043,10 +2942,8 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
case FSF_LUN_ALREADY_OPEN: case FSF_LUN_ALREADY_OPEN:
ZFCP_LOG_FLAGS(0, "FSF_LUN_ALREADY_OPEN\n"); ZFCP_LOG_FLAGS(0, "FSF_LUN_ALREADY_OPEN\n");
ZFCP_LOG_NORMAL("bug: Attempted to open the logical unit " ZFCP_LOG_NORMAL("bug: Attempted to open unit 0x%016Lx on "
"with FCP-LUN 0x%Lx at " "remote port 0x%016Lx on adapter %s twice.\n",
"the remote port with WWPN 0x%Lx connected "
"to the adapter %s twice.\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, zfcp_get_busid_by_unit(unit)); unit->port->wwpn, zfcp_get_busid_by_unit(unit));
debug_text_exception(adapter->erp_dbf, 0, debug_text_exception(adapter->erp_dbf, 0,
...@@ -3056,9 +2953,8 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3056,9 +2953,8 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
case FSF_ACCESS_DENIED: case FSF_ACCESS_DENIED:
ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
ZFCP_LOG_NORMAL("Access denied, cannot open unit " ZFCP_LOG_NORMAL("Access denied, cannot open unit 0x%016Lx on "
"with FCP-LUN 0x%Lx at the remote port with " "remote port 0x%016Lx on adapter %s\n",
"WWPN 0x%Lx connected to the adapter %s\n",
unit->fcp_lun, unit->port->wwpn, unit->fcp_lun, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
for (counter = 0; counter < 2; counter++) { for (counter = 0; counter < 2; counter++) {
...@@ -3081,8 +2977,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3081,8 +2977,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_BOXED: case FSF_PORT_BOXED:
ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
ZFCP_LOG_DEBUG("The remote port " ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
"with WWPN 0x%Lx on the adapter %s "
"needs to be reopened\n", "needs to be reopened\n",
unit->port->wwpn, zfcp_get_busid_by_unit(unit)); unit->port->wwpn, zfcp_get_busid_by_unit(unit));
debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed");
...@@ -3093,16 +2988,18 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3093,16 +2988,18 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
case FSF_LUN_SHARING_VIOLATION : case FSF_LUN_SHARING_VIOLATION :
ZFCP_LOG_FLAGS(2, "FSF_LUN_SHARING_VIOLATION\n"); ZFCP_LOG_FLAGS(2, "FSF_LUN_SHARING_VIOLATION\n");
subtable = header->fsf_status_qual.halfword[4]; if (header->fsf_status_qual.word[0] != 0) {
rule = header->fsf_status_qual.halfword[5];
if (rule == 0xFFFF) {
ZFCP_LOG_NORMAL("FCP-LUN 0x%Lx at the remote port " ZFCP_LOG_NORMAL("FCP-LUN 0x%Lx at the remote port "
"with WWPN 0x%Lx connected to the " "with WWPN 0x%Lx "
"adapter %s is already in use\n", "connected to the adapter %s "
"is already in use in LPAR%d\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit),
header->fsf_status_qual.fsf_queue_designator.hla);
} else { } else {
subtable = header->fsf_status_qual.halfword[4];
rule = header->fsf_status_qual.halfword[5];
switch (subtable) { switch (subtable) {
case FSF_SQ_CFDC_SUBTABLE_OS: case FSF_SQ_CFDC_SUBTABLE_OS:
case FSF_SQ_CFDC_SUBTABLE_PORT_WWPN: case FSF_SQ_CFDC_SUBTABLE_PORT_WWPN:
...@@ -3134,9 +3031,8 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3134,9 +3031,8 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(1, "FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED\n"); ZFCP_LOG_FLAGS(1, "FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED\n");
ZFCP_LOG_INFO("error: The adapter ran out of resources. " ZFCP_LOG_INFO("error: The adapter ran out of resources. "
"There is no handle (temporary port identifier) " "There is no handle (temporary port identifier) "
"available for the unit with FCP-LUN 0x%Lx " "available for unit 0x%016Lx on port 0x%016Lx "
"at the remote port with WWPN 0x%Lx connected " "on adapter %s\n",
"to the adapter %s\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
...@@ -3193,18 +3089,14 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3193,18 +3089,14 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
/* save LUN handle assigned by FSF */ /* save LUN handle assigned by FSF */
unit->handle = header->lun_handle; unit->handle = header->lun_handle;
ZFCP_LOG_TRACE("unit (FCP_LUN=0x%Lx) of remote port " ZFCP_LOG_TRACE("unit 0x%016Lx on remote port 0x%016Lx on "
"(WWPN=0x%Lx) via adapter (busid=%s) opened, " "adapter %s opened, port handle 0x%x\n",
"port handle 0x%x, access flag 0x%02x\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit), zfcp_get_busid_by_unit(unit),
unit->handle, unit->handle);
bottom->lun_access);
/* mark unit as open */ /* mark unit as open */
atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status); atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status);
if (adapter->supported_features & FSF_FEATURE_CFDC)
unit->lun_access = bottom->lun_access;
retval = 0; retval = 0;
break; break;
...@@ -3250,10 +3142,8 @@ zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action) ...@@ -3250,10 +3142,8 @@ zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action)
erp_action->adapter->pool.fsf_req_erp, erp_action->adapter->pool.fsf_req_erp,
&lock_flags, &(erp_action->fsf_req)); &lock_flags, &(erp_action->fsf_req));
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("error: Out of resources. Could not create a " ZFCP_LOG_INFO("error: Could not create close unit request for "
"close unit request for FCP-LUN 0x%Lx " "unit 0x%016Lx on port 0x%016Lx on adapter %s.\n",
"connected to the port with WWPN 0x%Lx connected "
"to the adapter %s.\n",
erp_action->unit->fcp_lun, erp_action->unit->fcp_lun,
erp_action->port->wwpn, erp_action->port->wwpn,
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
...@@ -3276,8 +3166,7 @@ zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action) ...@@ -3276,8 +3166,7 @@ zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action)
retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer); retval = zfcp_fsf_req_send(erp_action->fsf_req, &erp_action->timer);
if (retval) { if (retval) {
ZFCP_LOG_INFO("error: Could not send a close unit request for " ZFCP_LOG_INFO("error: Could not send a close unit request for "
"FCP-LUN 0x%Lx connected to the port with " "unit 0x%016Lx on port 0x%016Lx onadapter %s.\n",
"WWPN 0x%Lx connected to the adapter %s.\n",
erp_action->unit->fcp_lun, erp_action->unit->fcp_lun,
erp_action->port->wwpn, erp_action->port->wwpn,
zfcp_get_busid_by_adapter(erp_action->adapter)); zfcp_get_busid_by_adapter(erp_action->adapter));
...@@ -3286,8 +3175,8 @@ zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action) ...@@ -3286,8 +3175,8 @@ zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action)
goto out; goto out;
} }
ZFCP_LOG_TRACE("Close LUN request initiated (adapter busid=%s, " ZFCP_LOG_TRACE("Close LUN request initiated (adapter %s, "
"port wwpn=0x%Lx, unit fcp_lun=0x%Lx)\n", "port 0x%016Lx, unit 0x%016Lx)\n",
zfcp_get_busid_by_adapter(erp_action->adapter), zfcp_get_busid_by_adapter(erp_action->adapter),
erp_action->port->wwpn, erp_action->unit->fcp_lun); erp_action->port->wwpn, erp_action->unit->fcp_lun);
out: out:
...@@ -3321,9 +3210,8 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3321,9 +3210,8 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_HANDLE_NOT_VALID: case FSF_PORT_HANDLE_NOT_VALID:
ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
ZFCP_LOG_INFO("Temporary port identifier (handle) 0x%x " ZFCP_LOG_INFO("Temporary port identifier 0x%x for port "
"for the port with WWPN 0x%Lx connected to " "0x%016Lx on adapter %s invalid. This may "
"the adapter %s is not valid. This may "
"happen in rare circumstances\n", "happen in rare circumstances\n",
unit->port->handle, unit->port->handle,
unit->port->wwpn, unit->port->wwpn,
...@@ -3343,11 +3231,9 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3343,11 +3231,9 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
case FSF_LUN_HANDLE_NOT_VALID: case FSF_LUN_HANDLE_NOT_VALID:
ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n");
ZFCP_LOG_INFO("Temporary LUN identifier (handle) 0x%x " ZFCP_LOG_INFO("Temporary LUN identifier 0x%x of unit "
"of the logical unit with FCP-LUN 0x%Lx at " "0x%016Lx on port 0x%016Lx on adapter %s is "
"the remote port with WWPN 0x%Lx connected " "invalid. This may happen occasionally.\n",
"to the adapter %s is "
"not valid. This may happen occasionally.\n",
unit->handle, unit->handle,
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
...@@ -3367,8 +3253,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3367,8 +3253,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_BOXED: case FSF_PORT_BOXED:
ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
ZFCP_LOG_DEBUG("The remote port " ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
"with WWPN 0x%Lx on the adapter %s "
"needs to be reopened\n", "needs to be reopened\n",
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
...@@ -3414,9 +3299,8 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3414,9 +3299,8 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
case FSF_GOOD: case FSF_GOOD:
ZFCP_LOG_FLAGS(3, "FSF_GOOD\n"); ZFCP_LOG_FLAGS(3, "FSF_GOOD\n");
ZFCP_LOG_TRACE("unit (FCP_LUN=0x%Lx) of remote port " ZFCP_LOG_TRACE("unit 0x%016Lx on port 0x%016Lx on adapter %s "
"(WWPN=0x%Lx) via adapter (busid=%s) closed, " "closed, port handle 0x%x\n",
"port handle 0x%x \n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit), zfcp_get_busid_by_unit(unit),
...@@ -3468,10 +3352,9 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, ...@@ -3468,10 +3352,9 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
adapter->pool.fsf_req_scsi, adapter->pool.fsf_req_scsi,
&lock_flags, &fsf_req); &lock_flags, &fsf_req);
if (unlikely(retval < 0)) { if (unlikely(retval < 0)) {
ZFCP_LOG_DEBUG("error: Out of resources. Could not create an " ZFCP_LOG_DEBUG("error: Could not create FCP command request "
"FCP command request for FCP-LUN 0x%Lx " "for unit 0x%016Lx on port 0x%016Lx on "
"connected to the port with WWPN 0x%Lx " "adapter %s\n",
"connected to the adapter %s.\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
...@@ -3496,8 +3379,7 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, ...@@ -3496,8 +3379,7 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
fsf_req->data.send_fcp_command_task.start_jiffies = jiffies; fsf_req->data.send_fcp_command_task.start_jiffies = jiffies;
fsf_req->data.send_fcp_command_task.unit = unit; fsf_req->data.send_fcp_command_task.unit = unit;
ZFCP_LOG_DEBUG("unit=0x%lx, unit_fcp_lun=0x%Lx\n", ZFCP_LOG_DEBUG("unit=%p, fcp_lun=0x%016Lx\n", unit, unit->fcp_lun);
(unsigned long) unit, unit->fcp_lun);
/* set handles of unit and its parent port in QTCB */ /* set handles of unit and its parent port in QTCB */
fsf_req->qtcb->header.lun_handle = unit->handle; fsf_req->qtcb->header.lun_handle = unit->handle;
...@@ -3593,8 +3475,8 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, ...@@ -3593,8 +3475,8 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
} else { } else {
ZFCP_LOG_NORMAL("error: No truncation implemented but " ZFCP_LOG_NORMAL("error: No truncation implemented but "
"required. Shutting down unit " "required. Shutting down unit "
"(busid=%s, WWPN=0x%16.16Lx, " "(adapter %s, port 0x%016Lx, "
"FCP_LUN=0x%16.16Lx)\n", "unit 0x%016Lx)\n",
zfcp_get_busid_by_unit(unit), zfcp_get_busid_by_unit(unit),
unit->port->wwpn, unit->port->wwpn,
unit->fcp_lun); unit->fcp_lun);
...@@ -3617,17 +3499,16 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, ...@@ -3617,17 +3499,16 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
*/ */
retval = zfcp_fsf_req_send(fsf_req, NULL); retval = zfcp_fsf_req_send(fsf_req, NULL);
if (unlikely(retval < 0)) { if (unlikely(retval < 0)) {
ZFCP_LOG_INFO("error: Could not send an FCP command request " ZFCP_LOG_INFO("error: Could not send FCP command request "
"for a command on the adapter %s, " "on adapter %s, port 0x%016Lx, unit 0x%016Lx\n",
"port WWPN 0x%Lx and unit LUN 0x%Lx\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
unit->port->wwpn, unit->port->wwpn,
unit->fcp_lun); unit->fcp_lun);
goto send_failed; goto send_failed;
} }
ZFCP_LOG_TRACE("Send FCP Command initiated (adapter busid=%s, " ZFCP_LOG_TRACE("Send FCP Command initiated (adapter %s, "
"port wwpn=0x%Lx, unit fcp_lun=0x%Lx)\n", "port 0x%016Lx, unit 0x%016Lx)\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
unit->port->wwpn, unit->port->wwpn,
unit->fcp_lun); unit->fcp_lun);
...@@ -3676,10 +3557,9 @@ zfcp_fsf_send_fcp_command_task_management(struct zfcp_adapter *adapter, ...@@ -3676,10 +3557,9 @@ zfcp_fsf_send_fcp_command_task_management(struct zfcp_adapter *adapter,
adapter->pool.fsf_req_scsi, adapter->pool.fsf_req_scsi,
&lock_flags, &fsf_req); &lock_flags, &fsf_req);
if (retval < 0) { if (retval < 0) {
ZFCP_LOG_INFO("error: Out of resources. Could not create an " ZFCP_LOG_INFO("error: Could not create FCP command (task "
"FCP command (task management) request for " "management) request for adapter %s, port "
"the adapter %s, port with " " 0x%016Lx, unit 0x%016Lx.\n",
"WWPN 0x%Lx and FCP_LUN 0x%Lx.\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
unit->port->wwpn, unit->fcp_lun); unit->port->wwpn, unit->fcp_lun);
goto out; goto out;
...@@ -3722,8 +3602,8 @@ zfcp_fsf_send_fcp_command_task_management(struct zfcp_adapter *adapter, ...@@ -3722,8 +3602,8 @@ zfcp_fsf_send_fcp_command_task_management(struct zfcp_adapter *adapter,
if (retval) { if (retval) {
del_timer(&adapter->scsi_er_timer); del_timer(&adapter->scsi_er_timer);
ZFCP_LOG_INFO("error: Could not send an FCP-command (task " ZFCP_LOG_INFO("error: Could not send an FCP-command (task "
"management) on the adapter %s, port WWPN " "management) on adapter %s, port 0x%016Lx for "
"0x%Lx for unit LUN 0x%Lx\n", "unit LUN 0x%016Lx\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
unit->port->wwpn, unit->port->wwpn,
unit->fcp_lun); unit->fcp_lun);
...@@ -3733,8 +3613,8 @@ zfcp_fsf_send_fcp_command_task_management(struct zfcp_adapter *adapter, ...@@ -3733,8 +3613,8 @@ zfcp_fsf_send_fcp_command_task_management(struct zfcp_adapter *adapter,
} }
ZFCP_LOG_TRACE("Send FCP Command (task management function) initiated " ZFCP_LOG_TRACE("Send FCP Command (task management function) initiated "
"(adapter busid=%s, port wwpn=0x%Lx, " "(adapter %s, port 0x%016Lx, unit 0x%016Lx, "
"unit fcp_lun=0x%Lx, tm_flags=0x%x)\n", "tm_flags=0x%x)\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
unit->port->wwpn, unit->port->wwpn,
unit->fcp_lun, unit->fcp_lun,
...@@ -3776,9 +3656,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3776,9 +3656,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_HANDLE_NOT_VALID: case FSF_PORT_HANDLE_NOT_VALID:
ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(1, "FSF_PORT_HANDLE_NOT_VALID\n");
ZFCP_LOG_INFO("Temporary port identifier (handle) 0x%x " ZFCP_LOG_INFO("Temporary port identifier 0x%x for port "
"for the port with WWPN 0x%Lx connected to " "0x%016Lx on adapter %s invalid\n",
"the adapter %s is not valid.\n",
unit->port->handle, unit->port->handle,
unit->port->wwpn, zfcp_get_busid_by_unit(unit)); unit->port->wwpn, zfcp_get_busid_by_unit(unit));
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG,
...@@ -3792,11 +3671,9 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3792,11 +3671,9 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_LUN_HANDLE_NOT_VALID: case FSF_LUN_HANDLE_NOT_VALID:
ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n"); ZFCP_LOG_FLAGS(1, "FSF_LUN_HANDLE_NOT_VALID\n");
ZFCP_LOG_INFO("Temporary LUN identifier (handle) 0x%x " ZFCP_LOG_INFO("Temporary LUN identifier 0x%x for unit "
"of the logical unit with FCP-LUN 0x%Lx at " "0x%016Lx on port 0x%016Lx on adapter %s is "
"the remote port with WWPN 0x%Lx connected " "invalid. This may happen occasionally.\n",
"to the adapter %s is "
"not valid. This may happen occasionally.\n",
unit->handle, unit->handle,
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
...@@ -3813,16 +3690,13 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3813,16 +3690,13 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_HANDLE_MISMATCH: case FSF_HANDLE_MISMATCH:
ZFCP_LOG_FLAGS(0, "FSF_HANDLE_MISMATCH\n"); ZFCP_LOG_FLAGS(0, "FSF_HANDLE_MISMATCH\n");
ZFCP_LOG_NORMAL("bug: The port handle (temporary port " ZFCP_LOG_NORMAL("bug: The port handle 0x%x has changed "
"identifier) 0x%x has changed unexpectedly. " "unexpectedly. (adapter %s, port 0x%016Lx, "
"This was detected upon receiveing the " "unit 0x%016Lx)\n",
"response of a command send to the unit with "
"FCP-LUN 0x%Lx at the remote port with WWPN "
"0x%Lx connected to the adapter %s.\n",
unit->port->handle, unit->port->handle,
unit->fcp_lun, zfcp_get_busid_by_unit(unit),
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); unit->fcp_lun);
ZFCP_LOG_NORMAL("status qualifier:\n"); ZFCP_LOG_NORMAL("status qualifier:\n");
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
(char *) &header->fsf_status_qual, (char *) &header->fsf_status_qual,
...@@ -3841,11 +3715,11 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3841,11 +3715,11 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(0, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n"); ZFCP_LOG_FLAGS(0, "FSF_SERVICE_CLASS_NOT_SUPPORTED\n");
if (fsf_req->adapter->fc_service_class <= 3) { if (fsf_req->adapter->fc_service_class <= 3) {
ZFCP_LOG_NORMAL("error: The adapter %s does " ZFCP_LOG_NORMAL("error: The adapter %s does "
"not support fibre-channel class %d.\n", "not support fibrechannel class %d.\n",
zfcp_get_busid_by_unit(unit), zfcp_get_busid_by_unit(unit),
fsf_req->adapter->fc_service_class); fsf_req->adapter->fc_service_class);
} else { } else {
ZFCP_LOG_NORMAL("bug: The fibre channel class at the " ZFCP_LOG_NORMAL("bug: The fibrechannel class at "
"adapter %s is invalid. " "adapter %s is invalid. "
"(debug info %d)\n", "(debug info %d)\n",
zfcp_get_busid_by_unit(unit), zfcp_get_busid_by_unit(unit),
...@@ -3864,10 +3738,9 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3864,10 +3738,9 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_FCPLUN_NOT_VALID: case FSF_FCPLUN_NOT_VALID:
ZFCP_LOG_FLAGS(0, "FSF_FCPLUN_NOT_VALID\n"); ZFCP_LOG_FLAGS(0, "FSF_FCPLUN_NOT_VALID\n");
ZFCP_LOG_NORMAL("bug: The FCP LUN 0x%Lx behind the remote port " ZFCP_LOG_NORMAL("bug: unit 0x%016Lx on port 0x%016Lx on "
"of WWPN0x%Lx via the adapter %s does not have " "adapter %s does not have correct unit "
"the correct unit handle (temporary unit " "handle 0x%x\n",
"identifier) 0x%x\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit), zfcp_get_busid_by_unit(unit),
...@@ -3888,9 +3761,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3888,9 +3761,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_ACCESS_DENIED: case FSF_ACCESS_DENIED:
ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n"); ZFCP_LOG_FLAGS(2, "FSF_ACCESS_DENIED\n");
ZFCP_LOG_NORMAL("Access denied, cannot send FCP " ZFCP_LOG_NORMAL("Access denied, cannot send FCP command to "
"command to the unit with FCP-LUN 0x%Lx at the " "unit 0x%016Lx on port 0x%016Lx on "
"remote port with WWPN 0x%Lx connected to the "
"adapter %s\n", unit->fcp_lun, unit->port->wwpn, "adapter %s\n", unit->fcp_lun, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
for (counter = 0; counter < 2; counter++) { for (counter = 0; counter < 2; counter++) {
...@@ -3912,9 +3784,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3912,9 +3784,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_DIRECTION_INDICATOR_NOT_VALID: case FSF_DIRECTION_INDICATOR_NOT_VALID:
ZFCP_LOG_FLAGS(0, "FSF_DIRECTION_INDICATOR_NOT_VALID\n"); ZFCP_LOG_FLAGS(0, "FSF_DIRECTION_INDICATOR_NOT_VALID\n");
ZFCP_LOG_INFO("bug: Invalid data direction given for the unit " ZFCP_LOG_INFO("bug: Invalid data direction given for unit "
"with FCP LUN 0x%Lx at the remote port with " "0x%016Lx on port 0x%016Lx on adapter %s "
"WWPN 0x%Lx via the adapter %s "
"(debug info %d)\n", "(debug info %d)\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
...@@ -3935,9 +3806,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3935,9 +3806,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_INBOUND_DATA_LENGTH_NOT_VALID: case FSF_INBOUND_DATA_LENGTH_NOT_VALID:
ZFCP_LOG_FLAGS(0, "FSF_INBOUND_DATA_LENGTH_NOT_VALID\n"); ZFCP_LOG_FLAGS(0, "FSF_INBOUND_DATA_LENGTH_NOT_VALID\n");
ZFCP_LOG_NORMAL("bug: An invalid inbound data length field " ZFCP_LOG_NORMAL("bug: An invalid inbound data length field "
"was found in a command for the unit with " "was found in a command for unit 0x%016Lx "
"FCP LUN 0x%Lx of the remote port " "on port 0x%016Lx on adapter %s.\n",
"with WWPN 0x%Lx via the adapter %s.\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, zfcp_get_busid_by_unit(unit)); unit->port->wwpn, zfcp_get_busid_by_unit(unit));
/* stop operation for this adapter */ /* stop operation for this adapter */
...@@ -3955,9 +3825,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3955,9 +3825,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_OUTBOUND_DATA_LENGTH_NOT_VALID: case FSF_OUTBOUND_DATA_LENGTH_NOT_VALID:
ZFCP_LOG_FLAGS(0, "FSF_OUTBOUND_DATA_LENGTH_NOT_VALID\n"); ZFCP_LOG_FLAGS(0, "FSF_OUTBOUND_DATA_LENGTH_NOT_VALID\n");
ZFCP_LOG_NORMAL("bug: An invalid outbound data length field " ZFCP_LOG_NORMAL("bug: An invalid outbound data length field "
"was found in a command for the unit with " "was found in a command unit 0x%016Lx on port "
"FCP LUN 0x%Lx of the remote port " "0x%016Lx on adapter %s\n",
"with WWPN 0x%Lx via the adapter %s\n.",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
...@@ -3975,9 +3844,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3975,9 +3844,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(0, "FSF_CMND_LENGTH_NOT_VALID\n"); ZFCP_LOG_FLAGS(0, "FSF_CMND_LENGTH_NOT_VALID\n");
ZFCP_LOG_NORMAL ZFCP_LOG_NORMAL
("bug: An invalid control-data-block length field " ("bug: An invalid control-data-block length field "
"was found in a command for the unit with " "was found in a command for unit 0x%016Lx on port "
"FCP LUN 0x%Lx of the remote port " "0x%016Lx on adapter %s " "(debug info %d)\n",
"with WWPN 0x%Lx via the adapter %s " "(debug info %d)\n",
unit->fcp_lun, unit->port->wwpn, unit->fcp_lun, unit->port->wwpn,
zfcp_get_busid_by_unit(unit), zfcp_get_busid_by_unit(unit),
fsf_req->qtcb->bottom.io.fcp_cmnd_length); fsf_req->qtcb->bottom.io.fcp_cmnd_length);
...@@ -3994,8 +3862,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -3994,8 +3862,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_PORT_BOXED: case FSF_PORT_BOXED:
ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n"); ZFCP_LOG_FLAGS(2, "FSF_PORT_BOXED\n");
ZFCP_LOG_DEBUG("The remote port " ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s "
"with WWPN 0x%Lx on the adapter %s "
"needs to be reopened\n", "needs to be reopened\n",
unit->port->wwpn, zfcp_get_busid_by_unit(unit)); unit->port->wwpn, zfcp_get_busid_by_unit(unit));
debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed"); debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed");
...@@ -4010,9 +3877,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4010,9 +3877,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
case FSF_LUN_BOXED: case FSF_LUN_BOXED:
ZFCP_LOG_FLAGS(0, "FSF_LUN_BOXED\n"); ZFCP_LOG_FLAGS(0, "FSF_LUN_BOXED\n");
ZFCP_LOG_NORMAL( ZFCP_LOG_NORMAL(
"The remote unit with FCP-LUN 0x%Lx " "unit 0x%016Lx on port 0x%016Lx on adapter %s needs "
"at the remote port with WWPN 0x%Lx " "to be reopened\n",
"connected to the adapter %s needs to be reopened\n",
unit->fcp_lun, unit->port->wwpn, unit->fcp_lun, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed");
...@@ -4119,9 +3985,8 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4119,9 +3985,8 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
scpnt = fsf_req->data.send_fcp_command_task.scsi_cmnd; scpnt = fsf_req->data.send_fcp_command_task.scsi_cmnd;
if (unlikely(!scpnt)) { if (unlikely(!scpnt)) {
ZFCP_LOG_DEBUG ZFCP_LOG_DEBUG
("Command with fsf_req 0x%lx is not associated to " ("Command with fsf_req %p is not associated to "
"a scsi command anymore. Aborted?\n", "a scsi command anymore. Aborted?\n", fsf_req);
(unsigned long) fsf_req);
goto out; goto out;
} }
if (unlikely(fsf_req->status & ZFCP_STATUS_FSFREQ_ABORTED)) { if (unlikely(fsf_req->status & ZFCP_STATUS_FSFREQ_ABORTED)) {
...@@ -4179,12 +4044,10 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4179,12 +4044,10 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(0, "RSP_CODE_LENGTH_MISMATCH\n"); ZFCP_LOG_FLAGS(0, "RSP_CODE_LENGTH_MISMATCH\n");
/* hardware bug */ /* hardware bug */
ZFCP_LOG_NORMAL("bug: FCP response code indictates " ZFCP_LOG_NORMAL("bug: FCP response code indictates "
" that the fibre-channel protocol data " "that the fibrechannel protocol data "
"length differs from the burst length. " "length differs from the burst length. "
"The problem occured on the unit " "The problem occured on unit 0x%016Lx "
"with FCP LUN 0x%Lx connected to the " "on port 0x%016Lx on adapter %s",
"port with WWPN 0x%Lx at the "
"adapter %s",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
...@@ -4199,11 +4062,10 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4199,11 +4062,10 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(0, "RSP_CODE_FIELD_INVALID\n"); ZFCP_LOG_FLAGS(0, "RSP_CODE_FIELD_INVALID\n");
/* driver or hardware bug */ /* driver or hardware bug */
ZFCP_LOG_NORMAL("bug: FCP response code indictates " ZFCP_LOG_NORMAL("bug: FCP response code indictates "
"that the fibre-channel protocol data " "that the fibrechannel protocol data "
"fields were incorrectly set-up. " "fields were incorrectly set up. "
"The problem occured on the unit " "The problem occured on the unit "
"with FCP LUN 0x%Lx connected to the " "0x%016Lx on port 0x%016Lx on "
"port with WWPN 0x%Lx at the "
"adapter %s", "adapter %s",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
...@@ -4220,12 +4082,10 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4220,12 +4082,10 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
/* hardware bug */ /* hardware bug */
ZFCP_LOG_NORMAL("bug: The FCP response code indicates " ZFCP_LOG_NORMAL("bug: The FCP response code indicates "
"that conflicting values for the " "that conflicting values for the "
"fibre-channel payload offset from the " "fibrechannel payload offset from the "
"header were found. " "header were found. "
"The problem occured on the unit " "The problem occured on unit 0x%016Lx "
"with FCP LUN 0x%Lx connected to the " "on port 0x%016Lx on adapter %s.\n",
"port with WWPN 0x%Lx at the "
"adapter %s.\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
...@@ -4240,10 +4100,8 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4240,10 +4100,8 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_NORMAL("bug: An invalid FCP response " ZFCP_LOG_NORMAL("bug: An invalid FCP response "
"code was detected for a command. " "code was detected for a command. "
"The problem occured on the unit " "The problem occured on the unit "
"with FCP LUN 0x%Lx connected to the " "0x%016Lx on port 0x%016Lx on "
"port with WWPN 0x%Lx at the " "adapter %s (debug info 0x%x)\n",
"adapter %s "
"(debug info 0x%x)\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit), zfcp_get_busid_by_unit(unit),
...@@ -4283,9 +4141,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4283,9 +4141,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
/* check for overrun */ /* check for overrun */
if (unlikely(fcp_rsp_iu->validity.bits.fcp_resid_over)) { if (unlikely(fcp_rsp_iu->validity.bits.fcp_resid_over)) {
ZFCP_LOG_INFO("A data overrun was detected for a command. " ZFCP_LOG_INFO("A data overrun was detected for a command. "
"This happened for a command to the unit " "unit 0x%016Lx, port 0x%016Lx, adapter %s. "
"with FCP LUN 0x%Lx connected to the "
"port with WWPN 0x%Lx at the adapter %s. "
"The response data length is " "The response data length is "
"%d, the original length was %d.\n", "%d, the original length was %d.\n",
unit->fcp_lun, unit->fcp_lun,
...@@ -4298,9 +4154,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4298,9 +4154,7 @@ zfcp_fsf_send_fcp_command_task_handler(struct zfcp_fsf_req *fsf_req)
/* check for underrun */ /* check for underrun */
if (unlikely(fcp_rsp_iu->validity.bits.fcp_resid_under)) { if (unlikely(fcp_rsp_iu->validity.bits.fcp_resid_under)) {
ZFCP_LOG_DEBUG("A data underrun was detected for a command. " ZFCP_LOG_DEBUG("A data underrun was detected for a command. "
"This happened for a command to the unit " "unit 0x%016Lx, port 0x%016Lx, adapter %s. "
"with FCP LUN 0x%Lx connected to the "
"port with WWPN 0x%Lx at the adapter %s. "
"The response data length is " "The response data length is "
"%d, the original length was %d.\n", "%d, the original length was %d.\n",
unit->fcp_lun, unit->fcp_lun,
...@@ -4467,9 +4321,7 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4467,9 +4321,7 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(0, "RSP_CODE_TASKMAN_UNSUPP\n"); ZFCP_LOG_FLAGS(0, "RSP_CODE_TASKMAN_UNSUPP\n");
ZFCP_LOG_NORMAL("bug: A reuested task management function " ZFCP_LOG_NORMAL("bug: A reuested task management function "
"is not supported on the target device " "is not supported on the target device "
"The corresponding device is the unit with " "unit 0x%016Lx, port 0x%016Lx, adapter %s\n ",
"FCP LUN 0x%Lx at the port "
"with WWPN 0x%Lx at the adapter %s\n ",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
...@@ -4479,9 +4331,7 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4479,9 +4331,7 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req)
ZFCP_LOG_FLAGS(0, "RSP_CODE_TASKMAN_FAILED\n"); ZFCP_LOG_FLAGS(0, "RSP_CODE_TASKMAN_FAILED\n");
ZFCP_LOG_NORMAL("bug: A reuested task management function " ZFCP_LOG_NORMAL("bug: A reuested task management function "
"failed to complete successfully. " "failed to complete successfully. "
"The corresponding device is the unit with " "unit 0x%016Lx, port 0x%016Lx, adapter %s.\n",
"FCP LUN 0x%Lx at the port "
"with WWPN 0x%Lx at the adapter %s.\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
zfcp_get_busid_by_unit(unit)); zfcp_get_busid_by_unit(unit));
...@@ -4490,9 +4340,7 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req) ...@@ -4490,9 +4340,7 @@ zfcp_fsf_send_fcp_command_task_management_handler(struct zfcp_fsf_req *fsf_req)
default: default:
ZFCP_LOG_NORMAL("bug: An invalid FCP response " ZFCP_LOG_NORMAL("bug: An invalid FCP response "
"code was detected for a command. " "code was detected for a command. "
"The problem occured on the unit " "unit 0x%016Lx, port 0x%016Lx, adapter %s "
"with FCP LUN 0x%Lx connected to the "
"port with WWPN 0x%Lx at the adapter %s "
"(debug info 0x%x)\n", "(debug info 0x%x)\n",
unit->fcp_lun, unit->fcp_lun,
unit->port->wwpn, unit->port->wwpn,
...@@ -4835,8 +4683,8 @@ zfcp_fsf_req_wait_and_cleanup(struct zfcp_fsf_req *fsf_req, ...@@ -4835,8 +4683,8 @@ zfcp_fsf_req_wait_and_cleanup(struct zfcp_fsf_req *fsf_req,
signal); signal);
if (signal) { if (signal) {
ZFCP_LOG_DEBUG("Caught signal %i while waiting for the " ZFCP_LOG_DEBUG("Caught signal %i while waiting for the "
"completion of the request at 0x%lx\n", "completion of the request at %p\n",
signal, (unsigned long) fsf_req); signal, fsf_req);
retval = signal; retval = signal;
goto out; goto out;
} }
...@@ -5033,10 +4881,10 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) ...@@ -5033,10 +4881,10 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer)
if (likely(fsf_req->qtcb)) { if (likely(fsf_req->qtcb)) {
fsf_req->qtcb->prefix.req_seq_no = adapter->fsf_req_seq_no; fsf_req->qtcb->prefix.req_seq_no = adapter->fsf_req_seq_no;
fsf_req->seq_no = adapter->fsf_req_seq_no; fsf_req->seq_no = adapter->fsf_req_seq_no;
ZFCP_LOG_TRACE("FSF request 0x%lx of adapter 0x%lx gets " ZFCP_LOG_TRACE("FSF request %p of adapter %s gets "
"FSF sequence counter value of %i\n", "FSF sequence counter value of %i\n",
(unsigned long) fsf_req, fsf_req,
(unsigned long) adapter, zfcp_get_busid_by_adapter(adapter),
fsf_req->qtcb->prefix.req_seq_no); fsf_req->qtcb->prefix.req_seq_no);
} else } else
inc_seq_no = 0; inc_seq_no = 0;
...@@ -5052,18 +4900,18 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) ...@@ -5052,18 +4900,18 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer)
add_timer(timer); add_timer(timer);
} }
ZFCP_LOG_TRACE("request queue of adapter with busid=%s: " ZFCP_LOG_TRACE("request queue of adapter %s: "
"next free SBAL is %i, %i free SBALs\n", "next free SBAL is %i, %i free SBALs\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
req_queue->free_index, req_queue->free_index,
atomic_read(&req_queue->free_count)); atomic_read(&req_queue->free_count));
ZFCP_LOG_DEBUG("Calling do QDIO busid=%s, flags=0x%x, queue_no=%i, " ZFCP_LOG_DEBUG("calling do_QDIO adapter %s, flags=0x%x, queue_no=%i, "
"index_in_queue=%i, count=%i, buffers=0x%lx\n", "index_in_queue=%i, count=%i, buffers=%p\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
QDIO_FLAG_SYNC_OUTPUT, QDIO_FLAG_SYNC_OUTPUT,
0, fsf_req->sbal_first, fsf_req->sbal_number, 0, fsf_req->sbal_first, fsf_req->sbal_number,
(unsigned long) &req_queue->buffer[fsf_req->sbal_first]); &req_queue->buffer[fsf_req->sbal_first]);
/* /*
* adjust the number of free SBALs in request queue as well as * adjust the number of free SBALs in request queue as well as
...@@ -5126,8 +4974,9 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer) ...@@ -5126,8 +4974,9 @@ zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req, struct timer_list *timer)
if (likely(inc_seq_no)) { if (likely(inc_seq_no)) {
adapter->fsf_req_seq_no++; adapter->fsf_req_seq_no++;
ZFCP_LOG_TRACE ZFCP_LOG_TRACE
("FSF sequence counter value of adapter 0x%lx " ("FSF sequence counter value of adapter %s "
"increased to %i\n", (unsigned long) adapter, "increased to %i\n",
zfcp_get_busid_by_adapter(adapter),
adapter->fsf_req_seq_no); adapter->fsf_req_seq_no);
} }
/* count FSF requests pending */ /* count FSF requests pending */
......
...@@ -196,23 +196,16 @@ ...@@ -196,23 +196,16 @@
/* channel features */ /* channel features */
#define FSF_FEATURE_QTCB_SUPPRESSION 0x00000001 #define FSF_FEATURE_QTCB_SUPPRESSION 0x00000001
#define FSF_FEATURE_CFDC 0x00000002 #define FSF_FEATURE_CFDC 0x00000002
#define FSF_FEATURE_LOST_SAN_NOTIFICATION 0x00000008
#define FSF_FEATURE_HBAAPI_MANAGEMENT 0x00000010 #define FSF_FEATURE_HBAAPI_MANAGEMENT 0x00000010
#define FSF_FEATURE_ELS_CT_CHAINED_SBALS 0x00000020 #define FSF_FEATURE_ELS_CT_CHAINED_SBALS 0x00000020
/* option */ /* option */
#define FSF_OPEN_LUN_SUPPRESS_BOXING 0x00000001 #define FSF_OPEN_LUN_SUPPRESS_BOXING 0x00000001
#define FSF_OPEN_LUN_UNSOLICITED_SENSE_DATA 0x00000002
/* adapter types */ /* adapter types */
#define FSF_ADAPTER_TYPE_FICON 0x00000001 #define FSF_ADAPTER_TYPE_FICON 0x00000001
#define FSF_ADAPTER_TYPE_FICON_EXPRESS 0x00000002 #define FSF_ADAPTER_TYPE_FICON_EXPRESS 0x00000002
/* flags */
#define FSF_CFDC_OPEN_LUN_ALLOWED 0x01
#define FSF_CFDC_EXCLUSIVE_ACCESS 0x02
#define FSF_CFDC_OUTBOUND_TRANSFER_ALLOWED 0x10
/* port types */ /* port types */
#define FSF_HBA_PORTTYPE_UNKNOWN 0x00000001 #define FSF_HBA_PORTTYPE_UNKNOWN 0x00000001
#define FSF_HBA_PORTTYPE_NOTPRESENT 0x00000003 #define FSF_HBA_PORTTYPE_NOTPRESENT 0x00000003
...@@ -328,18 +321,7 @@ union fsf_status_qual { ...@@ -328,18 +321,7 @@ union fsf_status_qual {
u8 byte[FSF_STATUS_QUALIFIER_SIZE]; u8 byte[FSF_STATUS_QUALIFIER_SIZE];
u16 halfword[FSF_STATUS_QUALIFIER_SIZE / sizeof (u16)]; u16 halfword[FSF_STATUS_QUALIFIER_SIZE / sizeof (u16)];
u32 word[FSF_STATUS_QUALIFIER_SIZE / sizeof (u32)]; u32 word[FSF_STATUS_QUALIFIER_SIZE / sizeof (u32)];
struct { struct fsf_queue_designator fsf_queue_designator;
u32 this_cmd;
u32 aborted_cmd;
} port_handle;
struct {
u32 this_cmd;
u32 aborted_cmd;
} lun_handle;
struct {
u64 found;
u64 expected;
} fcp_lun;
} __attribute__ ((packed)); } __attribute__ ((packed));
struct fsf_qtcb_header { struct fsf_qtcb_header {
...@@ -399,8 +381,7 @@ struct fsf_qtcb_bottom_support { ...@@ -399,8 +381,7 @@ struct fsf_qtcb_bottom_support {
u32 service_class; u32 service_class;
u8 res3[3]; u8 res3[3];
u8 timeout; u8 timeout;
u32 lun_access; u8 res4[184];
u8 res4[180];
u32 els1_length; u32 els1_length;
u32 els2_length; u32 els2_length;
u32 req_buf_length; u32 req_buf_length;
......
...@@ -76,16 +76,15 @@ zfcp_qdio_buffers_enqueue(struct qdio_buffer **cur_buf, int count) ...@@ -76,16 +76,15 @@ zfcp_qdio_buffers_enqueue(struct qdio_buffer **cur_buf, int count)
struct qdio_buffer *first_in_page = NULL; struct qdio_buffer *first_in_page = NULL;
qdio_buffers_per_page = PAGE_SIZE / sizeof (struct qdio_buffer); qdio_buffers_per_page = PAGE_SIZE / sizeof (struct qdio_buffer);
ZFCP_LOG_TRACE("Buffers per page %d.\n", qdio_buffers_per_page); ZFCP_LOG_TRACE("buffers_per_page=%d\n", qdio_buffers_per_page);
for (buf_pos = 0; buf_pos < count; buf_pos++) { for (buf_pos = 0; buf_pos < count; buf_pos++) {
if (page_pos == 0) { if (page_pos == 0) {
cur_buf[buf_pos] = (struct qdio_buffer *) cur_buf[buf_pos] = (struct qdio_buffer *)
get_zeroed_page(GFP_KERNEL); get_zeroed_page(GFP_KERNEL);
if (cur_buf[buf_pos] == NULL) { if (cur_buf[buf_pos] == NULL) {
ZFCP_LOG_INFO("error: Could not allocate " ZFCP_LOG_INFO("error: allocation of "
"memory for qdio transfer " "QDIO buffer failed \n");
"structures.\n");
goto out; goto out;
} }
first_in_page = cur_buf[buf_pos]; first_in_page = cur_buf[buf_pos];
...@@ -115,7 +114,7 @@ zfcp_qdio_buffers_dequeue(struct qdio_buffer **cur_buf, int count) ...@@ -115,7 +114,7 @@ zfcp_qdio_buffers_dequeue(struct qdio_buffer **cur_buf, int count)
int qdio_buffers_per_page; int qdio_buffers_per_page;
qdio_buffers_per_page = PAGE_SIZE / sizeof (struct qdio_buffer); qdio_buffers_per_page = PAGE_SIZE / sizeof (struct qdio_buffer);
ZFCP_LOG_TRACE("Buffers per page %d.\n", qdio_buffers_per_page); ZFCP_LOG_TRACE("buffers_per_page=%d\n", qdio_buffers_per_page);
for (buf_pos = 0; buf_pos < count; buf_pos += qdio_buffers_per_page) for (buf_pos = 0; buf_pos < count; buf_pos += qdio_buffers_per_page)
free_page((unsigned long) cur_buf[buf_pos]); free_page((unsigned long) cur_buf[buf_pos]);
...@@ -133,9 +132,8 @@ zfcp_qdio_allocate_queues(struct zfcp_adapter *adapter) ...@@ -133,9 +132,8 @@ zfcp_qdio_allocate_queues(struct zfcp_adapter *adapter)
zfcp_qdio_buffers_enqueue(&(adapter->request_queue.buffer[0]), zfcp_qdio_buffers_enqueue(&(adapter->request_queue.buffer[0]),
QDIO_MAX_BUFFERS_PER_Q); QDIO_MAX_BUFFERS_PER_Q);
if (buffer_count < QDIO_MAX_BUFFERS_PER_Q) { if (buffer_count < QDIO_MAX_BUFFERS_PER_Q) {
ZFCP_LOG_DEBUG("error: Out of memory allocating " ZFCP_LOG_DEBUG("only %d QDIO buffers allocated for request "
"request queue, only %d buffers got. " "queue\n", buffer_count);
"Binning them.\n", buffer_count);
zfcp_qdio_buffers_dequeue(&(adapter->request_queue.buffer[0]), zfcp_qdio_buffers_dequeue(&(adapter->request_queue.buffer[0]),
buffer_count); buffer_count);
retval = -ENOMEM; retval = -ENOMEM;
...@@ -146,12 +144,11 @@ zfcp_qdio_allocate_queues(struct zfcp_adapter *adapter) ...@@ -146,12 +144,11 @@ zfcp_qdio_allocate_queues(struct zfcp_adapter *adapter)
zfcp_qdio_buffers_enqueue(&(adapter->response_queue.buffer[0]), zfcp_qdio_buffers_enqueue(&(adapter->response_queue.buffer[0]),
QDIO_MAX_BUFFERS_PER_Q); QDIO_MAX_BUFFERS_PER_Q);
if (buffer_count < QDIO_MAX_BUFFERS_PER_Q) { if (buffer_count < QDIO_MAX_BUFFERS_PER_Q) {
ZFCP_LOG_DEBUG("error: Out of memory allocating " ZFCP_LOG_DEBUG("only %d QDIO buffers allocated for response "
"response queue, only %d buffers got. " "queue", buffer_count);
"Binning them.\n", buffer_count);
zfcp_qdio_buffers_dequeue(&(adapter->response_queue.buffer[0]), zfcp_qdio_buffers_dequeue(&(adapter->response_queue.buffer[0]),
buffer_count); buffer_count);
ZFCP_LOG_TRACE("Deallocating request_queue Buffers.\n"); ZFCP_LOG_TRACE("freeing request_queue buffers\n");
zfcp_qdio_buffers_dequeue(&(adapter->request_queue.buffer[0]), zfcp_qdio_buffers_dequeue(&(adapter->request_queue.buffer[0]),
QDIO_MAX_BUFFERS_PER_Q); QDIO_MAX_BUFFERS_PER_Q);
retval = -ENOMEM; retval = -ENOMEM;
...@@ -165,11 +162,11 @@ zfcp_qdio_allocate_queues(struct zfcp_adapter *adapter) ...@@ -165,11 +162,11 @@ zfcp_qdio_allocate_queues(struct zfcp_adapter *adapter)
void void
zfcp_qdio_free_queues(struct zfcp_adapter *adapter) zfcp_qdio_free_queues(struct zfcp_adapter *adapter)
{ {
ZFCP_LOG_TRACE("Deallocating request_queue Buffers.\n"); ZFCP_LOG_TRACE("freeing request_queue buffers\n");
zfcp_qdio_buffers_dequeue(&(adapter->request_queue.buffer[0]), zfcp_qdio_buffers_dequeue(&(adapter->request_queue.buffer[0]),
QDIO_MAX_BUFFERS_PER_Q); QDIO_MAX_BUFFERS_PER_Q);
ZFCP_LOG_TRACE("Deallocating response_queue Buffers.\n"); ZFCP_LOG_TRACE("freeing response_queue buffers\n");
zfcp_qdio_buffers_dequeue(&(adapter->response_queue.buffer[0]), zfcp_qdio_buffers_dequeue(&(adapter->response_queue.buffer[0]),
QDIO_MAX_BUFFERS_PER_Q); QDIO_MAX_BUFFERS_PER_Q);
} }
...@@ -237,8 +234,8 @@ zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter, ...@@ -237,8 +234,8 @@ zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter,
ZFCP_LOG_FLAGS(1, "QDIO_STATUS_LOOK_FOR_ERROR \n"); ZFCP_LOG_FLAGS(1, "QDIO_STATUS_LOOK_FOR_ERROR \n");
ZFCP_LOG_INFO("A qdio problem occured. The status, qdio_error " ZFCP_LOG_INFO("QDIO problem occurred (status=0x%x, "
"and siga_error are 0x%x, 0x%x and 0x%x\n", "qdio_error=0x%x, siga_error=0x%x)\n",
status, qdio_error, siga_error); status, qdio_error, siga_error);
if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) { if (status & QDIO_STATUS_ACTIVATE_CHECK_CONDITION) {
...@@ -273,8 +270,8 @@ zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter, ...@@ -273,8 +270,8 @@ zfcp_qdio_handler_error_check(struct zfcp_adapter *adapter,
ZFCP_LOG_FLAGS(1, "SLSB_P_OUTPUT_ERROR\n"); ZFCP_LOG_FLAGS(1, "SLSB_P_OUTPUT_ERROR\n");
break; break;
default: default:
ZFCP_LOG_NORMAL("bug: Unknown qdio error reported " ZFCP_LOG_NORMAL("bug: unknown QDIO error 0x%x\n",
"(debug info 0x%x)\n", qdio_error); qdio_error);
break; break;
} }
/* Restarting IO on the failed adapter from scratch */ /* Restarting IO on the failed adapter from scratch */
...@@ -317,7 +314,7 @@ zfcp_qdio_request_handler(struct ccw_device *ccw_device, ...@@ -317,7 +314,7 @@ zfcp_qdio_request_handler(struct ccw_device *ccw_device,
adapter = (struct zfcp_adapter *) int_parm; adapter = (struct zfcp_adapter *) int_parm;
queue = &adapter->request_queue; queue = &adapter->request_queue;
ZFCP_LOG_DEBUG("busid=%s, first=%d, count=%d\n", ZFCP_LOG_DEBUG("adapter %s, first=%d, elements_processed=%d\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
first_element, elements_processed); first_element, elements_processed);
...@@ -336,7 +333,7 @@ zfcp_qdio_request_handler(struct ccw_device *ccw_device, ...@@ -336,7 +333,7 @@ zfcp_qdio_request_handler(struct ccw_device *ccw_device,
atomic_add(elements_processed, &queue->free_count); atomic_add(elements_processed, &queue->free_count);
ZFCP_LOG_DEBUG("free_count=%d\n", atomic_read(&queue->free_count)); ZFCP_LOG_DEBUG("free_count=%d\n", atomic_read(&queue->free_count));
wake_up(&adapter->request_wq); wake_up(&adapter->request_wq);
ZFCP_LOG_DEBUG("Elements_processed = %d, free count=%d\n", ZFCP_LOG_DEBUG("elements_processed=%d, free count=%d\n",
elements_processed, atomic_read(&queue->free_count)); elements_processed, atomic_read(&queue->free_count));
out: out:
return; return;
...@@ -383,7 +380,7 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device, ...@@ -383,7 +380,7 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device,
*/ */
buffere = &(queue->buffer[first_element]->element[0]); buffere = &(queue->buffer[first_element]->element[0]);
ZFCP_LOG_DEBUG("first BUFFERE flags=0x%x \n", buffere->flags); ZFCP_LOG_DEBUG("first BUFFERE flags=0x%x\n", buffere->flags);
/* /*
* go through all SBALs from input queue currently * go through all SBALs from input queue currently
* returned by QDIO layer * returned by QDIO layer
...@@ -406,19 +403,20 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device, ...@@ -406,19 +403,20 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device,
(void *) buffere->addr); (void *) buffere->addr);
if (retval) { if (retval) {
ZFCP_LOG_NORMAL ZFCP_LOG_NORMAL("bug: unexpected inbound "
("bug: Inbound packet seems not to " "packet on adapter %s "
"have been sent at all. It will be " "(reqid=0x%lx, "
"ignored. (debug info 0x%lx, 0x%lx, " "first_element=%d, "
"%d, %d, %s)\n", "elements_processed=%d)\n",
zfcp_get_busid_by_adapter(adapter),
(unsigned long) buffere->addr, (unsigned long) buffere->addr,
(unsigned long) &(buffere->addr), first_element,
first_element, elements_processed, elements_processed);
zfcp_get_busid_by_adapter(adapter)); ZFCP_LOG_NORMAL("hex dump of inbound buffer "
ZFCP_LOG_NORMAL("Dump of inbound BUFFER %d " "at address %p "
"BUFFERE %d at address 0x%lx\n", "(buffer_index=%d, "
buffer_index, buffere_index, "buffere_index=%d)\n", buffer,
(unsigned long) buffer); buffer_index, buffere_index);
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
(char *) buffer, SBAL_SIZE); (char *) buffer, SBAL_SIZE);
} }
...@@ -445,8 +443,9 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device, ...@@ -445,8 +443,9 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device,
count = atomic_read(&queue->free_count) + elements_processed; count = atomic_read(&queue->free_count) + elements_processed;
start = queue->free_index; start = queue->free_index;
ZFCP_LOG_TRACE("Calling do QDIO busid=%s, flags=0x%x, queue_no=%i, " ZFCP_LOG_TRACE("calling do_QDIO on adapter %s (flags=0x%x, "
"index_in_queue=%i, count=%i, buffers=0x%lx\n", "queue_no=%i, index_in_queue=%i, count=%i, "
"buffers=0x%lx\n",
zfcp_get_busid_by_adapter(adapter), zfcp_get_busid_by_adapter(adapter),
QDIO_FLAG_SYNC_INPUT | QDIO_FLAG_UNDER_INTERRUPT, QDIO_FLAG_SYNC_INPUT | QDIO_FLAG_UNDER_INTERRUPT,
0, start, count, (unsigned long) &queue->buffer[start]); 0, start, count, (unsigned long) &queue->buffer[start]);
...@@ -457,15 +456,16 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device, ...@@ -457,15 +456,16 @@ zfcp_qdio_response_handler(struct ccw_device *ccw_device,
if (unlikely(retval)) { if (unlikely(retval)) {
atomic_set(&queue->free_count, count); atomic_set(&queue->free_count, count);
ZFCP_LOG_DEBUG("Inbound data regions could not be cleared " ZFCP_LOG_DEBUG("clearing of inbound data regions failed, "
"Transfer queues may be down. " "queues may be down "
"(info %d, %d, %d)\n", count, start, retval); "(count=%d, start=%d, retval=%d)\n",
count, start, retval);
} else { } else {
queue->free_index += count; queue->free_index += count;
queue->free_index %= QDIO_MAX_BUFFERS_PER_Q; queue->free_index %= QDIO_MAX_BUFFERS_PER_Q;
atomic_set(&queue->free_count, 0); atomic_set(&queue->free_count, 0);
ZFCP_LOG_TRACE("%i buffers successfully enqueued to response " ZFCP_LOG_TRACE("%i buffers enqueued to response "
"queue starting at position %i\n", count, start); "queue at position %i\n", count, start);
} }
out: out:
return; return;
...@@ -491,8 +491,7 @@ zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, void *sbale_addr) ...@@ -491,8 +491,7 @@ zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, void *sbale_addr)
/* invalid (per convention used in this driver) */ /* invalid (per convention used in this driver) */
if (unlikely(!sbale_addr)) { if (unlikely(!sbale_addr)) {
ZFCP_LOG_NORMAL ZFCP_LOG_NORMAL("bug: invalid reqid\n");
("bug: Inbound data faulty, contains null-pointer!\n");
retval = -EINVAL; retval = -EINVAL;
goto out; goto out;
} }
...@@ -501,11 +500,9 @@ zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, void *sbale_addr) ...@@ -501,11 +500,9 @@ zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, void *sbale_addr)
fsf_req = (struct zfcp_fsf_req *) sbale_addr; fsf_req = (struct zfcp_fsf_req *) sbale_addr;
if (unlikely(adapter != fsf_req->adapter)) { if (unlikely(adapter != fsf_req->adapter)) {
ZFCP_LOG_NORMAL("bug: An inbound FSF acknowledgement was not " ZFCP_LOG_NORMAL("bug: invalid reqid (fsf_req=%p, "
"correct (debug info 0x%lx, 0x%lx, 0%lx) \n", "fsf_req->adapter=%p, adapter=%p)\n",
(unsigned long) fsf_req, fsf_req, fsf_req->adapter, adapter);
(unsigned long) fsf_req->adapter,
(unsigned long) adapter);
retval = -EINVAL; retval = -EINVAL;
goto out; goto out;
} }
...@@ -515,10 +512,9 @@ zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, void *sbale_addr) ...@@ -515,10 +512,9 @@ zfcp_qdio_reqid_check(struct zfcp_adapter *adapter, void *sbale_addr)
&fsf_req->qtcb->prefix.req_seq_no, sizeof (u32)); &fsf_req->qtcb->prefix.req_seq_no, sizeof (u32));
} }
ZFCP_LOG_TRACE("fsf_req at 0x%lx, QTCB at 0x%lx\n", ZFCP_LOG_TRACE("fsf_req at %p, QTCB at %p\n", fsf_req, fsf_req->qtcb);
(unsigned long) fsf_req, (unsigned long) fsf_req->qtcb);
if (likely(fsf_req->qtcb)) { if (likely(fsf_req->qtcb)) {
ZFCP_LOG_TRACE("HEX DUMP OF 1ST BUFFERE PAYLOAD (QTCB):\n"); ZFCP_LOG_TRACE("hex dump of QTCB:\n");
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_TRACE, (char *) fsf_req->qtcb, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_TRACE, (char *) fsf_req->qtcb,
sizeof(struct fsf_qtcb)); sizeof(struct fsf_qtcb));
} }
...@@ -889,8 +885,8 @@ zfcp_qdio_zero_sbals(struct qdio_buffer *buf[], int first, int clean_count) ...@@ -889,8 +885,8 @@ zfcp_qdio_zero_sbals(struct qdio_buffer *buf[], int first, int clean_count)
for (cur_pos = first; cur_pos < (first + clean_count); cur_pos++) { for (cur_pos = first; cur_pos < (first + clean_count); cur_pos++) {
index = cur_pos % QDIO_MAX_BUFFERS_PER_Q; index = cur_pos % QDIO_MAX_BUFFERS_PER_Q;
memset(buf[index], 0, sizeof (struct qdio_buffer)); memset(buf[index], 0, sizeof (struct qdio_buffer));
ZFCP_LOG_TRACE("zeroing BUFFER %d at address 0x%lx\n", ZFCP_LOG_TRACE("zeroing BUFFER %d at address %p\n",
index, (unsigned long) buf[index]); index, buf[index]);
} }
} }
......
...@@ -212,8 +212,8 @@ zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) ...@@ -212,8 +212,8 @@ zfcp_scsi_slave_destroy(struct scsi_device *sdpnt)
unit->device = NULL; unit->device = NULL;
zfcp_unit_put(unit); zfcp_unit_put(unit);
} else { } else {
ZFCP_LOG_INFO("no unit associated with SCSI device at " ZFCP_LOG_NORMAL("bug: no unit associated with SCSI device at "
"address 0x%lx\n", (unsigned long) sdpnt); "address %p\n", sdpnt);
} }
} }
...@@ -273,11 +273,9 @@ zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit, ...@@ -273,11 +273,9 @@ zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit,
if (unlikely( if (unlikely(
atomic_test_mask(ZFCP_STATUS_COMMON_ERP_FAILED, &unit->status) || atomic_test_mask(ZFCP_STATUS_COMMON_ERP_FAILED, &unit->status) ||
!atomic_test_mask(ZFCP_STATUS_COMMON_RUNNING, &unit->status))) { !atomic_test_mask(ZFCP_STATUS_COMMON_RUNNING, &unit->status))) {
ZFCP_LOG_DEBUG("Stopping SCSI IO on the unit with " ZFCP_LOG_DEBUG("stopping SCSI I/O on unit 0x%016Lx on port "
"FCP LUN 0x%Lx connected to the port " "0x%016Lx on adapter %s\n",
"with WWPN 0x%Lx at the adapter %s.\n", unit->fcp_lun, unit->port->wwpn,
unit->fcp_lun,
unit->port->wwpn,
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
zfcp_scsi_command_fail(scpnt, DID_ERROR); zfcp_scsi_command_fail(scpnt, DID_ERROR);
goto out; goto out;
...@@ -285,8 +283,8 @@ zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit, ...@@ -285,8 +283,8 @@ zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit,
if (unlikely( if (unlikely(
!atomic_test_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status))) { !atomic_test_mask(ZFCP_STATUS_COMMON_UNBLOCKED, &unit->status))) {
ZFCP_LOG_DEBUG("adapter %s not ready or unit with LUN 0x%Lx " ZFCP_LOG_DEBUG("adapter %s not ready or unit 0x%016Lx "
"on the port with WWPN 0x%Lx in recovery.\n", "on port 0x%016Lx in recovery\n",
zfcp_get_busid_by_unit(unit), zfcp_get_busid_by_unit(unit),
unit->fcp_lun, unit->port->wwpn); unit->fcp_lun, unit->port->wwpn);
retval = SCSI_MLQUEUE_DEVICE_BUSY; retval = SCSI_MLQUEUE_DEVICE_BUSY;
...@@ -297,7 +295,7 @@ zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit, ...@@ -297,7 +295,7 @@ zfcp_scsi_command_async(struct zfcp_adapter *adapter, struct zfcp_unit *unit,
ZFCP_REQ_AUTO_CLEANUP); ZFCP_REQ_AUTO_CLEANUP);
if (unlikely(tmp < 0)) { if (unlikely(tmp < 0)) {
ZFCP_LOG_DEBUG("error: Could not send a Send FCP Command\n"); ZFCP_LOG_DEBUG("error: initiation of Send FCP Cmnd failed\n");
retval = SCSI_MLQUEUE_HOST_BUSY; retval = SCSI_MLQUEUE_HOST_BUSY;
} else { } else {
debug_text_event(adapter->req_dbf, 3, "q_scpnt"); debug_text_event(adapter->req_dbf, 3, "q_scpnt");
...@@ -443,11 +441,8 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) ...@@ -443,11 +441,8 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
scpnt->cmnd, scpnt->cmnd,
min(scpnt->cmd_len, (unsigned char) ZFCP_ABORT_DBF_LENGTH)); min(scpnt->cmd_len, (unsigned char) ZFCP_ABORT_DBF_LENGTH));
/*TRACE*/ ZFCP_LOG_INFO("aborting scsi_cmnd=%p on adapter %s\n",
ZFCP_LOG_INFO scpnt, zfcp_get_busid_by_adapter(adapter));
("Aborting for adapter=0x%lx, busid=%s, scsi_cmnd=0x%lx\n",
(unsigned long) adapter, zfcp_get_busid_by_adapter(adapter),
(unsigned long) scpnt);
spin_unlock_irq(scsi_host->host_lock); spin_unlock_irq(scsi_host->host_lock);
...@@ -469,7 +464,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) ...@@ -469,7 +464,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
*/ */
req_data = (union zfcp_req_data *) scpnt->host_scribble; req_data = (union zfcp_req_data *) scpnt->host_scribble;
/* DEBUG */ /* DEBUG */
ZFCP_LOG_DEBUG("req_data=0x%lx\n", (unsigned long) req_data); ZFCP_LOG_DEBUG("req_data=%p\n", req_data);
if (!req_data) { if (!req_data) {
ZFCP_LOG_DEBUG("late command completion overtook abort\n"); ZFCP_LOG_DEBUG("late command completion overtook abort\n");
/* /*
...@@ -489,11 +484,10 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) ...@@ -489,11 +484,10 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
dbf_timeout = dbf_timeout =
(jiffies - req_data->send_fcp_command_task.start_jiffies) / HZ; (jiffies - req_data->send_fcp_command_task.start_jiffies) / HZ;
/* DEBUG */ ZFCP_LOG_DEBUG("old_fsf_req=%p\n", old_fsf_req);
ZFCP_LOG_DEBUG("old_fsf_req=0x%lx\n", (unsigned long) old_fsf_req);
if (!old_fsf_req) { if (!old_fsf_req) {
write_unlock_irqrestore(&adapter->abort_lock, flags); write_unlock_irqrestore(&adapter->abort_lock, flags);
ZFCP_LOG_NORMAL("bug: No old fsf request found.\n"); ZFCP_LOG_NORMAL("bug: no old fsf request found\n");
ZFCP_LOG_NORMAL("req_data:\n"); ZFCP_LOG_NORMAL("req_data:\n");
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL,
(char *) req_data, sizeof (union zfcp_req_data)); (char *) req_data, sizeof (union zfcp_req_data));
...@@ -517,8 +511,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) ...@@ -517,8 +511,7 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
* Since this lock will not be held, fsf_req may complete * Since this lock will not be held, fsf_req may complete
* late and may be released meanwhile. * late and may be released meanwhile.
*/ */
ZFCP_LOG_DEBUG("unit=0x%lx, unit_fcp_lun=0x%Lx\n", ZFCP_LOG_DEBUG("unit 0x%016Lx (%p)\n", unit->fcp_lun, unit);
(unsigned long) unit, unit->fcp_lun);
/* /*
* The 'Abort FCP Command' routine may block (call schedule) * The 'Abort FCP Command' routine may block (call schedule)
...@@ -533,18 +526,18 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt) ...@@ -533,18 +526,18 @@ zfcp_scsi_eh_abort_handler(struct scsi_cmnd *scpnt)
new_fsf_req = zfcp_fsf_abort_fcp_command((unsigned long) old_fsf_req, new_fsf_req = zfcp_fsf_abort_fcp_command((unsigned long) old_fsf_req,
adapter, adapter,
unit, ZFCP_WAIT_FOR_SBAL); unit, ZFCP_WAIT_FOR_SBAL);
ZFCP_LOG_DEBUG("new_fsf_req=0x%lx\n", (unsigned long) new_fsf_req); ZFCP_LOG_DEBUG("new_fsf_req=%p\n", new_fsf_req);
if (!new_fsf_req) { if (!new_fsf_req) {
retval = FAILED; retval = FAILED;
ZFCP_LOG_DEBUG("warning: Could not abort SCSI command " ZFCP_LOG_NORMAL("error: initiation of Abort FCP Cmnd "
"at 0x%lx\n", (unsigned long) scpnt); "failed\n");
strncpy(dbf_result, "##nores", ZFCP_ABORT_DBF_LENGTH); strncpy(dbf_result, "##nores", ZFCP_ABORT_DBF_LENGTH);
goto out; goto out;
} }
/* wait for completion of abort */ /* wait for completion of abort */
ZFCP_LOG_DEBUG("Waiting for cleanup....\n"); ZFCP_LOG_DEBUG("waiting for cleanup...\n");
#ifdef 1 #if 1
/* /*
* FIXME: * FIXME:
* copying zfcp_fsf_req_wait_and_cleanup code is not really nice * copying zfcp_fsf_req_wait_and_cleanup code is not really nice
...@@ -615,11 +608,11 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) ...@@ -615,11 +608,11 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt)
spin_unlock_irq(scsi_host->host_lock); spin_unlock_irq(scsi_host->host_lock);
if (!unit) { if (!unit) {
ZFCP_LOG_NORMAL("bug: Tried to reset a non existant unit.\n"); ZFCP_LOG_NORMAL("bug: Tried reset for nonexistent unit\n");
retval = SUCCESS; retval = SUCCESS;
goto out; goto out;
} }
ZFCP_LOG_NORMAL("Resetting Device fcp_lun=0x%Lx\n", unit->fcp_lun); ZFCP_LOG_NORMAL("resetting unit 0x%016Lx\n", unit->fcp_lun);
/* /*
* If we do not know whether the unit supports 'logical unit reset' * If we do not know whether the unit supports 'logical unit reset'
...@@ -633,18 +626,15 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) ...@@ -633,18 +626,15 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt)
retval = retval =
zfcp_task_management_function(unit, LOGICAL_UNIT_RESET); zfcp_task_management_function(unit, LOGICAL_UNIT_RESET);
if (retval) { if (retval) {
ZFCP_LOG_DEBUG ZFCP_LOG_DEBUG("unit reset failed (unit=%p)\n", unit);
("logical unit reset failed (unit=0x%lx)\n",
(unsigned long) unit);
if (retval == -ENOTSUPP) if (retval == -ENOTSUPP)
atomic_set_mask atomic_set_mask
(ZFCP_STATUS_UNIT_NOTSUPPUNITRESET, (ZFCP_STATUS_UNIT_NOTSUPPUNITRESET,
&unit->status); &unit->status);
/* fall through and try 'target reset' next */ /* fall through and try 'target reset' next */
} else { } else {
ZFCP_LOG_DEBUG ZFCP_LOG_DEBUG("unit reset succeeded (unit=%p)\n",
("logical unit reset succeeded (unit=0x%lx)\n", unit);
(unsigned long) unit);
/* avoid 'target reset' */ /* avoid 'target reset' */
retval = SUCCESS; retval = SUCCESS;
goto out; goto out;
...@@ -652,12 +642,10 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt) ...@@ -652,12 +642,10 @@ zfcp_scsi_eh_device_reset_handler(struct scsi_cmnd *scpnt)
} }
retval = zfcp_task_management_function(unit, TARGET_RESET); retval = zfcp_task_management_function(unit, TARGET_RESET);
if (retval) { if (retval) {
ZFCP_LOG_DEBUG("target reset failed (unit=0x%lx)\n", ZFCP_LOG_DEBUG("target reset failed (unit=%p)\n", unit);
(unsigned long) unit);
retval = FAILED; retval = FAILED;
} else { } else {
ZFCP_LOG_DEBUG("target reset succeeded (unit=0x%lx)\n", ZFCP_LOG_DEBUG("target reset succeeded (unit=%p)\n", unit);
(unsigned long) unit);
retval = SUCCESS; retval = SUCCESS;
} }
out: out:
...@@ -677,13 +665,9 @@ zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags) ...@@ -677,13 +665,9 @@ zfcp_task_management_function(struct zfcp_unit *unit, u8 tm_flags)
fsf_req = zfcp_fsf_send_fcp_command_task_management fsf_req = zfcp_fsf_send_fcp_command_task_management
(adapter, unit, tm_flags, ZFCP_WAIT_FOR_SBAL); (adapter, unit, tm_flags, ZFCP_WAIT_FOR_SBAL);
if (!fsf_req) { if (!fsf_req) {
ZFCP_LOG_INFO("error: Out of resources. Could not create a " ZFCP_LOG_INFO("error: creation of task management request "
"task management (abort, reset, etc) request " "failed for unit 0x%016Lx on port 0x%016Lx on "
"for the unit with FCP-LUN 0x%Lx connected to " "adapter %s\n", unit->fcp_lun, unit->port->wwpn,
"the port with WWPN 0x%Lx connected to "
"the adapter %s.\n",
unit->fcp_lun,
unit->port->wwpn,
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
retval = -ENOMEM; retval = -ENOMEM;
goto out; goto out;
...@@ -722,10 +706,8 @@ zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt) ...@@ -722,10 +706,8 @@ zfcp_scsi_eh_bus_reset_handler(struct scsi_cmnd *scpnt)
spin_unlock_irq(scsi_host->host_lock); spin_unlock_irq(scsi_host->host_lock);
unit = (struct zfcp_unit *) scpnt->device->hostdata; unit = (struct zfcp_unit *) scpnt->device->hostdata;
/*DEBUG*/ ZFCP_LOG_NORMAL("bus reset because of problems with "
ZFCP_LOG_NORMAL("Resetting because of problems with " "unit 0x%016Lx\n", unit->fcp_lun);
"unit=0x%lx, unit_fcp_lun=0x%Lx\n",
(unsigned long) unit, unit->fcp_lun);
zfcp_erp_adapter_reopen(unit->port->adapter, 0); zfcp_erp_adapter_reopen(unit->port->adapter, 0);
zfcp_erp_wait(unit->port->adapter); zfcp_erp_wait(unit->port->adapter);
retval = SUCCESS; retval = SUCCESS;
...@@ -751,10 +733,8 @@ zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt) ...@@ -751,10 +733,8 @@ zfcp_scsi_eh_host_reset_handler(struct scsi_cmnd *scpnt)
spin_unlock_irq(scsi_host->host_lock); spin_unlock_irq(scsi_host->host_lock);
unit = (struct zfcp_unit *) scpnt->device->hostdata; unit = (struct zfcp_unit *) scpnt->device->hostdata;
/*DEBUG*/ ZFCP_LOG_NORMAL("host reset because of problems with "
ZFCP_LOG_NORMAL("Resetting because of problems with " "unit 0x%016Lx\n", unit->fcp_lun);
"unit=0x%lx, unit_fcp_lun=0x%Lx\n",
(unsigned long) unit, unit->fcp_lun);
zfcp_erp_adapter_reopen(unit->port->adapter, 0); zfcp_erp_adapter_reopen(unit->port->adapter, 0);
zfcp_erp_wait(unit->port->adapter); zfcp_erp_wait(unit->port->adapter);
retval = SUCCESS; retval = SUCCESS;
...@@ -780,15 +760,13 @@ zfcp_adapter_scsi_register(struct zfcp_adapter *adapter) ...@@ -780,15 +760,13 @@ zfcp_adapter_scsi_register(struct zfcp_adapter *adapter)
adapter->scsi_host = scsi_host_alloc(&zfcp_data.scsi_host_template, adapter->scsi_host = scsi_host_alloc(&zfcp_data.scsi_host_template,
sizeof (struct zfcp_adapter *)); sizeof (struct zfcp_adapter *));
if (!adapter->scsi_host) { if (!adapter->scsi_host) {
ZFCP_LOG_NORMAL("error: Not enough free memory. " ZFCP_LOG_NORMAL("error: registration with SCSI stack failed "
"Could not register adapter %s " "for adapter %s ",
"with the SCSI-stack.\n",
zfcp_get_busid_by_adapter(adapter)); zfcp_get_busid_by_adapter(adapter));
retval = -EIO; retval = -EIO;
goto out; goto out;
} }
ZFCP_LOG_DEBUG("host registered, scsi_host at 0x%lx\n", ZFCP_LOG_DEBUG("host registered, scsi_host=%p\n", adapter->scsi_host);
(unsigned long) adapter->scsi_host);
/* tell the SCSI stack some characteristics of this adapter */ /* tell the SCSI stack some characteristics of this adapter */
adapter->scsi_host->max_id = 1; adapter->scsi_host->max_id = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment