]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: btintel_pcie: treat boot stage bit 12 as warning
authorSai Teja Aluvala <aluvala.sai.teja@intel.com>
Mon, 20 Apr 2026 17:37:35 +0000 (23:07 +0530)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 6 May 2026 20:21:34 +0000 (16:21 -0400)
CSR boot stage register bit 12 is documented as a device warning,
not a fatal error. Rename the bit definition accordingly and stop
including it in btintel_pcie_in_error().

This keeps warning-only boot stage values from being classified as
errors while preserving abort-handler state as the actual error
condition.

Fixes: 190377500fde ("Bluetooth: btintel_pcie: Dump debug registers on error")
Signed-off-by: Kiran K <kiran.k@intel.com>
Signed-off-by: Sai Teja Aluvala <aluvala.sai.teja@intel.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btintel_pcie.c
drivers/bluetooth/btintel_pcie.h

index 2f59c0d6f9ec4c4c826f284987d03e2b3b8fd814..a3643e67b33fd18908db1dcf4adcfdf19c9a9842 100644 (file)
@@ -289,6 +289,9 @@ static inline void btintel_pcie_dump_debug_registers(struct hci_dev *hdev)
        skb_put_data(skb, buf, strlen(buf));
        data->boot_stage_cache = reg;
 
+       if (reg & BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_WARNING)
+               bt_dev_warn(hdev, "Controller device warning (boot_stage: 0x%8.8x)", reg);
+
        reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_IPC_STATUS_REG);
        snprintf(buf, sizeof(buf), "ipc status: 0x%8.8x", reg);
        skb_put_data(skb, buf, strlen(buf));
@@ -880,8 +883,11 @@ static inline bool btintel_pcie_in_lockdown(struct btintel_pcie_data *data)
 
 static inline bool btintel_pcie_in_error(struct btintel_pcie_data *data)
 {
-       return (data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_ERR) ||
-               (data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_ABORT_HANDLER);
+       if (data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_WARNING)
+               bt_dev_warn(data->hdev, "Controller device warning (boot_stage: 0x%8.8x)",
+                           data->boot_stage_cache);
+
+       return  data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_ABORT_HANDLER;
 }
 
 static void btintel_pcie_msix_gp1_handler(struct btintel_pcie_data *data)
@@ -914,7 +920,8 @@ static void btintel_pcie_msix_gp0_handler(struct btintel_pcie_data *data)
                data->img_resp_cache = reg;
 
        if (btintel_pcie_in_error(data)) {
-               bt_dev_err(data->hdev, "Controller in error state");
+               bt_dev_err(data->hdev, "Controller in error state (boot_stage: 0x%8.8x)",
+                          data->boot_stage_cache);
                btintel_pcie_dump_debug_registers(data->hdev);
                return;
        }
index 3c7bb708362ded4e7168db0b9b3c552b773064c5..f922abd1e7d88191d2ae6a5635f0b51a5affd235 100644 (file)
@@ -48,7 +48,7 @@
 #define BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW               (BIT(2))
 #define BTINTEL_PCIE_CSR_BOOT_STAGE_ROM_LOCKDOWN       (BIT(10))
 #define BTINTEL_PCIE_CSR_BOOT_STAGE_IML_LOCKDOWN       (BIT(11))
-#define BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_ERR         (BIT(12))
+#define BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_WARNING     (BIT(12))
 #define BTINTEL_PCIE_CSR_BOOT_STAGE_ABORT_HANDLER      (BIT(13))
 #define BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_HALTED      (BIT(14))
 #define BTINTEL_PCIE_CSR_BOOT_STAGE_MAC_ACCESS_ON      (BIT(16))