summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe_ctlr.c
diff options
context:
space:
mode:
authorRobert Love <robert.w.love@intel.com>2013-03-25 19:00:27 +0100
committerRobert Love <robert.w.love@intel.com>2013-03-26 00:01:10 +0100
commit8a9a71381208b2364a2d12b0d257ae333917a1bc (patch)
tree3ed22690783800d22ddc569983bb0e069ea0de9d /drivers/scsi/fcoe/fcoe_ctlr.c
parentfcoe: Fix deadlock between create and destroy paths (diff)
downloadlinux-8a9a71381208b2364a2d12b0d257ae333917a1bc.tar.xz
linux-8a9a71381208b2364a2d12b0d257ae333917a1bc.zip
libfc, fcoe, bnx2fc: Always use fcoe_disc_init for discovery layer initialization
Currently libfcoe is doing some libfc discovery layer initialization outside of libfc. This patch moves this code into libfc and sets up a split in discovery (one time) initialization code and (re-configurable) settings that will come in the next patch. Signed-off-by: Robert Love <robert.w.love@intel.com> Tested-by: Jack Morgan <jack.morgan@intel.com> Reviewed-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Diffstat (limited to 'drivers/scsi/fcoe/fcoe_ctlr.c')
-rw-r--r--drivers/scsi/fcoe/fcoe_ctlr.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index 08c3bc398da2..ba2f977a6e1d 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -2826,6 +2826,8 @@ unlock:
int fcoe_libfc_config(struct fc_lport *lport, struct fcoe_ctlr *fip,
const struct libfc_function_template *tt, int init_fcp)
{
+ void *priv = lport;
+
/* Set the function pointers set by the LLDD */
memcpy(&lport->tt, tt, sizeof(*tt));
if (init_fcp && fc_fcp_init(lport))
@@ -2842,12 +2844,11 @@ int fcoe_libfc_config(struct fc_lport *lport, struct fcoe_ctlr *fip,
lport->tt.disc_start = fcoe_ctlr_disc_start;
lport->tt.disc_stop = fcoe_ctlr_disc_stop;
lport->tt.disc_stop_final = fcoe_ctlr_disc_stop_final;
- mutex_init(&lport->disc.disc_mutex);
- INIT_LIST_HEAD(&lport->disc.rports);
- lport->disc.priv = fip;
- } else {
- fc_disc_init(lport);
+ priv = fip;
}
+
+ fc_disc_init(lport, priv);
+
return 0;
}
EXPORT_SYMBOL_GPL(fcoe_libfc_config);