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.c103
1 files changed, 60 insertions, 43 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 2b7ddb78767..ffdf99736a4 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -298,7 +298,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
298 zfcp_get_busid_by_adapter(adapter), 298 zfcp_get_busid_by_adapter(adapter),
299 prot_status_qual->version_error.fsf_version, 299 prot_status_qual->version_error.fsf_version,
300 ZFCP_QTCB_VERSION); 300 ZFCP_QTCB_VERSION);
301 zfcp_erp_adapter_shutdown(adapter, 0); 301 zfcp_erp_adapter_shutdown(adapter, 0, 117, (u64)fsf_req);
302 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 302 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
303 break; 303 break;
304 304
@@ -309,7 +309,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
309 qtcb->prefix.req_seq_no, 309 qtcb->prefix.req_seq_no,
310 zfcp_get_busid_by_adapter(adapter), 310 zfcp_get_busid_by_adapter(adapter),
311 prot_status_qual->sequence_error.exp_req_seq_no); 311 prot_status_qual->sequence_error.exp_req_seq_no);
312 zfcp_erp_adapter_reopen(adapter, 0); 312 zfcp_erp_adapter_reopen(adapter, 0, 98, (u64)fsf_req);
313 fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY; 313 fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY;
314 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 314 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
315 break; 315 break;
@@ -320,7 +320,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
320 "that used on adapter %s. " 320 "that used on adapter %s. "
321 "Stopping all operations on this adapter.\n", 321 "Stopping all operations on this adapter.\n",
322 zfcp_get_busid_by_adapter(adapter)); 322 zfcp_get_busid_by_adapter(adapter));
323 zfcp_erp_adapter_shutdown(adapter, 0); 323 zfcp_erp_adapter_shutdown(adapter, 0, 118, (u64)fsf_req);
324 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 324 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
325 break; 325 break;
326 326
@@ -337,14 +337,15 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
337 *(unsigned long long*) 337 *(unsigned long long*)
338 (&qtcb->bottom.support.req_handle), 338 (&qtcb->bottom.support.req_handle),
339 zfcp_get_busid_by_adapter(adapter)); 339 zfcp_get_busid_by_adapter(adapter));
340 zfcp_erp_adapter_shutdown(adapter, 0); 340 zfcp_erp_adapter_shutdown(adapter, 0, 78, (u64)fsf_req);
341 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 341 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
342 break; 342 break;
343 343
344 case FSF_PROT_LINK_DOWN: 344 case FSF_PROT_LINK_DOWN:
345 zfcp_fsf_link_down_info_eval(fsf_req, 37, 345 zfcp_fsf_link_down_info_eval(fsf_req, 37,
346 &prot_status_qual->link_down_info); 346 &prot_status_qual->link_down_info);
347 zfcp_erp_adapter_reopen(adapter, 0); 347 /* FIXME: reopening adapter now? better wait for link up */
348 zfcp_erp_adapter_reopen(adapter, 0, 79, (u64)fsf_req);
348 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 349 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
349 break; 350 break;
350 351
@@ -359,7 +360,8 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
359 ZFCP_SET); 360 ZFCP_SET);
360 zfcp_erp_adapter_reopen(adapter, 361 zfcp_erp_adapter_reopen(adapter,
361 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 362 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED
362 | ZFCP_STATUS_COMMON_ERP_FAILED); 363 | ZFCP_STATUS_COMMON_ERP_FAILED,
364 99, (u64)fsf_req);
363 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 365 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
364 break; 366 break;
365 367
@@ -369,7 +371,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
369 "Restarting all operations on this " 371 "Restarting all operations on this "
370 "adapter.\n", 372 "adapter.\n",
371 zfcp_get_busid_by_adapter(adapter)); 373 zfcp_get_busid_by_adapter(adapter));
372 zfcp_erp_adapter_reopen(adapter, 0); 374 zfcp_erp_adapter_reopen(adapter, 0, 100, (u64)fsf_req);
373 fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY; 375 fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY;
374 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 376 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
375 break; 377 break;
@@ -382,7 +384,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req)
382 "(debug info 0x%x).\n", 384 "(debug info 0x%x).\n",
383 zfcp_get_busid_by_adapter(adapter), 385 zfcp_get_busid_by_adapter(adapter),
384 qtcb->prefix.prot_status); 386 qtcb->prefix.prot_status);
385 zfcp_erp_adapter_shutdown(adapter, 0); 387 zfcp_erp_adapter_shutdown(adapter, 0, 119, (u64)fsf_req);
386 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 388 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
387 } 389 }
388 390
@@ -421,7 +423,8 @@ zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *fsf_req)
421 "(debug info 0x%x).\n", 423 "(debug info 0x%x).\n",
422 zfcp_get_busid_by_adapter(fsf_req->adapter), 424 zfcp_get_busid_by_adapter(fsf_req->adapter),
423 fsf_req->qtcb->header.fsf_command); 425 fsf_req->qtcb->header.fsf_command);
424 zfcp_erp_adapter_shutdown(fsf_req->adapter, 0); 426 zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 120,
427 (u64)fsf_req);
425 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 428 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
426 break; 429 break;
427 430
@@ -475,7 +478,8 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req)
475 "problem on the adapter %s " 478 "problem on the adapter %s "
476 "Stopping all operations on this adapter. ", 479 "Stopping all operations on this adapter. ",
477 zfcp_get_busid_by_adapter(fsf_req->adapter)); 480 zfcp_get_busid_by_adapter(fsf_req->adapter));
478 zfcp_erp_adapter_shutdown(fsf_req->adapter, 0); 481 zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 121,
482 (u64)fsf_req);
479 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 483 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
480 break; 484 break;
481 case FSF_SQ_ULP_PROGRAMMING_ERROR: 485 case FSF_SQ_ULP_PROGRAMMING_ERROR:
@@ -796,12 +800,12 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req)
796 800
797 case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT: 801 case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT:
798 debug_text_event(adapter->erp_dbf, 3, "unsol_pc_phys:"); 802 debug_text_event(adapter->erp_dbf, 3, "unsol_pc_phys:");
799 zfcp_erp_port_reopen(port, 0); 803 zfcp_erp_port_reopen(port, 0, 101, (u64)fsf_req);
800 break; 804 break;
801 805
802 case FSF_STATUS_READ_SUB_ERROR_PORT: 806 case FSF_STATUS_READ_SUB_ERROR_PORT:
803 debug_text_event(adapter->erp_dbf, 1, "unsol_pc_err:"); 807 debug_text_event(adapter->erp_dbf, 1, "unsol_pc_err:");
804 zfcp_erp_port_shutdown(port, 0); 808 zfcp_erp_port_shutdown(port, 0, 122, (u64)fsf_req);
805 break; 809 break;
806 810
807 default: 811 default:
@@ -935,7 +939,8 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
935 ZFCP_SET); 939 ZFCP_SET);
936 zfcp_erp_adapter_reopen(adapter, 940 zfcp_erp_adapter_reopen(adapter,
937 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 941 ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED
938 | ZFCP_STATUS_COMMON_ERP_FAILED); 942 | ZFCP_STATUS_COMMON_ERP_FAILED,
943 102, (u64)fsf_req);
939 break; 944 break;
940 945
941 case FSF_STATUS_READ_NOTIFICATION_LOST: 946 case FSF_STATUS_READ_NOTIFICATION_LOST:
@@ -969,13 +974,14 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
969 974
970 if (status_buffer->status_subtype & 975 if (status_buffer->status_subtype &
971 FSF_STATUS_READ_SUB_ACT_UPDATED) 976 FSF_STATUS_READ_SUB_ACT_UPDATED)
972 zfcp_erp_adapter_access_changed(adapter); 977 zfcp_erp_adapter_access_changed(adapter, 135,
978 (u64)fsf_req);
973 break; 979 break;
974 980
975 case FSF_STATUS_READ_CFDC_UPDATED: 981 case FSF_STATUS_READ_CFDC_UPDATED:
976 ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n", 982 ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n",
977 zfcp_get_busid_by_adapter(adapter)); 983 zfcp_get_busid_by_adapter(adapter));
978 zfcp_erp_adapter_access_changed(adapter); 984 zfcp_erp_adapter_access_changed(adapter, 136, (u64)fsf_req);
979 break; 985 break;
980 986
981 case FSF_STATUS_READ_CFDC_HARDENED: 987 case FSF_STATUS_READ_CFDC_HARDENED:
@@ -1044,7 +1050,7 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req)
1044 ZFCP_LOG_INFO("restart adapter %s due to status read " 1050 ZFCP_LOG_INFO("restart adapter %s due to status read "
1045 "buffer shortage\n", 1051 "buffer shortage\n",
1046 zfcp_get_busid_by_adapter(adapter)); 1052 zfcp_get_busid_by_adapter(adapter));
1047 zfcp_erp_adapter_reopen(adapter, 0); 1053 zfcp_erp_adapter_reopen(adapter, 0, 103, (u64)fsf_req);
1048 } 1054 }
1049 } 1055 }
1050 out: 1056 out:
@@ -1167,7 +1173,8 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1167 /* Let's hope this sorts out the mess */ 1173 /* Let's hope this sorts out the mess */
1168 debug_text_event(new_fsf_req->adapter->erp_dbf, 1, 1174 debug_text_event(new_fsf_req->adapter->erp_dbf, 1,
1169 "fsf_s_phand_nv1"); 1175 "fsf_s_phand_nv1");
1170 zfcp_erp_adapter_reopen(unit->port->adapter, 0); 1176 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 104,
1177 (u64)new_fsf_req);
1171 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1178 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1172 } 1179 }
1173 break; 1180 break;
@@ -1199,7 +1206,8 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req)
1199 /* Let's hope this sorts out the mess */ 1206 /* Let's hope this sorts out the mess */
1200 debug_text_event(new_fsf_req->adapter->erp_dbf, 1, 1207 debug_text_event(new_fsf_req->adapter->erp_dbf, 1,
1201 "fsf_s_lhand_nv1"); 1208 "fsf_s_lhand_nv1");
1202 zfcp_erp_port_reopen(unit->port, 0); 1209 zfcp_erp_port_reopen(unit->port, 0, 105,
1210 (u64)new_fsf_req);
1203 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1211 new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1204 } 1212 }
1205 break; 1213 break;
@@ -1478,7 +1486,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1478 ZFCP_FC_SERVICE_CLASS_DEFAULT); 1486 ZFCP_FC_SERVICE_CLASS_DEFAULT);
1479 /* stop operation for this adapter */ 1487 /* stop operation for this adapter */
1480 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup"); 1488 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup");
1481 zfcp_erp_adapter_shutdown(adapter, 0); 1489 zfcp_erp_adapter_shutdown(adapter, 0, 123, (u64)fsf_req);
1482 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1490 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1483 break; 1491 break;
1484 1492
@@ -1547,7 +1555,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req)
1547 (char *) &header->fsf_status_qual, 1555 (char *) &header->fsf_status_qual,
1548 sizeof (union fsf_status_qual)); 1556 sizeof (union fsf_status_qual));
1549 debug_text_event(adapter->erp_dbf, 1, "fsf_s_phandle_nv"); 1557 debug_text_event(adapter->erp_dbf, 1, "fsf_s_phandle_nv");
1550 zfcp_erp_adapter_reopen(adapter, 0); 1558 zfcp_erp_adapter_reopen(adapter, 0, 106, (u64)fsf_req);
1551 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1559 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1552 break; 1560 break;
1553 1561
@@ -1782,7 +1790,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req)
1782 ZFCP_FC_SERVICE_CLASS_DEFAULT); 1790 ZFCP_FC_SERVICE_CLASS_DEFAULT);
1783 /* stop operation for this adapter */ 1791 /* stop operation for this adapter */
1784 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup"); 1792 debug_text_exception(adapter->erp_dbf, 0, "fsf_s_class_nsup");
1785 zfcp_erp_adapter_shutdown(adapter, 0); 1793 zfcp_erp_adapter_shutdown(adapter, 0, 124, (u64)fsf_req);
1786 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1794 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1787 break; 1795 break;
1788 1796
@@ -2104,7 +2112,7 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
2104 "driver (try updated device driver)\n", 2112 "driver (try updated device driver)\n",
2105 zfcp_get_busid_by_adapter(adapter)); 2113 zfcp_get_busid_by_adapter(adapter));
2106 debug_text_event(adapter->erp_dbf, 0, "low_qtcb_ver"); 2114 debug_text_event(adapter->erp_dbf, 0, "low_qtcb_ver");
2107 zfcp_erp_adapter_shutdown(adapter, 0); 2115 zfcp_erp_adapter_shutdown(adapter, 0, 125, (u64)fsf_req);
2108 return -EIO; 2116 return -EIO;
2109 } 2117 }
2110 if (ZFCP_QTCB_VERSION > bottom->high_qtcb_version) { 2118 if (ZFCP_QTCB_VERSION > bottom->high_qtcb_version) {
@@ -2114,7 +2122,7 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok)
2114 "(consider a microcode upgrade)\n", 2122 "(consider a microcode upgrade)\n",
2115 zfcp_get_busid_by_adapter(adapter)); 2123 zfcp_get_busid_by_adapter(adapter));
2116 debug_text_event(adapter->erp_dbf, 0, "high_qtcb_ver"); 2124 debug_text_event(adapter->erp_dbf, 0, "high_qtcb_ver");
2117 zfcp_erp_adapter_shutdown(adapter, 0); 2125 zfcp_erp_adapter_shutdown(adapter, 0, 126, (u64)fsf_req);
2118 return -EIO; 2126 return -EIO;
2119 } 2127 }
2120 return 0; 2128 return 0;
@@ -2164,7 +2172,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2164 zfcp_get_busid_by_adapter(adapter)); 2172 zfcp_get_busid_by_adapter(adapter));
2165 debug_text_event(fsf_req->adapter->erp_dbf, 0, 2173 debug_text_event(fsf_req->adapter->erp_dbf, 0,
2166 "top-al"); 2174 "top-al");
2167 zfcp_erp_adapter_shutdown(adapter, 0); 2175 zfcp_erp_adapter_shutdown(adapter, 0, 127, (u64)fsf_req);
2168 return -EIO; 2176 return -EIO;
2169 case FC_PORTTYPE_NPORT: 2177 case FC_PORTTYPE_NPORT:
2170 ZFCP_LOG_NORMAL("Switched fabric fibrechannel " 2178 ZFCP_LOG_NORMAL("Switched fabric fibrechannel "
@@ -2181,7 +2189,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2181 zfcp_get_busid_by_adapter(adapter)); 2189 zfcp_get_busid_by_adapter(adapter));
2182 debug_text_exception(fsf_req->adapter->erp_dbf, 0, 2190 debug_text_exception(fsf_req->adapter->erp_dbf, 0,
2183 "unknown-topo"); 2191 "unknown-topo");
2184 zfcp_erp_adapter_shutdown(adapter, 0); 2192 zfcp_erp_adapter_shutdown(adapter, 0, 128, (u64)fsf_req);
2185 return -EIO; 2193 return -EIO;
2186 } 2194 }
2187 bottom = &qtcb->bottom.config; 2195 bottom = &qtcb->bottom.config;
@@ -2197,7 +2205,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2197 "qtcb-size"); 2205 "qtcb-size");
2198 debug_event(fsf_req->adapter->erp_dbf, 0, 2206 debug_event(fsf_req->adapter->erp_dbf, 0,
2199 &bottom->max_qtcb_size, sizeof (u32)); 2207 &bottom->max_qtcb_size, sizeof (u32));
2200 zfcp_erp_adapter_shutdown(adapter, 0); 2208 zfcp_erp_adapter_shutdown(adapter, 0, 129, (u64)fsf_req);
2201 return -EIO; 2209 return -EIO;
2202 } 2210 }
2203 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, 2211 atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK,
@@ -2219,7 +2227,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req)
2219 debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf-stat-ng"); 2227 debug_text_event(fsf_req->adapter->erp_dbf, 0, "fsf-stat-ng");
2220 debug_event(fsf_req->adapter->erp_dbf, 0, 2228 debug_event(fsf_req->adapter->erp_dbf, 0,
2221 &fsf_req->qtcb->header.fsf_status, sizeof(u32)); 2229 &fsf_req->qtcb->header.fsf_status, sizeof(u32));
2222 zfcp_erp_adapter_shutdown(adapter, 0); 2230 zfcp_erp_adapter_shutdown(adapter, 0, 130, (u64)fsf_req);
2223 return -EIO; 2231 return -EIO;
2224 } 2232 }
2225 return 0; 2233 return 0;
@@ -2760,7 +2768,7 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req)
2760 sizeof (union fsf_status_qual)); 2768 sizeof (union fsf_status_qual));
2761 debug_text_event(fsf_req->adapter->erp_dbf, 1, 2769 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2762 "fsf_s_phand_nv"); 2770 "fsf_s_phand_nv");
2763 zfcp_erp_adapter_reopen(port->adapter, 0); 2771 zfcp_erp_adapter_reopen(port->adapter, 0, 107, (u64)fsf_req);
2764 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2772 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2765 break; 2773 break;
2766 2774
@@ -2903,7 +2911,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req)
2903 sizeof (union fsf_status_qual)); 2911 sizeof (union fsf_status_qual));
2904 debug_text_event(fsf_req->adapter->erp_dbf, 1, 2912 debug_text_event(fsf_req->adapter->erp_dbf, 1,
2905 "fsf_s_phand_nv"); 2913 "fsf_s_phand_nv");
2906 zfcp_erp_adapter_reopen(port->adapter, 0); 2914 zfcp_erp_adapter_reopen(port->adapter, 0, 108, (u64)fsf_req);
2907 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 2915 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
2908 break; 2916 break;
2909 2917
@@ -3128,7 +3136,8 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3128 (char *) &header->fsf_status_qual, 3136 (char *) &header->fsf_status_qual,
3129 sizeof (union fsf_status_qual)); 3137 sizeof (union fsf_status_qual));
3130 debug_text_event(adapter->erp_dbf, 1, "fsf_s_ph_nv"); 3138 debug_text_event(adapter->erp_dbf, 1, "fsf_s_ph_nv");
3131 zfcp_erp_adapter_reopen(unit->port->adapter, 0); 3139 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 109,
3140 (u64)fsf_req);
3132 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3141 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3133 break; 3142 break;
3134 3143
@@ -3311,13 +3320,15 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req)
3311 "unit not supported\n"); 3320 "unit not supported\n");
3312 zfcp_erp_unit_failed(unit, 35, (u64)fsf_req); 3321 zfcp_erp_unit_failed(unit, 35, (u64)fsf_req);
3313 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3322 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3314 zfcp_erp_unit_shutdown(unit, 0); 3323 zfcp_erp_unit_shutdown(unit, 0, 80,
3324 (u64)fsf_req);
3315 } else if (!exclusive && readwrite) { 3325 } else if (!exclusive && readwrite) {
3316 ZFCP_LOG_NORMAL("shared access of read-write " 3326 ZFCP_LOG_NORMAL("shared access of read-write "
3317 "unit not supported\n"); 3327 "unit not supported\n");
3318 zfcp_erp_unit_failed(unit, 36, (u64)fsf_req); 3328 zfcp_erp_unit_failed(unit, 36, (u64)fsf_req);
3319 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3329 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3320 zfcp_erp_unit_shutdown(unit, 0); 3330 zfcp_erp_unit_shutdown(unit, 0, 81,
3331 (u64)fsf_req);
3321 } 3332 }
3322 } 3333 }
3323 3334
@@ -3445,7 +3456,8 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3445 sizeof (union fsf_status_qual)); 3456 sizeof (union fsf_status_qual));
3446 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3457 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3447 "fsf_s_phand_nv"); 3458 "fsf_s_phand_nv");
3448 zfcp_erp_adapter_reopen(unit->port->adapter, 0); 3459 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 110,
3460 (u64)fsf_req);
3449 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3461 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3450 break; 3462 break;
3451 3463
@@ -3463,7 +3475,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req)
3463 sizeof (union fsf_status_qual)); 3475 sizeof (union fsf_status_qual));
3464 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3476 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3465 "fsf_s_lhand_nv"); 3477 "fsf_s_lhand_nv");
3466 zfcp_erp_port_reopen(unit->port, 0); 3478 zfcp_erp_port_reopen(unit->port, 0, 111, (u64)fsf_req);
3467 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3479 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3468 break; 3480 break;
3469 3481
@@ -3681,7 +3693,7 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter,
3681 zfcp_get_busid_by_unit(unit), 3693 zfcp_get_busid_by_unit(unit),
3682 unit->port->wwpn, 3694 unit->port->wwpn,
3683 unit->fcp_lun); 3695 unit->fcp_lun);
3684 zfcp_erp_unit_shutdown(unit, 0); 3696 zfcp_erp_unit_shutdown(unit, 0, 131, (u64)fsf_req);
3685 retval = -EINVAL; 3697 retval = -EINVAL;
3686 } 3698 }
3687 goto no_fit; 3699 goto no_fit;
@@ -3841,7 +3853,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3841 sizeof (union fsf_status_qual)); 3853 sizeof (union fsf_status_qual));
3842 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3854 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3843 "fsf_s_phand_nv"); 3855 "fsf_s_phand_nv");
3844 zfcp_erp_adapter_reopen(unit->port->adapter, 0); 3856 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 112,
3857 (u64)fsf_req);
3845 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3858 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3846 break; 3859 break;
3847 3860
@@ -3859,7 +3872,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3859 sizeof (union fsf_status_qual)); 3872 sizeof (union fsf_status_qual));
3860 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3873 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3861 "fsf_s_uhand_nv"); 3874 "fsf_s_uhand_nv");
3862 zfcp_erp_port_reopen(unit->port, 0); 3875 zfcp_erp_port_reopen(unit->port, 0, 113, (u64)fsf_req);
3863 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3876 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3864 break; 3877 break;
3865 3878
@@ -3877,7 +3890,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3877 sizeof (union fsf_status_qual)); 3890 sizeof (union fsf_status_qual));
3878 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3891 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3879 "fsf_s_hand_mis"); 3892 "fsf_s_hand_mis");
3880 zfcp_erp_adapter_reopen(unit->port->adapter, 0); 3893 zfcp_erp_adapter_reopen(unit->port->adapter, 0, 114,
3894 (u64)fsf_req);
3881 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3895 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3882 break; 3896 break;
3883 3897
@@ -3889,7 +3903,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3889 /* stop operation for this adapter */ 3903 /* stop operation for this adapter */
3890 debug_text_exception(fsf_req->adapter->erp_dbf, 0, 3904 debug_text_exception(fsf_req->adapter->erp_dbf, 0,
3891 "fsf_s_class_nsup"); 3905 "fsf_s_class_nsup");
3892 zfcp_erp_adapter_shutdown(unit->port->adapter, 0); 3906 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 132,
3907 (u64)fsf_req);
3893 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3908 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3894 break; 3909 break;
3895 3910
@@ -3907,7 +3922,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3907 sizeof (union fsf_status_qual)); 3922 sizeof (union fsf_status_qual));
3908 debug_text_event(fsf_req->adapter->erp_dbf, 1, 3923 debug_text_event(fsf_req->adapter->erp_dbf, 1,
3909 "fsf_s_fcp_lun_nv"); 3924 "fsf_s_fcp_lun_nv");
3910 zfcp_erp_port_reopen(unit->port, 0); 3925 zfcp_erp_port_reopen(unit->port, 0, 115, (u64)fsf_req);
3911 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3926 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3912 break; 3927 break;
3913 3928
@@ -3945,7 +3960,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3945 /* stop operation for this adapter */ 3960 /* stop operation for this adapter */
3946 debug_text_event(fsf_req->adapter->erp_dbf, 0, 3961 debug_text_event(fsf_req->adapter->erp_dbf, 0,
3947 "fsf_s_dir_ind_nv"); 3962 "fsf_s_dir_ind_nv");
3948 zfcp_erp_adapter_shutdown(unit->port->adapter, 0); 3963 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133,
3964 (u64)fsf_req);
3949 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3965 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3950 break; 3966 break;
3951 3967
@@ -3960,7 +3976,8 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req)
3960 /* stop operation for this adapter */ 3976 /* stop operation for this adapter */
3961 debug_text_event(fsf_req->adapter->erp_dbf, 0, 3977 debug_text_event(fsf_req->adapter->erp_dbf, 0,
3962 "fsf_s_cmd_len_nv"); 3978 "fsf_s_cmd_len_nv");
3963 zfcp_erp_adapter_shutdown(unit->port->adapter, 0); 3979 zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134,
3980 (u64)fsf_req);
3964 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; 3981 fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR;
3965 break; 3982 break;
3966 3983
@@ -4863,7 +4880,7 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req)
4863 req_queue->free_index -= fsf_req->sbal_number; 4880 req_queue->free_index -= fsf_req->sbal_number;
4864 req_queue->free_index += QDIO_MAX_BUFFERS_PER_Q; 4881 req_queue->free_index += QDIO_MAX_BUFFERS_PER_Q;
4865 req_queue->free_index %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */ 4882 req_queue->free_index %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */
4866 zfcp_erp_adapter_reopen(adapter, 0); 4883 zfcp_erp_adapter_reopen(adapter, 0, 116, (u64)fsf_req);
4867 } else { 4884 } else {
4868 req_queue->distance_from_int = new_distance_from_int; 4885 req_queue->distance_from_int = new_distance_from_int;
4869 /* 4886 /*