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 9800C455162; Sat, 12 Sep 2026 11:54:40 +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=1789214081; cv=none; b=kjrSainYQishraxskctWsl5yslD0BNiiVsK1wg2v7nW21xO/D52h1/U+y9IXvWdM5XFuy6WmJ2ISE8oL/k9p1dBspYY5V7xP15HHwgTrvvRkrMhYzGnPgm37b9lBAdErQOnK45ldbzD25chssP/oPg4QFNd/uojF+5MK+D//YwI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789214081; c=relaxed/simple; bh=zgt3rasZ3ALw2PiwzwNzUN9MC4/8ZkYjgr2kMYGIPkk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fJ8Xk2sw2cxSe5chsQJVGYCE/+aEJRu6CfAt1QP9M+p+1vzF+eg1SJ3RM6RzKG5/TvM/QG9Bym09Phqtgjq1hABmAjXoYWIXumO4ZxeeQol7g4okbXFi86tw+3wBB+H6iDFMAOUC0SuF9SOnMDTupTn0Z2nTCFo3UmL11FuVTV0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pXZIn8yV; 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="pXZIn8yV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BC361F000FF; Sat, 12 Sep 2026 11:54:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789214080; bh=bw1vvl/K0EziYeg+JPnbSnmmTDvb7xrRwMFU+jFy7wA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pXZIn8yV9N1vX61yGlrB0uMK+KRVgeWJ9UcVkN6k8sN84Z7VlUVrgPlbucb6sT4JO D7zrLLD5l/WP8zx1o1en85MYQXtjLcJirpUnKWAgDzK/3rK8vcuvjxD2DQgNg0X6Mg VA9roy62L8hSm0xQ8vcPFWBX93R9r8ii4S70U2UQ= 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.12 0235/1376] scsi: qla2xxx: Dont query firmware state while chip is down Date: Sat, 12 Sep 2026 08:44:21 +0200 Message-ID: <20260912065612.783116719@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@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.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nilesh Javali commit e0cebe20dcffbed9c078fe30e2d18cd5046d9eff upstream. qla2x00_fw_state_show() initializes rval to QLA_FUNCTION_FAILED and jumps to the out: label when the chip is down or EEH is busy. The out: block then re-issued qla2x00_get_firmware_state() because rval != QLA_SUCCESS, defeating the chip-down/EEH-busy guards and issuing a mailbox command (outside optrom_mutex) during ISP reset or PCI error recovery, which can hang the adapter. It also turned a normal in-lock mailbox failure into a second unsynchronized mailbox attempt. Make the out: fallback only mark the firmware state as unknown. The mailbox is now issued at most once, inside optrom_mutex, and only when the chip is up and not EEH-busy. Fixes: b6faaaf796d7 ("scsi: qla2xxx: Serialize mailbox request") Cc: stable@vger.kernel.org Reported-by: Sashiko Signed-off-by: Nilesh Javali Link: https://patch.msgid.link/20260730155838.2119230-8-njavali@marvell.com Signed-off-by: Martin K. Petersen (Oracle) Signed-off-by: Greg Kroah-Hartman --- drivers/scsi/qla2xxx/qla_attr.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c @@ -1662,10 +1662,8 @@ qla2x00_fw_state_show(struct device *dev rval = qla2x00_get_firmware_state(vha, state); mutex_unlock(&vha->hw->optrom_mutex); out: - if (rval != QLA_SUCCESS) { + if (rval != QLA_SUCCESS) memset(state, -1, sizeof(state)); - rval = qla2x00_get_firmware_state(vha, state); - } return scnprintf(buf, PAGE_SIZE, "0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", state[0], state[1], state[2], state[3], state[4], state[5]);