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

kernel Oops for xr819 module #12

Open
DeamonYang opened this issue Apr 23, 2020 · 1 comment
Open

kernel Oops for xr819 module #12

DeamonYang opened this issue Apr 23, 2020 · 1 comment

Comments

@DeamonYang
Copy link

Hello I'm try to use this xr819 driver for allwinner H6. My kernel version is mainline 5.3. I get the dmesg as follows:

[    9.100604] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[    9.109409] Mem abort info:
[    9.112205]   ESR = 0x96000004
[    9.115262]   Exception class = DABT (current EL), IL = 32 bits
[    9.121180]   SET = 0, FnV = 0
[    9.124234]   EA = 0, S1PTW = 0
[    9.127374] Data abort info:
[    9.130254]   ISV = 0, ISS = 0x00000004
[    9.134088]   CM = 0, WnR = 0
[    9.137059] user pgtable: 4k pages, 48-bit VAs, pgdp=00000000a2fea000
[    9.143497] [0000000000000000] pgd=0000000000000000
[    9.148378] Internal error: Oops: 96000004 [#1] PREEMPT SMP
[    9.153948] Modules linked in: xradio_wlan(+) crct10dif_ce dwmac_sun8i rfkill_gpio ipv6 nf_defrag_ipv6
[    9.163269] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.3.5-g45c72b0-dirty #24
[    9.170489] Hardware name: Tanix TX6 (DT)
[    9.174500] pstate: a0000085 (NzCv daIf -PAN -UAO)
[    9.179303] pc : __wake_up_common+0x60/0x150
[    9.183574] lr : __wake_up_common_lock+0x80/0xc8
[    9.188190] sp : ffff000010003cf0
[    9.191503] x29: ffff000010003cf0 x28: 0000000000000000 
[    9.196816] x27: 0000000000000000 x26: 0000000000000001 
[    9.202129] x25: 0000000000000000 x24: 0000000000000000 
[    9.207441] x23: 0000000000000003 x22: ffff80006315e360 
[    9.212754] x21: ffff000010003da0 x20: 0000000000000001 
[    9.218066] x19: ffff80006315e358 x18: 0000000000000000 
[    9.223379] x17: 0000000000000000 x16: 0000000000000000 
[    9.228691] x15: 0000000000000000 x14: 0000000000000000 
[    9.234003] x13: 0000000000000000 x12: 0000000000000000 
[    9.239316] x11: 0000000000000003 x10: 0000000000000040 
[    9.244628] x9 : ffff000010ec0c10 x8 : ffff000010ec0c08 
[    9.249940] x7 : ffff800064dacbb0 x6 : ffffffffffffffe8 
[    9.255252] x5 : ffff000010003da0 x4 : 0000000000000000 
[    9.260565] x3 : 0000000000000000 x2 : 0000000000000001 
[    9.265877] x1 : 0000000000000003 x0 : 0000000000000000 
[    9.271189] Call trace:
[    9.273640]  __wake_up_common+0x60/0x150
[    9.277564]  __wake_up_common_lock+0x80/0xc8
[    9.281835]  __wake_up+0x14/0x20
[    9.285092]  xradio_irq_handler+0x28/0x30 [xradio_wlan]
[    9.290337]  sdio_irq_handler+0x14/0x28 [xradio_wlan]
[    9.295392]  __handle_irq_event_percpu+0x74/0x188
[    9.300098]  handle_irq_event_percpu+0x34/0x88
[    9.304542]  handle_irq_event+0x48/0x78
[    9.308381]  handle_fasteoi_irq+0xb4/0x188
[    9.312478]  generic_handle_irq+0x24/0x38
[    9.316492]  sunxi_pinctrl_irq_handler+0x120/0x1c0
[    9.321283]  generic_handle_irq+0x24/0x38
[    9.325294]  __handle_domain_irq+0x5c/0xb0
[    9.329392]  gic_handle_irq+0x58/0xa8
[    9.333055]  el1_irq+0xb8/0x180
[    9.336200]  arch_cpu_idle+0x10/0x18
[    9.339780]  do_idle+0x1d0/0x2b0
[    9.343011]  cpu_startup_entry+0x20/0x28
[    9.346937]  rest_init+0xd4/0xe0
[    9.350171]  arch_call_rest_init+0xc/0x14
[    9.354184]  start_kernel+0x460/0x48c
[    9.357851] Code: 2a0103f7 f9002bbb aa0403f9 5280001b (f9400cd3) 
[    9.363950] ---[ end trace 0fb63f6098d742c3 ]---
[    9.368568] Kernel panic - not syncing: Fatal exception in interrupt
[    9.374922] SMP: stopping secondary CPUs
[    9.378846] Kernel Offset: disabled
[    9.382336] CPU features: 0x0002,20002004
[    9.386344] Memory Limit: none
[    9.389403] Rebooting in 10 seconds..

My dts file :

#include "sun50i-h6.dtsi"
#include <dt-bindings/gpio/gpio.h>

/ {
	model = "Tanix TX6";
	compatible = "oranth,tanix-tx6", "allwinner,sun50i-h6";

	aliases {
		ethernet0 = &emac;
		ethernet1 = &xr819wifi;
		serial0 = &uart0;
	};

	vdd_wifi: vdd_wifi {
		compatible = "regulator-fixed";
		regulator-name = "wifi";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; //PH4
		startup-delay-us = <70000>;
		enable-active-high;
	};

	
	pwrseq_wifi: pwrseq_wifi@0 {
		compatible = "mmc-pwrseq-simple";
//		pinctrl-names = "default";
//		pinctrl-0 = <&wifi_rst>;
		reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; //PM3
		post-power-on-delay-ms = <50>;
	};
	
};



&mmc1 {
//	pinctrl-names = "default";
//	pinctrl-0 = <&mmc1_pins>;
	vqmmc-supply = <&vdd_wifi>;
	vmmc-supply = <&reg_vcc3v3>;
	mmc-pwrseq = <&pwrseq_wifi>;
	bus-width = <4>;
	non-removable;
	status = "okay";

        xr819wifi: xr819wifi@1 {
                reg = <1>;
                compatible = "xradio,xr819";
//                pinctrl-names = "default";
//                pinctrl-0 = <&wifi_wake>;
                interrupt-parent = <&r_pio>;
                interrupts = <1 0 IRQ_TYPE_LEVEL_LOW>; /* PM0 *///<6 10 IRQ_TYPE_EDGE_RISING>;
                interrupt-names = "host-wake";
                local-mac-address = [dc 44 6d c0 ff ee];
        };
};

can you gave me some advice about how to address this problem? tks.
best wishes.

@DeamonYang
Copy link
Author

Oh ,I find That I used set wrong IRQ triger. It should be IRQ_TYPE_EDGE_RISING rather then IRQ_TYPE_LEVEL_LOW in the node of xr819wifi.
However there are another problem, the dmesg print
[ 9.863477] xradio_wlan mmc1:0001:1: bh thread exiting
how can I fix it.
best wishes

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

1 participant