tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD urtwn wifi driver



> On Apr 25, 2023, at 5:44 AM, Martin Husemann <martin%duskware.de@localhost> wrote:
> 
> On Mon, Apr 24, 2023 at 07:21:23PM -0600, Brook Milligan wrote:
>> # ifconfig urtwn0 up
>> [ 1295.6492326] urtwn0: could not load firmware page 3
> 
> This means not all pages of the firmware could be uploaded to the chip,
> which is very strange (why would the chip accept the previous pages
> but not this one?) - maybe timing is marginal. Does it happen reproducably?

Not exactly.  Sometimes the firmware page (3 above) is different.  Sometimes the message is not there.  Sometimes it panics.

I have attached below a script of one session, highly edited to focus on just the urtwm0 interface.  It include the relevant kernel message bits and a bunch of ifconfig commands.  Note that the first instance panics immediately, reboots, and continues into another session.  Also notice that all the 'ifconfig up' commands take a long time, and the last one spent an estpaciallj long time.

Perhaps this helps?

>> Is anyone working on NetBSD wifi drivers?
> 
> I am (and a few others), but the branch is not ready for merging yet. 
> Especially the urtwn driver has changed quite a bit.

What would be helpful for getting this to work?

Cheers,
Brook


[   2.0340622] urtwn0 at uhub1 port 1
[   2.0340622] urtwn0: Realtek (0x20f4) 802.11n WLAN Adapter (0x648c), rev 2.00/2.00, addr 2
[   2.1640816] urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, address 3c:8c:f8:f8:4c:6d
[   2.1764987] urtwn0: 1 rx pipe, 2 tx pipes
[   2.1764987] urtwn0: link state DOWN (was UNKNOWN)

armv7# ifconfig urtwn0
urtwn0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 3c:8c:f8:f8:4c:6d
        media: IEEE802.11 autoselect (DS1)
        status: no network
armv7# ifcomnfig urtwn0 down
armv7# ifconfig urtwn0
urtwn0: flags=0x8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 3c:8c:f8:f8:4c:6d
        media: IEEE802.11 autoselect
        status: no network
armv7# ifconfig urtwn0 up
[  92.4412699] panic: kernel diagnostic assertion "ep->phase == IDLE" failed: file "/Users/brook/NetBSD/NetBSD/src-beaglebone/sys/dev/usb/motg.c", line 1361 
[  92.4551729] cpu0: Begin traceback...
[  92.4551729] 0xa76a5c5c: netbsd:db_panic+0x14
[  92.4612729] 0xa76a5c7c: netbsd:vpanic+0x114
[  92.4722212] 0xa76a5c94: netbsd:kern_assert+0x40
[  92.4822256] 0xa76a5cec: netbsd:motg_device_ctrl_start1+0x6c8
[  92.4926642] 0xa76a5d3c: netbsd:usbd_transfer+0x140
[  92.4926642] 0xa76a5d9c: netbsd:usbd_do_request_len+0x118
[  92.5033780] 0xa76a5dbc: netbsd:usbd_do_request+0x2c
[  92.5113672] 0xa76a5e04: netbsd:urtwn_write_region_1+0x90
[  92.5212850] 0xa76a5e44: netbsd:urtwn_write_4+0x128
[  92.5312781] 0xa76a5ee4: netbsd:urtwn_set_chan.constprop.0+0x3fc
[  92.5412755] 0xa76a5f3c: netbsd:urtwn_newstate_cb+0x3f8
[  92.5615276] 0xa76a5f6c: netbsd:urtwn_task+0x94
[  92.5722734] 0xa76a5fac: netbsd:usb_task_thread+0x188
[  92.5722734] cpu0: End traceback...

[  92.5841815] dump to dev 92,1 not possible
[  92.5881115] rebooting...

[   2.0340539] urtwn0 at uhub1 port 1
[   2.0340539] urtwn0: Realtek (0x20f4) 802.11n WLAN Adapter (0x648c), rev 2.00/2.00, addr 2
[   2.1540679] urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R, address 3c:8c:f8:f8:4c:6d
[   2.1677806] urtwn0: 1 rx pipe, 2 tx pipes
[   2.1677806] urtwn0: link state DOWN (was UNKNOWN)

urtwn0: timeout waiting for firmware readiness
[  32.9340718] cpsw0: link state UP (was DOWN)
armv7# ifconfig urtwn0
urtwn0: flags=0x8803<UP,BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 3c:8c:f8:f8:4c:6d
        media: IEEE802.11 autoselect
        status: no network
armv7# ifconfig urtwn0 down
armv7# ifconfig urtwn0
urtwn0: flags=0x8802<BROADCAST,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 3c:8c:f8:f8:4c:6d
        media: IEEE802.11 autoselect
        status: no network
armv7# ifconfig urtwn0 up
[  66.8726543] urtwn0: could not load firmware page 0
armv7# ifconfig urtwn0 down
armv7# ifconfig urtwn0 up
armv7# ifconfig urtwn0
urtwn0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 3c:8c:f8:f8:4c:6d
        media: IEEE802.11 autoselect (DS1)
        status: no network
armv7# ifconfig urtwn0 down
armv7# ifconfig urtwn0 up
armv7# ifconfig urtwn0
urtwn0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 3c:8c:f8:f8:4c:6d
        media: IEEE802.11 autoselect (DS1)
        status: no network
armv7# ifconfig urtwn0 down
armv7# ifconfig urtwn0 up
[ 128.9194109] urtwn0: timeout waiting for firmware readiness
armv7# ifconfig urtwn0 down
armv7# ifconfig urtwn0 up
armv7# ifconfig urtwn0
urtwn0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 3c:8c:f8:f8:4c:6d
        media: IEEE802.11 autoselect (DS1)
        status: no network
armv7# ifconfig urtwn0 down
armv7# ifconfig urtwn0 up
armv7# ifconfig urtwn0
urtwn0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 3c:8c:f8:f8:4c:6d
        media: IEEE802.11 autoselect (DS1)
        status: no network
armv7# ifconfig urtwn0 down
armv7# ifconfig urtwn0 up
armv7# ifconfig urtwn0
urtwn0: flags=0x8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        ssid ""
        powersave off
        address: 3c:8c:f8:f8:4c:6d
        media: IEEE802.11 autoselect (DS1)
        status: no network
armv7# ifconfig urtwn0 down
armv7# ifconfig urtwn0 up
[ 217.3847507] urtwn0: could not load firmware page 3
armv7# ifconfig urtwn0 down
armv7# ifconfig urtwn0 up
[ 756.9931622] urtwn0: timeout waiting for MAC auto ON



Home | Main Index | Thread Index | Old Index