aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_erp.c
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2009-08-18 09:43:20 -0400
committerJames Bottomley <James.Bottomley@suse.de>2009-09-05 09:49:28 -0400
commit799b76d09aeee558d18c1f5b93e63f58f1d1fc11 (patch)
treea1a05faa773b329246a4fa97ba7c0ac5201b5d40 /drivers/s390/scsi/zfcp_erp.c
parent564e1c86c810f9ccfe4300afa402815e3db4886d (diff)
[SCSI] zfcp: Decouple gid_pn requests from erp
Don't let the erp wait for gid_pn requests to complete. Instead, queue the gid_pn work, exit erp and let the finished gid_pn work trigger a new port reopen. Reviewed-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_erp.c')
-rw-r--r--drivers/s390/scsi/zfcp_erp.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index feda1db56b23..67297d2744fb 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -26,7 +26,6 @@ enum zfcp_erp_steps {
26 ZFCP_ERP_STEP_FSF_XCONFIG = 0x0001, 26 ZFCP_ERP_STEP_FSF_XCONFIG = 0x0001,
27 ZFCP_ERP_STEP_PHYS_PORT_CLOSING = 0x0010, 27 ZFCP_ERP_STEP_PHYS_PORT_CLOSING = 0x0010,
28 ZFCP_ERP_STEP_PORT_CLOSING = 0x0100, 28 ZFCP_ERP_STEP_PORT_CLOSING = 0x0100,
29 ZFCP_ERP_STEP_NAMESERVER_LOOKUP = 0x0400,
30 ZFCP_ERP_STEP_PORT_OPENING = 0x0800, 29 ZFCP_ERP_STEP_PORT_OPENING = 0x0800,
31 ZFCP_ERP_STEP_UNIT_CLOSING = 0x1000, 30 ZFCP_ERP_STEP_UNIT_CLOSING = 0x1000,
32 ZFCP_ERP_STEP_UNIT_OPENING = 0x2000, 31 ZFCP_ERP_STEP_UNIT_OPENING = 0x2000,
@@ -842,27 +841,6 @@ static int zfcp_erp_open_ptp_port(struct zfcp_erp_action *act)
842 return zfcp_erp_port_strategy_open_port(act); 841 return zfcp_erp_port_strategy_open_port(act);
843} 842}
844 843
845void zfcp_erp_port_strategy_open_lookup(struct work_struct *work)
846{
847 int retval;
848 struct zfcp_port *port = container_of(work, struct zfcp_port,
849 gid_pn_work);
850
851 retval = zfcp_fc_ns_gid_pn(&port->erp_action);
852 if (!retval) {
853 port->erp_action.step = ZFCP_ERP_STEP_NAMESERVER_LOOKUP;
854 goto out;
855 }
856 if (retval == -ENOMEM) {
857 zfcp_erp_notify(&port->erp_action, ZFCP_STATUS_ERP_LOWMEM);
858 goto out;
859 }
860 /* all other error condtions */
861 zfcp_erp_notify(&port->erp_action, 0);
862out:
863 zfcp_port_put(port);
864}
865
866static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *act) 844static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *act)
867{ 845{
868 struct zfcp_adapter *adapter = act->adapter; 846 struct zfcp_adapter *adapter = act->adapter;
@@ -880,12 +858,8 @@ static int zfcp_erp_port_strategy_open_common(struct zfcp_erp_action *act)
880 if (!queue_work(adapter->work_queue, 858 if (!queue_work(adapter->work_queue,
881 &port->gid_pn_work)) 859 &port->gid_pn_work))
882 zfcp_port_put(port); 860 zfcp_port_put(port);
883 return ZFCP_ERP_CONTINUES; 861 return ZFCP_ERP_EXIT;
884 } 862 }
885 /* fall through */
886 case ZFCP_ERP_STEP_NAMESERVER_LOOKUP:
887 if (!port->d_id)
888 return ZFCP_ERP_FAILED;
889 return zfcp_erp_port_strategy_open_port(act); 863 return zfcp_erp_port_strategy_open_port(act);
890 864
891 case ZFCP_ERP_STEP_PORT_OPENING: 865 case ZFCP_ERP_STEP_PORT_OPENING: