diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2008-10-01 06:42:15 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-10-03 13:11:52 -0400 |
commit | ff3b24fa5370a7ca618f212284d9b36fcedb9c0e (patch) | |
tree | d5631509c630046c9d0a42a4e949179976b0ef9f /drivers/s390/scsi/zfcp_fsf.c | |
parent | 2450d3e7b8604d0abb042817f2502cb7ee0b782f (diff) |
[SCSI] zfcp: Update message with input from review
Update the kernel messages in zfcp with input from the message review
and remove some messages that have been identified as redundant.
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@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 233 |
1 files changed, 80 insertions, 153 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 9e083a5e2c4e..489a1896499e 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -50,19 +50,16 @@ static u32 fsf_qtcb_type[] = { | |||
50 | [FSF_QTCB_UPLOAD_CONTROL_FILE] = FSF_SUPPORT_COMMAND | 50 | [FSF_QTCB_UPLOAD_CONTROL_FILE] = FSF_SUPPORT_COMMAND |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static const char *zfcp_act_subtable_type[] = { | ||
54 | "unknown", "OS", "WWPN", "DID", "LUN" | ||
55 | }; | ||
56 | |||
57 | static void zfcp_act_eval_err(struct zfcp_adapter *adapter, u32 table) | 53 | static void zfcp_act_eval_err(struct zfcp_adapter *adapter, u32 table) |
58 | { | 54 | { |
59 | u16 subtable = table >> 16; | 55 | u16 subtable = table >> 16; |
60 | u16 rule = table & 0xffff; | 56 | u16 rule = table & 0xffff; |
57 | const char *act_type[] = { "unknown", "OS", "WWPN", "DID", "LUN" }; | ||
61 | 58 | ||
62 | if (subtable && subtable < ARRAY_SIZE(zfcp_act_subtable_type)) | 59 | if (subtable && subtable < ARRAY_SIZE(act_type)) |
63 | dev_warn(&adapter->ccw_device->dev, | 60 | dev_warn(&adapter->ccw_device->dev, |
64 | "Access denied in subtable %s, rule %d.\n", | 61 | "Access denied according to ACT rule type %s, " |
65 | zfcp_act_subtable_type[subtable], rule); | 62 | "rule %d\n", act_type[subtable], rule); |
66 | } | 63 | } |
67 | 64 | ||
68 | static void zfcp_fsf_access_denied_port(struct zfcp_fsf_req *req, | 65 | static void zfcp_fsf_access_denied_port(struct zfcp_fsf_req *req, |
@@ -70,7 +67,7 @@ static void zfcp_fsf_access_denied_port(struct zfcp_fsf_req *req, | |||
70 | { | 67 | { |
71 | struct fsf_qtcb_header *header = &req->qtcb->header; | 68 | struct fsf_qtcb_header *header = &req->qtcb->header; |
72 | dev_warn(&req->adapter->ccw_device->dev, | 69 | dev_warn(&req->adapter->ccw_device->dev, |
73 | "Access denied, cannot send command to port 0x%016Lx.\n", | 70 | "Access denied to port 0x%016Lx\n", |
74 | port->wwpn); | 71 | port->wwpn); |
75 | zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]); | 72 | zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]); |
76 | zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]); | 73 | zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]); |
@@ -83,7 +80,7 @@ static void zfcp_fsf_access_denied_unit(struct zfcp_fsf_req *req, | |||
83 | { | 80 | { |
84 | struct fsf_qtcb_header *header = &req->qtcb->header; | 81 | struct fsf_qtcb_header *header = &req->qtcb->header; |
85 | dev_warn(&req->adapter->ccw_device->dev, | 82 | dev_warn(&req->adapter->ccw_device->dev, |
86 | "Access denied for unit 0x%016Lx on port 0x%016Lx.\n", | 83 | "Access denied to unit 0x%016Lx on port 0x%016Lx\n", |
87 | unit->fcp_lun, unit->port->wwpn); | 84 | unit->fcp_lun, unit->port->wwpn); |
88 | zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]); | 85 | zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]); |
89 | zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]); | 86 | zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]); |
@@ -93,9 +90,8 @@ static void zfcp_fsf_access_denied_unit(struct zfcp_fsf_req *req, | |||
93 | 90 | ||
94 | static void zfcp_fsf_class_not_supp(struct zfcp_fsf_req *req) | 91 | static void zfcp_fsf_class_not_supp(struct zfcp_fsf_req *req) |
95 | { | 92 | { |
96 | dev_err(&req->adapter->ccw_device->dev, | 93 | dev_err(&req->adapter->ccw_device->dev, "FCP device not " |
97 | "Required FC class not supported by adapter, " | 94 | "operational because of an unsupported FC class\n"); |
98 | "shutting down adapter.\n"); | ||
99 | zfcp_erp_adapter_shutdown(req->adapter, 0, 123, req); | 95 | zfcp_erp_adapter_shutdown(req->adapter, 0, 123, req); |
100 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 96 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
101 | } | 97 | } |
@@ -171,42 +167,6 @@ static void zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *req) | |||
171 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); | 167 | read_unlock_irqrestore(&zfcp_data.config_lock, flags); |
172 | } | 168 | } |
173 | 169 | ||
174 | static void zfcp_fsf_bit_error_threshold(struct zfcp_fsf_req *req) | ||
175 | { | ||
176 | struct zfcp_adapter *adapter = req->adapter; | ||
177 | struct fsf_status_read_buffer *sr_buf = req->data; | ||
178 | struct fsf_bit_error_payload *err = &sr_buf->payload.bit_error; | ||
179 | |||
180 | dev_warn(&adapter->ccw_device->dev, | ||
181 | "Warning: bit error threshold data " | ||
182 | "received for the adapter: " | ||
183 | "link failures = %i, loss of sync errors = %i, " | ||
184 | "loss of signal errors = %i, " | ||
185 | "primitive sequence errors = %i, " | ||
186 | "invalid transmission word errors = %i, " | ||
187 | "CRC errors = %i).\n", | ||
188 | err->link_failure_error_count, | ||
189 | err->loss_of_sync_error_count, | ||
190 | err->loss_of_signal_error_count, | ||
191 | err->primitive_sequence_error_count, | ||
192 | err->invalid_transmission_word_error_count, | ||
193 | err->crc_error_count); | ||
194 | dev_warn(&adapter->ccw_device->dev, | ||
195 | "Additional bit error threshold data of the adapter: " | ||
196 | "primitive sequence event time-outs = %i, " | ||
197 | "elastic buffer overrun errors = %i, " | ||
198 | "advertised receive buffer-to-buffer credit = %i, " | ||
199 | "current receice buffer-to-buffer credit = %i, " | ||
200 | "advertised transmit buffer-to-buffer credit = %i, " | ||
201 | "current transmit buffer-to-buffer credit = %i).\n", | ||
202 | err->primitive_sequence_event_timeout_count, | ||
203 | err->elastic_buffer_overrun_error_count, | ||
204 | err->advertised_receive_b2b_credit, | ||
205 | err->current_receive_b2b_credit, | ||
206 | err->advertised_transmit_b2b_credit, | ||
207 | err->current_transmit_b2b_credit); | ||
208 | } | ||
209 | |||
210 | static void zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *req, u8 id, | 170 | static void zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *req, u8 id, |
211 | struct fsf_link_down_info *link_down) | 171 | struct fsf_link_down_info *link_down) |
212 | { | 172 | { |
@@ -223,62 +183,66 @@ static void zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *req, u8 id, | |||
223 | switch (link_down->error_code) { | 183 | switch (link_down->error_code) { |
224 | case FSF_PSQ_LINK_NO_LIGHT: | 184 | case FSF_PSQ_LINK_NO_LIGHT: |
225 | dev_warn(&req->adapter->ccw_device->dev, | 185 | dev_warn(&req->adapter->ccw_device->dev, |
226 | "The local link is down: no light detected.\n"); | 186 | "There is no light signal from the local " |
187 | "fibre channel cable\n"); | ||
227 | break; | 188 | break; |
228 | case FSF_PSQ_LINK_WRAP_PLUG: | 189 | case FSF_PSQ_LINK_WRAP_PLUG: |
229 | dev_warn(&req->adapter->ccw_device->dev, | 190 | dev_warn(&req->adapter->ccw_device->dev, |
230 | "The local link is down: wrap plug detected.\n"); | 191 | "There is a wrap plug instead of a fibre " |
192 | "channel cable\n"); | ||
231 | break; | 193 | break; |
232 | case FSF_PSQ_LINK_NO_FCP: | 194 | case FSF_PSQ_LINK_NO_FCP: |
233 | dev_warn(&req->adapter->ccw_device->dev, | 195 | dev_warn(&req->adapter->ccw_device->dev, |
234 | "The local link is down: " | 196 | "The adjacent fibre channel node does not " |
235 | "adjacent node on link does not support FCP.\n"); | 197 | "support FCP\n"); |
236 | break; | 198 | break; |
237 | case FSF_PSQ_LINK_FIRMWARE_UPDATE: | 199 | case FSF_PSQ_LINK_FIRMWARE_UPDATE: |
238 | dev_warn(&req->adapter->ccw_device->dev, | 200 | dev_warn(&req->adapter->ccw_device->dev, |
239 | "The local link is down: " | 201 | "The FCP device is suspended because of a " |
240 | "firmware update in progress.\n"); | 202 | "firmware update\n"); |
241 | break; | 203 | break; |
242 | case FSF_PSQ_LINK_INVALID_WWPN: | 204 | case FSF_PSQ_LINK_INVALID_WWPN: |
243 | dev_warn(&req->adapter->ccw_device->dev, | 205 | dev_warn(&req->adapter->ccw_device->dev, |
244 | "The local link is down: " | 206 | "The FCP device detected a WWPN that is " |
245 | "duplicate or invalid WWPN detected.\n"); | 207 | "duplicate or not valid\n"); |
246 | break; | 208 | break; |
247 | case FSF_PSQ_LINK_NO_NPIV_SUPPORT: | 209 | case FSF_PSQ_LINK_NO_NPIV_SUPPORT: |
248 | dev_warn(&req->adapter->ccw_device->dev, | 210 | dev_warn(&req->adapter->ccw_device->dev, |
249 | "The local link is down: " | 211 | "The fibre channel fabric does not support NPIV\n"); |
250 | "no support for NPIV by Fabric.\n"); | ||
251 | break; | 212 | break; |
252 | case FSF_PSQ_LINK_NO_FCP_RESOURCES: | 213 | case FSF_PSQ_LINK_NO_FCP_RESOURCES: |
253 | dev_warn(&req->adapter->ccw_device->dev, | 214 | dev_warn(&req->adapter->ccw_device->dev, |
254 | "The local link is down: " | 215 | "The FCP adapter cannot support more NPIV ports\n"); |
255 | "out of resource in FCP daughtercard.\n"); | ||
256 | break; | 216 | break; |
257 | case FSF_PSQ_LINK_NO_FABRIC_RESOURCES: | 217 | case FSF_PSQ_LINK_NO_FABRIC_RESOURCES: |
258 | dev_warn(&req->adapter->ccw_device->dev, | 218 | dev_warn(&req->adapter->ccw_device->dev, |
259 | "The local link is down: " | 219 | "The adjacent switch cannot support " |
260 | "out of resource in Fabric.\n"); | 220 | "more NPIV ports\n"); |
261 | break; | 221 | break; |
262 | case FSF_PSQ_LINK_FABRIC_LOGIN_UNABLE: | 222 | case FSF_PSQ_LINK_FABRIC_LOGIN_UNABLE: |
263 | dev_warn(&req->adapter->ccw_device->dev, | 223 | dev_warn(&req->adapter->ccw_device->dev, |
264 | "The local link is down: " | 224 | "The FCP adapter could not log in to the " |
265 | "unable to login to Fabric.\n"); | 225 | "fibre channel fabric\n"); |
266 | break; | 226 | break; |
267 | case FSF_PSQ_LINK_WWPN_ASSIGNMENT_CORRUPTED: | 227 | case FSF_PSQ_LINK_WWPN_ASSIGNMENT_CORRUPTED: |
268 | dev_warn(&req->adapter->ccw_device->dev, | 228 | dev_warn(&req->adapter->ccw_device->dev, |
269 | "WWPN assignment file corrupted on adapter.\n"); | 229 | "The WWPN assignment file on the FCP adapter " |
230 | "has been damaged\n"); | ||
270 | break; | 231 | break; |
271 | case FSF_PSQ_LINK_MODE_TABLE_CURRUPTED: | 232 | case FSF_PSQ_LINK_MODE_TABLE_CURRUPTED: |
272 | dev_warn(&req->adapter->ccw_device->dev, | 233 | dev_warn(&req->adapter->ccw_device->dev, |
273 | "Mode table corrupted on adapter.\n"); | 234 | "The mode table on the FCP adapter " |
235 | "has been damaged\n"); | ||
274 | break; | 236 | break; |
275 | case FSF_PSQ_LINK_NO_WWPN_ASSIGNMENT: | 237 | case FSF_PSQ_LINK_NO_WWPN_ASSIGNMENT: |
276 | dev_warn(&req->adapter->ccw_device->dev, | 238 | dev_warn(&req->adapter->ccw_device->dev, |
277 | "No WWPN for assignment table on adapter.\n"); | 239 | "All NPIV ports on the FCP adapter have " |
240 | "been assigned\n"); | ||
278 | break; | 241 | break; |
279 | default: | 242 | default: |
280 | dev_warn(&req->adapter->ccw_device->dev, | 243 | dev_warn(&req->adapter->ccw_device->dev, |
281 | "The local link to adapter is down.\n"); | 244 | "The link between the FCP adapter and " |
245 | "the FC fabric is down\n"); | ||
282 | } | 246 | } |
283 | out: | 247 | out: |
284 | zfcp_erp_adapter_failed(adapter, id, req); | 248 | zfcp_erp_adapter_failed(adapter, id, req); |
@@ -286,27 +250,18 @@ out: | |||
286 | 250 | ||
287 | static void zfcp_fsf_status_read_link_down(struct zfcp_fsf_req *req) | 251 | static void zfcp_fsf_status_read_link_down(struct zfcp_fsf_req *req) |
288 | { | 252 | { |
289 | struct zfcp_adapter *adapter = req->adapter; | ||
290 | struct fsf_status_read_buffer *sr_buf = req->data; | 253 | struct fsf_status_read_buffer *sr_buf = req->data; |
291 | struct fsf_link_down_info *ldi = | 254 | struct fsf_link_down_info *ldi = |
292 | (struct fsf_link_down_info *) &sr_buf->payload; | 255 | (struct fsf_link_down_info *) &sr_buf->payload; |
293 | 256 | ||
294 | switch (sr_buf->status_subtype) { | 257 | switch (sr_buf->status_subtype) { |
295 | case FSF_STATUS_READ_SUB_NO_PHYSICAL_LINK: | 258 | case FSF_STATUS_READ_SUB_NO_PHYSICAL_LINK: |
296 | dev_warn(&adapter->ccw_device->dev, | ||
297 | "Physical link is down.\n"); | ||
298 | zfcp_fsf_link_down_info_eval(req, 38, ldi); | 259 | zfcp_fsf_link_down_info_eval(req, 38, ldi); |
299 | break; | 260 | break; |
300 | case FSF_STATUS_READ_SUB_FDISC_FAILED: | 261 | case FSF_STATUS_READ_SUB_FDISC_FAILED: |
301 | dev_warn(&adapter->ccw_device->dev, | ||
302 | "Local link is down " | ||
303 | "due to failed FDISC login.\n"); | ||
304 | zfcp_fsf_link_down_info_eval(req, 39, ldi); | 262 | zfcp_fsf_link_down_info_eval(req, 39, ldi); |
305 | break; | 263 | break; |
306 | case FSF_STATUS_READ_SUB_FIRMWARE_UPDATE: | 264 | case FSF_STATUS_READ_SUB_FIRMWARE_UPDATE: |
307 | dev_warn(&adapter->ccw_device->dev, | ||
308 | "Local link is down " | ||
309 | "due to firmware update on adapter.\n"); | ||
310 | zfcp_fsf_link_down_info_eval(req, 40, NULL); | 265 | zfcp_fsf_link_down_info_eval(req, 40, NULL); |
311 | }; | 266 | }; |
312 | } | 267 | } |
@@ -335,14 +290,16 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req) | |||
335 | case FSF_STATUS_READ_SENSE_DATA_AVAIL: | 290 | case FSF_STATUS_READ_SENSE_DATA_AVAIL: |
336 | break; | 291 | break; |
337 | case FSF_STATUS_READ_BIT_ERROR_THRESHOLD: | 292 | case FSF_STATUS_READ_BIT_ERROR_THRESHOLD: |
338 | zfcp_fsf_bit_error_threshold(req); | 293 | dev_warn(&adapter->ccw_device->dev, |
294 | "The error threshold for checksum statistics " | ||
295 | "has been exceeded\n"); | ||
339 | break; | 296 | break; |
340 | case FSF_STATUS_READ_LINK_DOWN: | 297 | case FSF_STATUS_READ_LINK_DOWN: |
341 | zfcp_fsf_status_read_link_down(req); | 298 | zfcp_fsf_status_read_link_down(req); |
342 | break; | 299 | break; |
343 | case FSF_STATUS_READ_LINK_UP: | 300 | case FSF_STATUS_READ_LINK_UP: |
344 | dev_info(&adapter->ccw_device->dev, | 301 | dev_info(&adapter->ccw_device->dev, |
345 | "Local link was replugged.\n"); | 302 | "The local link has been restored\n"); |
346 | /* All ports should be marked as ready to run again */ | 303 | /* All ports should be marked as ready to run again */ |
347 | zfcp_erp_modify_adapter_status(adapter, 30, NULL, | 304 | zfcp_erp_modify_adapter_status(adapter, 30, NULL, |
348 | ZFCP_STATUS_COMMON_RUNNING, | 305 | ZFCP_STATUS_COMMON_RUNNING, |
@@ -386,8 +343,8 @@ static void zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *req) | |||
386 | break; | 343 | break; |
387 | case FSF_SQ_NO_RECOM: | 344 | case FSF_SQ_NO_RECOM: |
388 | dev_err(&req->adapter->ccw_device->dev, | 345 | dev_err(&req->adapter->ccw_device->dev, |
389 | "No recommendation could be given for a " | 346 | "The FCP adapter reported a problem " |
390 | "problem on the adapter.\n"); | 347 | "that cannot be recovered\n"); |
391 | zfcp_erp_adapter_shutdown(req->adapter, 0, 121, req); | 348 | zfcp_erp_adapter_shutdown(req->adapter, 0, 121, req); |
392 | break; | 349 | break; |
393 | } | 350 | } |
@@ -403,8 +360,7 @@ static void zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *req) | |||
403 | switch (req->qtcb->header.fsf_status) { | 360 | switch (req->qtcb->header.fsf_status) { |
404 | case FSF_UNKNOWN_COMMAND: | 361 | case FSF_UNKNOWN_COMMAND: |
405 | dev_err(&req->adapter->ccw_device->dev, | 362 | dev_err(&req->adapter->ccw_device->dev, |
406 | "Command issued by the device driver (0x%x) is " | 363 | "The FCP adapter does not recognize the command 0x%x\n", |
407 | "not known by the adapter.\n", | ||
408 | req->qtcb->header.fsf_command); | 364 | req->qtcb->header.fsf_command); |
409 | zfcp_erp_adapter_shutdown(req->adapter, 0, 120, req); | 365 | zfcp_erp_adapter_shutdown(req->adapter, 0, 120, req); |
410 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 366 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
@@ -435,11 +391,9 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req) | |||
435 | return; | 391 | return; |
436 | case FSF_PROT_QTCB_VERSION_ERROR: | 392 | case FSF_PROT_QTCB_VERSION_ERROR: |
437 | dev_err(&adapter->ccw_device->dev, | 393 | dev_err(&adapter->ccw_device->dev, |
438 | "The QTCB version requested by zfcp (0x%x) is not " | 394 | "QTCB version 0x%x not supported by FCP adapter " |
439 | "supported by the FCP adapter (lowest supported " | 395 | "(0x%x to 0x%x)\n", FSF_QTCB_CURRENT_VERSION, |
440 | "0x%x, highest supported 0x%x).\n", | 396 | psq->word[0], psq->word[1]); |
441 | FSF_QTCB_CURRENT_VERSION, psq->word[0], | ||
442 | psq->word[1]); | ||
443 | zfcp_erp_adapter_shutdown(adapter, 0, 117, req); | 397 | zfcp_erp_adapter_shutdown(adapter, 0, 117, req); |
444 | break; | 398 | break; |
445 | case FSF_PROT_ERROR_STATE: | 399 | case FSF_PROT_ERROR_STATE: |
@@ -449,8 +403,7 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req) | |||
449 | break; | 403 | break; |
450 | case FSF_PROT_UNSUPP_QTCB_TYPE: | 404 | case FSF_PROT_UNSUPP_QTCB_TYPE: |
451 | dev_err(&adapter->ccw_device->dev, | 405 | dev_err(&adapter->ccw_device->dev, |
452 | "Packet header type used by the device driver is " | 406 | "The QTCB type is not supported by the FCP adapter\n"); |
453 | "incompatible with that used on the adapter.\n"); | ||
454 | zfcp_erp_adapter_shutdown(adapter, 0, 118, req); | 407 | zfcp_erp_adapter_shutdown(adapter, 0, 118, req); |
455 | break; | 408 | break; |
456 | case FSF_PROT_HOST_CONNECTION_INITIALIZING: | 409 | case FSF_PROT_HOST_CONNECTION_INITIALIZING: |
@@ -459,7 +412,7 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req) | |||
459 | break; | 412 | break; |
460 | case FSF_PROT_DUPLICATE_REQUEST_ID: | 413 | case FSF_PROT_DUPLICATE_REQUEST_ID: |
461 | dev_err(&adapter->ccw_device->dev, | 414 | dev_err(&adapter->ccw_device->dev, |
462 | "The request identifier 0x%Lx is ambiguous.\n", | 415 | "0x%Lx is an ambiguous request identifier\n", |
463 | (unsigned long long)qtcb->bottom.support.req_handle); | 416 | (unsigned long long)qtcb->bottom.support.req_handle); |
464 | zfcp_erp_adapter_shutdown(adapter, 0, 78, req); | 417 | zfcp_erp_adapter_shutdown(adapter, 0, 78, req); |
465 | break; | 418 | break; |
@@ -479,9 +432,7 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req) | |||
479 | break; | 432 | break; |
480 | default: | 433 | default: |
481 | dev_err(&adapter->ccw_device->dev, | 434 | dev_err(&adapter->ccw_device->dev, |
482 | "Transfer protocol status information" | 435 | "0x%x is not a valid transfer protocol status\n", |
483 | "provided by the adapter (0x%x) " | ||
484 | "is not compatible with the device driver.\n", | ||
485 | qtcb->prefix.prot_status); | 436 | qtcb->prefix.prot_status); |
486 | zfcp_erp_adapter_shutdown(adapter, 0, 119, req); | 437 | zfcp_erp_adapter_shutdown(adapter, 0, 119, req); |
487 | } | 438 | } |
@@ -559,33 +510,17 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req) | |||
559 | adapter->peer_wwpn = bottom->plogi_payload.wwpn; | 510 | adapter->peer_wwpn = bottom->plogi_payload.wwpn; |
560 | adapter->peer_wwnn = bottom->plogi_payload.wwnn; | 511 | adapter->peer_wwnn = bottom->plogi_payload.wwnn; |
561 | fc_host_port_type(shost) = FC_PORTTYPE_PTP; | 512 | fc_host_port_type(shost) = FC_PORTTYPE_PTP; |
562 | if (req->erp_action) | ||
563 | dev_info(&adapter->ccw_device->dev, | ||
564 | "Point-to-Point fibrechannel " | ||
565 | "configuration detected.\n"); | ||
566 | break; | 513 | break; |
567 | case FSF_TOPO_FABRIC: | 514 | case FSF_TOPO_FABRIC: |
568 | fc_host_port_type(shost) = FC_PORTTYPE_NPORT; | 515 | fc_host_port_type(shost) = FC_PORTTYPE_NPORT; |
569 | if (req->erp_action) | ||
570 | dev_info(&adapter->ccw_device->dev, | ||
571 | "Switched fabric fibrechannel " | ||
572 | "network detected.\n"); | ||
573 | break; | 516 | break; |
574 | case FSF_TOPO_AL: | 517 | case FSF_TOPO_AL: |
575 | fc_host_port_type(shost) = FC_PORTTYPE_NLPORT; | 518 | fc_host_port_type(shost) = FC_PORTTYPE_NLPORT; |
576 | dev_err(&adapter->ccw_device->dev, | ||
577 | "Unsupported arbitrated loop fibrechannel " | ||
578 | "topology detected, shutting down " | ||
579 | "adapter.\n"); | ||
580 | zfcp_erp_adapter_shutdown(adapter, 0, 127, req); | ||
581 | return -EIO; | ||
582 | default: | 519 | default: |
583 | fc_host_port_type(shost) = FC_PORTTYPE_UNKNOWN; | ||
584 | dev_err(&adapter->ccw_device->dev, | 520 | dev_err(&adapter->ccw_device->dev, |
585 | "The fibrechannel topology reported by the" | 521 | "Unknown or unsupported arbitrated loop " |
586 | " adapter is not known by the zfcp driver," | 522 | "fibre channel topology detected\n"); |
587 | " shutting down adapter.\n"); | 523 | zfcp_erp_adapter_shutdown(adapter, 0, 127, req); |
588 | zfcp_erp_adapter_shutdown(adapter, 0, 128, req); | ||
589 | return -EIO; | 524 | return -EIO; |
590 | } | 525 | } |
591 | 526 | ||
@@ -616,11 +551,9 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req) | |||
616 | 551 | ||
617 | if (bottom->max_qtcb_size < sizeof(struct fsf_qtcb)) { | 552 | if (bottom->max_qtcb_size < sizeof(struct fsf_qtcb)) { |
618 | dev_err(&adapter->ccw_device->dev, | 553 | dev_err(&adapter->ccw_device->dev, |
619 | "Maximum QTCB size (%d bytes) allowed by " | 554 | "FCP adapter maximum QTCB size (%d bytes) " |
620 | "the adapter is lower than the minimum " | 555 | "is too small\n", |
621 | "required by the driver (%ld bytes).\n", | 556 | bottom->max_qtcb_size); |
622 | bottom->max_qtcb_size, | ||
623 | sizeof(struct fsf_qtcb)); | ||
624 | zfcp_erp_adapter_shutdown(adapter, 0, 129, req); | 557 | zfcp_erp_adapter_shutdown(adapter, 0, 129, req); |
625 | return; | 558 | return; |
626 | } | 559 | } |
@@ -656,15 +589,15 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req) | |||
656 | 589 | ||
657 | if (FSF_QTCB_CURRENT_VERSION < bottom->low_qtcb_version) { | 590 | if (FSF_QTCB_CURRENT_VERSION < bottom->low_qtcb_version) { |
658 | dev_err(&adapter->ccw_device->dev, | 591 | dev_err(&adapter->ccw_device->dev, |
659 | "The adapter only supports newer control block " | 592 | "The FCP adapter only supports newer " |
660 | "versions, try updated device driver.\n"); | 593 | "control block versions\n"); |
661 | zfcp_erp_adapter_shutdown(adapter, 0, 125, req); | 594 | zfcp_erp_adapter_shutdown(adapter, 0, 125, req); |
662 | return; | 595 | return; |
663 | } | 596 | } |
664 | if (FSF_QTCB_CURRENT_VERSION > bottom->high_qtcb_version) { | 597 | if (FSF_QTCB_CURRENT_VERSION > bottom->high_qtcb_version) { |
665 | dev_err(&adapter->ccw_device->dev, | 598 | dev_err(&adapter->ccw_device->dev, |
666 | "The adapter only supports older control block " | 599 | "The FCP adapter only supports older " |
667 | "versions, consider a microcode upgrade.\n"); | 600 | "control block versions\n"); |
668 | zfcp_erp_adapter_shutdown(adapter, 0, 126, req); | 601 | zfcp_erp_adapter_shutdown(adapter, 0, 126, req); |
669 | } | 602 | } |
670 | } | 603 | } |
@@ -1463,9 +1396,8 @@ static void zfcp_fsf_open_port_handler(struct zfcp_fsf_req *req) | |||
1463 | break; | 1396 | break; |
1464 | case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED: | 1397 | case FSF_MAXIMUM_NUMBER_OF_PORTS_EXCEEDED: |
1465 | dev_warn(&req->adapter->ccw_device->dev, | 1398 | dev_warn(&req->adapter->ccw_device->dev, |
1466 | "The adapter is out of resources. The remote port " | 1399 | "Not enough FCP adapter resources to open " |
1467 | "0x%016Lx could not be opened, disabling it.\n", | 1400 | "remote port 0x%016Lx\n", port->wwpn); |
1468 | port->wwpn); | ||
1469 | zfcp_erp_port_failed(port, 31, req); | 1401 | zfcp_erp_port_failed(port, 31, req); |
1470 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1402 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1471 | break; | 1403 | break; |
@@ -1477,8 +1409,8 @@ static void zfcp_fsf_open_port_handler(struct zfcp_fsf_req *req) | |||
1477 | break; | 1409 | break; |
1478 | case FSF_SQ_NO_RETRY_POSSIBLE: | 1410 | case FSF_SQ_NO_RETRY_POSSIBLE: |
1479 | dev_warn(&req->adapter->ccw_device->dev, | 1411 | dev_warn(&req->adapter->ccw_device->dev, |
1480 | "The remote port 0x%016Lx could not be " | 1412 | "Remote port 0x%016Lx could not be opened\n", |
1481 | "opened. Disabling it.\n", port->wwpn); | 1413 | port->wwpn); |
1482 | zfcp_erp_port_failed(port, 32, req); | 1414 | zfcp_erp_port_failed(port, 32, req); |
1483 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1415 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1484 | break; | 1416 | break; |
@@ -1784,14 +1716,12 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req) | |||
1784 | case FSF_LUN_SHARING_VIOLATION: | 1716 | case FSF_LUN_SHARING_VIOLATION: |
1785 | if (header->fsf_status_qual.word[0]) | 1717 | if (header->fsf_status_qual.word[0]) |
1786 | dev_warn(&adapter->ccw_device->dev, | 1718 | dev_warn(&adapter->ccw_device->dev, |
1787 | "FCP-LUN 0x%Lx at the remote port " | 1719 | "LUN 0x%Lx on port 0x%Lx is already in " |
1788 | "with WWPN 0x%Lx " | 1720 | "use by CSS%d, MIF Image ID %x\n", |
1789 | "connected to the adapter " | ||
1790 | "is already in use in LPAR%d, CSS%d.\n", | ||
1791 | unit->fcp_lun, | 1721 | unit->fcp_lun, |
1792 | unit->port->wwpn, | 1722 | unit->port->wwpn, |
1793 | queue_designator->hla, | 1723 | queue_designator->cssid, |
1794 | queue_designator->cssid); | 1724 | queue_designator->hla); |
1795 | else | 1725 | else |
1796 | zfcp_act_eval_err(adapter, | 1726 | zfcp_act_eval_err(adapter, |
1797 | header->fsf_status_qual.word[2]); | 1727 | header->fsf_status_qual.word[2]); |
@@ -1802,8 +1732,8 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req) | |||
1802 | break; | 1732 | break; |
1803 | case FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED: | 1733 | case FSF_MAXIMUM_NUMBER_OF_LUNS_EXCEEDED: |
1804 | dev_warn(&adapter->ccw_device->dev, | 1734 | dev_warn(&adapter->ccw_device->dev, |
1805 | "The adapter ran out of resources. There is no " | 1735 | "No handle is available for LUN " |
1806 | "handle available for unit 0x%016Lx on port 0x%016Lx.", | 1736 | "0x%016Lx on port 0x%016Lx\n", |
1807 | unit->fcp_lun, unit->port->wwpn); | 1737 | unit->fcp_lun, unit->port->wwpn); |
1808 | zfcp_erp_unit_failed(unit, 34, req); | 1738 | zfcp_erp_unit_failed(unit, 34, req); |
1809 | /* fall through */ | 1739 | /* fall through */ |
@@ -1841,25 +1771,25 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req) | |||
1841 | atomic_set_mask(ZFCP_STATUS_UNIT_READONLY, | 1771 | atomic_set_mask(ZFCP_STATUS_UNIT_READONLY, |
1842 | &unit->status); | 1772 | &unit->status); |
1843 | dev_info(&adapter->ccw_device->dev, | 1773 | dev_info(&adapter->ccw_device->dev, |
1844 | "Read-only access for unit 0x%016Lx " | 1774 | "SCSI device at LUN 0x%016Lx on port " |
1845 | "on port 0x%016Lx.\n", | 1775 | "0x%016Lx opened read-only\n", |
1846 | unit->fcp_lun, unit->port->wwpn); | 1776 | unit->fcp_lun, unit->port->wwpn); |
1847 | } | 1777 | } |
1848 | 1778 | ||
1849 | if (exclusive && !readwrite) { | 1779 | if (exclusive && !readwrite) { |
1850 | dev_err(&adapter->ccw_device->dev, | 1780 | dev_err(&adapter->ccw_device->dev, |
1851 | "Exclusive access of read-only unit " | 1781 | "Exclusive read-only access not " |
1852 | "0x%016Lx on port 0x%016Lx not " | 1782 | "supported (unit 0x%016Lx, " |
1853 | "supported, disabling unit.\n", | 1783 | "port 0x%016Lx)\n", |
1854 | unit->fcp_lun, unit->port->wwpn); | 1784 | unit->fcp_lun, unit->port->wwpn); |
1855 | zfcp_erp_unit_failed(unit, 35, req); | 1785 | zfcp_erp_unit_failed(unit, 35, req); |
1856 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1786 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1857 | zfcp_erp_unit_shutdown(unit, 0, 80, req); | 1787 | zfcp_erp_unit_shutdown(unit, 0, 80, req); |
1858 | } else if (!exclusive && readwrite) { | 1788 | } else if (!exclusive && readwrite) { |
1859 | dev_err(&adapter->ccw_device->dev, | 1789 | dev_err(&adapter->ccw_device->dev, |
1860 | "Shared access of read-write unit " | 1790 | "Shared read-write access not " |
1861 | "0x%016Lx on port 0x%016Lx not " | 1791 | "supported (unit 0x%016Lx, port " |
1862 | "supported, disabling unit.\n", | 1792 | "0x%016Lx\n)", |
1863 | unit->fcp_lun, unit->port->wwpn); | 1793 | unit->fcp_lun, unit->port->wwpn); |
1864 | zfcp_erp_unit_failed(unit, 36, req); | 1794 | zfcp_erp_unit_failed(unit, 36, req); |
1865 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1795 | req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
@@ -2166,9 +2096,8 @@ static void zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *req) | |||
2166 | break; | 2096 | break; |
2167 | case FSF_DIRECTION_INDICATOR_NOT_VALID: | 2097 | case FSF_DIRECTION_INDICATOR_NOT_VALID: |
2168 | dev_err(&req->adapter->ccw_device->dev, | 2098 | dev_err(&req->adapter->ccw_device->dev, |
2169 | "Invalid data direction (%d) given for unit " | 2099 | "Incorrect direction %d, unit 0x%016Lx on port " |
2170 | "0x%016Lx on port 0x%016Lx, shutting down " | 2100 | "0x%016Lx closed\n", |
2171 | "adapter.\n", | ||
2172 | req->qtcb->bottom.io.data_direction, | 2101 | req->qtcb->bottom.io.data_direction, |
2173 | unit->fcp_lun, unit->port->wwpn); | 2102 | unit->fcp_lun, unit->port->wwpn); |
2174 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, req); | 2103 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, req); |
@@ -2176,9 +2105,8 @@ static void zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *req) | |||
2176 | break; | 2105 | break; |
2177 | case FSF_CMND_LENGTH_NOT_VALID: | 2106 | case FSF_CMND_LENGTH_NOT_VALID: |
2178 | dev_err(&req->adapter->ccw_device->dev, | 2107 | dev_err(&req->adapter->ccw_device->dev, |
2179 | "An invalid control-data-block length field (%d) " | 2108 | "Incorrect CDB length %d, unit 0x%016Lx on " |
2180 | "was found in a command for unit 0x%016Lx on port " | 2109 | "port 0x%016Lx closed\n", |
2181 | "0x%016Lx. Shutting down adapter.\n", | ||
2182 | req->qtcb->bottom.io.fcp_cmnd_length, | 2110 | req->qtcb->bottom.io.fcp_cmnd_length, |
2183 | unit->fcp_lun, unit->port->wwpn); | 2111 | unit->fcp_lun, unit->port->wwpn); |
2184 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, req); | 2112 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, req); |
@@ -2306,10 +2234,9 @@ int zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, | |||
2306 | retval = -EIO; | 2234 | retval = -EIO; |
2307 | else { | 2235 | else { |
2308 | dev_err(&adapter->ccw_device->dev, | 2236 | dev_err(&adapter->ccw_device->dev, |
2309 | "SCSI request too large. " | 2237 | "Oversize data package, unit 0x%016Lx " |
2310 | "Shutting down unit 0x%016Lx on port " | 2238 | "on port 0x%016Lx closed\n", |
2311 | "0x%016Lx.\n", unit->fcp_lun, | 2239 | unit->fcp_lun, unit->port->wwpn); |
2312 | unit->port->wwpn); | ||
2313 | zfcp_erp_unit_shutdown(unit, 0, 131, req); | 2240 | zfcp_erp_unit_shutdown(unit, 0, 131, req); |
2314 | retval = -EINVAL; | 2241 | retval = -EINVAL; |
2315 | } | 2242 | } |