Commit 1d3aab08 authored by Swen Schillig's avatar Swen Schillig Committed by James Bottomley

[SCSI] zfcp: register with SCSI layer on ccw registration

Synchronize the registration and de-registration with the SCSI layer
at CCW registration, de-registration. Before we registered with the
SCSI layer on adapter activation. This way the reg and de-reg process
is in balance.
Signed-off-by: default avatarSwen Schillig <swen@vnet.ibm.com>
Signed-off-by: default avatarChristof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 27c3f0a6
...@@ -534,6 +534,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device) ...@@ -534,6 +534,7 @@ int zfcp_adapter_enqueue(struct ccw_device *ccw_device)
zfcp_fc_nameserver_init(adapter); zfcp_fc_nameserver_init(adapter);
if (!zfcp_adapter_scsi_register(adapter))
return 0; return 0;
sysfs_failed: sysfs_failed:
......
...@@ -106,10 +106,6 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device) ...@@ -106,10 +106,6 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device)
if (retval) if (retval)
goto out; goto out;
retval = zfcp_adapter_scsi_register(adapter);
if (retval)
goto out_scsi_register;
/* initialize request counter */ /* initialize request counter */
BUG_ON(!zfcp_reqlist_isempty(adapter)); BUG_ON(!zfcp_reqlist_isempty(adapter));
adapter->req_no = 0; adapter->req_no = 0;
...@@ -123,8 +119,6 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device) ...@@ -123,8 +119,6 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device)
flush_work(&adapter->scan_work); flush_work(&adapter->scan_work);
return 0; return 0;
out_scsi_register:
zfcp_erp_thread_kill(adapter);
out: out:
up(&zfcp_data.config_sema); up(&zfcp_data.config_sema);
return retval; return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment