Page MenuHomeFreeBSD

rtwn: fix RTL8192EU power-down / power-up hanging
ClosedPublic

Authored by adrian on Jan 11 2025, 3:02 PM.
Referenced Files
Unknown Object (File)
Fri, Feb 7, 10:52 AM
Unknown Object (File)
Tue, Feb 4, 9:40 PM
Unknown Object (File)
Sun, Feb 2, 8:55 PM
Unknown Object (File)
Fri, Jan 31, 6:39 PM
Unknown Object (File)
Sun, Jan 26, 12:20 AM
Unknown Object (File)
Sun, Jan 19, 10:33 PM
Unknown Object (File)
Sun, Jan 19, 8:25 PM
Unknown Object (File)
Thu, Jan 16, 8:10 AM
Subscribers

Details

Summary

The RTL8192EU NIC (on older USB 2/USB 3 ports, not on newer
USB 3 ports, that still needs to be fixed!) will attach, scan,
associate fine. However, restarting wpa_supplicant results in the
NIC hanging until you disconnect it.

It turns out early in the power_on sequence - BUT only after a
power_off - the NIC would suddenly stop responding to any USB
transfers. It doesn't require the MCU to be available for USB
transfers - the hardware itself does that - so something had to be
going very sideways.

I traced it down to these steps during the power_off sequence.
They don't exist in the Linux rtl8xxxu driver, and there are commits
earlier in their RTL8192EU bring-up that suggest the author was
facing similar power sequencing / re-sequencing issues.

This likely won't fix the actual channel programming /
power sequencing / deafness issues on later USB-3 ports.
There are other commits / fixes in the rtl8xxxu driver related to
RTL8192EU bring-up that we don't have.

Obtained from: Linux rtl8xxxu driver

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

adrian added a reviewer: cy.

cy - this likely won't change the rtl8192eu power / channel sequencing stuff (i'm working on that now, stay tuned) but it DOES make it so we can start/stop/start/stop/start wpa_supplicant and have the NIC survive it without crashing. Would you mind verifying that? Thanks!

This revision was not accepted when it landed; it landed in state Needs Review.Wed, Jan 22, 9:47 PM
This revision was automatically updated to reflect the committed changes.