Commit 054f4382 authored by Joe Carnuccio's avatar Joe Carnuccio Committed by Martin K. Petersen

scsi: qla2xxx: Move free of fcport out of interrupt context

This patch moves freeing of fcport out of interrupt context.

Link: https://lore.kernel.org/r/20200212214436.25532-3-hmadhani@marvell.comSigned-off-by: default avatarJoe Carnuccio <joe.carnuccio@cavium.com>
Signed-off-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 07553b1e
...@@ -11,6 +11,14 @@ ...@@ -11,6 +11,14 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/bsg-lib.h> #include <linux/bsg-lib.h>
static void qla2xxx_free_fcport_work(struct work_struct *work)
{
struct fc_port *fcport = container_of(work, typeof(*fcport),
free_work);
qla2x00_free_fcport(fcport);
}
/* BSG support for ELS/CT pass through */ /* BSG support for ELS/CT pass through */
void qla2x00_bsg_job_done(srb_t *sp, int res) void qla2x00_bsg_job_done(srb_t *sp, int res)
{ {
...@@ -53,8 +61,10 @@ void qla2x00_bsg_sp_free(srb_t *sp) ...@@ -53,8 +61,10 @@ void qla2x00_bsg_sp_free(srb_t *sp)
if (sp->type == SRB_CT_CMD || if (sp->type == SRB_CT_CMD ||
sp->type == SRB_FXIOCB_BCMD || sp->type == SRB_FXIOCB_BCMD ||
sp->type == SRB_ELS_CMD_HST) sp->type == SRB_ELS_CMD_HST) {
qla2x00_free_fcport(sp->fcport); INIT_WORK(&sp->fcport->free_work, qla2xxx_free_fcport_work);
queue_work(ha->wq, &sp->fcport->free_work);
}
qla2x00_rel_sp(sp); qla2x00_rel_sp(sp);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment