Casulo
(Casulo)
October 15, 2024, 9:05am
1
Hello guys,
So i have a QCNCM865 card. Makes the system reboot when the module gets loaded.
Details:
Log:
[Oct15 09:43] ath12k_pci 0000:01:00.0: vgaarb: pci_notify
[ +0.005246] ath12k_pci 0000:01:00.0: assign IRQ: got 0
[ +0.005431] ath12k_pci 0000:01:00.0: BAR 0 [mem 0x30200000-0x303fffff 64bit]: assigned
[ +0.007986] ath12k_pci 0000:01:00.0: enabling device (0000 -> 0002)
[ +0.006287] ath12k_pci 0000:01:00.0: enabling bus mastering
[ +0.005948] mtk-pcie-gen3 11300000.pcie: msi#0x10 address_hi 0x0 address_lo 0x11300c00 data 16
[ +0.008741] mtk-pcie-gen3 11300000.pcie: msi#0x11 address_hi 0x0 address_lo 0x11300c00 data 17
[ +0.008677] mtk-pcie-gen3 11300000.pcie: msi#0x12 address_hi 0x0 address_lo 0x11300c00 data 18
[ +0.008645] mtk-pcie-gen3 11300000.pcie: msi#0x13 address_hi 0x0 address_lo 0x11300c00 data 19
[ +0.008647] mtk-pcie-gen3 11300000.pcie: msi#0x14 address_hi 0x0 address_lo 0x11300c00 data 20
[ +0.008618] mtk-pcie-gen3 11300000.pcie: msi#0x15 address_hi 0x0 address_lo 0x11300c00 data 21
[ +0.008623] mtk-pcie-gen3 11300000.pcie: msi#0x16 address_hi 0x0 address_lo 0x11300c00 data 22
[ +0.008612] mtk-pcie-gen3 11300000.pcie: msi#0x17 address_hi 0x0 address_lo 0x11300c00 data 23
[ +0.008669] mtk-pcie-gen3 11300000.pcie: msi#0x18 address_hi 0x0 address_lo 0x11300c00 data 24
[ +0.008624] mtk-pcie-gen3 11300000.pcie: msi#0x19 address_hi 0x0 address_lo 0x11300c00 data 25
[ +0.008654] mtk-pcie-gen3 11300000.pcie: msi#0x1a address_hi 0x0 address_lo 0x11300c00 data 26
[ +0.008600] mtk-pcie-gen3 11300000.pcie: msi#0x1b address_hi 0x0 address_lo 0x11300c00 data 27
[ +0.008609] mtk-pcie-gen3 11300000.pcie: msi#0x1c address_hi 0x0 address_lo 0x11300c00 data 28
[ +0.008650] mtk-pcie-gen3 11300000.pcie: msi#0x1d address_hi 0x0 address_lo 0x11300c00 data 29
[ +0.008615] mtk-pcie-gen3 11300000.pcie: msi#0x1e address_hi 0x0 address_lo 0x11300c00 data 30
[ +0.008654] mtk-pcie-gen3 11300000.pcie: msi#0x1f address_hi 0x0 address_lo 0x11300c00 data 31
[ +0.008719] ath12k_pci 0000:01:00.0: MSI vectors: 16
[ +0.004969] ath12k_pci 0000:01:00.0: Hardware name: wcn7850 hw2.0
After this it just reboots, any ideas?
Casulo
(Casulo)
October 16, 2024, 9:58am
2
With this patch, it doesn’t crash/reboot, but it doesn’t start the card either:
Fix ltssm crashes on BPI-Rx boards.
Seems read32/write32 using wrong address which
is not a problem on x86/64 PCI controllers.
But have issues on BPI-Rx boards.
--- a/drivers/net/wireless/ath/ath12k/pci.c
+++ b/drivers/net/wireless/ath/ath12k/pci.c
@@ -277,6 +277,9 @@ static void ath12k_pci_enable_ltssm(stru
u32 val;
int i;
+ /* Prevent startup crash on BPI-Rx */
+ return;
+
val = ath12k_pci_read32(ab, PCIE_PCIE_PARF_LTSSM);
/* PCIE link seems very unstable after the Hot Reset*/
If i move the firmware files out, the log is the same.
modprobe -v ath12k debug_mask=0xffffffff
2024-10-15T20:08:06.167848+01:00 bpi-r4 kernel: [ 1681.508556] ath12k_pci 0001:01:00.0: vgaarb: pci_notify
2024-10-15T20:08:06.167899+01:00 bpi-r4 kernel: [ 1681.513805] ath12k_pci 0001:01:00.0: assign IRQ: got 0
2024-10-15T20:08:06.176140+01:00 bpi-r4 kernel: [ 1681.519354] ath12k_pci 0001:01:00.0: BAR 0 [mem 0x38200000-0x383fffff 64bit]: assigned
2024-10-15T20:08:06.188163+01:00 bpi-r4 kernel: [ 1681.527363] ath12k_pci 0001:01:00.0: enabling bus mastering
2024-10-15T20:08:06.188187+01:00 bpi-r4 kernel: [ 1681.532950] ath12k_pci 0001:01:00.0: boot pci_mem 0x000000000b4709b6
2024-10-15T20:08:06.188200+01:00 bpi-r4 kernel: [ 1681.539316] ath12k_pci 0001:01:00.0: pci probe 17cb:1107 1eac:8000
2024-10-15T20:08:06.210271+01:00 bpi-r4 kernel: [ 1681.545504] ath12k_pci 0001:01:00.0: pci tcsr_soc_hw_version major 2 minor 0
2024-10-15T20:08:06.210290+01:00 bpi-r4 kernel: [ 1681.552805] mtk-pcie-gen3 11310000.pcie: msi#0x10 address_hi 0x0 address_lo 0x11310c00 data 16
2024-10-15T20:08:06.210301+01:00 bpi-r4 kernel: [ 1681.561436] mtk-pcie-gen3 11310000.pcie: msi#0x11 address_hi 0x0 address_lo 0x11310c00 data 17
2024-10-15T20:08:06.227513+01:00 bpi-r4 kernel: [ 1681.570055] mtk-pcie-gen3 11310000.pcie: msi#0x12 address_hi 0x0 address_lo 0x11310c00 data 18
2024-10-15T20:08:06.227537+01:00 bpi-r4 kernel: [ 1681.578663] mtk-pcie-gen3 11310000.pcie: msi#0x13 address_hi 0x0 address_lo 0x11310c00 data 19
2024-10-15T20:08:06.244725+01:00 bpi-r4 kernel: [ 1681.587271] mtk-pcie-gen3 11310000.pcie: msi#0x14 address_hi 0x0 address_lo 0x11310c00 data 20
2024-10-15T20:08:06.244749+01:00 bpi-r4 kernel: [ 1681.595876] mtk-pcie-gen3 11310000.pcie: msi#0x15 address_hi 0x0 address_lo 0x11310c00 data 21
2024-10-15T20:08:06.261932+01:00 bpi-r4 kernel: [ 1681.604475] mtk-pcie-gen3 11310000.pcie: msi#0x16 address_hi 0x0 address_lo 0x11310c00 data 22
2024-10-15T20:08:06.261954+01:00 bpi-r4 kernel: [ 1681.613082] mtk-pcie-gen3 11310000.pcie: msi#0x17 address_hi 0x0 address_lo 0x11310c00 data 23
2024-10-15T20:08:06.279142+01:00 bpi-r4 kernel: [ 1681.621689] mtk-pcie-gen3 11310000.pcie: msi#0x18 address_hi 0x0 address_lo 0x11310c00 data 24
2024-10-15T20:08:06.279162+01:00 bpi-r4 kernel: [ 1681.630294] mtk-pcie-gen3 11310000.pcie: msi#0x19 address_hi 0x0 address_lo 0x11310c00 data 25
2024-10-15T20:08:06.296354+01:00 bpi-r4 kernel: [ 1681.638901] mtk-pcie-gen3 11310000.pcie: msi#0x1a address_hi 0x0 address_lo 0x11310c00 data 26
2024-10-15T20:08:06.296374+01:00 bpi-r4 kernel: [ 1681.647507] mtk-pcie-gen3 11310000.pcie: msi#0x1b address_hi 0x0 address_lo 0x11310c00 data 27
2024-10-15T20:08:06.313572+01:00 bpi-r4 kernel: [ 1681.656117] mtk-pcie-gen3 11310000.pcie: msi#0x1c address_hi 0x0 address_lo 0x11310c00 data 28
2024-10-15T20:08:06.313593+01:00 bpi-r4 kernel: [ 1681.664724] mtk-pcie-gen3 11310000.pcie: msi#0x1d address_hi 0x0 address_lo 0x11310c00 data 29
2024-10-15T20:08:06.330780+01:00 bpi-r4 kernel: [ 1681.673323] mtk-pcie-gen3 11310000.pcie: msi#0x1e address_hi 0x0 address_lo 0x11310c00 data 30
2024-10-15T20:08:06.330800+01:00 bpi-r4 kernel: [ 1681.681930] mtk-pcie-gen3 11310000.pcie: msi#0x1f address_hi 0x0 address_lo 0x11310c00 data 31
2024-10-15T20:08:06.344392+01:00 bpi-r4 kernel: [ 1681.690579] ath12k_pci 0001:01:00.0: MSI vectors: 16
2024-10-15T20:08:06.344411+01:00 bpi-r4 kernel: [ 1681.695551] ath12k_pci 0001:01:00.0: msi base data is 16
2024-10-15T20:08:06.355793+01:00 bpi-r4 kernel: [ 1681.700852] ath12k_pci 0001:01:00.0: Hardware name: wcn7850 hw2.0
2024-10-15T20:08:06.389554+01:00 bpi-r4 kernel: [ 1681.724674] ath12k_pci 0001:01:00.0: boot firmware request ath12k/WCN7850/hw2.0/firmware-2.bin size 15224888
2024-10-15T20:08:06.389587+01:00 bpi-r4 kernel: [ 1681.734504] ath12k_pci 0001:01:00.0: found fw timestamp 1725641048
2024-10-15T20:08:06.389605+01:00 bpi-r4 kernel: [ 1681.740691] ath12k_pci 0001:01:00.0: found m3 image ie (421880 B)
2024-10-15T20:08:06.408675+01:00 bpi-r4 kernel: [ 1681.746784] ath12k_pci 0001:01:00.0: found fw image ie (7278592 B)
2024-10-15T20:08:06.408691+01:00 bpi-r4 kernel: [ 1681.752953] ath12k_pci 0001:01:00.0: found dualmac fw image ie (7524352 B)
2024-10-15T20:08:06.408703+01:00 bpi-r4 kernel: [ 1681.759822] ath12k_pci 0001:01:00.0: found firmware features ie (1 B)
2024-10-15T20:08:06.424331+01:00 bpi-r4 kernel: [ 1681.766258] ath12k_pci 0001:01:00.0: features
2024-10-15T20:08:06.424344+01:00 bpi-r4 kernel: [ 1681.770606] ath12k_pci 0001:01:00.0: using fw api 2
2024-10-15T20:08:06.424356+01:00 bpi-r4 kernel: [ 1681.775486] ath12k_pci 0001:01:00.0: Assign MSI to user: MHI, num_vectors: 3, user_base_data: 16, base_vector: 0
2024-10-15T20:08:06.443546+01:00 bpi-r4 kernel: [ 1681.785657] ath12k_pci 0001:01:00.0: Number of assigned MSI for MHI is 3, base vector is 0
2024-10-15T20:08:06.443591+01:00 bpi-r4 kernel: [ 1681.794460] ath12k_pci 0001:01:00.0: Assign MSI to user: CE, num_vectors: 5, user_base_data: 19, base_vector: 3
2024-10-15T20:08:06.473603+01:00 bpi-r4 kernel: [ 1681.804673] ath12k_pci 0001:01:00.0: Assign MSI to user: DP, num_vectors: 8, user_base_data: 24, base_vector: 8
2024-10-15T20:08:06.473641+01:00 bpi-r4 kernel: [ 1681.814798] ath12k_pci 0001:01:00.0: irq:127 group:0
2024-10-15T20:08:06.473647+01:00 bpi-r4 kernel: [ 1681.819775] ath12k_pci 0001:01:00.0: irq:128 group:1
2024-10-15T20:08:06.473659+01:00 bpi-r4 kernel: [ 1681.824762] ath12k_pci 0001:01:00.0: irq:129 group:2
2024-10-15T20:08:06.483564+01:00 bpi-r4 kernel: [ 1681.829742] ath12k_pci 0001:01:00.0: irq:130 group:3
2024-10-15T20:08:06.483589+01:00 bpi-r4 kernel: [ 1681.834735] ath12k_pci 0001:01:00.0: irq:131 group:4
2024-10-15T20:08:06.493538+01:00 bpi-r4 kernel: [ 1681.839713] ath12k_pci 0001:01:00.0: irq:132 group:5
2024-10-15T20:08:06.505801+01:00 bpi-r4 kernel: [ 1681.844715] ath12k_pci 0001:01:00.0: irq:133 group:6
2024-10-15T20:08:06.505819+01:00 bpi-r4 kernel: [ 1681.849716] ath12k_pci 0001:01:00.0: pci after request_irq msi_ep_base_data 16
2024-10-15T20:08:06.516074+01:00 bpi-r4 kernel: [ 1681.857027] ath12k_pci 0001:01:00.0: cookie:0x0
2024-10-15T20:08:06.516091+01:00 bpi-r4 kernel: [ 1681.861562] ath12k_pci 0001:01:00.0: WLAON_WARM_SW_ENTRY 0x0
2024-10-15T20:08:06.546879+01:00 bpi-r4 kernel: [ 1681.887234] ath12k_pci 0001:01:00.0: WLAON_WARM_SW_ENTRY 0x0
2024-10-15T20:08:06.546893+01:00 bpi-r4 kernel: [ 1681.892893] ath12k_pci 0001:01:00.0: soc reset cause:0
2024-10-15T20:08:06.573503+01:00 bpi-r4 kernel: [ 1681.918033] ath12k_pci 0001:01:00.0: MHISTATUS 0xff04
2024-10-15T20:08:06.595511+01:00 bpi-r4 kernel: [ 1681.933081] ath12k_pci 0001:01:00.0: pci link_ctl 0x0040 L0s 0 L1 0
2024-10-15T20:08:06.595527+01:00 bpi-r4 kernel: [ 1681.939351] ath12k_pci 0001:01:00.0: pci reg 0x3164 instance 0x11 read val 0x11
2024-10-15T20:08:06.595549+01:00 bpi-r4 kernel: [ 1681.946653] ath12k_pci 0001:01:00.0: setting mhi state: INIT(0)
2024-10-15T20:08:06.614361+01:00 bpi-r4 kernel: [ 1681.955063] ath12k_pci 0001:01:00.0: setting mhi state: POWER_ON(2)
2024-10-15T20:08:06.614384+01:00 bpi-r4 kernel: [ 1681.961325] mhi mhi0: Requested to power ON
2024-10-15T20:08:06.614395+01:00 bpi-r4 kernel: [ 1681.965527] mhi mhi0: Power on setup success
2024-10-15T20:08:06.623524+01:00 bpi-r4 kernel: [ 1681.968231] mhi mhi0: Image transfer failed
2024-10-15T20:08:06.623555+01:00 bpi-r4 kernel: [ 1681.973970] mhi mhi0: Reg: ERROR_CODE value: 0xef120100
2024-10-15T20:08:06.637892+01:00 bpi-r4 kernel: [ 1681.979205] mhi mhi0: Reg: ERROR_DBG1 value: 0x6a880000
2024-10-15T20:08:06.637911+01:00 bpi-r4 kernel: [ 1681.984420] mhi mhi0: Reg: ERROR_DBG2 value: 0x0
2024-10-15T20:08:06.637916+01:00 bpi-r4 kernel: [ 1681.989035] mhi mhi0: Reg: ERROR_DBG3 value: 0x80000
2024-10-15T20:08:06.648818+01:00 bpi-r4 kernel: [ 1681.994120] mhi mhi0: MHI did not load image over BHI, ret: -5
2024-10-15T20:08:06.653519+01:00 bpi-r4 kernel: [ 1682.000028] ath12k_pci 0001:01:00.0: failed to set mhi state: POWER_ON(2)
2024-10-15T20:08:06.667290+01:00 bpi-r4 kernel: [ 1682.006868] ath12k_pci 0001:01:00.0: failed to start mhi: -110
2024-10-15T20:08:06.667304+01:00 bpi-r4 kernel: [ 1682.012693] ath12k_pci 0001:01:00.0: failed to power up :-110
2024-10-15T20:08:06.725730+01:00 bpi-r4 kernel: [ 1682.064693] ath12k_pci 0001:01:00.0: failed to create soc core: -110
2024-10-15T20:08:06.725750+01:00 bpi-r4 kernel: [ 1682.071042] ath12k_pci 0001:01:00.0: failed to init core: -110
2024-10-15T20:08:07.387602+01:00 bpi-r4 kernel: [ 1682.725386] ath12k_pci 0001:01:00.0: probe with driver ath12k_pci failed with error -110
2024-10-15T20:08:07.387641+01:00 bpi-r4 kernel: [ 1682.733493] ath12k_pci 0001:01:00.0: vgaarb: pci_notify