summaryrefslogtreecommitdiff
path: root/drivers/scsi/fnic/fnic_fcs.c
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2024-02-09 21:07:35 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2024-02-13 04:50:07 +0300
commit379a58caa19930e010b7efa1c1f3b9411d3d2ca3 (patch)
tree0432c6d3a2732149db172bceda463b47f4c702a5 /drivers/scsi/fnic/fnic_fcs.c
parent977fe773dcc7098d8eaf4ee6382cb51e13e784cb (diff)
downloadlinux-379a58caa19930e010b7efa1c1f3b9411d3d2ca3.tar.xz
scsi: fnic: Move fnic_fnic_flush_tx() to a work queue
Rather than call 'fnic_flush_tx()' from interrupt context we should be moving it onto a work queue to avoid any locking issues. Fixes: 1a1975551943 ("scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock") Co-developed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Lee Duncan <lduncan@suse.com> Link: https://lore.kernel.org/r/ce5ffa5d0ff82c2b2e283b3b4bff23291d49b05c.1707500786.git.lduncan@suse.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/fnic/fnic_fcs.c')
-rw-r--r--drivers/scsi/fnic/fnic_fcs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index 5e312a55cc7d..a08293b2ad9f 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -1182,7 +1182,7 @@ int fnic_send(struct fc_lport *lp, struct fc_frame *fp)
/**
* fnic_flush_tx() - send queued frames.
- * @fnic: fnic device
+ * @work: pointer to work element
*
* Send frames that were waiting to go out in FC or Ethernet mode.
* Whenever changing modes we purge queued frames, so these frames should
@@ -1190,8 +1190,9 @@ int fnic_send(struct fc_lport *lp, struct fc_frame *fp)
*
* Called without fnic_lock held.
*/
-void fnic_flush_tx(struct fnic *fnic)
+void fnic_flush_tx(struct work_struct *work)
{
+ struct fnic *fnic = container_of(work, struct fnic, flush_work);
struct sk_buff *skb;
struct fc_frame *fp;