aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c2
-rw-r--r--drivers/scsi/fcoe/fcoe_ctlr.c11
-rw-r--r--drivers/scsi/libfc/fc_disc.c5
-rw-r--r--include/scsi/libfc.h2
4 files changed, 11 insertions, 9 deletions
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index cc4791cf575b..b867b1bfa908 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -939,7 +939,7 @@ static int bnx2fc_libfc_config(struct fc_lport *lport)
939 fc_elsct_init(lport); 939 fc_elsct_init(lport);
940 fc_exch_init(lport); 940 fc_exch_init(lport);
941 fc_rport_init(lport); 941 fc_rport_init(lport);
942 fc_disc_init(lport); 942 fc_disc_init(lport, lport);
943 return 0; 943 return 0;
944} 944}
945 945
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);
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 8e561e6a557c..141c54b97082 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -714,8 +714,9 @@ static void fc_disc_stop_final(struct fc_lport *lport)
714/** 714/**
715 * fc_disc_init() - Initialize the discovery layer for a local port 715 * fc_disc_init() - Initialize the discovery layer for a local port
716 * @lport: The local port that needs the discovery layer to be initialized 716 * @lport: The local port that needs the discovery layer to be initialized
717 * @priv: Private data structre for users of the discovery layer
717 */ 718 */
718int fc_disc_init(struct fc_lport *lport) 719int fc_disc_init(struct fc_lport *lport, void *priv)
719{ 720{
720 struct fc_disc *disc; 721 struct fc_disc *disc;
721 722
@@ -736,7 +737,7 @@ int fc_disc_init(struct fc_lport *lport)
736 mutex_init(&disc->disc_mutex); 737 mutex_init(&disc->disc_mutex);
737 INIT_LIST_HEAD(&disc->rports); 738 INIT_LIST_HEAD(&disc->rports);
738 739
739 disc->priv = lport; 740 disc->priv = priv;
740 741
741 return 0; 742 return 0;
742} 743}
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 399162b50a8d..add2a498bd44 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -1074,7 +1074,7 @@ void fc_rport_terminate_io(struct fc_rport *);
1074/* 1074/*
1075 * DISCOVERY LAYER 1075 * DISCOVERY LAYER
1076 *****************************/ 1076 *****************************/
1077int fc_disc_init(struct fc_lport *); 1077int fc_disc_init(struct fc_lport *, void *);
1078 1078
1079static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc) 1079static inline struct fc_lport *fc_disc_lport(struct fc_disc *disc)
1080{ 1080{