Re: rt8000usb driver issue (maybe interaction with other drivers)

From: Stanislaw Gruszka
Date: Mon Oct 02 2023 - 14:57:45 EST



(cc list is too big, I shrink it)

On Sun, Oct 01, 2023 at 12:12:02PM +0700, Bagas Sanjaya wrote:
> On Sat, Sep 30, 2023 at 06:04:22PM -0400, enc0der wrote:
> > Hello all!
> >
> > This is the first time I have ever reported anything linux related, so
> > if this is not the proper way, please let me know what the correct way
> > is.
> >
> > I am using an NVIDIA Jetson Orin Nano developer platform. They
> > release what they call a jetpack that comes with linux and their
> > additions on top. We are using the latest version they release (just
> > released about a month ago)
>
> Something like a distro? What version?
>
> >
> > When I plug in a USB WiFi adapter that uses the rt8000usb driver, if I
> > connect to a network it sees, I get a kernel panic. If I have
> > "automatically connect" it kernel panics when I plug the USB in.
> >
> > The version of the kernel they ship is:
> >
> > 5.10.120-tegra. (tegra is their additions)
> >
> > I talked with NVIDIA first on what I was seeing and after looking at
> > my log, they said it is likely a driver problem.

Is possible that this is rt2800usb or usb host driver issue. But without
full logs we can not be sure.

> > Right after I plug in the device, this is the sequence of messages I see:
> >
> > [ 264.400281] BUG: scheduling while atomic: NetworkManager/622/0x00000203

After that message there should be stack trace visible. To debug this
you would need to find a way to see the full logs (dmesg/kmsg) after the crash.
It can be serial console, netconsole, pstore or some other thing. Perhaps
your platform allow to boot debug kernel with various check, which will
not panic when the bug occures and will show useful info in the logs.

> > [ 28.071586] lr : arm_smmu_dma_sync+0x40/0x70
> > [ 28.075965] sp : ffff8000100231a0
> > [ 28.079365] x29: 0000000000001000 x28: ffff4655c01d0ec0
> > [ 28.084817] x27: ffffaced1f227000 x26: ffff4655c6ee32c0
> > [ 28.090270] x25: 0000000000000000 x24: ffffaced1e405858
> > [ 28.095718] x23: ffff46572e84ae00 x22: ffff4655c6ee2c40
> > [ 28.101165] x21: ffff4655c82c3480 x20: ffffaced1db49e08
> > [ 28.106618] x19: ffff8000100231c0 x18: 0000000000010101
> > [ 28.112073] x17: 0000000000cccccc x16: ffffaced1d23382c
> > [ 28.117520] x15: 0000000000000000 x14: 0000000000000000
> > [ 28.122970] x13: 0000000000000001 x12: 0000000000000000
> > [ 28.128421] x11: 0000000000000008 x10: 0000000000000ab0
> > [ 28.133863] x9 : ffff800010023180 x8 : ffff4655c6ee3750
> > [ 28.139309] x7 : 000000067eb29c20 x6 : 0000000000000238
> > [ 28.144763] x5 : 00000000410fd420 x4 : 0000000000f0000f
> > [ 28.150214] x3 : 0000000000001000 x2 : ffff4655c82c3480
> > [ 28.155658] x1 : ffffaced1db49e08 x0 : ffff465704c37558
> > [ 28.161107] Call trace:
> > [ 28.163620] 0x1000
> > [ 28.165777] Code: bad PC value
> > [ 28.168911] ---[ end trace 62dc42c98ec427ca ]---
> > [ 28.183964] Kernel panic - not syncing: Oops: Fatal exception
> > [ 28.189864] SMP: stopping secondary CPUs
> > [ 29.275883] SMP: failed to stop secondary CPUs 0-5
> > [ 29.280811] Kernel Offset: 0x2ced0d200000 from 0xffff800010000000

This actually suggest that the issue is somewhere in the core.
But again, without full logs we can not be sure.

> > [ 29.287066] PHYS_OFFSET: 0xffffb9ab40000000
> > [ 29.291360] CPU features: 0x08040006,4a80aa38
> > [ 29.295832] Memory Limit: none
> > [ 29.309234] ---[ end Kernel panic - not syncing: Oops: Fatal exception ]---
> >
> > (This one I believe when I started with the wifi adapter connected to
> > USB3 and networking was set to automatically connect.
> >
> > I see in the git repo that these drivers have been changed over the
> > last few years. Given the age of the kernel that NVIDIA is using, I
> > am not sure how to correlate changes listed in the history of the
> > files with the release. I guess I could download and diff them until
> > I figure out where.

The rt2800 driver wasn't modified for ages. It's rater stable, but
perhaps there are issues in other involved modules i.e. mac80211.

Regards
Stanislaw