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 6635456C658; Wed, 9 Sep 2026 14:29:51 +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=1788964192; cv=none; b=J7WxhNF1KWiTNc1W5IJpowblfiowqtgjPx9QfJUiK88C7oE8TfSmd6dImeoh+3ZzId4mmv1Cuey7QUAGVFWx3K3E0vnhHRHZq6JhqBlC8HQWAsdD5zfLV2vhBO8kmRwD9m0aUEGijwNQ21iyupIlilU7todoCJkFcerSlA1WH04= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788964192; c=relaxed/simple; bh=qtpDz7P2D+wZ7owRAnYPdc9rvP8iC6gLv43QrDYQOrE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UHa1kDO4sHo0IE5R2zmxZwMEks8+soOxHxzsxWoPK5EpaQz90r9CGpE3MN2N30xczC0DmgOUMC/s0afpanGbcWrYweY1Q8a8MLIZ9HMMxIgifejY3TbQ5VDl52digFG9+J/D5bPAjNOBALauFIpA55GW8j5DvAnmEl5LFh7cOWc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gh22oRlC; 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="gh22oRlC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 756081F00A3A; Wed, 9 Sep 2026 14:29:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788964191; bh=A2CqX+68PW2K9uW/O06KV03iSzNaKvnZFkPdaU5MfJQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gh22oRlCSu18Fh0muTmag39JnkygKen6ScBDvZN30IZdo5gh3n0b0aG9eJO7AvaZ5 E/ckTbkaVy7qzYFdmqwSojg9WkGx6VADKqghlUGBV/OKSJ92o97wHzb9Z9n1nsQlZ0 EpLEnb5do/g52bYfil/UbxNStkGRrH+jGvBCi7L4= 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.18 338/583] scsi: qla2xxx: Dont query firmware state while chip is down Date: Wed, 9 Sep 2026 15:40:23 +0200 Message-ID: <20260909134249.704510919@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260909134237.773280130@linuxfoundation.org> References: <20260909134237.773280130@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.18-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]);