From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E87D22A7F6; Sat, 12 Sep 2026 14:06:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789222009; cv=none; b=K8d2XRc9pgAxo17g2XmD4Jl5nf9nFCM6nCvyPlMHv7M4kWye+lAiCIOXt8Y76E+Xo9rcj+xKdshe0dHpoHGI8W3oz4jf3Y7uHhky99mSLJHGt8sagBaGTrn2QsJ7EXpu0eDQ1ESL+1sB5fUzxAFUEl/Q/SEY6KNHpegXhXS/ROA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789222009; c=relaxed/simple; bh=LjDwTT4x49yLt7kiwvWcRgobvjvlAP0MjAf2HnV11h8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JOgSHelql4LFlBZ6w6uNTvUrfI8b/bIVGynKvS2rBnVWtKsD+ZLv1H+S0yRwH3cXR6oVS+ukYKOBmEww8hA7GjyZA5oXj48WYxVLDUtVHkGfHq0YnHU7JvyUvwcNti0H7rjQVIiQ1eehK2yoax6vKXajVwu4tJw13AYWkuqvIB8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=m75QKEmS; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="m75QKEmS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DBDC31F000FF; Sat, 12 Sep 2026 14:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789222007; bh=hLOqQz90ReyMivjZx8Daz7oEVXSXLiYih19HfV3AezM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=m75QKEmSOCDheRtg7gd/trQ6I/X0v26k9e1geB8TNoMxK9qWfrYPi5N+oUiZlx9l/ IBSeqQWuE2k5zuocSgijVMmUqeSL2IyWveGCy5cIVLyN+mg/Q+lSPD1sMY1eNjFkkV zN3ld5fZs1fVQ5MXLNXCjOH54SArJWsnOgzdBios= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko , Nilesh Javali , "Martin K. Petersen (Oracle)" Subject: [PATCH 6.6 0500/1424] scsi: qla2xxx: Skip NVMe LS reject IOCB when FW not started Date: Sat, 12 Sep 2026 08:48:52 +0200 Message-ID: <20260912065618.489123058@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.279695368@linuxfoundation.org> References: <20260912065607.279695368@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nilesh Javali commit f7e46ebffc5781aab3f1f5a5d4350addbb5833f4 upstream. qla_nvme_xmt_ls_rsp() bails out to the out: label when firmware is not started (!ha->flags.fw_started), but the out: path unconditionally calls qla_nvme_ls_reject_iocb(), which ends in qla2x00_start_iocbs() and an unconditional doorbell write to the request queue in-pointer register. This rings the firmware doorbell and queues an IOCB that stopped or resetting firmware cannot consume, and touches MMIO during the reset/EEH window where fw_started is also clear. Only emit the LS reject IOCB (and ring the doorbell) when fw_started is set; otherwise just clean up and return. The post-allocation failure cases (SRB alloc / qla2x00_start_sp() failure) run with firmware started and still send the reject. Apply the same guard to the reject emission in qla2xxx_process_purls_pkt(). Fixes: 875386b98857 ("scsi: qla2xxx: Add Unsolicited LS Request and Response Support for NVMe") Cc: stable@vger.kernel.org Reported-by: Sashiko Signed-off-by: Nilesh Javali Link: https://patch.msgid.link/20260730155838.2119230-26-njavali@marvell.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_nvme.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) --- a/drivers/scsi/qla2xxx/qla_nvme.c +++ b/drivers/scsi/qla2xxx/qla_nvme.c @@ -442,9 +442,11 @@ out: a.vp_idx = vha->vp_idx; a.nport_handle = uctx->nport_handle; a.xchg_address = uctx->exchange_address; - spin_lock_irqsave(ha->base_qpair->qp_lock_ptr, flags); - qla_nvme_ls_reject_iocb(vha, ha->base_qpair, &a, true); - spin_unlock_irqrestore(ha->base_qpair->qp_lock_ptr, flags); + if (ha->flags.fw_started) { + spin_lock_irqsave(ha->base_qpair->qp_lock_ptr, flags); + qla_nvme_ls_reject_iocb(vha, ha->base_qpair, &a, true); + spin_unlock_irqrestore(ha->base_qpair->qp_lock_ptr, flags); + } kfree(uctx); return rval; } @@ -1206,9 +1208,14 @@ qla2xxx_process_purls_pkt(struct scsi_ql a.vp_idx = vha->vp_idx; a.nport_handle = uctx->nport_handle; a.xchg_address = uctx->exchange_address; - spin_lock_irqsave(vha->hw->base_qpair->qp_lock_ptr, flags); - qla_nvme_ls_reject_iocb(vha, vha->hw->base_qpair, &a, true); - spin_unlock_irqrestore(vha->hw->base_qpair->qp_lock_ptr, flags); + if (vha->hw->flags.fw_started) { + spin_lock_irqsave(vha->hw->base_qpair->qp_lock_ptr, + flags); + qla_nvme_ls_reject_iocb(vha, vha->hw->base_qpair, &a, + true); + spin_unlock_irqrestore(vha->hw->base_qpair->qp_lock_ptr, + flags); + } list_del(&uctx->elem); kfree(uctx); }