[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>
This commit is contained in:

committed by
James Bottomley

parent
14e242ea55
commit
55c770fa11
@@ -132,7 +132,7 @@ static void zfcp_fc_wka_port_init(struct zfcp_wka_port *wka_port, u32 d_id,
|
||||
INIT_DELAYED_WORK(&wka_port->work, zfcp_wka_port_offline);
|
||||
}
|
||||
|
||||
void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *wka)
|
||||
static void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *wka)
|
||||
{
|
||||
cancel_delayed_work_sync(&wka->work);
|
||||
mutex_lock(&wka->mutex);
|
||||
@@ -140,6 +140,15 @@ void zfcp_fc_wka_port_force_offline(struct zfcp_wka_port *wka)
|
||||
mutex_unlock(&wka->mutex);
|
||||
}
|
||||
|
||||
void zfcp_fc_wka_ports_force_offline(struct zfcp_wka_ports *gs)
|
||||
{
|
||||
zfcp_fc_wka_port_force_offline(&gs->ms);
|
||||
zfcp_fc_wka_port_force_offline(&gs->ts);
|
||||
zfcp_fc_wka_port_force_offline(&gs->ds);
|
||||
zfcp_fc_wka_port_force_offline(&gs->as);
|
||||
zfcp_fc_wka_port_force_offline(&gs->ks);
|
||||
}
|
||||
|
||||
void zfcp_fc_wka_ports_init(struct zfcp_adapter *adapter)
|
||||
{
|
||||
struct zfcp_wka_ports *gs = adapter->gs;
|
||||
|
Reference in New Issue
Block a user