From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380195; b=yVdhz6ut5gpmCjXiZVYI4Lyad9NpzTLLYn8l8KD1xazonvcUt2AnKNYorUaJXAXXGAAx Wly9h4x/a9FvCHMiOIBEX+SpJIUt7pf0b0bZXRvbu4NhuSuCLiUDorQqcvwwLx9cvcjgq 8qqt54VaX5s/hedyyerU8elGYSmdtWrh3lF2SgzNnicTRZtOHyUdLifN8hb0NJIHsjpjB 5UieF21F23BHAYd/Ox8lMwKiQTAJr6OxWRopgcAfyyyXCKZfBg7AGJ5nZiJv2ztvAKyR6 JQOOXh1JniaXHGhzwQmU4068/ewBwrTq0jP1vhJLAFyTaV8T9Ocz++LFJYxXVJ/h/pQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380195; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=LafarAkWmycAt3YH6QIuUJxWu/TsC3RiaHpHS+WssZw=; b=yYwpKWPMvSYR3DNPP1/Xt6ouddn14uqfgzYW6TiG4bbmwGUIf4SsSPPFyndNus3XrJ/O LNQsB75MjvFPt5p09yyN4Dlps3611aRQHkfzWll3BFXc+2ebCreA9Os8qaz2qB103b6ej 5165pmuWBG2Zae6pa4xpkAM3S/tJKX3onr3FLUSVZRBtwa1+zJdjaBUpZMC9I/ytqTeNU DjGuQVHh31N11AInx1/vimPr+YeQ9lMEjBYLMW+pNDGjftRxm0jg4JUH8044kc0p+C5hI W2a0xc51EhJpmE++CQhQPSwTyyRm3Q34bw1JfJ5IyZi/0m2FJnIZjgdV3obEUaplnow== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=aO9qViqa; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D72EF606A32D; Fri, 4 Dec 2026 10:29:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=aO9qViqa Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20CDC1F000C2; Fri, 4 Dec 2026 10:29:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380195; bh=LafarAkWmycAt3YH6QIuUJxWu/TsC3RiaHpHS+WssZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aO9qViqaLZzJNBPcUyvHUNn1iurBt7tSY6BWV7jsKTxhW1nMsG+F7i5cpLXym9pFa 0dK6Pc6ntNQNOGgF2AJHpHYPu7M2bFEeVQFrMNQ6txDR0QKXF1ppZJzD/wSLamAzaF axI0PaRGowtzS+YS7BWcaubQo/dfjQiSdi8vGLg8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Paul Menzel , Kiran K , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 7.3 167/742] Bluetooth: btintel_pcie: Set only MAC_INIT in btintel_pcie_mac_init() Date: Fri, 4 Dec 2026 19:00:31 +0900 Message-ID: <20261204100639.539640197@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kiran K [ Upstream commit b535edbf51782cc38acc2e7a6f5ff590ab865c27 ] btintel_pcie_mac_init() is called prior to reading device memory via target access. To acquire MAC access, only the MAC_INIT and MAC_ACCESS_REQ bits in the function control register need to be programmed. Currently, btintel_pcie_mac_init() also modifies FUNC_ENA, FUNC_INIT, BUS_MASTER_DISCON, and SW_RESET, which are not relevant to MAC access (though doing so had no observed side effects). Leave those bits untouched and only set MAC_INIT if it is not already set. Fixes: b9465e6670a2 ("Bluetooth: btintel_pcie: Read hardware exception data") Assisted-by: Copilot:Gemini 4 Argon Reviewed-by: Paul Menzel Signed-off-by: Kiran K Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- drivers/bluetooth/btintel_pcie.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c index 85141532de602..7dcb515cf0f26 100644 --- a/drivers/bluetooth/btintel_pcie.c +++ b/drivers/bluetooth/btintel_pcie.c @@ -589,14 +589,11 @@ static void btintel_pcie_mac_init(struct btintel_pcie_data *data) { u32 reg; - /* Set MAC_INIT bit to start primary bootloader */ reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG); - reg &= ~(BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_INIT | - BTINTEL_PCIE_CSR_FUNC_CTRL_BUS_MASTER_DISCON | - BTINTEL_PCIE_CSR_FUNC_CTRL_SW_RESET); - reg |= (BTINTEL_PCIE_CSR_FUNC_CTRL_FUNC_ENA | - BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT); - btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG, reg); + if (!(reg & BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT)) { + reg |= BTINTEL_PCIE_CSR_FUNC_CTRL_MAC_INIT; + btintel_pcie_wr_reg32(data, BTINTEL_PCIE_CSR_FUNC_CTRL_REG, reg); + } } static int btintel_pcie_get_mac_access(struct btintel_pcie_data *data) -- 2.53.0