Skip to content

Commit 1d589ed

Browse files
Christof SchmittJames Bottomley
authored andcommitted
[SCSI] zfcp: print S_ID and D_ID with 3 bytes
S_ID and D_ID are defined in the FCP spec as 3 byte fields. Change the output in zfcp print statements accordingly to print them with only 3 bytes. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1 parent 463fc69 commit 1d589ed

File tree

3 files changed

+28
-28
lines changed

3 files changed

+28
-28
lines changed

drivers/s390/scsi/zfcp_aux.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,7 @@ zfcp_fsf_incoming_els_plogi(struct zfcp_adapter *adapter,
14971497

14981498
if (!port || (port->wwpn != (*(wwn_t *) &els_plogi->serv_param.wwpn))) {
14991499
ZFCP_LOG_DEBUG("ignored incoming PLOGI for nonexisting port "
1500-
"with d_id 0x%08x on adapter %s\n",
1500+
"with d_id 0x%06x on adapter %s\n",
15011501
status_buffer->d_id,
15021502
zfcp_get_busid_by_adapter(adapter));
15031503
} else {
@@ -1522,7 +1522,7 @@ zfcp_fsf_incoming_els_logo(struct zfcp_adapter *adapter,
15221522

15231523
if (!port || (port->wwpn != els_logo->nport_wwpn)) {
15241524
ZFCP_LOG_DEBUG("ignored incoming LOGO for nonexisting port "
1525-
"with d_id 0x%08x on adapter %s\n",
1525+
"with d_id 0x%06x on adapter %s\n",
15261526
status_buffer->d_id,
15271527
zfcp_get_busid_by_adapter(adapter));
15281528
} else {
@@ -1704,7 +1704,7 @@ static void zfcp_ns_gid_pn_handler(unsigned long data)
17041704
/* looks like a valid d_id */
17051705
port->d_id = ct_iu_resp->d_id & ZFCP_DID_MASK;
17061706
atomic_set_mask(ZFCP_STATUS_PORT_DID_DID, &port->status);
1707-
ZFCP_LOG_DEBUG("adapter %s: wwpn=0x%016Lx ---> d_id=0x%08x\n",
1707+
ZFCP_LOG_DEBUG("adapter %s: wwpn=0x%016Lx ---> d_id=0x%06x\n",
17081708
zfcp_get_busid_by_port(port), port->wwpn, port->d_id);
17091709
goto out;
17101710

drivers/s390/scsi/zfcp_erp.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -342,17 +342,17 @@ zfcp_erp_adisc(struct zfcp_port *port)
342342
adisc->wwpn = fc_host_port_name(adapter->scsi_host);
343343
adisc->wwnn = fc_host_node_name(adapter->scsi_host);
344344
adisc->nport_id = fc_host_port_id(adapter->scsi_host);
345-
ZFCP_LOG_INFO("ADISC request from s_id 0x%08x to d_id 0x%08x "
345+
ZFCP_LOG_INFO("ADISC request from s_id 0x%06x to d_id 0x%06x "
346346
"(wwpn=0x%016Lx, wwnn=0x%016Lx, "
347-
"hard_nport_id=0x%08x, nport_id=0x%08x)\n",
347+
"hard_nport_id=0x%06x, nport_id=0x%06x)\n",
348348
adisc->nport_id, send_els->d_id, (wwn_t) adisc->wwpn,
349349
(wwn_t) adisc->wwnn, adisc->hard_nport_id,
350350
adisc->nport_id);
351351

352352
retval = zfcp_fsf_send_els(send_els);
353353
if (retval != 0) {
354354
ZFCP_LOG_NORMAL("error: initiation of Send ELS failed for port "
355-
"0x%08x on adapter %s\n", send_els->d_id,
355+
"0x%06x on adapter %s\n", send_els->d_id,
356356
zfcp_get_busid_by_adapter(adapter));
357357
goto freemem;
358358
}
@@ -398,7 +398,7 @@ zfcp_erp_adisc_handler(unsigned long data)
398398
if (send_els->status != 0) {
399399
ZFCP_LOG_NORMAL("ELS request rejected/timed out, "
400400
"force physical port reopen "
401-
"(adapter %s, port d_id=0x%08x)\n",
401+
"(adapter %s, port d_id=0x%06x)\n",
402402
zfcp_get_busid_by_adapter(adapter), d_id);
403403
debug_text_event(adapter->erp_dbf, 3, "forcreop");
404404
if (zfcp_erp_port_forced_reopen(port, 0))
@@ -411,9 +411,9 @@ zfcp_erp_adisc_handler(unsigned long data)
411411

412412
adisc = zfcp_sg_to_address(send_els->resp);
413413

414-
ZFCP_LOG_INFO("ADISC response from d_id 0x%08x to s_id "
415-
"0x%08x (wwpn=0x%016Lx, wwnn=0x%016Lx, "
416-
"hard_nport_id=0x%08x, nport_id=0x%08x)\n",
414+
ZFCP_LOG_INFO("ADISC response from d_id 0x%06x to s_id "
415+
"0x%06x (wwpn=0x%016Lx, wwnn=0x%016Lx, "
416+
"hard_nport_id=0x%06x, nport_id=0x%06x)\n",
417417
d_id, fc_host_port_id(adapter->scsi_host),
418418
(wwn_t) adisc->wwpn, (wwn_t) adisc->wwnn,
419419
adisc->hard_nport_id, adisc->nport_id);
@@ -1377,7 +1377,7 @@ zfcp_erp_port_failed(struct zfcp_port *port)
13771377

13781378
if (atomic_test_mask(ZFCP_STATUS_PORT_WKA, &port->status))
13791379
ZFCP_LOG_NORMAL("port erp failed (adapter %s, "
1380-
"port d_id=0x%08x)\n",
1380+
"port d_id=0x%06x)\n",
13811381
zfcp_get_busid_by_port(port), port->d_id);
13821382
else
13831383
ZFCP_LOG_NORMAL("port erp failed (adapter %s, wwpn=0x%016Lx)\n",
@@ -2401,7 +2401,7 @@ zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *erp_action)
24012401
retval = ZFCP_ERP_FAILED;
24022402
}
24032403
} else {
2404-
ZFCP_LOG_DEBUG("port 0x%016Lx has d_id=0x%08x -> "
2404+
ZFCP_LOG_DEBUG("port 0x%016Lx has d_id=0x%06x -> "
24052405
"trying open\n", port->wwpn, port->d_id);
24062406
retval = zfcp_erp_port_strategy_open_port(erp_action);
24072407
}
@@ -2441,7 +2441,7 @@ zfcp_erp_port_strategy_open_nameserver(struct zfcp_erp_action *erp_action)
24412441
case ZFCP_ERP_STEP_UNINITIALIZED:
24422442
case ZFCP_ERP_STEP_PHYS_PORT_CLOSING:
24432443
case ZFCP_ERP_STEP_PORT_CLOSING:
2444-
ZFCP_LOG_DEBUG("port 0x%016Lx has d_id=0x%08x -> trying open\n",
2444+
ZFCP_LOG_DEBUG("port 0x%016Lx has d_id=0x%06x -> trying open\n",
24452445
port->wwpn, port->d_id);
24462446
retval = zfcp_erp_port_strategy_open_port(erp_action);
24472447
break;

drivers/s390/scsi/zfcp_fsf.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req)
828828

829829
if (!port || (port->d_id != (status_buffer->d_id & ZFCP_DID_MASK))) {
830830
ZFCP_LOG_NORMAL("bug: Reopen port indication received for"
831-
"nonexisting port with d_id 0x%08x on "
831+
"nonexisting port with d_id 0x%06x on "
832832
"adapter %s. Ignored.\n",
833833
status_buffer->d_id & ZFCP_DID_MASK,
834834
zfcp_get_busid_by_adapter(adapter));
@@ -853,7 +853,7 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req)
853853
&status_buffer->status_subtype, sizeof (u32));
854854
ZFCP_LOG_NORMAL("bug: Undefined status subtype received "
855855
"for a reopen indication on port with "
856-
"d_id 0x%08x on the adapter %s. "
856+
"d_id 0x%06x on the adapter %s. "
857857
"Ignored. (debug info 0x%x)\n",
858858
status_buffer->d_id,
859859
zfcp_get_busid_by_adapter(adapter),
@@ -1156,7 +1156,7 @@ zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
11561156
}
11571157

11581158
ZFCP_LOG_DEBUG("Abort FCP Command request initiated "
1159-
"(adapter%s, port d_id=0x%08x, "
1159+
"(adapter%s, port d_id=0x%06x, "
11601160
"unit x%016Lx, old_req_id=0x%lx)\n",
11611161
zfcp_get_busid_by_adapter(adapter),
11621162
unit->port->d_id,
@@ -1554,7 +1554,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
15541554

15551555
case FSF_ACCESS_DENIED:
15561556
ZFCP_LOG_NORMAL("access denied, cannot send generic service "
1557-
"command (adapter %s, port d_id=0x%08x)\n",
1557+
"command (adapter %s, port d_id=0x%06x)\n",
15581558
zfcp_get_busid_by_port(port), port->d_id);
15591559
for (counter = 0; counter < 2; counter++) {
15601560
subtable = header->fsf_status_qual.halfword[counter * 2];
@@ -1576,7 +1576,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
15761576

15771577
case FSF_GENERIC_COMMAND_REJECTED:
15781578
ZFCP_LOG_INFO("generic service command rejected "
1579-
"(adapter %s, port d_id=0x%08x)\n",
1579+
"(adapter %s, port d_id=0x%06x)\n",
15801580
zfcp_get_busid_by_port(port), port->d_id);
15811581
ZFCP_LOG_INFO("status qualifier:\n");
15821582
ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO,
@@ -1602,7 +1602,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
16021602

16031603
case FSF_PORT_BOXED:
16041604
ZFCP_LOG_INFO("port needs to be reopened "
1605-
"(adapter %s, port d_id=0x%08x)\n",
1605+
"(adapter %s, port d_id=0x%06x)\n",
16061606
zfcp_get_busid_by_port(port), port->d_id);
16071607
debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed");
16081608
zfcp_erp_port_boxed(port);
@@ -1683,7 +1683,7 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
16831683
NULL, &lock_flags, &fsf_req);
16841684
if (ret < 0) {
16851685
ZFCP_LOG_INFO("error: creation of ELS request failed "
1686-
"(adapter %s, port d_id: 0x%08x)\n",
1686+
"(adapter %s, port d_id: 0x%06x)\n",
16871687
zfcp_get_busid_by_adapter(adapter), d_id);
16881688
goto failed_req;
16891689
}
@@ -1708,7 +1708,7 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
17081708
ZFCP_MAX_SBALS_PER_ELS_REQ);
17091709
if (bytes <= 0) {
17101710
ZFCP_LOG_INFO("error: creation of ELS request failed "
1711-
"(adapter %s, port d_id: 0x%08x)\n",
1711+
"(adapter %s, port d_id: 0x%06x)\n",
17121712
zfcp_get_busid_by_adapter(adapter), d_id);
17131713
if (bytes == 0) {
17141714
ret = -ENOMEM;
@@ -1725,7 +1725,7 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
17251725
ZFCP_MAX_SBALS_PER_ELS_REQ);
17261726
if (bytes <= 0) {
17271727
ZFCP_LOG_INFO("error: creation of ELS request failed "
1728-
"(adapter %s, port d_id: 0x%08x)\n",
1728+
"(adapter %s, port d_id: 0x%06x)\n",
17291729
zfcp_get_busid_by_adapter(adapter), d_id);
17301730
if (bytes == 0) {
17311731
ret = -ENOMEM;
@@ -1739,7 +1739,7 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
17391739
/* reject request */
17401740
ZFCP_LOG_INFO("error: microcode does not support chained SBALs"
17411741
", ELS request too big (adapter %s, "
1742-
"port d_id: 0x%08x)\n",
1742+
"port d_id: 0x%06x)\n",
17431743
zfcp_get_busid_by_adapter(adapter), d_id);
17441744
ret = -EOPNOTSUPP;
17451745
goto failed_send;
@@ -1760,13 +1760,13 @@ zfcp_fsf_send_els(struct zfcp_send_els *els)
17601760
ret = zfcp_fsf_req_send(fsf_req);
17611761
if (ret) {
17621762
ZFCP_LOG_DEBUG("error: initiation of ELS request failed "
1763-
"(adapter %s, port d_id: 0x%08x)\n",
1763+
"(adapter %s, port d_id: 0x%06x)\n",
17641764
zfcp_get_busid_by_adapter(adapter), d_id);
17651765
goto failed_send;
17661766
}
17671767

17681768
ZFCP_LOG_DEBUG("ELS request initiated (adapter %s, port d_id: "
1769-
"0x%08x)\n", zfcp_get_busid_by_adapter(adapter), d_id);
1769+
"0x%06x)\n", zfcp_get_busid_by_adapter(adapter), d_id);
17701770
goto out;
17711771

17721772
failed_send:
@@ -1859,7 +1859,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
18591859
case FSF_ELS_COMMAND_REJECTED:
18601860
ZFCP_LOG_INFO("ELS has been rejected because command filter "
18611861
"prohibited sending "
1862-
"(adapter: %s, port d_id: 0x%08x)\n",
1862+
"(adapter: %s, port d_id: 0x%06x)\n",
18631863
zfcp_get_busid_by_adapter(adapter), d_id);
18641864

18651865
break;
@@ -1907,7 +1907,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
19071907

19081908
case FSF_ACCESS_DENIED:
19091909
ZFCP_LOG_NORMAL("access denied, cannot send ELS command "
1910-
"(adapter %s, port d_id=0x%08x)\n",
1910+
"(adapter %s, port d_id=0x%06x)\n",
19111911
zfcp_get_busid_by_adapter(adapter), d_id);
19121912
for (counter = 0; counter < 2; counter++) {
19131913
subtable = header->fsf_status_qual.halfword[counter * 2];
@@ -2070,7 +2070,7 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
20702070
ZFCP_LOG_NORMAL("The adapter %s reported the following characteristics:\n"
20712071
"WWNN 0x%016Lx, "
20722072
"WWPN 0x%016Lx, "
2073-
"S_ID 0x%08x,\n"
2073+
"S_ID 0x%06x,\n"
20742074
"adapter version 0x%x, "
20752075
"LIC version 0x%x, "
20762076
"FC link speed %d Gb/s\n",

0 commit comments

Comments
 (0)