Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Bluetooth: btintel_pcie: treat boot stage bit 12 as warning

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>

authored by

Sai Teja Aluvala and committed by
Luiz Augusto von Dentz
5917dd39 4e37f645

+11 -4
+10 -3
drivers/bluetooth/btintel_pcie.c
··· 289 289 skb_put_data(skb, buf, strlen(buf)); 290 290 data->boot_stage_cache = reg; 291 291 292 + if (reg & BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_WARNING) 293 + bt_dev_warn(hdev, "Controller device warning (boot_stage: 0x%8.8x)", reg); 294 + 292 295 reg = btintel_pcie_rd_reg32(data, BTINTEL_PCIE_CSR_IPC_STATUS_REG); 293 296 snprintf(buf, sizeof(buf), "ipc status: 0x%8.8x", reg); 294 297 skb_put_data(skb, buf, strlen(buf)); ··· 883 880 884 881 static inline bool btintel_pcie_in_error(struct btintel_pcie_data *data) 885 882 { 886 - return (data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_ERR) || 887 - (data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_ABORT_HANDLER); 883 + if (data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_WARNING) 884 + bt_dev_warn(data->hdev, "Controller device warning (boot_stage: 0x%8.8x)", 885 + data->boot_stage_cache); 886 + 887 + return data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_ABORT_HANDLER; 888 888 } 889 889 890 890 static void btintel_pcie_msix_gp1_handler(struct btintel_pcie_data *data) ··· 920 914 data->img_resp_cache = reg; 921 915 922 916 if (btintel_pcie_in_error(data)) { 923 - bt_dev_err(data->hdev, "Controller in error state"); 917 + bt_dev_err(data->hdev, "Controller in error state (boot_stage: 0x%8.8x)", 918 + data->boot_stage_cache); 924 919 btintel_pcie_dump_debug_registers(data->hdev); 925 920 return; 926 921 }
+1 -1
drivers/bluetooth/btintel_pcie.h
··· 48 48 #define BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW (BIT(2)) 49 49 #define BTINTEL_PCIE_CSR_BOOT_STAGE_ROM_LOCKDOWN (BIT(10)) 50 50 #define BTINTEL_PCIE_CSR_BOOT_STAGE_IML_LOCKDOWN (BIT(11)) 51 - #define BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_ERR (BIT(12)) 51 + #define BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_WARNING (BIT(12)) 52 52 #define BTINTEL_PCIE_CSR_BOOT_STAGE_ABORT_HANDLER (BIT(13)) 53 53 #define BTINTEL_PCIE_CSR_BOOT_STAGE_DEVICE_HALTED (BIT(14)) 54 54 #define BTINTEL_PCIE_CSR_BOOT_STAGE_MAC_ACCESS_ON (BIT(16))