Skip to content

Commit

Permalink
[SCSI] zfcp: Reorder registration of initial SCSI device
Browse files Browse the repository at this point in the history
Make sure that the rport registration did complete and then register
SCSI device directly. Otherwise the unit_enqueue would race with the
call to zfcp_scsi_queue_unit_register.

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>
  • Loading branch information
Christof Schmitt authored and James Bottomley committed Sep 9, 2010
1 parent 634651f commit 9197846
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/s390/scsi/zfcp_aux.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,14 @@ static void __init zfcp_init_device_configure(char *busid, u64 wwpn, u64 lun)
if (!port)
goto out_port;

flush_work(&port->rport_work);
unit = zfcp_unit_enqueue(port, lun);
if (IS_ERR(unit))
goto out_unit;

zfcp_erp_unit_reopen(unit, 0, "auidc_1", NULL);
zfcp_erp_wait(adapter);
flush_work(&unit->scsi_work);
zfcp_scsi_scan(unit);

out_unit:
put_device(&port->dev);
Expand Down

0 comments on commit 9197846

Please sign in to comment.