]>
Commit | Line | Data |
---|---|---|
721db3cc GKH |
1 | From 5d4a3d0a2ff23799b956e5962b886287614e7fad Mon Sep 17 00:00:00 2001 |
2 | From: Steffen Maier <maier@linux.vnet.ibm.com> | |
3 | Date: Fri, 28 Jul 2017 12:30:58 +0200 | |
4 | Subject: scsi: zfcp: trace high part of "new" 64 bit SCSI LUN | |
5 | ||
6 | From: Steffen Maier <maier@linux.vnet.ibm.com> | |
7 | ||
8 | commit 5d4a3d0a2ff23799b956e5962b886287614e7fad upstream. | |
9 | ||
10 | Complements debugging aspects of the otherwise functionally complete | |
11 | v3.17 commit 9cb78c16f5da ("scsi: use 64-bit LUNs"). | |
12 | ||
13 | While I don't have access to a target exporting 3 or 4 level LUNs, | |
14 | I did test it by explicitly attaching a non-existent fake 4 level LUN | |
15 | by means of zfcp sysfs attribute "unit_add". | |
16 | In order to see corresponding trace records of otherwise successful | |
17 | events, we had to increase the trace level of area SCSI and HBA to 6. | |
18 | ||
19 | $ echo 6 > /sys/kernel/debug/s390dbf/zfcp_0.0.1880_scsi/level | |
20 | $ echo 6 > /sys/kernel/debug/s390dbf/zfcp_0.0.1880_hba/level | |
21 | ||
22 | $ echo 0x4011402240334044 > \ | |
23 | /sys/bus/ccw/drivers/zfcp/0.0.1880/0x50050763031bd327/unit_add | |
24 | ||
25 | Example output formatted by an updated zfcpdbf from the s390-tools | |
26 | package interspersed with kernel messages at scsi_logging_level=4605: | |
27 | ||
28 | Timestamp : ... | |
29 | Area : REC | |
30 | Subarea : 00 | |
31 | Level : 1 | |
32 | Exception : - | |
33 | CPU ID : .. | |
34 | Caller : 0x... | |
35 | Record ID : 1 | |
36 | Tag : scsla_1 | |
37 | LUN : 0x4011402240334044 | |
38 | WWPN : 0x50050763031bd327 | |
39 | D_ID : 0x00...... | |
40 | Adapter status : 0x5400050b | |
41 | Port status : 0x54000001 | |
42 | LUN status : 0x41000000 | |
43 | Ready count : 0x00000001 | |
44 | Running count : 0x00000000 | |
45 | ERP want : 0x01 | |
46 | ERP need : 0x01 | |
47 | ||
48 | scsi 2:0:0:4630896905707208721: scsi scan: INQUIRY pass 1 length 36 | |
49 | scsi 2:0:0:4630896905707208721: scsi scan: INQUIRY successful with code 0x0 | |
50 | ||
51 | Timestamp : ... | |
52 | Area : HBA | |
53 | Subarea : 00 | |
54 | Level : 6 | |
55 | Exception : - | |
56 | CPU ID : .. | |
57 | Caller : 0x... | |
58 | Record ID : 1 | |
59 | Tag : fs_norm | |
60 | Request ID : 0x<inquiry2-req-id> | |
61 | Request status : 0x00000010 | |
62 | FSF cmnd : 0x00000001 | |
63 | FSF sequence no: 0x... | |
64 | FSF issued : ... | |
65 | FSF stat : 0x00000000 | |
66 | FSF stat qual : 00000000 00000000 00000000 00000000 | |
67 | Prot stat : 0x00000001 | |
68 | Prot stat qual : ........ ........ 00000000 00000000 | |
69 | Port handle : 0x... | |
70 | LUN handle : 0x... | |
71 | | | |
72 | Timestamp : ... | |
73 | Area : SCSI | |
74 | Subarea : 00 | |
75 | Level : 6 | |
76 | Exception : - | |
77 | CPU ID : .. | |
78 | Caller : 0x... | |
79 | Record ID : 1 | |
80 | Tag : rsl_nor | |
81 | Request ID : 0x<inquiry2-req-id> | |
82 | SCSI ID : 0x00000000 | |
83 | SCSI LUN : 0x40224011 | |
84 | SCSI LUN high : 0x40444033 <======================= | |
85 | SCSI result : 0x00000000 | |
86 | SCSI retries : 0x00 | |
87 | SCSI allowed : 0x03 | |
88 | SCSI scribble : 0x<inquiry2-req-id> | |
89 | SCSI opcode : 12000000 a4000000 00000000 00000000 | |
90 | FCP rsp inf cod: 0x00 | |
91 | FCP rsp IU : 00000000 00000000 00000000 00000000 | |
92 | 00000000 00000000 | |
93 | ||
94 | scsi 2:0:0:4630896905707208721: scsi scan: INQUIRY pass 2 length 164 | |
95 | scsi 2:0:0:4630896905707208721: scsi scan: INQUIRY successful with code 0x0 | |
96 | scsi 2:0:0:4630896905707208721: scsi scan: peripheral device type of 31, \ | |
97 | no device added | |
98 | ||
99 | Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com> | |
100 | Fixes: 9cb78c16f5da ("scsi: use 64-bit LUNs") | |
101 | Reviewed-by: Benjamin Block <bblock@linux.vnet.ibm.com> | |
102 | Reviewed-by: Jens Remus <jremus@linux.vnet.ibm.com> | |
103 | Signed-off-by: Benjamin Block <bblock@linux.vnet.ibm.com> | |
104 | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | |
105 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
106 | ||
107 | --- | |
108 | drivers/s390/scsi/zfcp_dbf.c | 2 +- | |
109 | drivers/s390/scsi/zfcp_dbf.h | 4 +++- | |
110 | 2 files changed, 4 insertions(+), 2 deletions(-) | |
111 | ||
112 | --- a/drivers/s390/scsi/zfcp_dbf.c | |
113 | +++ b/drivers/s390/scsi/zfcp_dbf.c | |
114 | @@ -563,8 +563,8 @@ void zfcp_dbf_scsi(char *tag, int level, | |
115 | rec->scsi_retries = sc->retries; | |
116 | rec->scsi_allowed = sc->allowed; | |
117 | rec->scsi_id = sc->device->id; | |
118 | - /* struct zfcp_dbf_scsi needs to be updated to handle 64bit LUNs */ | |
119 | rec->scsi_lun = (u32)sc->device->lun; | |
120 | + rec->scsi_lun_64_hi = (u32)(sc->device->lun >> 32); | |
121 | rec->host_scribble = (unsigned long)sc->host_scribble; | |
122 | ||
123 | memcpy(rec->scsi_opcode, sc->cmnd, | |
124 | --- a/drivers/s390/scsi/zfcp_dbf.h | |
125 | +++ b/drivers/s390/scsi/zfcp_dbf.h | |
126 | @@ -204,7 +204,7 @@ enum zfcp_dbf_scsi_id { | |
127 | * @id: unique number of recovery record type | |
128 | * @tag: identifier string specifying the location of initiation | |
129 | * @scsi_id: scsi device id | |
130 | - * @scsi_lun: scsi device logical unit number | |
131 | + * @scsi_lun: scsi device logical unit number, low part of 64 bit, old 32 bit | |
132 | * @scsi_result: scsi result | |
133 | * @scsi_retries: current retry number of scsi request | |
134 | * @scsi_allowed: allowed retries | |
135 | @@ -214,6 +214,7 @@ enum zfcp_dbf_scsi_id { | |
136 | * @host_scribble: LLD specific data attached to SCSI request | |
137 | * @pl_len: length of paload stored as zfcp_dbf_pay | |
138 | * @fsf_rsp: response for fsf request | |
139 | + * @scsi_lun_64_hi: scsi device logical unit number, high part of 64 bit | |
140 | */ | |
141 | struct zfcp_dbf_scsi { | |
142 | u8 id; | |
143 | @@ -230,6 +231,7 @@ struct zfcp_dbf_scsi { | |
144 | u64 host_scribble; | |
145 | u16 pl_len; | |
146 | struct fcp_resp_with_ext fcp_rsp; | |
147 | + u32 scsi_lun_64_hi; | |
148 | } __packed; | |
149 | ||
150 | /** |