diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 149 |
1 files changed, 68 insertions, 81 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index b7aa9696ba60..3211dcc59543 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, 117, (u64)fsf_req); | 301 | zfcp_erp_adapter_shutdown(adapter, 0, 117, 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, 98, (u64)fsf_req); | 312 | zfcp_erp_adapter_reopen(adapter, 0, 98, 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, 118, (u64)fsf_req); | 323 | zfcp_erp_adapter_shutdown(adapter, 0, 118, 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,7 +337,7 @@ 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, 78, (u64)fsf_req); | 340 | zfcp_erp_adapter_shutdown(adapter, 0, 78, fsf_req); |
341 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 341 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
342 | break; | 342 | break; |
343 | 343 | ||
@@ -345,7 +345,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
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 | /* FIXME: reopening adapter now? better wait for link up */ | 347 | /* FIXME: reopening adapter now? better wait for link up */ |
348 | zfcp_erp_adapter_reopen(adapter, 0, 79, (u64)fsf_req); | 348 | zfcp_erp_adapter_reopen(adapter, 0, 79, fsf_req); |
349 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 349 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
350 | break; | 350 | break; |
351 | 351 | ||
@@ -355,13 +355,13 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
355 | "Re-starting operations on this adapter.\n", | 355 | "Re-starting operations on this adapter.\n", |
356 | zfcp_get_busid_by_adapter(adapter)); | 356 | zfcp_get_busid_by_adapter(adapter)); |
357 | /* All ports should be marked as ready to run again */ | 357 | /* All ports should be marked as ready to run again */ |
358 | zfcp_erp_modify_adapter_status(adapter, 28, | 358 | zfcp_erp_modify_adapter_status(adapter, 28, NULL, |
359 | 0, ZFCP_STATUS_COMMON_RUNNING, | 359 | ZFCP_STATUS_COMMON_RUNNING, |
360 | ZFCP_SET); | 360 | ZFCP_SET); |
361 | zfcp_erp_adapter_reopen(adapter, | 361 | zfcp_erp_adapter_reopen(adapter, |
362 | ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | 362 | ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
363 | | ZFCP_STATUS_COMMON_ERP_FAILED, | 363 | | ZFCP_STATUS_COMMON_ERP_FAILED, |
364 | 99, (u64)fsf_req); | 364 | 99, fsf_req); |
365 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 365 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
366 | break; | 366 | break; |
367 | 367 | ||
@@ -371,7 +371,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
371 | "Restarting all operations on this " | 371 | "Restarting all operations on this " |
372 | "adapter.\n", | 372 | "adapter.\n", |
373 | zfcp_get_busid_by_adapter(adapter)); | 373 | zfcp_get_busid_by_adapter(adapter)); |
374 | zfcp_erp_adapter_reopen(adapter, 0, 100, (u64)fsf_req); | 374 | zfcp_erp_adapter_reopen(adapter, 0, 100, fsf_req); |
375 | fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY; | 375 | fsf_req->status |= ZFCP_STATUS_FSFREQ_RETRY; |
376 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 376 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
377 | break; | 377 | break; |
@@ -384,7 +384,7 @@ zfcp_fsf_protstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
384 | "(debug info 0x%x).\n", | 384 | "(debug info 0x%x).\n", |
385 | zfcp_get_busid_by_adapter(adapter), | 385 | zfcp_get_busid_by_adapter(adapter), |
386 | qtcb->prefix.prot_status); | 386 | qtcb->prefix.prot_status); |
387 | zfcp_erp_adapter_shutdown(adapter, 0, 119, (u64)fsf_req); | 387 | zfcp_erp_adapter_shutdown(adapter, 0, 119, fsf_req); |
388 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 388 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
389 | } | 389 | } |
390 | 390 | ||
@@ -423,8 +423,7 @@ zfcp_fsf_fsfstatus_eval(struct zfcp_fsf_req *fsf_req) | |||
423 | "(debug info 0x%x).\n", | 423 | "(debug info 0x%x).\n", |
424 | zfcp_get_busid_by_adapter(fsf_req->adapter), | 424 | zfcp_get_busid_by_adapter(fsf_req->adapter), |
425 | fsf_req->qtcb->header.fsf_command); | 425 | fsf_req->qtcb->header.fsf_command); |
426 | zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 120, | 426 | zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 120, fsf_req); |
427 | (u64)fsf_req); | ||
428 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 427 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
429 | break; | 428 | break; |
430 | 429 | ||
@@ -478,8 +477,7 @@ zfcp_fsf_fsfstatus_qual_eval(struct zfcp_fsf_req *fsf_req) | |||
478 | "problem on the adapter %s " | 477 | "problem on the adapter %s " |
479 | "Stopping all operations on this adapter. ", | 478 | "Stopping all operations on this adapter. ", |
480 | zfcp_get_busid_by_adapter(fsf_req->adapter)); | 479 | zfcp_get_busid_by_adapter(fsf_req->adapter)); |
481 | zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 121, | 480 | zfcp_erp_adapter_shutdown(fsf_req->adapter, 0, 121, fsf_req); |
482 | (u64)fsf_req); | ||
483 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 481 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
484 | break; | 482 | break; |
485 | case FSF_SQ_ULP_PROGRAMMING_ERROR: | 483 | case FSF_SQ_ULP_PROGRAMMING_ERROR: |
@@ -605,7 +603,7 @@ zfcp_fsf_link_down_info_eval(struct zfcp_fsf_req *fsf_req, u8 id, | |||
605 | link_down->vendor_specific_code); | 603 | link_down->vendor_specific_code); |
606 | 604 | ||
607 | out: | 605 | out: |
608 | zfcp_erp_adapter_failed(adapter, id, (u64)fsf_req); | 606 | zfcp_erp_adapter_failed(adapter, id, fsf_req); |
609 | } | 607 | } |
610 | 608 | ||
611 | /* | 609 | /* |
@@ -799,11 +797,11 @@ zfcp_fsf_status_read_port_closed(struct zfcp_fsf_req *fsf_req) | |||
799 | switch (status_buffer->status_subtype) { | 797 | switch (status_buffer->status_subtype) { |
800 | 798 | ||
801 | case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT: | 799 | case FSF_STATUS_READ_SUB_CLOSE_PHYS_PORT: |
802 | zfcp_erp_port_reopen(port, 0, 101, (u64)fsf_req); | 800 | zfcp_erp_port_reopen(port, 0, 101, fsf_req); |
803 | break; | 801 | break; |
804 | 802 | ||
805 | case FSF_STATUS_READ_SUB_ERROR_PORT: | 803 | case FSF_STATUS_READ_SUB_ERROR_PORT: |
806 | zfcp_erp_port_shutdown(port, 0, 122, (u64)fsf_req); | 804 | zfcp_erp_port_shutdown(port, 0, 122, fsf_req); |
807 | break; | 805 | break; |
808 | 806 | ||
809 | default: | 807 | default: |
@@ -929,13 +927,13 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
929 | "Restarting operations on this adapter\n", | 927 | "Restarting operations on this adapter\n", |
930 | zfcp_get_busid_by_adapter(adapter)); | 928 | zfcp_get_busid_by_adapter(adapter)); |
931 | /* All ports should be marked as ready to run again */ | 929 | /* All ports should be marked as ready to run again */ |
932 | zfcp_erp_modify_adapter_status(adapter, 30, 0, | 930 | zfcp_erp_modify_adapter_status(adapter, 30, NULL, |
933 | ZFCP_STATUS_COMMON_RUNNING, | 931 | ZFCP_STATUS_COMMON_RUNNING, |
934 | ZFCP_SET); | 932 | ZFCP_SET); |
935 | zfcp_erp_adapter_reopen(adapter, | 933 | zfcp_erp_adapter_reopen(adapter, |
936 | ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED | 934 | ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED |
937 | | ZFCP_STATUS_COMMON_ERP_FAILED, | 935 | | ZFCP_STATUS_COMMON_ERP_FAILED, |
938 | 102, (u64)fsf_req); | 936 | 102, fsf_req); |
939 | break; | 937 | break; |
940 | 938 | ||
941 | case FSF_STATUS_READ_NOTIFICATION_LOST: | 939 | case FSF_STATUS_READ_NOTIFICATION_LOST: |
@@ -969,14 +967,13 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
969 | 967 | ||
970 | if (status_buffer->status_subtype & | 968 | if (status_buffer->status_subtype & |
971 | FSF_STATUS_READ_SUB_ACT_UPDATED) | 969 | FSF_STATUS_READ_SUB_ACT_UPDATED) |
972 | zfcp_erp_adapter_access_changed(adapter, 135, | 970 | zfcp_erp_adapter_access_changed(adapter, 135, fsf_req); |
973 | (u64)fsf_req); | ||
974 | break; | 971 | break; |
975 | 972 | ||
976 | case FSF_STATUS_READ_CFDC_UPDATED: | 973 | case FSF_STATUS_READ_CFDC_UPDATED: |
977 | ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n", | 974 | ZFCP_LOG_NORMAL("CFDC has been updated on the adapter %s\n", |
978 | zfcp_get_busid_by_adapter(adapter)); | 975 | zfcp_get_busid_by_adapter(adapter)); |
979 | zfcp_erp_adapter_access_changed(adapter, 136, (u64)fsf_req); | 976 | zfcp_erp_adapter_access_changed(adapter, 136, fsf_req); |
980 | break; | 977 | break; |
981 | 978 | ||
982 | case FSF_STATUS_READ_CFDC_HARDENED: | 979 | case FSF_STATUS_READ_CFDC_HARDENED: |
@@ -1044,7 +1041,7 @@ zfcp_fsf_status_read_handler(struct zfcp_fsf_req *fsf_req) | |||
1044 | ZFCP_LOG_INFO("restart adapter %s due to status read " | 1041 | ZFCP_LOG_INFO("restart adapter %s due to status read " |
1045 | "buffer shortage\n", | 1042 | "buffer shortage\n", |
1046 | zfcp_get_busid_by_adapter(adapter)); | 1043 | zfcp_get_busid_by_adapter(adapter)); |
1047 | zfcp_erp_adapter_reopen(adapter, 0, 103, (u64)fsf_req); | 1044 | zfcp_erp_adapter_reopen(adapter, 0, 103, fsf_req); |
1048 | } | 1045 | } |
1049 | } | 1046 | } |
1050 | out: | 1047 | out: |
@@ -1164,7 +1161,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1164 | sizeof (union fsf_status_qual)); | 1161 | sizeof (union fsf_status_qual)); |
1165 | /* Let's hope this sorts out the mess */ | 1162 | /* Let's hope this sorts out the mess */ |
1166 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 104, | 1163 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 104, |
1167 | (u64)new_fsf_req); | 1164 | new_fsf_req); |
1168 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1165 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1169 | } | 1166 | } |
1170 | break; | 1167 | break; |
@@ -1192,8 +1189,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1192 | fsf_status_qual, | 1189 | fsf_status_qual, |
1193 | sizeof (union fsf_status_qual)); | 1190 | sizeof (union fsf_status_qual)); |
1194 | /* Let's hope this sorts out the mess */ | 1191 | /* Let's hope this sorts out the mess */ |
1195 | zfcp_erp_port_reopen(unit->port, 0, 105, | 1192 | zfcp_erp_port_reopen(unit->port, 0, 105, new_fsf_req); |
1196 | (u64)new_fsf_req); | ||
1197 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1193 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1198 | } | 1194 | } |
1199 | break; | 1195 | break; |
@@ -1207,7 +1203,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1207 | ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to " | 1203 | ZFCP_LOG_INFO("Remote port 0x%016Lx on adapter %s needs to " |
1208 | "be reopened\n", unit->port->wwpn, | 1204 | "be reopened\n", unit->port->wwpn, |
1209 | zfcp_get_busid_by_unit(unit)); | 1205 | zfcp_get_busid_by_unit(unit)); |
1210 | zfcp_erp_port_boxed(unit->port, 47, (u64)new_fsf_req); | 1206 | zfcp_erp_port_boxed(unit->port, 47, new_fsf_req); |
1211 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1207 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1212 | | ZFCP_STATUS_FSFREQ_RETRY; | 1208 | | ZFCP_STATUS_FSFREQ_RETRY; |
1213 | break; | 1209 | break; |
@@ -1218,7 +1214,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1218 | "to be reopened\n", | 1214 | "to be reopened\n", |
1219 | unit->fcp_lun, unit->port->wwpn, | 1215 | unit->fcp_lun, unit->port->wwpn, |
1220 | zfcp_get_busid_by_unit(unit)); | 1216 | zfcp_get_busid_by_unit(unit)); |
1221 | zfcp_erp_unit_boxed(unit, 48, (u64)new_fsf_req); | 1217 | zfcp_erp_unit_boxed(unit, 48, new_fsf_req); |
1222 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1218 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1223 | | ZFCP_STATUS_FSFREQ_RETRY; | 1219 | | ZFCP_STATUS_FSFREQ_RETRY; |
1224 | break; | 1220 | break; |
@@ -1452,7 +1448,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1452 | zfcp_get_busid_by_port(port), | 1448 | zfcp_get_busid_by_port(port), |
1453 | ZFCP_FC_SERVICE_CLASS_DEFAULT); | 1449 | ZFCP_FC_SERVICE_CLASS_DEFAULT); |
1454 | /* stop operation for this adapter */ | 1450 | /* stop operation for this adapter */ |
1455 | zfcp_erp_adapter_shutdown(adapter, 0, 123, (u64)fsf_req); | 1451 | zfcp_erp_adapter_shutdown(adapter, 0, 123, fsf_req); |
1456 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1452 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1457 | break; | 1453 | break; |
1458 | 1454 | ||
@@ -1492,7 +1488,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1492 | break; | 1488 | break; |
1493 | } | 1489 | } |
1494 | } | 1490 | } |
1495 | zfcp_erp_port_access_denied(port, 55, (u64)fsf_req); | 1491 | zfcp_erp_port_access_denied(port, 55, fsf_req); |
1496 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1492 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1497 | break; | 1493 | break; |
1498 | 1494 | ||
@@ -1516,7 +1512,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1516 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO, | 1512 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_INFO, |
1517 | (char *) &header->fsf_status_qual, | 1513 | (char *) &header->fsf_status_qual, |
1518 | sizeof (union fsf_status_qual)); | 1514 | sizeof (union fsf_status_qual)); |
1519 | zfcp_erp_adapter_reopen(adapter, 0, 106, (u64)fsf_req); | 1515 | zfcp_erp_adapter_reopen(adapter, 0, 106, fsf_req); |
1520 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1516 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1521 | break; | 1517 | break; |
1522 | 1518 | ||
@@ -1524,7 +1520,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1524 | ZFCP_LOG_INFO("port needs to be reopened " | 1520 | ZFCP_LOG_INFO("port needs to be reopened " |
1525 | "(adapter %s, port d_id=0x%06x)\n", | 1521 | "(adapter %s, port d_id=0x%06x)\n", |
1526 | zfcp_get_busid_by_port(port), port->d_id); | 1522 | zfcp_get_busid_by_port(port), port->d_id); |
1527 | zfcp_erp_port_boxed(port, 49, (u64)fsf_req); | 1523 | zfcp_erp_port_boxed(port, 49, fsf_req); |
1528 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1524 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1529 | | ZFCP_STATUS_FSFREQ_RETRY; | 1525 | | ZFCP_STATUS_FSFREQ_RETRY; |
1530 | break; | 1526 | break; |
@@ -1746,7 +1742,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1746 | zfcp_get_busid_by_adapter(adapter), | 1742 | zfcp_get_busid_by_adapter(adapter), |
1747 | ZFCP_FC_SERVICE_CLASS_DEFAULT); | 1743 | ZFCP_FC_SERVICE_CLASS_DEFAULT); |
1748 | /* stop operation for this adapter */ | 1744 | /* stop operation for this adapter */ |
1749 | zfcp_erp_adapter_shutdown(adapter, 0, 124, (u64)fsf_req); | 1745 | zfcp_erp_adapter_shutdown(adapter, 0, 124, fsf_req); |
1750 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1746 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1751 | break; | 1747 | break; |
1752 | 1748 | ||
@@ -1842,7 +1838,7 @@ static int zfcp_fsf_send_els_handler(struct zfcp_fsf_req *fsf_req) | |||
1842 | } | 1838 | } |
1843 | } | 1839 | } |
1844 | if (port != NULL) | 1840 | if (port != NULL) |
1845 | zfcp_erp_port_access_denied(port, 56, (u64)fsf_req); | 1841 | zfcp_erp_port_access_denied(port, 56, fsf_req); |
1846 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 1842 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
1847 | break; | 1843 | break; |
1848 | 1844 | ||
@@ -2060,7 +2056,7 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok) | |||
2060 | "versions in comparison to this device " | 2056 | "versions in comparison to this device " |
2061 | "driver (try updated device driver)\n", | 2057 | "driver (try updated device driver)\n", |
2062 | zfcp_get_busid_by_adapter(adapter)); | 2058 | zfcp_get_busid_by_adapter(adapter)); |
2063 | zfcp_erp_adapter_shutdown(adapter, 0, 125, (u64)fsf_req); | 2059 | zfcp_erp_adapter_shutdown(adapter, 0, 125, fsf_req); |
2064 | return -EIO; | 2060 | return -EIO; |
2065 | } | 2061 | } |
2066 | if (ZFCP_QTCB_VERSION > bottom->high_qtcb_version) { | 2062 | if (ZFCP_QTCB_VERSION > bottom->high_qtcb_version) { |
@@ -2069,7 +2065,7 @@ zfcp_fsf_exchange_config_evaluate(struct zfcp_fsf_req *fsf_req, int xchg_ok) | |||
2069 | "versions than this device driver uses" | 2065 | "versions than this device driver uses" |
2070 | "(consider a microcode upgrade)\n", | 2066 | "(consider a microcode upgrade)\n", |
2071 | zfcp_get_busid_by_adapter(adapter)); | 2067 | zfcp_get_busid_by_adapter(adapter)); |
2072 | zfcp_erp_adapter_shutdown(adapter, 0, 126, (u64)fsf_req); | 2068 | zfcp_erp_adapter_shutdown(adapter, 0, 126, fsf_req); |
2073 | return -EIO; | 2069 | return -EIO; |
2074 | } | 2070 | } |
2075 | return 0; | 2071 | return 0; |
@@ -2115,7 +2111,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
2115 | "topology detected at adapter %s " | 2111 | "topology detected at adapter %s " |
2116 | "unsupported, shutting down adapter\n", | 2112 | "unsupported, shutting down adapter\n", |
2117 | zfcp_get_busid_by_adapter(adapter)); | 2113 | zfcp_get_busid_by_adapter(adapter)); |
2118 | zfcp_erp_adapter_shutdown(adapter, 0, 127, (u64)fsf_req); | 2114 | zfcp_erp_adapter_shutdown(adapter, 0, 127, fsf_req); |
2119 | return -EIO; | 2115 | return -EIO; |
2120 | case FC_PORTTYPE_NPORT: | 2116 | case FC_PORTTYPE_NPORT: |
2121 | ZFCP_LOG_NORMAL("Switched fabric fibrechannel " | 2117 | ZFCP_LOG_NORMAL("Switched fabric fibrechannel " |
@@ -2130,7 +2126,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
2130 | "of a type known to the zfcp " | 2126 | "of a type known to the zfcp " |
2131 | "driver, shutting down adapter\n", | 2127 | "driver, shutting down adapter\n", |
2132 | zfcp_get_busid_by_adapter(adapter)); | 2128 | zfcp_get_busid_by_adapter(adapter)); |
2133 | zfcp_erp_adapter_shutdown(adapter, 0, 128, (u64)fsf_req); | 2129 | zfcp_erp_adapter_shutdown(adapter, 0, 128, fsf_req); |
2134 | return -EIO; | 2130 | return -EIO; |
2135 | } | 2131 | } |
2136 | bottom = &qtcb->bottom.config; | 2132 | bottom = &qtcb->bottom.config; |
@@ -2142,7 +2138,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
2142 | bottom->max_qtcb_size, | 2138 | bottom->max_qtcb_size, |
2143 | zfcp_get_busid_by_adapter(adapter), | 2139 | zfcp_get_busid_by_adapter(adapter), |
2144 | sizeof(struct fsf_qtcb)); | 2140 | sizeof(struct fsf_qtcb)); |
2145 | zfcp_erp_adapter_shutdown(adapter, 0, 129, (u64)fsf_req); | 2141 | zfcp_erp_adapter_shutdown(adapter, 0, 129, fsf_req); |
2146 | return -EIO; | 2142 | return -EIO; |
2147 | } | 2143 | } |
2148 | atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, | 2144 | atomic_set_mask(ZFCP_STATUS_ADAPTER_XCONFIG_OK, |
@@ -2159,7 +2155,7 @@ zfcp_fsf_exchange_config_data_handler(struct zfcp_fsf_req *fsf_req) | |||
2159 | &qtcb->header.fsf_status_qual.link_down_info); | 2155 | &qtcb->header.fsf_status_qual.link_down_info); |
2160 | break; | 2156 | break; |
2161 | default: | 2157 | default: |
2162 | zfcp_erp_adapter_shutdown(adapter, 0, 130, (u64)fsf_req); | 2158 | zfcp_erp_adapter_shutdown(adapter, 0, 130, fsf_req); |
2163 | return -EIO; | 2159 | return -EIO; |
2164 | } | 2160 | } |
2165 | return 0; | 2161 | return 0; |
@@ -2458,7 +2454,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2458 | break; | 2454 | break; |
2459 | } | 2455 | } |
2460 | } | 2456 | } |
2461 | zfcp_erp_port_access_denied(port, 57, (u64)fsf_req); | 2457 | zfcp_erp_port_access_denied(port, 57, fsf_req); |
2462 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 2458 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
2463 | break; | 2459 | break; |
2464 | 2460 | ||
@@ -2467,7 +2463,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2467 | "The remote port 0x%016Lx on adapter %s " | 2463 | "The remote port 0x%016Lx on adapter %s " |
2468 | "could not be opened. Disabling it.\n", | 2464 | "could not be opened. Disabling it.\n", |
2469 | port->wwpn, zfcp_get_busid_by_port(port)); | 2465 | port->wwpn, zfcp_get_busid_by_port(port)); |
2470 | zfcp_erp_port_failed(port, 31, (u64)fsf_req); | 2466 | zfcp_erp_port_failed(port, 31, fsf_req); |
2471 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 2467 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
2472 | break; | 2468 | break; |
2473 | 2469 | ||
@@ -2487,7 +2483,7 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2487 | "Disabling it.\n", | 2483 | "Disabling it.\n", |
2488 | port->wwpn, | 2484 | port->wwpn, |
2489 | zfcp_get_busid_by_port(port)); | 2485 | zfcp_get_busid_by_port(port)); |
2490 | zfcp_erp_port_failed(port, 32, (u64)fsf_req); | 2486 | zfcp_erp_port_failed(port, 32, fsf_req); |
2491 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 2487 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
2492 | break; | 2488 | break; |
2493 | default: | 2489 | default: |
@@ -2669,7 +2665,7 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2669 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, | 2665 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, |
2670 | (char *) &fsf_req->qtcb->header.fsf_status_qual, | 2666 | (char *) &fsf_req->qtcb->header.fsf_status_qual, |
2671 | sizeof (union fsf_status_qual)); | 2667 | sizeof (union fsf_status_qual)); |
2672 | zfcp_erp_adapter_reopen(port->adapter, 0, 107, (u64)fsf_req); | 2668 | zfcp_erp_adapter_reopen(port->adapter, 0, 107, fsf_req); |
2673 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 2669 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
2674 | break; | 2670 | break; |
2675 | 2671 | ||
@@ -2684,7 +2680,7 @@ zfcp_fsf_close_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2684 | ZFCP_LOG_TRACE("remote port 0x016%Lx on adapter %s closed, " | 2680 | ZFCP_LOG_TRACE("remote port 0x016%Lx on adapter %s closed, " |
2685 | "port handle 0x%x\n", port->wwpn, | 2681 | "port handle 0x%x\n", port->wwpn, |
2686 | zfcp_get_busid_by_port(port), port->handle); | 2682 | zfcp_get_busid_by_port(port), port->handle); |
2687 | zfcp_erp_modify_port_status(port, 33, (u64)fsf_req, | 2683 | zfcp_erp_modify_port_status(port, 33, fsf_req, |
2688 | ZFCP_STATUS_COMMON_OPEN, | 2684 | ZFCP_STATUS_COMMON_OPEN, |
2689 | ZFCP_CLEAR); | 2685 | ZFCP_CLEAR); |
2690 | retval = 0; | 2686 | retval = 0; |
@@ -2806,7 +2802,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2806 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, | 2802 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, |
2807 | (char *) &header->fsf_status_qual, | 2803 | (char *) &header->fsf_status_qual, |
2808 | sizeof (union fsf_status_qual)); | 2804 | sizeof (union fsf_status_qual)); |
2809 | zfcp_erp_adapter_reopen(port->adapter, 0, 108, (u64)fsf_req); | 2805 | zfcp_erp_adapter_reopen(port->adapter, 0, 108, fsf_req); |
2810 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 2806 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
2811 | break; | 2807 | break; |
2812 | 2808 | ||
@@ -2827,7 +2823,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2827 | break; | 2823 | break; |
2828 | } | 2824 | } |
2829 | } | 2825 | } |
2830 | zfcp_erp_port_access_denied(port, 58, (u64)fsf_req); | 2826 | zfcp_erp_port_access_denied(port, 58, fsf_req); |
2831 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 2827 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
2832 | break; | 2828 | break; |
2833 | 2829 | ||
@@ -2837,7 +2833,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2837 | "to close it physically.\n", | 2833 | "to close it physically.\n", |
2838 | port->wwpn, | 2834 | port->wwpn, |
2839 | zfcp_get_busid_by_port(port)); | 2835 | zfcp_get_busid_by_port(port)); |
2840 | zfcp_erp_port_boxed(port, 50, (u64)fsf_req); | 2836 | zfcp_erp_port_boxed(port, 50, fsf_req); |
2841 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 2837 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
2842 | ZFCP_STATUS_FSFREQ_RETRY; | 2838 | ZFCP_STATUS_FSFREQ_RETRY; |
2843 | 2839 | ||
@@ -3016,8 +3012,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3016 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, | 3012 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, |
3017 | (char *) &header->fsf_status_qual, | 3013 | (char *) &header->fsf_status_qual, |
3018 | sizeof (union fsf_status_qual)); | 3014 | sizeof (union fsf_status_qual)); |
3019 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 109, | 3015 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 109, fsf_req); |
3020 | (u64)fsf_req); | ||
3021 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3016 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3022 | break; | 3017 | break; |
3023 | 3018 | ||
@@ -3047,7 +3042,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3047 | break; | 3042 | break; |
3048 | } | 3043 | } |
3049 | } | 3044 | } |
3050 | zfcp_erp_unit_access_denied(unit, 59, (u64)fsf_req); | 3045 | zfcp_erp_unit_access_denied(unit, 59, fsf_req); |
3051 | atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); | 3046 | atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); |
3052 | atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); | 3047 | atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); |
3053 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3048 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
@@ -3057,7 +3052,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3057 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " | 3052 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " |
3058 | "needs to be reopened\n", | 3053 | "needs to be reopened\n", |
3059 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); | 3054 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); |
3060 | zfcp_erp_port_boxed(unit->port, 51, (u64)fsf_req); | 3055 | zfcp_erp_port_boxed(unit->port, 51, fsf_req); |
3061 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 3056 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
3062 | ZFCP_STATUS_FSFREQ_RETRY; | 3057 | ZFCP_STATUS_FSFREQ_RETRY; |
3063 | break; | 3058 | break; |
@@ -3097,7 +3092,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3097 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, | 3092 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, |
3098 | (char *) &header->fsf_status_qual, | 3093 | (char *) &header->fsf_status_qual, |
3099 | sizeof (union fsf_status_qual)); | 3094 | sizeof (union fsf_status_qual)); |
3100 | zfcp_erp_unit_access_denied(unit, 60, (u64)fsf_req); | 3095 | zfcp_erp_unit_access_denied(unit, 60, fsf_req); |
3101 | atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); | 3096 | atomic_clear_mask(ZFCP_STATUS_UNIT_SHARED, &unit->status); |
3102 | atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); | 3097 | atomic_clear_mask(ZFCP_STATUS_UNIT_READONLY, &unit->status); |
3103 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3098 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
@@ -3111,7 +3106,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3111 | unit->fcp_lun, | 3106 | unit->fcp_lun, |
3112 | unit->port->wwpn, | 3107 | unit->port->wwpn, |
3113 | zfcp_get_busid_by_unit(unit)); | 3108 | zfcp_get_busid_by_unit(unit)); |
3114 | zfcp_erp_unit_failed(unit, 34, (u64)fsf_req); | 3109 | zfcp_erp_unit_failed(unit, 34, fsf_req); |
3115 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3110 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3116 | break; | 3111 | break; |
3117 | 3112 | ||
@@ -3181,17 +3176,15 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3181 | if (exclusive && !readwrite) { | 3176 | if (exclusive && !readwrite) { |
3182 | ZFCP_LOG_NORMAL("exclusive access of read-only " | 3177 | ZFCP_LOG_NORMAL("exclusive access of read-only " |
3183 | "unit not supported\n"); | 3178 | "unit not supported\n"); |
3184 | zfcp_erp_unit_failed(unit, 35, (u64)fsf_req); | 3179 | zfcp_erp_unit_failed(unit, 35, fsf_req); |
3185 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3180 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3186 | zfcp_erp_unit_shutdown(unit, 0, 80, | 3181 | zfcp_erp_unit_shutdown(unit, 0, 80, fsf_req); |
3187 | (u64)fsf_req); | ||
3188 | } else if (!exclusive && readwrite) { | 3182 | } else if (!exclusive && readwrite) { |
3189 | ZFCP_LOG_NORMAL("shared access of read-write " | 3183 | ZFCP_LOG_NORMAL("shared access of read-write " |
3190 | "unit not supported\n"); | 3184 | "unit not supported\n"); |
3191 | zfcp_erp_unit_failed(unit, 36, (u64)fsf_req); | 3185 | zfcp_erp_unit_failed(unit, 36, fsf_req); |
3192 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3186 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3193 | zfcp_erp_unit_shutdown(unit, 0, 81, | 3187 | zfcp_erp_unit_shutdown(unit, 0, 81, fsf_req); |
3194 | (u64)fsf_req); | ||
3195 | } | 3188 | } |
3196 | } | 3189 | } |
3197 | 3190 | ||
@@ -3314,8 +3307,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3314 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, | 3307 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, |
3315 | (char *) &fsf_req->qtcb->header.fsf_status_qual, | 3308 | (char *) &fsf_req->qtcb->header.fsf_status_qual, |
3316 | sizeof (union fsf_status_qual)); | 3309 | sizeof (union fsf_status_qual)); |
3317 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 110, | 3310 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 110, fsf_req); |
3318 | (u64)fsf_req); | ||
3319 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3311 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3320 | break; | 3312 | break; |
3321 | 3313 | ||
@@ -3331,7 +3323,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3331 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, | 3323 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, |
3332 | (char *) &fsf_req->qtcb->header.fsf_status_qual, | 3324 | (char *) &fsf_req->qtcb->header.fsf_status_qual, |
3333 | sizeof (union fsf_status_qual)); | 3325 | sizeof (union fsf_status_qual)); |
3334 | zfcp_erp_port_reopen(unit->port, 0, 111, (u64)fsf_req); | 3326 | zfcp_erp_port_reopen(unit->port, 0, 111, fsf_req); |
3335 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3327 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3336 | break; | 3328 | break; |
3337 | 3329 | ||
@@ -3340,7 +3332,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3340 | "needs to be reopened\n", | 3332 | "needs to be reopened\n", |
3341 | unit->port->wwpn, | 3333 | unit->port->wwpn, |
3342 | zfcp_get_busid_by_unit(unit)); | 3334 | zfcp_get_busid_by_unit(unit)); |
3343 | zfcp_erp_port_boxed(unit->port, 52, (u64)fsf_req); | 3335 | zfcp_erp_port_boxed(unit->port, 52, fsf_req); |
3344 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 3336 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
3345 | ZFCP_STATUS_FSFREQ_RETRY; | 3337 | ZFCP_STATUS_FSFREQ_RETRY; |
3346 | break; | 3338 | break; |
@@ -3534,7 +3526,7 @@ zfcp_fsf_send_fcp_command_task(struct zfcp_adapter *adapter, | |||
3534 | zfcp_get_busid_by_unit(unit), | 3526 | zfcp_get_busid_by_unit(unit), |
3535 | unit->port->wwpn, | 3527 | unit->port->wwpn, |
3536 | unit->fcp_lun); | 3528 | unit->fcp_lun); |
3537 | zfcp_erp_unit_shutdown(unit, 0, 131, (u64)fsf_req); | 3529 | zfcp_erp_unit_shutdown(unit, 0, 131, fsf_req); |
3538 | retval = -EINVAL; | 3530 | retval = -EINVAL; |
3539 | } | 3531 | } |
3540 | goto no_fit; | 3532 | goto no_fit; |
@@ -3692,8 +3684,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3692 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, | 3684 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, |
3693 | (char *) &header->fsf_status_qual, | 3685 | (char *) &header->fsf_status_qual, |
3694 | sizeof (union fsf_status_qual)); | 3686 | sizeof (union fsf_status_qual)); |
3695 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 112, | 3687 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 112, fsf_req); |
3696 | (u64)fsf_req); | ||
3697 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3688 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3698 | break; | 3689 | break; |
3699 | 3690 | ||
@@ -3709,7 +3700,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3709 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, | 3700 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, |
3710 | (char *) &header->fsf_status_qual, | 3701 | (char *) &header->fsf_status_qual, |
3711 | sizeof (union fsf_status_qual)); | 3702 | sizeof (union fsf_status_qual)); |
3712 | zfcp_erp_port_reopen(unit->port, 0, 113, (u64)fsf_req); | 3703 | zfcp_erp_port_reopen(unit->port, 0, 113, fsf_req); |
3713 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3704 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3714 | break; | 3705 | break; |
3715 | 3706 | ||
@@ -3725,8 +3716,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3725 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, | 3716 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_NORMAL, |
3726 | (char *) &header->fsf_status_qual, | 3717 | (char *) &header->fsf_status_qual, |
3727 | sizeof (union fsf_status_qual)); | 3718 | sizeof (union fsf_status_qual)); |
3728 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 114, | 3719 | zfcp_erp_adapter_reopen(unit->port->adapter, 0, 114, fsf_req); |
3729 | (u64)fsf_req); | ||
3730 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3720 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3731 | break; | 3721 | break; |
3732 | 3722 | ||
@@ -3736,8 +3726,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3736 | zfcp_get_busid_by_unit(unit), | 3726 | zfcp_get_busid_by_unit(unit), |
3737 | ZFCP_FC_SERVICE_CLASS_DEFAULT); | 3727 | ZFCP_FC_SERVICE_CLASS_DEFAULT); |
3738 | /* stop operation for this adapter */ | 3728 | /* stop operation for this adapter */ |
3739 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 132, | 3729 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 132, fsf_req); |
3740 | (u64)fsf_req); | ||
3741 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3730 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3742 | break; | 3731 | break; |
3743 | 3732 | ||
@@ -3753,7 +3742,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3753 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, | 3742 | ZFCP_HEX_DUMP(ZFCP_LOG_LEVEL_DEBUG, |
3754 | (char *) &header->fsf_status_qual, | 3743 | (char *) &header->fsf_status_qual, |
3755 | sizeof (union fsf_status_qual)); | 3744 | sizeof (union fsf_status_qual)); |
3756 | zfcp_erp_port_reopen(unit->port, 0, 115, (u64)fsf_req); | 3745 | zfcp_erp_port_reopen(unit->port, 0, 115, fsf_req); |
3757 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3746 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3758 | break; | 3747 | break; |
3759 | 3748 | ||
@@ -3775,7 +3764,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3775 | break; | 3764 | break; |
3776 | } | 3765 | } |
3777 | } | 3766 | } |
3778 | zfcp_erp_unit_access_denied(unit, 61, (u64)fsf_req); | 3767 | zfcp_erp_unit_access_denied(unit, 61, fsf_req); |
3779 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3768 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3780 | break; | 3769 | break; |
3781 | 3770 | ||
@@ -3788,8 +3777,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3788 | zfcp_get_busid_by_unit(unit), | 3777 | zfcp_get_busid_by_unit(unit), |
3789 | fsf_req->qtcb->bottom.io.data_direction); | 3778 | fsf_req->qtcb->bottom.io.data_direction); |
3790 | /* stop operation for this adapter */ | 3779 | /* stop operation for this adapter */ |
3791 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, | 3780 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 133, fsf_req); |
3792 | (u64)fsf_req); | ||
3793 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3781 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3794 | break; | 3782 | break; |
3795 | 3783 | ||
@@ -3802,8 +3790,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3802 | zfcp_get_busid_by_unit(unit), | 3790 | zfcp_get_busid_by_unit(unit), |
3803 | fsf_req->qtcb->bottom.io.fcp_cmnd_length); | 3791 | fsf_req->qtcb->bottom.io.fcp_cmnd_length); |
3804 | /* stop operation for this adapter */ | 3792 | /* stop operation for this adapter */ |
3805 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, | 3793 | zfcp_erp_adapter_shutdown(unit->port->adapter, 0, 134, fsf_req); |
3806 | (u64)fsf_req); | ||
3807 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; | 3794 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR; |
3808 | break; | 3795 | break; |
3809 | 3796 | ||
@@ -3811,7 +3798,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3811 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " | 3798 | ZFCP_LOG_DEBUG("The remote port 0x%016Lx on adapter %s " |
3812 | "needs to be reopened\n", | 3799 | "needs to be reopened\n", |
3813 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); | 3800 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); |
3814 | zfcp_erp_port_boxed(unit->port, 53, (u64)fsf_req); | 3801 | zfcp_erp_port_boxed(unit->port, 53, fsf_req); |
3815 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 3802 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
3816 | ZFCP_STATUS_FSFREQ_RETRY; | 3803 | ZFCP_STATUS_FSFREQ_RETRY; |
3817 | break; | 3804 | break; |
@@ -3821,7 +3808,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3821 | "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n", | 3808 | "wwpn=0x%016Lx, fcp_lun=0x%016Lx)\n", |
3822 | zfcp_get_busid_by_unit(unit), | 3809 | zfcp_get_busid_by_unit(unit), |
3823 | unit->port->wwpn, unit->fcp_lun); | 3810 | unit->port->wwpn, unit->fcp_lun); |
3824 | zfcp_erp_unit_boxed(unit, 54, (u64)fsf_req); | 3811 | zfcp_erp_unit_boxed(unit, 54, fsf_req); |
3825 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 3812 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
3826 | | ZFCP_STATUS_FSFREQ_RETRY; | 3813 | | ZFCP_STATUS_FSFREQ_RETRY; |
3827 | break; | 3814 | break; |
@@ -4681,7 +4668,7 @@ static int zfcp_fsf_req_send(struct zfcp_fsf_req *fsf_req) | |||
4681 | req_queue->free_index -= fsf_req->sbal_number; | 4668 | req_queue->free_index -= fsf_req->sbal_number; |
4682 | req_queue->free_index += QDIO_MAX_BUFFERS_PER_Q; | 4669 | req_queue->free_index += QDIO_MAX_BUFFERS_PER_Q; |
4683 | req_queue->free_index %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */ | 4670 | req_queue->free_index %= QDIO_MAX_BUFFERS_PER_Q; /* wrap */ |
4684 | zfcp_erp_adapter_reopen(adapter, 0, 116, (u64)fsf_req); | 4671 | zfcp_erp_adapter_reopen(adapter, 0, 116, fsf_req); |
4685 | } else { | 4672 | } else { |
4686 | req_queue->distance_from_int = new_distance_from_int; | 4673 | req_queue->distance_from_int = new_distance_from_int; |
4687 | /* | 4674 | /* |