diff options
author | Hannes Reinecke <hare@suse.de> | 2016-10-18 10:01:43 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-11-08 17:29:55 -0500 |
commit | 05d7d3b0bd07e3990ab7a39ee93be28dbf7091d4 (patch) | |
tree | 3255b20befb2f4551eab03618793fda2b60a2813 /drivers/scsi/libfc/fc_rport.c | |
parent | 2580064b5ec6dc9efa475298b276ab21f5cc287d (diff) | |
download | linux-05d7d3b0bd07e3990ab7a39ee93be28dbf7091d4.tar.gz linux-05d7d3b0bd07e3990ab7a39ee93be28dbf7091d4.tar.bz2 linux-05d7d3b0bd07e3990ab7a39ee93be28dbf7091d4.zip |
scsi: libfc: Replace ->rport_login callback with function call
The ->rport_login callback only ever had one implementation,
so we can as well call it directly and drop the callback.
Signed-off-by: Hannes Reinecke <hare@suse.com>
Acked-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/libfc/fc_rport.c')
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index b05fa9997db5..c045bc459910 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -412,6 +412,14 @@ static void fc_rport_work(struct work_struct *work) * fc_rport_login() - Start the remote port login state machine * @rdata: The remote port to be logged in to * + * Initiates the RP state machine. It is called from the LP module. + * This function will issue the following commands to the N_Port + * identified by the FC ID provided. + * + * - PLOGI + * - PRLI + * - RTV + * * Locking Note: Called without the rport lock held. This * function will hold the rport lock, call an _enter_* * function and then unlock the rport. @@ -420,7 +428,7 @@ static void fc_rport_work(struct work_struct *work) * If it appears we are already logged in, ADISC is used to verify * the setup. */ -static int fc_rport_login(struct fc_rport_priv *rdata) +int fc_rport_login(struct fc_rport_priv *rdata) { mutex_lock(&rdata->rp_mutex); @@ -452,6 +460,7 @@ static int fc_rport_login(struct fc_rport_priv *rdata) return 0; } +EXPORT_SYMBOL(fc_rport_login); /** * fc_rport_enter_delete() - Schedule a remote port to be deleted @@ -2175,9 +2184,6 @@ static void fc_rport_flush_queue(void) */ int fc_rport_init(struct fc_lport *lport) { - if (!lport->tt.rport_login) - lport->tt.rport_login = fc_rport_login; - if (!lport->tt.rport_logoff) lport->tt.rport_logoff = fc_rport_logoff; |