diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-08-18 09:43:12 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-09-05 09:49:15 -0400 |
commit | 55c770fa11d21456e02dc7afb9a37404da9c7b4c (patch) | |
tree | 26d0d750f7864f6fec9acf2aa1610757e5417caf /drivers/s390 | |
parent | 14e242ea55a8b807dc1fb7654941caf68a20cd81 (diff) |
[SCSI] zfcp: Implicitly close all wka ports
An adapter shutdown implicitly closes all open ports. Make sure to
mark all WKA ports as offline, not only the directory server. Also
make sure that no pending wka port work is running when the adapter is
being removed.
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')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_erp.c | 2 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_ext.h | 4 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_fc.c | 11 |
4 files changed, 13 insertions, 5 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 870fe79bc7ea..7aba6840243f 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -555,6 +555,7 @@ void zfcp_adapter_dequeue(struct zfcp_adapter *adapter) | |||
555 | 555 | ||
556 | cancel_work_sync(&adapter->scan_work); | 556 | cancel_work_sync(&adapter->scan_work); |
557 | cancel_work_sync(&adapter->stat_work); | 557 | cancel_work_sync(&adapter->stat_work); |
558 | zfcp_fc_wka_ports_force_offline(adapter->gs); | ||
558 | zfcp_adapter_scsi_unregister(adapter); | 559 | zfcp_adapter_scsi_unregister(adapter); |
559 | sysfs_remove_group(&adapter->ccw_device->dev.kobj, | 560 | sysfs_remove_group(&adapter->ccw_device->dev.kobj, |
560 | &zfcp_sysfs_adapter_attrs); | 561 | &zfcp_sysfs_adapter_attrs); |
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index c75d6f35cb5f..39e4dd15453f 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c | |||
@@ -714,7 +714,7 @@ static void zfcp_erp_adapter_strategy_close(struct zfcp_erp_action *act) | |||
714 | zfcp_qdio_close(adapter); | 714 | zfcp_qdio_close(adapter); |
715 | zfcp_fsf_req_dismiss_all(adapter); | 715 | zfcp_fsf_req_dismiss_all(adapter); |
716 | adapter->fsf_req_seq_no = 0; | 716 | adapter->fsf_req_seq_no = 0; |
717 | zfcp_fc_wka_port_force_offline(&adapter->gs->ds); | 717 | zfcp_fc_wka_ports_force_offline(adapter->gs); |
718 | /* all ports and units are closed */ | 718 | /* all ports and units are closed */ |
719 | zfcp_erp_modify_adapter_status(adapter, "erascl1", NULL, | 719 | zfcp_erp_modify_adapter_status(adapter, "erascl1", NULL, |
720 | ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR); | 720 | ZFCP_STATUS_COMMON_OPEN, ZFCP_CLEAR); |
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index eeed322f32d0..1a66695f11a2 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/drivers/s390/scsi/zfcp_ext.h | |||
@@ -104,12 +104,10 @@ extern int zfcp_fc_ns_gid_pn(struct zfcp_erp_action *); | |||
104 | extern void zfcp_fc_plogi_evaluate(struct zfcp_port *, struct fsf_plogi *); | 104 | extern void zfcp_fc_plogi_evaluate(struct zfcp_port *, struct fsf_plogi *); |
105 | extern void zfcp_test_link(struct zfcp_port *); | 105 | extern void zfcp_test_link(struct zfcp_port *); |
106 | extern void zfcp_fc_link_test_work(struct work_struct *); | 106 | extern void zfcp_fc_link_test_work(struct work_struct *); |
107 | extern void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *); | 107 | extern void zfcp_fc_wka_ports_force_offline(struct zfcp_wka_ports *); |
108 | extern void zfcp_fc_wka_ports_init(struct zfcp_adapter *); | 108 | extern void zfcp_fc_wka_ports_init(struct zfcp_adapter *); |
109 | extern int zfcp_fc_execute_els_fc_job(struct fc_bsg_job *); | 109 | extern int zfcp_fc_execute_els_fc_job(struct fc_bsg_job *); |
110 | extern int zfcp_fc_execute_ct_fc_job(struct fc_bsg_job *); | 110 | extern int zfcp_fc_execute_ct_fc_job(struct fc_bsg_job *); |
111 | extern void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *); | ||
112 | |||
113 | 111 | ||
114 | /* zfcp_fsf.c */ | 112 | /* zfcp_fsf.c */ |
115 | extern int zfcp_fsf_open_port(struct zfcp_erp_action *); | 113 | extern int zfcp_fsf_open_port(struct zfcp_erp_action *); |
diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 94c13bd32b5f..6d0fef92567b 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c | |||
@@ -132,7 +132,7 @@ static void zfcp_fc_wka_port_init(struct zfcp_wka_port *wka_port, u32 d_id, | |||
132 | INIT_DELAYED_WORK(&wka_port->work, zfcp_wka_port_offline); | 132 | INIT_DELAYED_WORK(&wka_port->work, zfcp_wka_port_offline); |
133 | } | 133 | } |
134 | 134 | ||
135 | void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *wka) | 135 | static void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *wka) |
136 | { | 136 | { |
137 | cancel_delayed_work_sync(&wka->work); | 137 | cancel_delayed_work_sync(&wka->work); |
138 | mutex_lock(&wka->mutex); | 138 | mutex_lock(&wka->mutex); |
@@ -140,6 +140,15 @@ void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *wka) | |||
140 | mutex_unlock(&wka->mutex); | 140 | mutex_unlock(&wka->mutex); |
141 | } | 141 | } |
142 | 142 | ||
143 | void zfcp_fc_wka_ports_force_offline(struct zfcp_wka_ports *gs) | ||
144 | { | ||
145 | zfcp_fc_wka_port_force_offline(&gs->ms); | ||
146 | zfcp_fc_wka_port_force_offline(&gs->ts); | ||
147 | zfcp_fc_wka_port_force_offline(&gs->ds); | ||
148 | zfcp_fc_wka_port_force_offline(&gs->as); | ||
149 | zfcp_fc_wka_port_force_offline(&gs->ks); | ||
150 | } | ||
151 | |||
143 | void zfcp_fc_wka_ports_init(struct zfcp_adapter *adapter) | 152 | void zfcp_fc_wka_ports_init(struct zfcp_adapter *adapter) |
144 | { | 153 | { |
145 | struct zfcp_wka_ports *gs = adapter->gs; | 154 | struct zfcp_wka_ports *gs = adapter->gs; |