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=1796381876; b=xAEd2ahDf+zY5XdT266M+xbMZck2ZX++u9cttGadpQlIdISfmx9IYPvaCLO8AWeozNjr 32BZCU6Gz1GmDmVP7EJktzoX9LmzhdUmx09q9gVGlHtwOi4hBRIobvL1Oz92/QyN7FzLF V6k9qYjnW9QsKC3Tn5uTd6MTVDfaTUXNYtyzBA1oTRg+e1dqMgx5VgwkVi8mXABURhHAP ypmHoOEpEkRf62whwV1tNQnRI8JEu/X6XJPUzOJFqWGVzSnYUO0a6rKXdPbSUgi32nei4 IGtTuRqdYvwmeq//Vfvz4TvvF6kJA2dfimR3rjubyO7TQpQG+Y9SLultn4ML7izcXOw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381876; 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=FtMXTjYTQeTtzUGePwTYLg07WxTHSlG34627S1W/VV8=; b=kVSWf3O3EprEsCKcmzoze5a2HXHqwddD2moK2uqtIVlKIl67vOSXivberABvL4QG2q54 sbDx4AIYs+9NX1ewSH8Fe7WPVbj1OS/MKt5A+cllpNFe3skLNUAI73tUcK+AhQUm6PE4r LV/VwXT6/z179NVGZrkKQV6H9JmPIk0190rTBp09c1kg6dF3dyJgJLVojqRvde1TwsSlj Yk/KEW3m01ytLHcGQIsWqnmgBX0BQe+/q9WvMkr7uZ318wCgOOwwx3KReMrU7FYROtsPY c4+eiuga3qMbQ83paAZYDlit+JC5oVB2CriHX/6lh+/ofUz8CWNejqYAGu2MBlu6IAA== 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=UiaQSRiG; 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 7DB89606A322; Fri, 4 Dec 2026 10:57:56 +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=UiaQSRiG Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6EED1F00931; Fri, 4 Dec 2026 10:57:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381876; bh=FtMXTjYTQeTtzUGePwTYLg07WxTHSlG34627S1W/VV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=UiaQSRiGlDq1IgJUIJX9kCqqiAa/uX/MhGBU9Zuxs9GU2VuT41/BmJhsJh8pZN4wP c8Pn2io7sosP7SukWEJ6uUs/bIWUh+/ad66v0Ft3/rDbzKfiSBFIrNIL558QySBVKK g/wU/6jaXJx5me+XnxoSCK5dGKpww5KO3QPSC2XQ= 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 6.18 212/703] Bluetooth: btintel_pcie: Set only MAC_INIT in btintel_pcie_mac_init() Date: Fri, 4 Dec 2026 19:01:51 +0900 Message-ID: <20261204100633.483107264@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-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 3799e5b20d5f7..c590f071e6889 100644 --- a/drivers/bluetooth/btintel_pcie.c +++ b/drivers/bluetooth/btintel_pcie.c @@ -555,14 +555,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