Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page Fault for QCA6174 #24

Open
NathanKuo0821 opened this issue Feb 14, 2020 · 13 comments
Open

Page Fault for QCA6174 #24

NathanKuo0821 opened this issue Feb 14, 2020 · 13 comments

Comments

@NathanKuo0821
Copy link

NathanKuo0821 commented Feb 14, 2020

I running QCA6174 with FreeBSD RELEASE 12.0 on my laptop, after load the driver the page fault error occurred.

I try to replace the board data based on issues #20 , but the issue still exist.

Does anyone have an idea for this issue? I need some help.

Infomation:
OS : FreeBSD 12.0
Driver : git clone --branch NEW_ATHP_ARVIF_LOCK https://github.com/Geramy/athp
Laptop : Lenovo T400

Command:
kldload athp_QCA6174_hw3.0_board.bin
kldload athp_QCA6174_hw3.0_firmware-4.bin
kldload if_athp

Log:
FreeBSD 12.0-RELEASE FreeBSD 12.0-RELEASE GENERIC amd64

panic: page fault

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...

Unread portion of the kernel message buffer:
athp0: wmi unified ready event not received

Fatal trap 12: page fault while in kernel mode
cpuid = 1; apic id = 01
fault virtual address = 0x58
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff82a26fc1
stack pointer = 0x28:0xfffffe002e63b6c0
frame pointer = 0x28:0xfffffe002e63b720
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = interrupt enabled, resume, IOPL = 0
current process = 0 (athp0 ath10k_at_wq)
trap number = 12
panic: page fault
cpuid = 1
time = 1581651376
KDB: stack backtrace:
0 0xffffffff80be7977 at kdb_backtrace+0x67
1 0xffffffff80b9b563 at vpanic+0x1a3
2 0xffffffff80b9b3b3 at panic+0x43
3 0xffffffff8107496f at trap_fatal+0x35f
4 0xffffffff810749c9 at trap_pfault+0x49
5 0xffffffff81073fee at trap+0x29e
6 0xffffffff8104f1d5 at calltrap+0x8
7 0xffffffff82a26e81 at ath10k_ce_init_pipe+0x31
8 0xffffffff82a28a59 at ath10k_pci_init_pipes+0x49
9 0xffffffff82a223a0 at ath10k_pci_warm_reset+0xf0
10 0xffffffff82a2225f at ath10k_pci_safe_chip_reset+0x3f
11 0xffffffff82a2a624 at ath10k_pci_hif_stop+0x64
12 0xffffffff82a2f14c at ath10k_hif_stop+0x2c
13 0xffffffff82a2e30b at ath10k_core_start+0x81b
14 0xffffffff82a2f837 at ath10k_core_probe_fw+0x2f7
15 0xffffffff82a32c88 at attempt_ath10k_core_probe_fw+0x18
16 0xffffffff82a30c97 at ath10k_core_register_work+0x27
17 0xffffffff80bf9cb4 at taskqueue_run_locked+0x154
Uptime: 4m44s

https://imgur.com/L4x229k
https://imgur.com/5fiUXcb
https://imgur.com/j6vGwho

Nathan Kuo

@NathanKuo0821
Copy link
Author

NathanKuo0821 commented Feb 17, 2020

After change the board data from the https://github.com/kvalo/ath10k-firmware/blob/master/QCA6174/hw3.0/board.bin , loading the driver work.

Now the issue is when I create the wlan interface by using command "ifconfig wlan0 create wlandev athp0" , the system panic , I need some help, plz.

The log:
athp0: ath10k_download_cal_dt: TODO: device tree check
athp0: ath10k_wmi_event_service_ready_work: TODO: EEPROM code: 0x0000006c
athp0: failed to enable PMF QOS: -35
kernel trap 12 with interrupts disabled

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address = 0x20
fault code = supervisor read data, page not present
instruction pointer = 0x20:0xffffffff80bfe337
stack pointer = 0x28:0xfffffe002e45e500
frame pointer = 0x28:0xfffffe002e45e510
code segment = base 0x0, limit 0xfffff, type 0x1b
= DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags = resume, IOPL = 0
current process = 1417 (ifconfig)
trap number = 12
panic: page fault
cpuid = 0
time = 1581899134
KDB: stack backtrace:
0 0xffffffff80be7977 at kdb_backtrace+0x67
1 0xffffffff80b9b563 at vpanic+0x1a3
2 0xffffffff80b9b3b3 at panic+0x43
3 0xffffffff8107496f at trap_fatal+0x35f
4 0xffffffff810749c9 at trap_pfault+0x49
5 0xffffffff81073fee at trap+0x29e
6 0xffffffff8104f1d5 at calltrap+0x8
7 0xffffffff80b7b149 at __mtx_unlock_sleep+0xb9
8 0xffffffff8296c356 at ath10k_start+0x6f6
9 0xffffffff829323a0 at athp_vap_create+0x60
10 0xffffffff80cd6ebd at wlan_clone_create+0xcd
11 0xffffffff80c9ec15 at if_clone_createif+0xb5
12 0xffffffff80c9c1c7 at ifioctl+0x5f7
13 0xffffffff80c04f3d at kern_ioctl+0x26d
14 0xffffffff80c04c5e at sys_ioctl+0x15e
15 0xffffffff81075449 at amd64_syscall+0x369
16 0xffffffff8104fabd at fast_syscall_common+0x101
Uptime: 2m19s
Dumping 370 out of 3938 MB:..5%..13%..22%..31%..44%..52%..61%..74%..83%..91%
Dump complete

@NathanKuo0821
Copy link
Author

Hey Guys,
Is anyone still here? Can you help?

Nathan Kuo

@nerzhul
Copy link

nerzhul commented Feb 27, 2020

Hello, i can confirm i have exactly the same problem, a panic due to a mutex, on FreeBSD current

@Geramy
Copy link
Contributor

Geramy commented May 8, 2020

Sorry I did not read the entire post we are currently working on mutex issues.

@Geramy
Copy link
Contributor

Geramy commented May 8, 2020

What machines or laptops are you guys running?

@NathanKuo0821
Copy link
Author

NathanKuo0821 commented May 8, 2020 via email

@nupfel
Copy link

nupfel commented May 8, 2020

i have an older razer blade 2015 model the QCA6174 is branded as "killer networking" wireless card

@nerzhul
Copy link

nerzhul commented May 9, 2020

hello @Geramy i'm on a acer aspire S13

@erikarn
Copy link
Owner

erikarn commented Jun 18, 2020

hi! Does anyone have the exact models of their cards? Even the FCC IDs stamped on them would be nice.

There are a handful of QCA6174 variants out there and they have different data path / command path needs.

I've fixed one bug in the RX path that caused a panic on my QCA6174 HW3.2, but there are other NICs out there and other bugs to chase.

I'd like to try and fix them all but I will need more NICs to test! Thanks!

@nerzhul
Copy link

nerzhul commented Jun 19, 2020

@erikarn just compiled your module (cheating on the MA_OWNED undefined in my case).

Here is the dmesg when i load the if_athp after compilation:

athp0: <QCA6174> mem 0xb1000000-0xb11fffff irq 17 at device 0.0 on pci1
athp_pci_attach: msicount=8, msixcount=0
athp0: athp_pci_attach: 8 MSI interrupts
athp0: ath10k_pci_alloc_pipes: WARNING: configuring 4k dmamap size for pipe 5; figure out what to do instead
athp0: ath10k_pci_alloc_pipes: WARNING: configuring 4k dmamap size for pipe 6; figure out what to do instead
athp0: athp_pci_attach: chipid: 0x00340aff
athp0: ath10k_fetch_fw_file: firmware_get: athp_cal-pci-athp0.bin
athp_cal-pci-athp0.bin: could not load firmware image, error 2
athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_board.bin
athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_firmware-5.bin
athp_QCA6174_hw3.0_firmware-5.bin: could not load firmware image, error 2
athp0: could not fetch firmware file 'athp_QCA6174_hw3.0/firmware-5.bin': -1
athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_firmware-4.bin
athp0: ath10k_core_init_firmware_features: hardware crypto
athp0: ath10k_download_cal_dt: TODO: device tree check

No interface appears in ifconfig, certainly due to the firmware issue

@nerzhul
Copy link

nerzhul commented Jun 19, 2020

i just cheated again, adding the new modules and replacing firmware-5 with firmware-6 (which exists not the first) in the code.
you have a PR adding the missing parts here: #36
Now i have a better dmesg output but no network card appear in ifconfig:

athp0: <QCA6174> mem 0xb1000000-0xb11fffff irq 17 at device 0.0 on pci1
athp_pci_attach: msicount=8, msixcount=0
athp0: athp_pci_attach: 8 MSI interrupts
athp0: ath10k_pci_alloc_pipes: WARNING: configuring 4k dmamap size for pipe 5; figure out what to do instead
athp0: ath10k_pci_alloc_pipes: WARNING: configuring 4k dmamap size for pipe 6; figure out what to do instead
athp0: athp_pci_attach: chipid: 0x00340aff
athp0: ath10k_fetch_fw_file: firmware_get: athp_cal-pci-athp0.bin
athp_cal-pci-athp0.bin: could not load firmware image, error 2
athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_board.bin
athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_firmware-6.bin
athp0: ath10k_core_init_firmware_features: hardware crypto
athp0: ath10k_download_cal_dt: TODO: device tree check
athp0: Unknown eventid: 3
athp0: ath10k_wmi_event_service_ready_work: TODO: EEPROM code: 0x0000006c
athp0: Unknown eventid: 118809
athp0: Unknown eventid: 90118
athp0: htt version request timed out
athp0: failed to setup htt: -60
athp0: ath10k_pci_irq_sync: TODO
athp0: ath10k_pci_kill_tasklet: called
athp0: ath10k_htt_tx_free: called
athp0: ath10k_htt_tx_free: tearing down htt locks
athp0: could not init core (-60)
athp0: could not probe fw, clean up allocations and memory and retry. (-60)
athp0: ath10k_fetch_fw_file: firmware_get: athp_cal-pci-athp0.bin
athp_cal-pci-athp0.bin: could not load firmware image, error 2
athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_board.bin
athp0: ath10k_fetch_fw_file: firmware_get: athp_QCA6174_hw3.0_firmware-6.bin
athp0: ath10k_core_init_firmware_features: hardware crypto
athp0: ath10k_download_cal_dt: TODO: device tree check
athp0: Unknown eventid: 3
athp0: ath10k_wmi_event_service_ready_work: TODO: EEPROM code: 0x0000006c
athp0: Unknown eventid: 118809
athp0: Unknown eventid: 90118
athp0: qca6174 hw3.2 (0x05030000, 0x00340aff) fw WLAN.RM.4.4.1-00140-QCARMSWPZ-1 api 5 htt-ver 3.60 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1 features wowlan,ignore-otp
athp0: ath10k_core_stop: state=0
athp0: ath10k_wait_for_suspend: state=0
athp0: ath10k_wmi_pdev_suspend_target: called
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
... (more than 100 times this entry)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: htc ep 2 out of TX credits (0 < 1)
athp0: ath10k_wmi_cmd_send: failed (-35)
athp0: could not suspend target (-35)
athp0: ath10k_pci_irq_sync: TODO
athp0: ath10k_pci_kill_tasklet: called
athp0: ath10k_htt_tx_free: called
athp0: ath10k_htt_tx_free: tearing down htt locks
athp0: ath10k_mac_register: called
athp0: athp_attach_net80211: called
athp_getradiocaps: called; maxchans=1024
athp0: athp_getradiocaps: enabling HT/VHT rates
athp_getradiocaps: done; maxchans=1024, nchans=278
athp0: athp_attach_11n: 2 tx streams, 2 rx streams
athp0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
athp0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
athp0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
athp0: 2T2R
athp0: 11na MCS 20MHz
athp0: MCS 0-7: 6.5Mbps - 65Mbps
athp0: MCS 8-15: 13Mbps - 130Mbps
athp0: 11na MCS 20MHz SGI
athp0: MCS 0-7: 7Mbps - 72Mbps
athp0: MCS 8-15: 14.5Mbps - 144.5Mbps
athp0: 11na MCS 40MHz:
athp0: MCS 0-7: 13.5Mbps - 135Mbps
athp0: MCS 8-15: 27Mbps - 270Mbps
athp0: 11na MCS 40MHz SGI:
athp0: MCS 0-7: 15Mbps - 150Mbps
athp0: MCS 8-15: 30Mbps - 300Mbps
athp0: 11ng MCS 20MHz
athp0: MCS 0-7: 6.5Mbps - 65Mbps
athp0: MCS 8-15: 13Mbps - 130Mbps
athp0: 11ng MCS 20MHz SGI
athp0: MCS 0-7: 7Mbps - 72Mbps
athp0: MCS 8-15: 14.5Mbps - 144.5Mbps
athp0: 11ng MCS 40MHz:
athp0: MCS 0-7: 13.5Mbps - 135Mbps
athp0: MCS 8-15: 27Mbps - 270Mbps
athp0: 11ng MCS 40MHz SGI:
athp0: MCS 0-7: 15Mbps - 150Mbps
athp0: MCS 8-15: 30Mbps - 300Mbps
athp0: [VHT] Channel Widths: 20MHz, 40MHz, 80MHz
athp0: [VHT] Features: 339011b2<MPDU11454,RXLDPC,SHORTGI80,RXSTBC1,RXSTBC2,BFEECAP>
athp0: [VHT] NSS 1: TX MCS 0..9, RX MCS 0..9
athp0: [VHT] NSS 2: TX MCS 0..9, RX MCS 0..9

@DH3S3N
Copy link

DH3S3N commented Aug 23, 2022

hi! Does anyone have the exact models of their cards? Even the FCC IDs stamped on them would be nice.

There are a handful of QCA6174 variants out there and they have different data path / command path needs.

I've fixed one bug in the RX path that caused a panic on my QCA6174 HW3.2, but there are other NICs out there and other bugs to chase.

I'd like to try and fix them all but I will need more NICs to test! Thanks!

Alienware 15 R2 (Killer 1535)
MSIP-CRM-ATH-QCNFA364A
FCC ID: PPD-QCNFA364AH
Qualcomm Atheros
Model: QCNFA364A
CMIITID:2015AJ1614(M)
IC: 4104A-QCNFA364A
CCAI15LP0770T

Dual-band-Killer1535-802-11ac-M-2-Wireless-Card-For-Bigfoot-Killer-Wireless-AC-1535-Atheros jpg_220x220
Dual-band-Killer1535-802-11ac-M-2-Wireless-Card-For-Bigfoot-Killer-Wireless-AC-1535-Atheros jpg_220x220-2

Output from pciconf
none3@pci0:60:0:0: class=0x028000 rev=0x32 hdr=0x00 vendor=0x168c device=0x003e subvendor=0x1a56 subdevice=0x1535 vendor = 'Qualcomm Atheros' device = 'QCA6174 802.11ac Wireless Network Adapter' class = network

PS - The pciconf output is from a fresh install with GENERIC kernel. I have not tried to (compiled or) loaded the drivers from the repo.

@erikarn
Copy link
Owner

erikarn commented Aug 23, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants