aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/fcoe/fcoe_ctlr.c
diff options
context:
space:
mode:
authorRobert Love <robert.w.love@intel.com>2013-03-25 14:00:27 -0400
committerRobert Love <robert.w.love@intel.com>2013-03-25 19:01:10 -0400
commit8a9a71381208b2364a2d12b0d257ae333917a1bc (patch)
tree3ed22690783800d22ddc569983bb0e069ea0de9d /drivers/scsi/fcoe/fcoe_ctlr.c
parentf9c4358edb285cead00a0d6cf0644c84ee773026 (diff)
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:
2826int fcoe_libfc_config(struct fc_lport *lport, struct fcoe_ctlr *fip, 2826int fcoe_libfc_config(struct fc_lport *lport, struct fcoe_ctlr *fip,
2827 const struct libfc_function_template *tt, int init_fcp) 2827 const struct libfc_function_template *tt, int init_fcp)
2828{ 2828{
2829 void *priv = lport;
2830
2829 /* Set the function pointers set by the LLDD */ 2831 /* Set the function pointers set by the LLDD */
2830 memcpy(&lport->tt, tt, sizeof(*tt)); 2832 memcpy(&lport->tt, tt, sizeof(*tt));
2831 if (init_fcp && fc_fcp_init(lport)) 2833 if (init_fcp && fc_fcp_init(lport))
@@ -2842,12 +2844,11 @@ int fcoe_libfc_config(struct fc_lport *lport, struct fcoe_ctlr *fip,
2842 lport->tt.disc_start = fcoe_ctlr_disc_start; 2844 lport->tt.disc_start = fcoe_ctlr_disc_start;
2843 lport->tt.disc_stop = fcoe_ctlr_disc_stop; 2845 lport->tt.disc_stop = fcoe_ctlr_disc_stop;
2844 lport->tt.disc_stop_final = fcoe_ctlr_disc_stop_final; 2846 lport->tt.disc_stop_final = fcoe_ctlr_disc_stop_final;
2845 mutex_init(&lport->disc.disc_mutex); 2847 priv = fip;
2846 INIT_LIST_HEAD(&lport->disc.rports);
2847 lport->disc.priv = fip;
2848 } else {
2849 fc_disc_init(lport);
2850 } 2848 }
2849
2850 fc_disc_init(lport, priv);
2851
2851 return 0; 2852 return 0;
2852} 2853}
2853EXPORT_SYMBOL_GPL(fcoe_libfc_config); 2854EXPORT_SYMBOL_GPL(fcoe_libfc_config);