aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fsf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c131
1 files changed, 68 insertions, 63 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 698e42214a37..b4c9ba085093 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -18,8 +18,8 @@
18static void zfcp_fsf_request_timeout_handler(unsigned long data) 18static void zfcp_fsf_request_timeout_handler(unsigned long data)
19{ 19{
20 struct zfcp_adapter *adapter = (struct zfcp_adapter *) data; 20 struct zfcp_adapter *adapter = (struct zfcp_adapter *) data;
21 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 62, 21 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED,
22 NULL); 22 "fsrth_1", NULL);
23} 23}
24 24
25static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req, 25static void zfcp_fsf_start_timer(struct zfcp_fsf_req *fsf_req,
@@ -78,7 +78,7 @@ static void zfcp_fsf_access_denied_port(struct zfcp_fsf_req *req,
78 (unsigned long long)port->wwpn); 78 (unsigned long long)port->wwpn);
79 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]); 79 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
80 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]); 80 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
81 zfcp_erp_port_access_denied(port, 55, req); 81 zfcp_erp_port_access_denied(port, "fspad_1", req);
82 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 82 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
83} 83}
84 84
@@ -92,7 +92,7 @@ static void zfcp_fsf_access_denied_unit(struct zfcp_fsf_req *req,
92 (unsigned long long)unit->port->wwpn); 92 (unsigned long long)unit->port->wwpn);
93 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]); 93 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[0]);
94 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]); 94 zfcp_act_eval_err(req->adapter, header->fsf_status_qual.halfword[1]);
95 zfcp_erp_unit_access_denied(unit, 59, req); 95 zfcp_erp_unit_access_denied(unit, "fsuad_1", req);
96 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 96 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
97} 97}
98 98
@@ -100,7 +100,7 @@ static void zfcp_fsf_class_not_supp(struct zfcp_fsf_req *req)
100{ 100{
101 dev_err(&req->adapter->ccw_device->dev, "FCP device not " 101 dev_err(&req->adapter->ccw_device->dev, "FCP device not "
102 "operational because of an unsupported FC class\n"); 102 "operational because of an unsupported FC class\n");
103 zfcp_erp_adapter_shutdown(req->adapter, 0, 123, req); 103 zfcp_erp_adapter_shutdown(req->adapter, 0, "fscns_1", req);
104 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 104 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
105} 105}
106 106
@@ -162,13 +162,13 @@ static void zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *req)
162 list_for_each_entry(port, &adapter->port_list_head, list) 162 list_for_each_entry(port, &adapter->port_list_head, list)
163 if (port->d_id == d_id) { 163 if (port->d_id == d_id) {
164 read_unlock_irqrestore(&zfcp_data.config_lock, flags); 164 read_unlock_irqrestore(&zfcp_data.config_lock, flags);
165 zfcp_erp_port_reopen(port, 0, 101, req); 165 zfcp_erp_port_reopen(port, 0, "fssrpc1", req);
166 return; 166 return;
167 } 167 }
168 read_unlock_irqrestore(&zfcp_data.config_lock, flags); 168 read_unlock_irqrestore(&zfcp_data.config_lock, flags);
169} 169}
170 170
171static void zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *req, u8 id, 171static void zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *req, char *id,
172 struct fsf_link_down_info *link_down) 172 struct fsf_link_down_info *link_down)
173{ 173{
174 struct zfcp_adapter *adapter = req->adapter; 174 struct zfcp_adapter *adapter = req->adapter;
@@ -257,13 +257,13 @@ static void zfcp_fsf_status_read_link_down(struct zfcp_fsf_req *req)
257 257
258 switch (sr_buf->status_subtype) { 258 switch (sr_buf->status_subtype) {
259 case FSF_STATUS_READ_SUB_NO_PHYSICAL_LINK: 259 case FSF_STATUS_READ_SUB_NO_PHYSICAL_LINK:
260 zfcp_fsf_link_down_info_eval(req, 38, ldi); 260 zfcp_fsf_link_down_info_eval(req, "fssrld1", ldi);
261 break; 261 break;
262 case FSF_STATUS_READ_SUB_FDISC_FAILED: 262 case FSF_STATUS_READ_SUB_FDISC_FAILED:
263 zfcp_fsf_link_down_info_eval(req, 39, ldi); 263 zfcp_fsf_link_down_info_eval(req, "fssrld2", ldi);
264 break; 264 break;
265 case FSF_STATUS_READ_SUB_FIRMWARE_UPDATE: 265 case FSF_STATUS_READ_SUB_FIRMWARE_UPDATE:
266 zfcp_fsf_link_down_info_eval(req, 40, NULL); 266 zfcp_fsf_link_down_info_eval(req, "fssrld3", NULL);
267 }; 267 };
268} 268}
269 269
@@ -303,22 +303,23 @@ static void zfcp_fsf_status_read_handler(struct zfcp_fsf_req *req)
303 dev_info(&adapter->ccw_device->dev, 303 dev_info(&adapter->ccw_device->dev,
304 "The local link has been restored\n"); 304 "The local link has been restored\n");
305 /* All ports should be marked as ready to run again */ 305 /* All ports should be marked as ready to run again */
306 zfcp_erp_modify_adapter_status(adapter, 30, NULL, 306 zfcp_erp_modify_adapter_status(adapter, "fssrh_1", NULL,
307 ZFCP_STATUS_COMMON_RUNNING, 307 ZFCP_STATUS_COMMON_RUNNING,
308 ZFCP_SET); 308 ZFCP_SET);
309 zfcp_erp_adapter_reopen(adapter, 309 zfcp_erp_adapter_reopen(adapter,
310 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | 310 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
311 ZFCP_STATUS_COMMON_ERP_FAILED, 311 ZFCP_STATUS_COMMON_ERP_FAILED,
312 102, req); 312 "fssrh_2", req);
313 break; 313 break;
314 case FSF_STATUS_READ_NOTIFICATION_LOST: 314 case FSF_STATUS_READ_NOTIFICATION_LOST:
315 if (sr_buf->status_subtype & FSF_STATUS_READ_SUB_ACT_UPDATED) 315 if (sr_buf->status_subtype & FSF_STATUS_READ_SUB_ACT_UPDATED)
316 zfcp_erp_adapter_access_changed(adapter, 135, req); 316 zfcp_erp_adapter_access_changed(adapter, "fssrh_3",
317 req);
317 if (sr_buf->status_subtype & FSF_STATUS_READ_SUB_INCOMING_ELS) 318 if (sr_buf->status_subtype & FSF_STATUS_READ_SUB_INCOMING_ELS)
318 schedule_work(&adapter->scan_work); 319 schedule_work(&adapter->scan_work);
319 break; 320 break;
320 case FSF_STATUS_READ_CFDC_UPDATED: 321 case FSF_STATUS_READ_CFDC_UPDATED:
321 zfcp_erp_adapter_access_changed(adapter, 136, req); 322 zfcp_erp_adapter_access_changed(adapter, "fssrh_4", req);
322 break; 323 break;
323 case FSF_STATUS_READ_FEATURE_UPDATE_ALERT: 324 case FSF_STATUS_READ_FEATURE_UPDATE_ALERT:
324 adapter->adapter_features = sr_buf->payload.word[0]; 325 adapter->adapter_features = sr_buf->payload.word[0];
@@ -347,7 +348,7 @@ static void zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *req)
347 dev_err(&req->adapter->ccw_device->dev, 348 dev_err(&req->adapter->ccw_device->dev,
348 "The FCP adapter reported a problem " 349 "The FCP adapter reported a problem "
349 "that cannot be recovered\n"); 350 "that cannot be recovered\n");
350 zfcp_erp_adapter_shutdown(req->adapter, 0, 121, req); 351 zfcp_erp_adapter_shutdown(req->adapter, 0, "fsfsqe1", req);
351 break; 352 break;
352 } 353 }
353 /* all non-return stats set FSFREQ_ERROR*/ 354 /* all non-return stats set FSFREQ_ERROR*/
@@ -364,7 +365,7 @@ static void zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *req)
364 dev_err(&req->adapter->ccw_device->dev, 365 dev_err(&req->adapter->ccw_device->dev,
365 "The FCP adapter does not recognize the command 0x%x\n", 366 "The FCP adapter does not recognize the command 0x%x\n",
366 req->qtcb->header.fsf_command); 367 req->qtcb->header.fsf_command);
367 zfcp_erp_adapter_shutdown(req->adapter, 0, 120, req); 368 zfcp_erp_adapter_shutdown(req->adapter, 0, "fsfse_1", req);
368 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 369 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
369 break; 370 break;
370 case FSF_ADAPTER_STATUS_AVAILABLE: 371 case FSF_ADAPTER_STATUS_AVAILABLE:
@@ -396,17 +397,17 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req)
396 "QTCB version 0x%x not supported by FCP adapter " 397 "QTCB version 0x%x not supported by FCP adapter "
397 "(0x%x to 0x%x)\n", FSF_QTCB_CURRENT_VERSION, 398 "(0x%x to 0x%x)\n", FSF_QTCB_CURRENT_VERSION,
398 psq->word[0], psq->word[1]); 399 psq->word[0], psq->word[1]);
399 zfcp_erp_adapter_shutdown(adapter, 0, 117, req); 400 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_1", req);
400 break; 401 break;
401 case FSF_PROT_ERROR_STATE: 402 case FSF_PROT_ERROR_STATE:
402 case FSF_PROT_SEQ_NUMB_ERROR: 403 case FSF_PROT_SEQ_NUMB_ERROR:
403 zfcp_erp_adapter_reopen(adapter, 0, 98, req); 404 zfcp_erp_adapter_reopen(adapter, 0, "fspse_2", req);
404 req->status |= ZFCP_STATUS_FSFREQ_RETRY; 405 req->status |= ZFCP_STATUS_FSFREQ_RETRY;
405 break; 406 break;
406 case FSF_PROT_UNSUPP_QTCB_TYPE: 407 case FSF_PROT_UNSUPP_QTCB_TYPE:
407 dev_err(&adapter->ccw_device->dev, 408 dev_err(&adapter->ccw_device->dev,
408 "The QTCB type is not supported by the FCP adapter\n"); 409 "The QTCB type is not supported by the FCP adapter\n");
409 zfcp_erp_adapter_shutdown(adapter, 0, 118, req); 410 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_3", req);
410 break; 411 break;
411 case FSF_PROT_HOST_CONNECTION_INITIALIZING: 412 case FSF_PROT_HOST_CONNECTION_INITIALIZING:
412 atomic_set_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT, 413 atomic_set_mask(ZFCP_STATUS_ADAPTER_HOST_CON_INIT,
@@ -416,27 +417,29 @@ static void zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *req)
416 dev_err(&adapter->ccw_device->dev, 417 dev_err(&adapter->ccw_device->dev,
417 "0x%Lx is an ambiguous request identifier\n", 418 "0x%Lx is an ambiguous request identifier\n",
418 (unsigned long long)qtcb->bottom.support.req_handle); 419 (unsigned long long)qtcb->bottom.support.req_handle);
419 zfcp_erp_adapter_shutdown(adapter, 0, 78, req); 420 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_4", req);
420 break; 421 break;
421 case FSF_PROT_LINK_DOWN: 422 case FSF_PROT_LINK_DOWN:
422 zfcp_fsf_link_down_info_eval(req, 37, &psq->link_down_info); 423 zfcp_fsf_link_down_info_eval(req, "fspse_5",
424 &psq->link_down_info);
423 /* FIXME: reopening adapter now? better wait for link up */ 425 /* FIXME: reopening adapter now? better wait for link up */
424 zfcp_erp_adapter_reopen(adapter, 0, 79, req); 426 zfcp_erp_adapter_reopen(adapter, 0, "fspse_6", req);
425 break; 427 break;
426 case FSF_PROT_REEST_QUEUE: 428 case FSF_PROT_REEST_QUEUE:
427 /* All ports should be marked as ready to run again */ 429 /* All ports should be marked as ready to run again */
428 zfcp_erp_modify_adapter_status(adapter, 28, NULL, 430 zfcp_erp_modify_adapter_status(adapter, "fspse_7", NULL,
429 ZFCP_STATUS_COMMON_RUNNING, 431 ZFCP_STATUS_COMMON_RUNNING,
430 ZFCP_SET); 432 ZFCP_SET);
431 zfcp_erp_adapter_reopen(adapter, 433 zfcp_erp_adapter_reopen(adapter,
432 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | 434 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
433 ZFCP_STATUS_COMMON_ERP_FAILED, 99, req); 435 ZFCP_STATUS_COMMON_ERP_FAILED,
436 "fspse_8", req);
434 break; 437 break;
435 default: 438 default:
436 dev_err(&adapter->ccw_device->dev, 439 dev_err(&adapter->ccw_device->dev,
437 "0x%x is not a valid transfer protocol status\n", 440 "0x%x is not a valid transfer protocol status\n",
438 qtcb->prefix.prot_status); 441 qtcb->prefix.prot_status);
439 zfcp_erp_adapter_shutdown(adapter, 0, 119, req); 442 zfcp_erp_adapter_shutdown(adapter, 0, "fspse_9", req);
440 } 443 }
441 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 444 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
442} 445}
@@ -522,7 +525,7 @@ static int zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *req)
522 dev_err(&adapter->ccw_device->dev, 525 dev_err(&adapter->ccw_device->dev,
523 "Unknown or unsupported arbitrated loop " 526 "Unknown or unsupported arbitrated loop "
524 "fibre channel topology detected\n"); 527 "fibre channel topology detected\n");
525 zfcp_erp_adapter_shutdown(adapter, 0, 127, req); 528 zfcp_erp_adapter_shutdown(adapter, 0, "fsece_1", req);
526 return -EIO; 529 return -EIO;
527 } 530 }
528 531
@@ -556,7 +559,7 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req)
556 "FCP adapter maximum QTCB size (%d bytes) " 559 "FCP adapter maximum QTCB size (%d bytes) "
557 "is too small\n", 560 "is too small\n",
558 bottom->max_qtcb_size); 561 bottom->max_qtcb_size);
559 zfcp_erp_adapter_shutdown(adapter, 0, 129, req); 562 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh1", req);
560 return; 563 return;
561 } 564 }
562 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, 565 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK,
@@ -573,11 +576,11 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req)
573 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, 576 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK,
574 &adapter->status); 577 &adapter->status);
575 578
576 zfcp_fsf_link_down_info_eval(req, 42, 579 zfcp_fsf_link_down_info_eval(req, "fsecdh2",
577 &qtcb->header.fsf_status_qual.link_down_info); 580 &qtcb->header.fsf_status_qual.link_down_info);
578 break; 581 break;
579 default: 582 default:
580 zfcp_erp_adapter_shutdown(adapter, 0, 130, req); 583 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh3", req);
581 return; 584 return;
582 } 585 }
583 586
@@ -593,14 +596,14 @@ static void zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *req)
593 dev_err(&adapter->ccw_device->dev, 596 dev_err(&adapter->ccw_device->dev,
594 "The FCP adapter only supports newer " 597 "The FCP adapter only supports newer "
595 "control block versions\n"); 598 "control block versions\n");
596 zfcp_erp_adapter_shutdown(adapter, 0, 125, req); 599 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh4", req);
597 return; 600 return;
598 } 601 }
599 if (FSF_QTCB_CURRENT_VERSION > bottom->high_qtcb_version) { 602 if (FSF_QTCB_CURRENT_VERSION > bottom->high_qtcb_version) {
600 dev_err(&adapter->ccw_device->dev, 603 dev_err(&adapter->ccw_device->dev,
601 "The FCP adapter only supports older " 604 "The FCP adapter only supports older "
602 "control block versions\n"); 605 "control block versions\n");
603 zfcp_erp_adapter_shutdown(adapter, 0, 126, req); 606 zfcp_erp_adapter_shutdown(adapter, 0, "fsecdh5", req);
604 } 607 }
605} 608}
606 609
@@ -634,7 +637,7 @@ static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req)
634 break; 637 break;
635 case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: 638 case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE:
636 zfcp_fsf_exchange_port_evaluate(req); 639 zfcp_fsf_exchange_port_evaluate(req);
637 zfcp_fsf_link_down_info_eval(req, 43, 640 zfcp_fsf_link_down_info_eval(req, "fsepdh1",
638 &qtcb->header.fsf_status_qual.link_down_info); 641 &qtcb->header.fsf_status_qual.link_down_info);
639 break; 642 break;
640 } 643 }
@@ -779,7 +782,7 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *req)
779 if (zfcp_reqlist_find_safe(adapter, req)) 782 if (zfcp_reqlist_find_safe(adapter, req))
780 zfcp_reqlist_remove(adapter, req); 783 zfcp_reqlist_remove(adapter, req);
781 spin_unlock_irqrestore(&adapter->req_list_lock, flags); 784 spin_unlock_irqrestore(&adapter->req_list_lock, flags);
782 zfcp_erp_adapter_reopen(adapter, 0, 116, req); 785 zfcp_erp_adapter_reopen(adapter, 0, "fsrs__1", req);
783 return -EIO; 786 return -EIO;
784 } 787 }
785 788
@@ -859,14 +862,14 @@ static void zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *req)
859 switch (req->qtcb->header.fsf_status) { 862 switch (req->qtcb->header.fsf_status) {
860 case FSF_PORT_HANDLE_NOT_VALID: 863 case FSF_PORT_HANDLE_NOT_VALID:
861 if (fsq->word[0] == fsq->word[1]) { 864 if (fsq->word[0] == fsq->word[1]) {
862 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 104, 865 zfcp_erp_adapter_reopen(unit->port->adapter, 0,
863 req); 866 "fsafch1", req);
864 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 867 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
865 } 868 }
866 break; 869 break;
867 case FSF_LUN_HANDLE_NOT_VALID: 870 case FSF_LUN_HANDLE_NOT_VALID:
868 if (fsq->word[0] == fsq->word[1]) { 871 if (fsq->word[0] == fsq->word[1]) {
869 zfcp_erp_port_reopen(unit->port, 0, 105, req); 872 zfcp_erp_port_reopen(unit->port, 0, "fsafch2", req);
870 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 873 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
871 } 874 }
872 break; 875 break;
@@ -874,12 +877,12 @@ static void zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *req)
874 req->status |= ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED; 877 req->status |= ZFCP_STATUS_FSFREQ_ABORTNOTNEEDED;
875 break; 878 break;
876 case FSF_PORT_BOXED: 879 case FSF_PORT_BOXED:
877 zfcp_erp_port_boxed(unit->port, 47, req); 880 zfcp_erp_port_boxed(unit->port, "fsafch3", req);
878 req->status |= ZFCP_STATUS_FSFREQ_ERROR | 881 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
879 ZFCP_STATUS_FSFREQ_RETRY; 882 ZFCP_STATUS_FSFREQ_RETRY;
880 break; 883 break;
881 case FSF_LUN_BOXED: 884 case FSF_LUN_BOXED:
882 zfcp_erp_unit_boxed(unit, 48, req); 885 zfcp_erp_unit_boxed(unit, "fsafch4", req);
883 req->status |= ZFCP_STATUS_FSFREQ_ERROR | 886 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
884 ZFCP_STATUS_FSFREQ_RETRY; 887 ZFCP_STATUS_FSFREQ_RETRY;
885 break; 888 break;
@@ -982,7 +985,7 @@ static void zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *req)
982 ZFCP_STATUS_FSFREQ_RETRY; 985 ZFCP_STATUS_FSFREQ_RETRY;
983 break; 986 break;
984 case FSF_PORT_HANDLE_NOT_VALID: 987 case FSF_PORT_HANDLE_NOT_VALID:
985 zfcp_erp_adapter_reopen(adapter, 0, 106, req); 988 zfcp_erp_adapter_reopen(adapter, 0, "fsscth1", req);
986 case FSF_GENERIC_COMMAND_REJECTED: 989 case FSF_GENERIC_COMMAND_REJECTED:
987 case FSF_PAYLOAD_SIZE_MISMATCH: 990 case FSF_PAYLOAD_SIZE_MISMATCH:
988 case FSF_REQUEST_SIZE_TOO_LARGE: 991 case FSF_REQUEST_SIZE_TOO_LARGE:
@@ -1400,7 +1403,7 @@ static void zfcp_fsf_open_port_handler(struct zfcp_fsf_req *req)
1400 "Not enough FCP adapter resources to open " 1403 "Not enough FCP adapter resources to open "
1401 "remote port 0x%016Lx\n", 1404 "remote port 0x%016Lx\n",
1402 (unsigned long long)port->wwpn); 1405 (unsigned long long)port->wwpn);
1403 zfcp_erp_port_failed(port, 31, req); 1406 zfcp_erp_port_failed(port, "fsoph_1", req);
1404 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1407 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1405 break; 1408 break;
1406 case FSF_ADAPTER_STATUS_AVAILABLE: 1409 case FSF_ADAPTER_STATUS_AVAILABLE:
@@ -1506,13 +1509,13 @@ static void zfcp_fsf_close_port_handler(struct zfcp_fsf_req *req)
1506 1509
1507 switch (req->qtcb->header.fsf_status) { 1510 switch (req->qtcb->header.fsf_status) {
1508 case FSF_PORT_HANDLE_NOT_VALID: 1511 case FSF_PORT_HANDLE_NOT_VALID:
1509 zfcp_erp_adapter_reopen(port->adapter, 0, 107, req); 1512 zfcp_erp_adapter_reopen(port->adapter, 0, "fscph_1", req);
1510 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1513 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1511 break; 1514 break;
1512 case FSF_ADAPTER_STATUS_AVAILABLE: 1515 case FSF_ADAPTER_STATUS_AVAILABLE:
1513 break; 1516 break;
1514 case FSF_GOOD: 1517 case FSF_GOOD:
1515 zfcp_erp_modify_port_status(port, 33, req, 1518 zfcp_erp_modify_port_status(port, "fscph_2", req,
1516 ZFCP_STATUS_COMMON_OPEN, 1519 ZFCP_STATUS_COMMON_OPEN,
1517 ZFCP_CLEAR); 1520 ZFCP_CLEAR);
1518 break; 1521 break;
@@ -1641,7 +1644,7 @@ static void zfcp_fsf_close_wka_port_handler(struct zfcp_fsf_req *req)
1641 1644
1642 if (req->qtcb->header.fsf_status == FSF_PORT_HANDLE_NOT_VALID) { 1645 if (req->qtcb->header.fsf_status == FSF_PORT_HANDLE_NOT_VALID) {
1643 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1646 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1644 zfcp_erp_adapter_reopen(wka_port->adapter, 0, 84, req); 1647 zfcp_erp_adapter_reopen(wka_port->adapter, 0, "fscwph1", req);
1645 } 1648 }
1646 1649
1647 wka_port->status = ZFCP_WKA_PORT_OFFLINE; 1650 wka_port->status = ZFCP_WKA_PORT_OFFLINE;
@@ -1700,14 +1703,14 @@ static void zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *req)
1700 1703
1701 switch (header->fsf_status) { 1704 switch (header->fsf_status) {
1702 case FSF_PORT_HANDLE_NOT_VALID: 1705 case FSF_PORT_HANDLE_NOT_VALID:
1703 zfcp_erp_adapter_reopen(port->adapter, 0, 108, req); 1706 zfcp_erp_adapter_reopen(port->adapter, 0, "fscpph1", req);
1704 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1707 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1705 break; 1708 break;
1706 case FSF_ACCESS_DENIED: 1709 case FSF_ACCESS_DENIED:
1707 zfcp_fsf_access_denied_port(req, port); 1710 zfcp_fsf_access_denied_port(req, port);
1708 break; 1711 break;
1709 case FSF_PORT_BOXED: 1712 case FSF_PORT_BOXED:
1710 zfcp_erp_port_boxed(port, 50, req); 1713 zfcp_erp_port_boxed(port, "fscpph2", req);
1711 req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1714 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1712 ZFCP_STATUS_FSFREQ_RETRY; 1715 ZFCP_STATUS_FSFREQ_RETRY;
1713 /* can't use generic zfcp_erp_modify_port_status because 1716 /* can't use generic zfcp_erp_modify_port_status because
@@ -1805,7 +1808,7 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
1805 switch (header->fsf_status) { 1808 switch (header->fsf_status) {
1806 1809
1807 case FSF_PORT_HANDLE_NOT_VALID: 1810 case FSF_PORT_HANDLE_NOT_VALID:
1808 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 109, req); 1811 zfcp_erp_adapter_reopen(unit->port->adapter, 0, "fsouh_1", req);
1809 /* fall through */ 1812 /* fall through */
1810 case FSF_LUN_ALREADY_OPEN: 1813 case FSF_LUN_ALREADY_OPEN:
1811 break; 1814 break;
@@ -1815,7 +1818,7 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
1815 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); 1818 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status);
1816 break; 1819 break;
1817 case FSF_PORT_BOXED: 1820 case FSF_PORT_BOXED:
1818 zfcp_erp_port_boxed(unit->port, 51, req); 1821 zfcp_erp_port_boxed(unit->port, "fsouh_2", req);
1819 req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1822 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1820 ZFCP_STATUS_FSFREQ_RETRY; 1823 ZFCP_STATUS_FSFREQ_RETRY;
1821 break; 1824 break;
@@ -1831,7 +1834,7 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
1831 else 1834 else
1832 zfcp_act_eval_err(adapter, 1835 zfcp_act_eval_err(adapter,
1833 header->fsf_status_qual.word[2]); 1836 header->fsf_status_qual.word[2]);
1834 zfcp_erp_unit_access_denied(unit, 60, req); 1837 zfcp_erp_unit_access_denied(unit, "fsouh_3", req);
1835 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); 1838 atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status);
1836 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); 1839 atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status);
1837 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1840 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -1842,7 +1845,7 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
1842 "0x%016Lx on port 0x%016Lx\n", 1845 "0x%016Lx on port 0x%016Lx\n",
1843 (unsigned long long)unit->fcp_lun, 1846 (unsigned long long)unit->fcp_lun,
1844 (unsigned long long)unit->port->wwpn); 1847 (unsigned long long)unit->port->wwpn);
1845 zfcp_erp_unit_failed(unit, 34, req); 1848 zfcp_erp_unit_failed(unit, "fsouh_4", req);
1846 /* fall through */ 1849 /* fall through */
1847 case FSF_INVALID_COMMAND_OPTION: 1850 case FSF_INVALID_COMMAND_OPTION:
1848 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1851 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
@@ -1891,9 +1894,9 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
1891 "port 0x%016Lx)\n", 1894 "port 0x%016Lx)\n",
1892 (unsigned long long)unit->fcp_lun, 1895 (unsigned long long)unit->fcp_lun,
1893 (unsigned long long)unit->port->wwpn); 1896 (unsigned long long)unit->port->wwpn);
1894 zfcp_erp_unit_failed(unit, 35, req); 1897 zfcp_erp_unit_failed(unit, "fsouh_5", req);
1895 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1898 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1896 zfcp_erp_unit_shutdown(unit, 0, 80, req); 1899 zfcp_erp_unit_shutdown(unit, 0, "fsouh_6", req);
1897 } else if (!exclusive && readwrite) { 1900 } else if (!exclusive && readwrite) {
1898 dev_err(&adapter->ccw_device->dev, 1901 dev_err(&adapter->ccw_device->dev,
1899 "Shared read-write access not " 1902 "Shared read-write access not "
@@ -1901,9 +1904,9 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
1901 "0x%016Lx)\n", 1904 "0x%016Lx)\n",
1902 (unsigned long long)unit->fcp_lun, 1905 (unsigned long long)unit->fcp_lun,
1903 (unsigned long long)unit->port->wwpn); 1906 (unsigned long long)unit->port->wwpn);
1904 zfcp_erp_unit_failed(unit, 36, req); 1907 zfcp_erp_unit_failed(unit, "fsouh_7", req);
1905 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1908 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1906 zfcp_erp_unit_shutdown(unit, 0, 81, req); 1909 zfcp_erp_unit_shutdown(unit, 0, "fsouh_8", req);
1907 } 1910 }
1908 } 1911 }
1909 break; 1912 break;
@@ -1968,15 +1971,15 @@ static void zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *req)
1968 1971
1969 switch (req->qtcb->header.fsf_status) { 1972 switch (req->qtcb->header.fsf_status) {
1970 case FSF_PORT_HANDLE_NOT_VALID: 1973 case FSF_PORT_HANDLE_NOT_VALID:
1971 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 110, req); 1974 zfcp_erp_adapter_reopen(unit->port->adapter, 0, "fscuh_1", req);
1972 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1975 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1973 break; 1976 break;
1974 case FSF_LUN_HANDLE_NOT_VALID: 1977 case FSF_LUN_HANDLE_NOT_VALID:
1975 zfcp_erp_port_reopen(unit->port, 0, 111, req); 1978 zfcp_erp_port_reopen(unit->port, 0, "fscuh_2", req);
1976 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1979 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1977 break; 1980 break;
1978 case FSF_PORT_BOXED: 1981 case FSF_PORT_BOXED:
1979 zfcp_erp_port_boxed(unit->port, 52, req); 1982 zfcp_erp_port_boxed(unit->port, "fscuh_3", req);
1980 req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1983 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1981 ZFCP_STATUS_FSFREQ_RETRY; 1984 ZFCP_STATUS_FSFREQ_RETRY;
1982 break; 1985 break;
@@ -2215,12 +2218,12 @@ static void zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *req)
2215 switch (header->fsf_status) { 2218 switch (header->fsf_status) {
2216 case FSF_HANDLE_MISMATCH: 2219 case FSF_HANDLE_MISMATCH:
2217 case FSF_PORT_HANDLE_NOT_VALID: 2220 case FSF_PORT_HANDLE_NOT_VALID:
2218 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 112, req); 2221 zfcp_erp_adapter_reopen(unit->port->adapter, 0, "fssfch1", req);
2219 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2222 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2220 break; 2223 break;
2221 case FSF_FCPLUN_NOT_VALID: 2224 case FSF_FCPLUN_NOT_VALID:
2222 case FSF_LUN_HANDLE_NOT_VALID: 2225 case FSF_LUN_HANDLE_NOT_VALID:
2223 zfcp_erp_port_reopen(unit->port, 0, 113, req); 2226 zfcp_erp_port_reopen(unit->port, 0, "fssfch2", req);
2224 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2227 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2225 break; 2228 break;
2226 case FSF_SERVICE_CLASS_NOT_SUPPORTED: 2229 case FSF_SERVICE_CLASS_NOT_SUPPORTED:
@@ -2236,7 +2239,8 @@ static void zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *req)
2236 req->qtcb->bottom.io.data_direction, 2239 req->qtcb->bottom.io.data_direction,
2237 (unsigned long long)unit->fcp_lun, 2240 (unsigned long long)unit->fcp_lun,
2238 (unsigned long long)unit->port->wwpn); 2241 (unsigned long long)unit->port->wwpn);
2239 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, req); 2242 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, "fssfch3",
2243 req);
2240 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2244 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2241 break; 2245 break;
2242 case FSF_CMND_LENGTH_NOT_VALID: 2246 case FSF_CMND_LENGTH_NOT_VALID:
@@ -2246,16 +2250,17 @@ static void zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *req)
2246 req->qtcb->bottom.io.fcp_cmnd_length, 2250 req->qtcb->bottom.io.fcp_cmnd_length,
2247 (unsigned long long)unit->fcp_lun, 2251 (unsigned long long)unit->fcp_lun,
2248 (unsigned long long)unit->port->wwpn); 2252 (unsigned long long)unit->port->wwpn);
2249 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, req); 2253 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, "fssfch4",
2254 req);
2250 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2255 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2251 break; 2256 break;
2252 case FSF_PORT_BOXED: 2257 case FSF_PORT_BOXED:
2253 zfcp_erp_port_boxed(unit->port, 53, req); 2258 zfcp_erp_port_boxed(unit->port, "fssfch5", req);
2254 req->status |= ZFCP_STATUS_FSFREQ_ERROR | 2259 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
2255 ZFCP_STATUS_FSFREQ_RETRY; 2260 ZFCP_STATUS_FSFREQ_RETRY;
2256 break; 2261 break;
2257 case FSF_LUN_BOXED: 2262 case FSF_LUN_BOXED:
2258 zfcp_erp_unit_boxed(unit, 54, req); 2263 zfcp_erp_unit_boxed(unit, "fssfch6", req);
2259 req->status |= ZFCP_STATUS_FSFREQ_ERROR | 2264 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
2260 ZFCP_STATUS_FSFREQ_RETRY; 2265 ZFCP_STATUS_FSFREQ_RETRY;
2261 break; 2266 break;
@@ -2388,7 +2393,7 @@ int zfcp_fsf_send_fcp_command_task(struct zfcp_unit *unit,
2388 "on port 0x%016Lx closed\n", 2393 "on port 0x%016Lx closed\n",
2389 (unsigned long long)unit->fcp_lun, 2394 (unsigned long long)unit->fcp_lun,
2390 (unsigned long long)unit->port->wwpn); 2395 (unsigned long long)unit->port->wwpn);
2391 zfcp_erp_unit_shutdown(unit, 0, 131, req); 2396 zfcp_erp_unit_shutdown(unit, 0, "fssfct1", req);
2392 retval = -EINVAL; 2397 retval = -EINVAL;
2393 } 2398 }
2394 goto failed_scsi_cmnd; 2399 goto failed_scsi_cmnd;