On Sun, Oct 15, 2023 at 2:55 PM Maciej Żenczykowski maze@google.com wrote:
I've received reports that an ethernet usb dongle doesn't work (google internal bug 304028301)...
Investigation shows that we have 5.10 (GKI) with USB_NET_AX8817X=y and AX88796B_PHY not set. I *think* this configuration combination makes no sense? [note: I'm unsure how many different phy's this driver supports...]
Obviously, we could simply turn it on 'manually'... but:
commit dde25846925765a88df8964080098174495c1f10 Author: Oleksij Rempel o.rempel@pengutronix.de Date: Mon Jun 7 10:27:22 2021 +0200
net: usb/phy: asix: add support for ax88772A/C PHYs Add support for build-in x88772A/C PHYs Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
includes (as a side effect):
drivers/net/usb/Kconfig @@ -164,6 +164,7 @@ config USB_NET_AX8817X depends on USB_USBNET select CRC32 select PHYLIB
select AX88796B_PHY default y
which presumably makes this (particular problem) a non issue on 5.15+
I'm guessing the above fix (ie. commit dde25846925765a88df8964080098174495c1f10) could (should?) simply be backported to older stable kernels?
I've verified it cherrypicks cleanly and builds (on x86_64 5.10 gki), ie. $ git checkout android/kernel/common/android13-5.10 $ git cherry-pick -x dde25846925765a88df8964080098174495c1f10 $ make ARCH=x86_64 gki_defconfig $ egrep -i ax88796b < .config CONFIG_AX88796B_PHY=y $ make -j50 ./drivers/net/phy/ax88796b.o gets built
I've sourced a copy of the problematic hardware, but I'm hitting problems where on at least two (both my chromebook and 1 of the 2 usb-c ports on my lenovo laptop) totally different usb controllers/ports it doesn't even usb enumerate (ie. nothing in dmesg, no show on lsusb), which is making testing difficult (unsure if I just got a bad sample)...
And actually looking longer at the logs:
usb 1-5: new high-speed USB device number 9 using xhci_hcd usb 1-5: New USB device found, idVendor=0b95, idProduct=772b, bcdDevice= 0.02 usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5: Product: AX88772C usb 1-5: Manufacturer: ASIX Elec. Corp. usb 1-5: SerialNumber: 000002 asix 1-5:1.0 (unnamed net_device) (uninitialized): PHY [usb-001:009:10] driver [Asix Electronics AX88772C] (irq=POLL) Asix Electronics AX88772C usb-001:009:10: attached PHY driver (mii_bus:phy_addr=usb-001:009:10, irq=POLL) asix 1-5:1.0 eth0: register 'asix' at usb-0000:00:14.0-5, ASIX AX88772B USB 2.0 Ethernet, 14:ae:85:70:44:29 asix 1-5:1.0 enx14ae85704429: renamed from eth0 asix 1-5:1.0 enx14ae85704429: configuring for phy/internal link mode usb 1-5: USB disconnect, device number 9 asix 1-5:1.0 enx14ae85704429: unregister 'asix' usb-0000:00:14.0-5, ASIX AX88772B USB 2.0 Ethernet
It looks like the rest of that patch is needed too, since it is a AX88772C phy.
This means even with the option manually enabled, we'd still need to cherrypick dde25846925765a88df8964080098174495c1f10 "net: usb/phy: asix: add support for ax88772A/C PHYs" since apparently this is simply new(ish) hardware with built-in x88772C PHY.