This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC3301:rmmod cc33xx + cc33xx_sDIO 在校准问题后失败

Guru**** 2481505 points
Other Parts Discussed in Thread: CC3301

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/wi-fi-group/wifi/f/wi-fi-forum/1353912/cc3301-rmmod-cc33xx-cc33xx_sdio-fails-after-calibration-issue

器件型号:CC3301

您好!

我们在代码中处理对 CC3301的 PG2和 PG1版本的支持、并放置了备用机制、以便在 PG2未正确加载时使用 PG1驱动程序。

我们的主要问题是`rmmod cc33xx && rmmod cc33xx_sDIO`在插入失败后不起作用,如下所示:

# modprobe cc33xx
# modprobe cc33xx_sdio
[  405.109329] cc33xx_sdio mmc2:0001:2: Using GPIO as IRQ
[  405.120114] cc33xx_driver cc33xx.1.auto: Direct firmware load for ti-connectivity/cc33xx-nvs.bin failed with error -2
[  407.644714] cc33xx_driver cc33xx.1.auto: Direct firmware load for ti-connectivity/static_calibration.bin failed with error -2
[  407.656104] wlcore: WARNING Could not get firmware ti-connectivity/static_calibration.bin: -2, proceeding with no calibration
[  407.667531] wlcore: ERROR FW is stuck, triggering recovery
[  409.686627] wlcore: WARNING CONFIGURE command NOK
[  409.691430] wlcore: WARNING acx command sending failed: -5
[  409.697974] wlcore: ERROR FW download failed

# rmmod cc33xx
# rmmod cc33xx_sdio
[  790.539493] Unable to handle kernel paging request at virtual address ffff800000f3e7c0
[  790.547478] Mem abort info:
[  790.550312]   ESR = 0x0000000086000007
[  790.554102]   EC = 0x21: IABT (current EL), IL = 32 bits
[  790.559469]   SET = 0, FnV = 0
[  790.562544]   EA = 0, S1PTW = 0
[  790.565675]   FSC = 0x07: level 3 translation fault
[  790.570551] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000082143000
[  790.577263] [ffff800000f3e7c0] pgd=10000000b7fff003, p4d=10000000b7fff003, pud=10000000b7ffe003, pmd=1000000086d06003, pte=0000000000000000
[  790.589793] Internal error: Oops: 0000000086000007 [#1] PREEMPT SMP
[  790.596051] Modules linked in: cc33xx_sdio(-) mac80211 libarc4 ppp_async crc_ccitt ppp_generic slhc can_isotp can_raw can cfg80211 rfkill cdc_acm xhci_plat_hcd iptable_filter ip_tables xt_tcpudp dwc3 xt_conntrack nf_conntrack l]
[  790.631700] CPU: 1 PID: 5712 Comm: irq/320-cc33xx Not tainted 6.1.46-g1d4b5da681 #1
[  790.639342] Hardware name: Generac CES Penguin2 (DT)
[  790.644293] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[  790.651240] pc : 0xffff800000f3e7c0
[  790.654730] lr : gpio_irq_thread_handler+0x24/0x3c [cc33xx_sdio]
[  790.660733] sp : ffff800009c3bdb0
[  790.664036] x29: ffff800009c3bdb0 x28: 0000000000000000 x27: 0000000000000000
[  790.671160] x26: ffff8000080b7a80 x25: ffff8000080b79d0 x24: ffff00000a621000
[  790.678283] x23: ffff000002d7f000 x22: 0000000000000001 x21: ffff000002b23900
[  790.685407] x20: ffff000002d7f000 x19: ffff00000a621000 x18: 0000000000000000
[  790.692530] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[  790.699652] x14: 0000000000000000 x13: 0000000000000000 x12: 0000000000000000
[  790.706775] x11: 0000000000000004 x10: 00000000000009b0 x9 : ffff800009c3bd50
[  790.713899] x8 : ffff000002b24310 x7 : ffff000037dac2c0 x6 : 0000000000000000
[  790.721022] x5 : 00000000410fd030 x4 : 0000000000000000 x3 : 0000000000000010
[  790.728145] x2 : ffff800000f7d694 x1 : ffff800000f3e7c0 x0 : ffff000006cd7c00
[  790.735269] Call trace:
[  790.737706]  0xffff800000f3e7c0
[  790.740841]  irq_thread_fn+0x2c/0xb0
[  790.744415]  irq_thread+0x16c/0x254
[  790.747895]  kthread+0x10c/0x110
[  790.751118]  ret_from_fork+0x10/0x20
[  790.754694] Code: bad PC value
[  790.757744] ---[ end trace 0000000000000000 ]---
[  790.762351] Kernel panic - not syncing: Oops: Fatal exception
[  790.768082] SMP: stopping secondary CPUs
[  790.771998] Kernel Offset: disabled
[  790.775474] CPU features: 0x00000,00800084,0000420b
[  790.780339] Memory Limit: none
[  790.783386] Rebooting in 3 seconds..

调查后、boot.c:cc33xx_init_fw (cc33xx.ko 的一部分)中的驱动程序代码似乎没有正确禁用 IRQ、以防出现校准数据错误:

	ret = wait_for_boot_irq(wl, HINT_FW_INIT_COMPLETE , CC33XX_BOOT_TIMEOUT);
	if (ret < 0)
		goto disable_irq;
	
	/* Get static calibration data and send it to FW*/
	ret = download_static_calibration_data(wl);
	if (ret < 0)
		return ret;

	ret = cc33xx_hw_init(wl);
	if (ret < 0)
		goto disable_irq;

在该错误情况下 IRQ 未正确禁用的情况下、cc33xx_sDIO 驱动程序无法正确卸载、因为 cc33xx_sDIO 中的 IRQ 处理代码似乎会在指向 cc33xx 模块中的一个函数时执行、该函数已被卸载。

使用

	/* Get static calibration data and send it to FW*/
	ret = download_static_calibration_data(wl);
	if (ret < 0)
		goto disable_irq;

解决卸载问题。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好、Bertrand、

    非常感谢、这可能会对其他客户有所帮助。 但是 、不会再生产 PG1器件、因此我们不会期望支持此类器件。