aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2009-07-13 09:06:02 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-07-30 09:49:54 -0400
commitdfb3cf00e402686f671db697adbd8b9f4c219268 (patch)
treef6258a74a9c2d350cb309670f0043eae4f718329 /drivers/s390
parent5381837f125cc62ad703fbcdfcd7566fc81fd404 (diff)
[SCSI] zfcp: Fix invalid command order
We should not modify the port status after triggering an ERP action for the port. It is not guaranteed which status is finally active when the ERP action is performed. This can lead to situations which are unwanted and hard to debug in case of a failure. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index c57658f3d34f..bbb7ef0b052d 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -1731,15 +1731,16 @@ static void zfcp_fsf_close_physical_port_handler(struct zfcp_fsf_req *req)
1731 zfcp_fsf_access_denied_port(req, port); 1731 zfcp_fsf_access_denied_port(req, port);
1732 break; 1732 break;
1733 case FSF_PORT_BOXED: 1733 case FSF_PORT_BOXED:
1734 zfcp_erp_port_boxed(port, "fscpph2", req);
1735 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1736 ZFCP_STATUS_FSFREQ_RETRY;
1737 /* can't use generic zfcp_erp_modify_port_status because 1734 /* can't use generic zfcp_erp_modify_port_status because
1738 * ZFCP_STATUS_COMMON_OPEN must not be reset for the port */ 1735 * ZFCP_STATUS_COMMON_OPEN must not be reset for the port */
1739 atomic_clear_mask(ZFCP_STATUS_PORT_PHYS_OPEN, &port->status); 1736 atomic_clear_mask(ZFCP_STATUS_PORT_PHYS_OPEN, &port->status);
1740 list_for_each_entry(unit, &port->unit_list_head, list) 1737 list_for_each_entry(unit, &port->unit_list_head, list)
1741 atomic_clear_mask(ZFCP_STATUS_COMMON_OPEN, 1738 atomic_clear_mask(ZFCP_STATUS_COMMON_OPEN,
1742 &unit->status); 1739 &unit->status);
1740 zfcp_erp_port_boxed(port, "fscpph2", req);
1741 req->status |= ZFCP_STATUS_FSFREQ_ERROR |
1742 ZFCP_STATUS_FSFREQ_RETRY;
1743
1743 break; 1744 break;
1744 case FSF_ADAPTER_STATUS_AVAILABLE: 1745 case FSF_ADAPTER_STATUS_AVAILABLE:
1745 switch (header->fsf_status_qual.word[0]) { 1746 switch (header->fsf_status_qual.word[0]) {