summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-10-18 11:01:46 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-09 01:29:55 +0300
commit5922a957457c9146fc601ce3c36a076dde249593 (patch)
treec8ff9177807299a35c8841547761135bbf05ba40
parente76ee65fa649740fde0da44a0e1dc458407c685c (diff)
downloadlinux-5922a957457c9146fc601ce3c36a076dde249593.tar.xz
scsi: libfc: Replace ->rport_flush_queue callback with function call
The ->rport_flush_queue callback only ever had a single 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>
-rw-r--r--drivers/scsi/fcoe/fcoe_ctlr.c2
-rw-r--r--drivers/scsi/libfc/fc_disc.c2
-rw-r--r--drivers/scsi/libfc/fc_lport.c2
-rw-r--r--drivers/scsi/libfc/fc_rport.c6
-rw-r--r--include/scsi/libfc.h8
5 files changed, 6 insertions, 14 deletions
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index 12aecf337540..12efc1d5df78 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -2215,7 +2215,7 @@ static void fcoe_ctlr_disc_stop(struct fc_lport *lport)
static void fcoe_ctlr_disc_stop_final(struct fc_lport *lport)
{
fcoe_ctlr_disc_stop(lport);
- lport->tt.rport_flush_queue();
+ fc_rport_flush_queue();
synchronize_rcu();
}
diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
index 7efa5a66e92a..6103231104da 100644
--- a/drivers/scsi/libfc/fc_disc.c
+++ b/drivers/scsi/libfc/fc_disc.c
@@ -719,7 +719,7 @@ static void fc_disc_stop(struct fc_lport *lport)
static void fc_disc_stop_final(struct fc_lport *lport)
{
fc_disc_stop(lport);
- lport->tt.rport_flush_queue();
+ fc_rport_flush_queue();
}
/**
diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c
index 937a442cc70e..7315675d3e33 100644
--- a/drivers/scsi/libfc/fc_lport.c
+++ b/drivers/scsi/libfc/fc_lport.c
@@ -625,7 +625,7 @@ int fc_fabric_logoff(struct fc_lport *lport)
if (lport->dns_rdata)
fc_rport_logoff(lport->dns_rdata);
mutex_unlock(&lport->lp_mutex);
- lport->tt.rport_flush_queue();
+ fc_rport_flush_queue();
mutex_lock(&lport->lp_mutex);
fc_lport_enter_logo(lport);
mutex_unlock(&lport->lp_mutex);
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c
index feae7abf05c3..6e5022627777 100644
--- a/drivers/scsi/libfc/fc_rport.c
+++ b/drivers/scsi/libfc/fc_rport.c
@@ -2175,10 +2175,11 @@ static void fc_rport_recv_logo_req(struct fc_lport *lport, struct fc_frame *fp)
/**
* fc_rport_flush_queue() - Flush the rport_event_queue
*/
-static void fc_rport_flush_queue(void)
+void fc_rport_flush_queue(void)
{
flush_workqueue(rport_event_queue);
}
+EXPORT_SYMBOL(fc_rport_flush_queue);
/**
* fc_rport_init() - Initialize the remote port layer for a local port
@@ -2186,9 +2187,6 @@ static void fc_rport_flush_queue(void)
*/
int fc_rport_init(struct fc_lport *lport)
{
- if (!lport->tt.rport_flush_queue)
- lport->tt.rport_flush_queue = fc_rport_flush_queue;
-
return 0;
}
EXPORT_SYMBOL(fc_rport_init);
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 1e1dbc94d54a..57630c5a7fc4 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -583,13 +583,6 @@ struct libfc_function_template {
void (*exch_mgr_reset)(struct fc_lport *, u32 s_id, u32 d_id);
/*
- * Flush the rport work queue. Generally used before shutdown.
- *
- * STATUS: OPTIONAL
- */
- void (*rport_flush_queue)(void);
-
- /*
* Set the local port FC_ID.
*
* This may be provided by the LLD to allow it to be
@@ -994,6 +987,7 @@ void fc_rport_destroy(struct kref *kref);
int fc_rport_login(struct fc_rport_priv *rdata);
int fc_rport_logoff(struct fc_rport_priv *rdata);
void fc_rport_recv_req(struct fc_lport *lport, struct fc_frame *fp);
+void fc_rport_flush_queue(void);
/*
* DISCOVERY LAYER