FAILED: patch "[PATCH] scsi: qla2xxx: Check if port is online before sending ELS" failed to apply to 4.19-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.19.y
git checkout FETCH_HEAD
git cherry-pick -x 0c227dc22ca18856055983f27594feb2e0149965
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 4.19.y' HEAD^..
Possible dependencies:
0c227dc22ca1 ("scsi: qla2xxx: Check if port is online before sending ELS") 7fb223d0ad80 ("scsi: qla2xxx: Fix a memory leak in an error path of qla2x00_process_els()") 84318a9f01ce ("scsi: qla2xxx: edif: Add send, receive, and accept for auth_els") 7ebb336e45ef ("scsi: qla2xxx: edif: Add start + stop bsgs")d94d8158e184 ("scsi: qla2xxx: Add heartbeat check")f7a0ed479e66 ("scsi: qla2xxx: Fix crash in PCIe error handling")2ce35c0821af ("scsi: qla2xxx: Fix use after free in bsg")5777fef788a5 ("scsi: qla2xxx: Consolidate zio threshold setting for both FCP & NVMe") dbf1f53cfd23 ("scsi: qla2xxx: Implementation to get and manage host, target stats and initiator port") 707531bc2626 ("scsi: qla2xxx: If fcport is undergoing deletion complete I/O with retry") 3e6efab865ac ("scsi: qla2xxx: Fix reset of MPI firmware")44f5a37d1e3e ("scsi: qla2xxx: Fix buffer-buffer credit extraction error") 89c72f4245a8 ("scsi: qla2xxx: Add IOCB resource tracking")49db4d4e02aa ("scsi: qla2xxx: Performance tweak")1e98fb0f9208 ("scsi: qla2xxx: Setup debugfs entries for remote ports")897d68eb816b ("scsi: qla2xxx: Fix WARN_ON in qla_nvme_register_hba")81b9d1e19d62 ("scsi: qla2xxx: Reduce noisy debug message")9f2475fe7406 ("scsi: qla2xxx: SAN congestion management implementation")62e9dd177732 ("scsi: qla2xxx: Change in PUREX to handle FPIN ELS requests") 818dbde78e0f ("Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 0c227dc22ca18856055983f27594feb2e0149965 Mon Sep 17 00:00:00 2001
From: Shreyas Deodhar <[email protected]>
Date: Mon, 19 Dec 2022 03:07:38 -0800
Subject: [PATCH] scsi: qla2xxx: Check if port is online before sending ELS
CT Ping and ELS cmds fail for NVMe targets. Check if port is online before sending ELS instead of sending login.
drivers/scsi/qla2xxx/qla_bsg.c +5 -4
@@ -278,8 +278,8 @@ qla2x00_process_els(struct bsg_job *bsg_job)const char *type;int req_sg_cnt, rsp_sg_cnt;int rval = (DID_ERROR <<16 ); -uint16_t nextlid =0 ;uint32_t els_cmd =0 ; +int qla_port_allocated =0 ;if (bsg_request->msgcode ==FC_BSG_RPT_ELS ) { rport =fc_bsg_to_rport (bsg_job);
@@ -329,9 +329,9 @@ qla2x00_process_els(struct bsg_job *bsg_job)/* make sure the rport is logged in, * if not perform fabric login */ -if (qla2x00_fabric_login (vha, fcport, &nextlid)) { +if (atomic_read (&fcport->state) !=FCS_ONLINE ) {ql_dbg (ql_dbg_user, vha,0x7003 , -"Failed to login port %06X for ELS passthru.\n" , +"Port %06X is not online for ELS passthru.\n" , fcport->d_id.b24); rval = -EIO ; goto done;
@@ -348,6 +348,7 @@ qla2x00_process_els(struct bsg_job *bsg_job) goto done; } + qla_port_allocated =1 ;/* Initialize all required fields of fcport */ fcport->vha = vha; fcport->d_id.b.al_pa =
@@ -432,7 +433,7 @@ qla2x00_process_els(struct bsg_job *bsg_job) goto done_free_fcport; done_free_fcport: -if (bsg_request->msgcode !=FC_BSG_RPT_ELS ) +if (qla_port_allocated)qla2x00_free_fcport (fcport); done:return rval;