mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 10:58:48 +09:00
scsi: qedf: Don't process stag work during unload and recovery
[ Upstream commit 51071f0831ea975fc045526dd7e17efe669dc6e1 ] Stag work can cause issues during unload and recovery, hence don't process it. Signed-off-by: Saurav Kashyap <skashyap@marvell.com> Signed-off-by: Nilesh Javali <njavali@marvell.com> Link: https://lore.kernel.org/r/20240515091101.18754-2-skashyap@marvell.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0b6d662ed5
commit
bd09ebf8f0
@@ -4001,6 +4001,22 @@ void qedf_stag_change_work(struct work_struct *work)
|
|||||||
struct qedf_ctx *qedf =
|
struct qedf_ctx *qedf =
|
||||||
container_of(work, struct qedf_ctx, stag_work.work);
|
container_of(work, struct qedf_ctx, stag_work.work);
|
||||||
|
|
||||||
|
if (!qedf) {
|
||||||
|
QEDF_ERR(&qedf->dbg_ctx, "qedf is NULL");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (test_bit(QEDF_IN_RECOVERY, &qedf->flags)) {
|
||||||
|
QEDF_ERR(&qedf->dbg_ctx,
|
||||||
|
"Already is in recovery, hence not calling software context reset.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (test_bit(QEDF_UNLOADING, &qedf->flags)) {
|
||||||
|
QEDF_ERR(&qedf->dbg_ctx, "Driver unloading\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
printk_ratelimited("[%s]:[%s:%d]:%d: Performing software context reset.",
|
printk_ratelimited("[%s]:[%s:%d]:%d: Performing software context reset.",
|
||||||
dev_name(&qedf->pdev->dev), __func__, __LINE__,
|
dev_name(&qedf->pdev->dev), __func__, __LINE__,
|
||||||
qedf->dbg_ctx.host_no);
|
qedf->dbg_ctx.host_no);
|
||||||
|
|||||||
Reference in New Issue
Block a user