diff options
author | Andreas Herrmann <aherrman@de.ibm.com> | 2005-06-13 07:23:57 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-06-13 22:37:01 -0400 |
commit | d736a27b7efbc835c7b83db5c1bbd41edbadf32e (patch) | |
tree | cefcc6dfb1853b6d008d67124b032bdfd6ff990b /drivers/s390/scsi/zfcp_fsf.c | |
parent | cd8a383ebc93f8ded9cefee53a337542c3aacad7 (diff) |
[SCSI] zfcp: fix handling of port boxed and lun boxed fsf states
From: Maxim Shchetynin <maxim@de.ibm.com>
Signed-off-by: Andreas Herrmann <aherrman@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_fsf.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index 56b2ea97da1..0d9f20edc49 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c | |||
@@ -1228,7 +1228,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1228 | zfcp_get_busid_by_unit(unit)); | 1228 | zfcp_get_busid_by_unit(unit)); |
1229 | debug_text_event(new_fsf_req->adapter->erp_dbf, 2, | 1229 | debug_text_event(new_fsf_req->adapter->erp_dbf, 2, |
1230 | "fsf_s_pboxed"); | 1230 | "fsf_s_pboxed"); |
1231 | zfcp_erp_port_reopen(unit->port, 0); | 1231 | zfcp_erp_port_boxed(unit->port); |
1232 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1232 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1233 | | ZFCP_STATUS_FSFREQ_RETRY; | 1233 | | ZFCP_STATUS_FSFREQ_RETRY; |
1234 | break; | 1234 | break; |
@@ -1240,10 +1240,7 @@ zfcp_fsf_abort_fcp_command_handler(struct zfcp_fsf_req *new_fsf_req) | |||
1240 | unit->fcp_lun, unit->port->wwpn, | 1240 | unit->fcp_lun, unit->port->wwpn, |
1241 | zfcp_get_busid_by_unit(unit)); | 1241 | zfcp_get_busid_by_unit(unit)); |
1242 | debug_text_event(new_fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); | 1242 | debug_text_event(new_fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); |
1243 | zfcp_erp_unit_reopen(unit, 0); | 1243 | zfcp_erp_unit_boxed(unit); |
1244 | zfcp_cmd_dbf_event_fsf("unitbox", new_fsf_req, | ||
1245 | &new_fsf_req->qtcb->header.fsf_status_qual, | ||
1246 | sizeof(union fsf_status_qual)); | ||
1247 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1244 | new_fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1248 | | ZFCP_STATUS_FSFREQ_RETRY; | 1245 | | ZFCP_STATUS_FSFREQ_RETRY; |
1249 | break; | 1246 | break; |
@@ -1573,7 +1570,7 @@ zfcp_fsf_send_ct_handler(struct zfcp_fsf_req *fsf_req) | |||
1573 | "(adapter %s, port d_id=0x%08x)\n", | 1570 | "(adapter %s, port d_id=0x%08x)\n", |
1574 | zfcp_get_busid_by_port(port), port->d_id); | 1571 | zfcp_get_busid_by_port(port), port->d_id); |
1575 | debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); | 1572 | debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); |
1576 | zfcp_erp_port_reopen(port, 0); | 1573 | zfcp_erp_port_boxed(port); |
1577 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 1574 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1578 | | ZFCP_STATUS_FSFREQ_RETRY; | 1575 | | ZFCP_STATUS_FSFREQ_RETRY; |
1579 | break; | 1576 | break; |
@@ -2460,6 +2457,9 @@ zfcp_fsf_open_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2460 | /* mark port as open */ | 2457 | /* mark port as open */ |
2461 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN | | 2458 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN | |
2462 | ZFCP_STATUS_PORT_PHYS_OPEN, &port->status); | 2459 | ZFCP_STATUS_PORT_PHYS_OPEN, &port->status); |
2460 | atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED | | ||
2461 | ZFCP_STATUS_COMMON_ACCESS_BOXED, | ||
2462 | &port->status); | ||
2463 | retval = 0; | 2463 | retval = 0; |
2464 | /* check whether D_ID has changed during open */ | 2464 | /* check whether D_ID has changed during open */ |
2465 | /* | 2465 | /* |
@@ -2803,7 +2803,7 @@ zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *fsf_req) | |||
2803 | port->wwpn, | 2803 | port->wwpn, |
2804 | zfcp_get_busid_by_port(port)); | 2804 | zfcp_get_busid_by_port(port)); |
2805 | debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_pboxed"); | 2805 | debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_pboxed"); |
2806 | zfcp_erp_port_reopen(port, 0); | 2806 | zfcp_erp_port_boxed(port); |
2807 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 2807 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
2808 | ZFCP_STATUS_FSFREQ_RETRY; | 2808 | ZFCP_STATUS_FSFREQ_RETRY; |
2809 | break; | 2809 | break; |
@@ -3035,7 +3035,7 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3035 | "needs to be reopened\n", | 3035 | "needs to be reopened\n", |
3036 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); | 3036 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); |
3037 | debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); | 3037 | debug_text_event(adapter->erp_dbf, 2, "fsf_s_pboxed"); |
3038 | zfcp_erp_port_reopen(unit->port, 0); | 3038 | zfcp_erp_port_boxed(unit->port); |
3039 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 3039 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
3040 | ZFCP_STATUS_FSFREQ_RETRY; | 3040 | ZFCP_STATUS_FSFREQ_RETRY; |
3041 | break; | 3041 | break; |
@@ -3145,7 +3145,9 @@ zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3145 | unit->handle); | 3145 | unit->handle); |
3146 | /* mark unit as open */ | 3146 | /* mark unit as open */ |
3147 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status); | 3147 | atomic_set_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status); |
3148 | 3148 | atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED | | |
3149 | ZFCP_STATUS_COMMON_ACCESS_BOXED, | ||
3150 | &unit->status); | ||
3149 | if (adapter->supported_features & FSF_FEATURE_LUN_SHARING){ | 3151 | if (adapter->supported_features & FSF_FEATURE_LUN_SHARING){ |
3150 | if (!exclusive) | 3152 | if (!exclusive) |
3151 | atomic_set_mask(ZFCP_STATUS_UNIT_SHARED, | 3153 | atomic_set_mask(ZFCP_STATUS_UNIT_SHARED, |
@@ -3335,7 +3337,7 @@ zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *fsf_req) | |||
3335 | unit->port->wwpn, | 3337 | unit->port->wwpn, |
3336 | zfcp_get_busid_by_unit(unit)); | 3338 | zfcp_get_busid_by_unit(unit)); |
3337 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed"); | 3339 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed"); |
3338 | zfcp_erp_port_reopen(unit->port, 0); | 3340 | zfcp_erp_port_boxed(unit->port); |
3339 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 3341 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
3340 | ZFCP_STATUS_FSFREQ_RETRY; | 3342 | ZFCP_STATUS_FSFREQ_RETRY; |
3341 | break; | 3343 | break; |
@@ -3881,10 +3883,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3881 | "needs to be reopened\n", | 3883 | "needs to be reopened\n", |
3882 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); | 3884 | unit->port->wwpn, zfcp_get_busid_by_unit(unit)); |
3883 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed"); | 3885 | debug_text_event(fsf_req->adapter->erp_dbf, 2, "fsf_s_pboxed"); |
3884 | zfcp_erp_port_reopen(unit->port, 0); | 3886 | zfcp_erp_port_boxed(unit->port); |
3885 | zfcp_cmd_dbf_event_fsf("portbox", fsf_req, | ||
3886 | &header->fsf_status_qual, | ||
3887 | sizeof (union fsf_status_qual)); | ||
3888 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | | 3887 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | |
3889 | ZFCP_STATUS_FSFREQ_RETRY; | 3888 | ZFCP_STATUS_FSFREQ_RETRY; |
3890 | break; | 3889 | break; |
@@ -3895,10 +3894,7 @@ zfcp_fsf_send_fcp_command_handler(struct zfcp_fsf_req *fsf_req) | |||
3895 | zfcp_get_busid_by_unit(unit), | 3894 | zfcp_get_busid_by_unit(unit), |
3896 | unit->port->wwpn, unit->fcp_lun); | 3895 | unit->port->wwpn, unit->fcp_lun); |
3897 | debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); | 3896 | debug_text_event(fsf_req->adapter->erp_dbf, 1, "fsf_s_lboxed"); |
3898 | zfcp_erp_unit_reopen(unit, 0); | 3897 | zfcp_erp_unit_boxed(unit); |
3899 | zfcp_cmd_dbf_event_fsf("unitbox", fsf_req, | ||
3900 | &header->fsf_status_qual, | ||
3901 | sizeof(union fsf_status_qual)); | ||
3902 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR | 3898 | fsf_req->status |= ZFCP_STATUS_FSFREQ_ERROR |
3903 | | ZFCP_STATUS_FSFREQ_RETRY; | 3899 | | ZFCP_STATUS_FSFREQ_RETRY; |
3904 | break; | 3900 | break; |