linux-stable/drivers/s390/scsi
Steffen Maier 5d4a3d0a2f scsi: zfcp: trace high part of "new" 64 bit SCSI LUN
Complements debugging aspects of the otherwise functionally complete
v3.17 commit 9cb78c16f5 ("scsi: use 64-bit LUNs").

While I don't have access to a target exporting 3 or 4 level LUNs,
I did test it by explicitly attaching a non-existent fake 4 level LUN
by means of zfcp sysfs attribute "unit_add".
In order to see corresponding trace records of otherwise successful
events, we had to increase the trace level of area SCSI and HBA to 6.

$ echo 6 > /sys/kernel/debug/s390dbf/zfcp_0.0.1880_scsi/level
$ echo 6 > /sys/kernel/debug/s390dbf/zfcp_0.0.1880_hba/level

$ echo 0x4011402240334044 > \
  /sys/bus/ccw/drivers/zfcp/0.0.1880/0x50050763031bd327/unit_add

Example output formatted by an updated zfcpdbf from the s390-tools
package interspersed with kernel messages at scsi_logging_level=4605:

Timestamp      : ...
Area           : REC
Subarea        : 00
Level          : 1
Exception      : -
CPU ID         : ..
Caller         : 0x...
Record ID      : 1
Tag            : scsla_1
LUN            : 0x4011402240334044
WWPN           : 0x50050763031bd327
D_ID           : 0x00......
Adapter status : 0x5400050b
Port status    : 0x54000001
LUN status     : 0x41000000
Ready count    : 0x00000001
Running count  : 0x00000000
ERP want       : 0x01
ERP need       : 0x01

scsi 2:0:0:4630896905707208721: scsi scan: INQUIRY pass 1 length 36
scsi 2:0:0:4630896905707208721: scsi scan: INQUIRY successful with code 0x0

Timestamp      : ...
Area           : HBA
Subarea        : 00
Level          : 6
Exception      : -
CPU ID         : ..
Caller         : 0x...
Record ID      : 1
Tag            : fs_norm
Request ID     : 0x<inquiry2-req-id>
Request status : 0x00000010
FSF cmnd       : 0x00000001
FSF sequence no: 0x...
FSF issued     : ...
FSF stat       : 0x00000000
FSF stat qual  : 00000000 00000000 00000000 00000000
Prot stat      : 0x00000001
Prot stat qual : ........ ........ 00000000 00000000
Port handle    : 0x...
LUN handle     : 0x...
|
Timestamp      : ...
Area           : SCSI
Subarea        : 00
Level          : 6
Exception      : -
CPU ID         : ..
Caller         : 0x...
Record ID      : 1
Tag            : rsl_nor
Request ID     : 0x<inquiry2-req-id>
SCSI ID        : 0x00000000
SCSI LUN       : 0x40224011
SCSI LUN high  : 0x40444033 <=======================
SCSI result    : 0x00000000
SCSI retries   : 0x00
SCSI allowed   : 0x03
SCSI scribble  : 0x<inquiry2-req-id>
SCSI opcode    : 12000000 a4000000 00000000 00000000
FCP rsp inf cod: 0x00
FCP rsp IU     : 00000000 00000000 00000000 00000000
                 00000000 00000000

scsi 2:0:0:4630896905707208721: scsi scan: INQUIRY pass 2 length 164
scsi 2:0:0:4630896905707208721: scsi scan: INQUIRY successful with code 0x0
scsi 2:0:0:4630896905707208721: scsi scan: peripheral device type of 31, \
no device added

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Fixes: 9cb78c16f5 ("scsi: use 64-bit LUNs")
Cc: <stable@vger.kernel.org> #3.17+
Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Reviewed-by: Jens Remus <jremus@linux.vnet.ibm.com>
Signed-off-by: Benjamin Block <bblock@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-08-10 19:36:58 -04:00
..
Makefile [SCSI] zfcp: remove access control tables interface 2013-05-31 16:32:38 -07:00
zfcp_aux.c scsi: zfcp: Remove unneeded linux/miscdevice.h include 2017-08-10 19:36:53 -04:00
zfcp_ccw.c zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_dbf.c scsi: zfcp: trace high part of "new" 64 bit SCSI LUN 2017-08-10 19:36:58 -04:00
zfcp_dbf.h scsi: zfcp: trace high part of "new" 64 bit SCSI LUN 2017-08-10 19:36:58 -04:00
zfcp_def.h zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_erp.c scsi: zfcp: use setup_timer instead of init_timer 2017-08-10 19:36:53 -04:00
zfcp_ext.h scsi: zfcp: fix rport unblock race with LUN recovery 2016-12-14 15:17:20 -05:00
zfcp_fc.c scsi: fc: use bsg_job_done 2016-11-17 20:15:26 -05:00
zfcp_fc.h scsi: zfcp: add handling for FCP_RESID_OVER to the fcp ingress path 2017-08-10 19:36:55 -04:00
zfcp_fsf.c scsi: zfcp: fix capping of unsuccessful GPN_FT SAN response trace records 2017-08-10 19:36:55 -04:00
zfcp_fsf.h scsi: zfcp: do not trace pure benign residual HBA responses at default level 2016-12-14 15:15:48 -05:00
zfcp_qdio.c scsi: zfcp: convert bool-definitions to use 'true' instead of '1' 2017-08-10 19:36:54 -04:00
zfcp_qdio.h scsi: zfcp: replace zfcp_qdio_sbale_count by sg_nents 2017-08-10 19:36:52 -04:00
zfcp_reqlist.h scsi: zfcp: fix use-after-"free" in FC ingress path after TMF 2016-12-14 15:14:04 -05:00
zfcp_scsi.c scsi: zfcp: fix missing trace records for early returns in TMF eh handlers 2017-08-10 19:36:56 -04:00
zfcp_sysfs.c zfcp: auto port scan resiliency 2014-11-20 09:11:30 +01:00
zfcp_unit.c zfcp: Revert to original scanning behaviour 2016-04-15 16:53:12 -04:00