diff options
Diffstat (limited to 'drivers/scsi/libfc/fc_disc.c')
-rw-r--r-- | drivers/scsi/libfc/fc_disc.c | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c index 8e561e6a557c..880a9068ca12 100644 --- a/drivers/scsi/libfc/fc_disc.c +++ b/drivers/scsi/libfc/fc_disc.c | |||
@@ -712,12 +712,13 @@ static void fc_disc_stop_final(struct fc_lport *lport) | |||
712 | } | 712 | } |
713 | 713 | ||
714 | /** | 714 | /** |
715 | * fc_disc_init() - Initialize the discovery layer for a local port | 715 | * fc_disc_config() - Configure 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 configured |
717 | * @priv: Private data structre for users of the discovery layer | ||
717 | */ | 718 | */ |
718 | int fc_disc_init(struct fc_lport *lport) | 719 | void fc_disc_config(struct fc_lport *lport, void *priv) |
719 | { | 720 | { |
720 | struct fc_disc *disc; | 721 | struct fc_disc *disc = &lport->disc; |
721 | 722 | ||
722 | if (!lport->tt.disc_start) | 723 | if (!lport->tt.disc_start) |
723 | lport->tt.disc_start = fc_disc_start; | 724 | lport->tt.disc_start = fc_disc_start; |
@@ -732,12 +733,21 @@ int fc_disc_init(struct fc_lport *lport) | |||
732 | lport->tt.disc_recv_req = fc_disc_recv_req; | 733 | lport->tt.disc_recv_req = fc_disc_recv_req; |
733 | 734 | ||
734 | disc = &lport->disc; | 735 | disc = &lport->disc; |
736 | |||
737 | disc->priv = priv; | ||
738 | } | ||
739 | EXPORT_SYMBOL(fc_disc_config); | ||
740 | |||
741 | /** | ||
742 | * fc_disc_init() - Initialize the discovery layer for a local port | ||
743 | * @lport: The local port that needs the discovery layer to be initialized | ||
744 | */ | ||
745 | void fc_disc_init(struct fc_lport *lport) | ||
746 | { | ||
747 | struct fc_disc *disc = &lport->disc; | ||
748 | |||
735 | INIT_DELAYED_WORK(&disc->disc_work, fc_disc_timeout); | 749 | INIT_DELAYED_WORK(&disc->disc_work, fc_disc_timeout); |
736 | mutex_init(&disc->disc_mutex); | 750 | mutex_init(&disc->disc_mutex); |
737 | INIT_LIST_HEAD(&disc->rports); | 751 | INIT_LIST_HEAD(&disc->rports); |
738 | |||
739 | disc->priv = lport; | ||
740 | |||
741 | return 0; | ||
742 | } | 752 | } |
743 | EXPORT_SYMBOL(fc_disc_init); | 753 | EXPORT_SYMBOL(fc_disc_init); |