* [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list
@ 2024-02-05 10:40 Christian Hewitt
2024-02-05 10:40 ` [PATCH 2/2] net: asix: cosmetic tidying of the usb " Christian Hewitt
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Christian Hewitt @ 2024-02-05 10:40 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Grant Grundler, linux-usb, netdev, linux-kernel
Add a generic AX88179A entry for the 0b95:1790 device id:
kernel: usb 2-1: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 2.00
kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
kernel: usb 2-1: Product: AX88179A
kernel: usb 2-1: Manufacturer: ASIX
kernel: usb 2-1: SerialNumber: 00D24DC0
kernel: asix 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0000: -32
kernel: asix: probe of 2-1:1.0 failed with error -32
kernel: ax88179_178a 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0040: -32
kernel: ax88179_178a 2-1:1.0 eth1: register 'ax88179_178a' at usb-0000:01:00.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 20:7b:d2:d2:4d:c0
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
The change is tested by a LibreELEC (distro) user who reports the NIC to be working
fine (and logs support this) but the "Failed to read reg index 0x0000: -32" errors
suggest ax88178_info might not be the correct choice. I'm not a serious coder so I
need to "ask the audience" for suggestions on what more might be needed?
drivers/net/usb/asix_devices.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c
index f7cff58fe044..9a7b1136cd98 100644
--- a/drivers/net/usb/asix_devices.c
+++ b/drivers/net/usb/asix_devices.c
@@ -1506,6 +1506,10 @@ static const struct usb_device_id products [] = {
// ASIX AX88178 10/100/1000
USB_DEVICE (0x0b95, 0x1780),
.driver_info = (unsigned long) &ax88178_info,
+}, {
+ // ASIX AX88179A 10/100/1000
+ USB_DEVICE(0x0b95, 0x1790),
+ .driver_info = (unsigned long)&ax88178_info,
}, {
// Logitec LAN-GTJ/U2A
USB_DEVICE (0x0789, 0x0160),
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 2/2] net: asix: cosmetic tidying of the usb device list 2024-02-05 10:40 [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list Christian Hewitt @ 2024-02-05 10:40 ` Christian Hewitt 2024-02-05 14:03 ` [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A " Andrew Lunn 2024-02-10 18:20 ` Grant Grundler 2 siblings, 0 replies; 7+ messages in thread From: Christian Hewitt @ 2024-02-05 10:40 UTC (permalink / raw) To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Grant Grundler, linux-usb, netdev, linux-kernel Cosmetic corrections for tabs/spaces, capital letters, and formatting. Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> --- While checking the patch for adding the ID's (cribbing the format from the existing entries) checkpatch complained about "space prohibited between function name and open parenthesis" and "No space is necessary after a cast"; so this patch fixes the same issues on the existing ID's in the same list. While here, also fix some tabs/spaces and Capitals for consistency. drivers/net/usb/asix_devices.c | 136 ++++++++++++++++----------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c index 9a7b1136cd98..56ea5a943a16 100644 --- a/drivers/net/usb/asix_devices.c +++ b/drivers/net/usb/asix_devices.c @@ -1424,152 +1424,152 @@ static const struct driver_info hg20f9_info = { static const struct usb_device_id products [] = { { // Linksys USB200M - USB_DEVICE (0x077b, 0x2226), - .driver_info = (unsigned long) &ax8817x_info, + USB_DEVICE(0x077b, 0x2226), + .driver_info = (unsigned long)&ax8817x_info, }, { // Netgear FA120 - USB_DEVICE (0x0846, 0x1040), - .driver_info = (unsigned long) &netgear_fa120_info, + USB_DEVICE(0x0846, 0x1040), + .driver_info = (unsigned long)&netgear_fa120_info, }, { // DLink DUB-E100 - USB_DEVICE (0x2001, 0x1a00), - .driver_info = (unsigned long) &dlink_dub_e100_info, + USB_DEVICE(0x2001, 0x1a00), + .driver_info = (unsigned long)&dlink_dub_e100_info, }, { // Intellinet, ST Lab USB Ethernet - USB_DEVICE (0x0b95, 0x1720), - .driver_info = (unsigned long) &ax8817x_info, + USB_DEVICE(0x0b95, 0x1720), + .driver_info = (unsigned long)&ax8817x_info, }, { // Hawking UF200, TrendNet TU2-ET100 - USB_DEVICE (0x07b8, 0x420a), - .driver_info = (unsigned long) &hawking_uf200_info, + USB_DEVICE(0x07b8, 0x420a), + .driver_info = (unsigned long)&hawking_uf200_info, }, { // Billionton Systems, USB2AR - USB_DEVICE (0x08dd, 0x90ff), - .driver_info = (unsigned long) &ax8817x_info, + USB_DEVICE(0x08dd, 0x90ff), + .driver_info = (unsigned long)&ax8817x_info, }, { // Billionton Systems, GUSB2AM-1G-B USB_DEVICE(0x08dd, 0x0114), - .driver_info = (unsigned long) &ax88178_info, + .driver_info = (unsigned long)&ax88178_info, }, { // ATEN UC210T - USB_DEVICE (0x0557, 0x2009), - .driver_info = (unsigned long) &ax8817x_info, + USB_DEVICE(0x0557, 0x2009), + .driver_info = (unsigned long)&ax8817x_info, }, { // Buffalo LUA-U2-KTX - USB_DEVICE (0x0411, 0x003d), - .driver_info = (unsigned long) &ax8817x_info, + USB_DEVICE(0x0411, 0x003d), + .driver_info = (unsigned long)&ax8817x_info, }, { // Buffalo LUA-U2-GT 10/100/1000 - USB_DEVICE (0x0411, 0x006e), - .driver_info = (unsigned long) &ax88178_info, + USB_DEVICE(0x0411, 0x006e), + .driver_info = (unsigned long)&ax88178_info, }, { // Sitecom LN-029 "USB 2.0 10/100 Ethernet adapter" - USB_DEVICE (0x6189, 0x182d), - .driver_info = (unsigned long) &ax8817x_info, + USB_DEVICE(0x6189, 0x182d), + .driver_info = (unsigned long)&ax8817x_info, }, { // Sitecom LN-031 "USB 2.0 10/100/1000 Ethernet adapter" - USB_DEVICE (0x0df6, 0x0056), - .driver_info = (unsigned long) &ax88178_info, + USB_DEVICE(0x0df6, 0x0056), + .driver_info = (unsigned long)&ax88178_info, }, { // Sitecom LN-028 "USB 2.0 10/100/1000 Ethernet adapter" - USB_DEVICE (0x0df6, 0x061c), - .driver_info = (unsigned long) &ax88178_info, + USB_DEVICE(0x0df6, 0x061c), + .driver_info = (unsigned long)&ax88178_info, }, { - // corega FEther USB2-TX - USB_DEVICE (0x07aa, 0x0017), - .driver_info = (unsigned long) &ax8817x_info, + // Corega FEther USB2-TX + USB_DEVICE(0x07aa, 0x0017), + .driver_info = (unsigned long)&ax8817x_info, }, { // Surecom EP-1427X-2 - USB_DEVICE (0x1189, 0x0893), - .driver_info = (unsigned long) &ax8817x_info, + USB_DEVICE(0x1189, 0x0893), + .driver_info = (unsigned long)&ax8817x_info, }, { - // goodway corp usb gwusb2e - USB_DEVICE (0x1631, 0x6200), - .driver_info = (unsigned long) &ax8817x_info, + // Goodway corp usb gwusb2e + USB_DEVICE(0x1631, 0x6200), + .driver_info = (unsigned long)&ax8817x_info, }, { // JVC MP-PRX1 Port Replicator - USB_DEVICE (0x04f1, 0x3008), - .driver_info = (unsigned long) &ax8817x_info, + USB_DEVICE(0x04f1, 0x3008), + .driver_info = (unsigned long)&ax8817x_info, }, { // Lenovo U2L100P 10/100 - USB_DEVICE (0x17ef, 0x7203), + USB_DEVICE(0x17ef, 0x7203), .driver_info = (unsigned long)&ax88772b_info, }, { // ASIX AX88772B 10/100 - USB_DEVICE (0x0b95, 0x772b), - .driver_info = (unsigned long) &ax88772b_info, + USB_DEVICE(0x0b95, 0x772b), + .driver_info = (unsigned long)&ax88772b_info, }, { // ASIX AX88772 10/100 - USB_DEVICE (0x0b95, 0x7720), - .driver_info = (unsigned long) &ax88772_info, + USB_DEVICE(0x0b95, 0x7720), + .driver_info = (unsigned long)&ax88772_info, }, { // ASIX AX88178 10/100/1000 - USB_DEVICE (0x0b95, 0x1780), - .driver_info = (unsigned long) &ax88178_info, + USB_DEVICE(0x0b95, 0x1780), + .driver_info = (unsigned long)&ax88178_info, }, { // ASIX AX88179A 10/100/1000 USB_DEVICE(0x0b95, 0x1790), .driver_info = (unsigned long)&ax88178_info, }, { // Logitec LAN-GTJ/U2A - USB_DEVICE (0x0789, 0x0160), - .driver_info = (unsigned long) &ax88178_info, + USB_DEVICE(0x0789, 0x0160), + .driver_info = (unsigned long)&ax88178_info, }, { // Linksys USB200M Rev 2 - USB_DEVICE (0x13b1, 0x0018), - .driver_info = (unsigned long) &ax88772_info, + USB_DEVICE(0x13b1, 0x0018), + .driver_info = (unsigned long)&ax88772_info, }, { // 0Q0 cable ethernet - USB_DEVICE (0x1557, 0x7720), - .driver_info = (unsigned long) &ax88772_info, + USB_DEVICE(0x1557, 0x7720), + .driver_info = (unsigned long)&ax88772_info, }, { // DLink DUB-E100 H/W Ver B1 - USB_DEVICE (0x07d1, 0x3c05), - .driver_info = (unsigned long) &ax88772_info, + USB_DEVICE(0x07d1, 0x3c05), + .driver_info = (unsigned long)&ax88772_info, }, { // DLink DUB-E100 H/W Ver B1 Alternate - USB_DEVICE (0x2001, 0x3c05), - .driver_info = (unsigned long) &ax88772_info, + USB_DEVICE(0x2001, 0x3c05), + .driver_info = (unsigned long)&ax88772_info, }, { - // DLink DUB-E100 H/W Ver C1 - USB_DEVICE (0x2001, 0x1a02), - .driver_info = (unsigned long) &ax88772_info, + // DLink DUB-E100 H/W Ver C1 + USB_DEVICE(0x2001, 0x1a02), + .driver_info = (unsigned long)&ax88772_info, }, { // Linksys USB1000 - USB_DEVICE (0x1737, 0x0039), - .driver_info = (unsigned long) &ax88178_info, + USB_DEVICE(0x1737, 0x0039), + .driver_info = (unsigned long)&ax88178_info, }, { // IO-DATA ETG-US2 - USB_DEVICE (0x04bb, 0x0930), - .driver_info = (unsigned long) &ax88178_info, + USB_DEVICE(0x04bb, 0x0930), + .driver_info = (unsigned long)&ax88178_info, }, { // Belkin F5D5055 USB_DEVICE(0x050d, 0x5055), - .driver_info = (unsigned long) &ax88178_info, + .driver_info = (unsigned long)&ax88178_info, }, { // Apple USB Ethernet Adapter USB_DEVICE(0x05ac, 0x1402), - .driver_info = (unsigned long) &ax88772_info, + .driver_info = (unsigned long)&ax88772_info, }, { // Cables-to-Go USB Ethernet Adapter USB_DEVICE(0x0b95, 0x772a), - .driver_info = (unsigned long) &ax88772_info, + .driver_info = (unsigned long)&ax88772_info, }, { // ABOCOM for pci USB_DEVICE(0x14ea, 0xab11), - .driver_info = (unsigned long) &ax88178_info, + .driver_info = (unsigned long)&ax88178_info, }, { // ASIX 88772a USB_DEVICE(0x0db0, 0xa877), - .driver_info = (unsigned long) &ax88772_info, + .driver_info = (unsigned long)&ax88772_info, }, { // Asus USB Ethernet Adapter - USB_DEVICE (0x0b95, 0x7e2b), + USB_DEVICE(0x0b95, 0x7e2b), .driver_info = (unsigned long)&ax88772b_info, }, { /* ASIX 88172a demo board */ USB_DEVICE(0x0b95, 0x172a), - .driver_info = (unsigned long) &ax88172a_info, + .driver_info = (unsigned long)&ax88172a_info, }, { /* * USBLINK HG20F9 "USB 2.0 LAN" @@ -1577,11 +1577,11 @@ static const struct usb_device_id products [] = { * doesn't (yet) conflict with any known Linksys product. */ USB_DEVICE(0x066b, 0x20f9), - .driver_info = (unsigned long) &hg20f9_info, + .driver_info = (unsigned long)&hg20f9_info, }, { // Linux Automation GmbH USB 10Base-T1L USB_DEVICE(0x33f7, 0x0004), - .driver_info = (unsigned long) &lxausb_t1l_info, + .driver_info = (unsigned long)&lxausb_t1l_info, }, { }, // END }; -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list 2024-02-05 10:40 [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list Christian Hewitt 2024-02-05 10:40 ` [PATCH 2/2] net: asix: cosmetic tidying of the usb " Christian Hewitt @ 2024-02-05 14:03 ` Andrew Lunn 2024-02-10 18:20 ` Grant Grundler 2 siblings, 0 replies; 7+ messages in thread From: Andrew Lunn @ 2024-02-05 14:03 UTC (permalink / raw) To: Christian Hewitt Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Grant Grundler, linux-usb, netdev, linux-kernel On Mon, Feb 05, 2024 at 10:40:48AM +0000, Christian Hewitt wrote: > Add a generic AX88179A entry for the 0b95:1790 device id: > > kernel: usb 2-1: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 2.00 > kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 > kernel: usb 2-1: Product: AX88179A > kernel: usb 2-1: Manufacturer: ASIX > kernel: usb 2-1: SerialNumber: 00D24DC0 > kernel: asix 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0000: -32 > kernel: asix: probe of 2-1:1.0 failed with error -32 > kernel: ax88179_178a 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0040: -32 > kernel: ax88179_178a 2-1:1.0 eth1: register 'ax88179_178a' at usb-0000:01:00.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 20:7b:d2:d2:4d:c0 > > Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> > --- > The change is tested by a LibreELEC (distro) user who reports the NIC to be working > fine (and logs support this) but the "Failed to read reg index 0x0000: -32" errors > suggest ax88178_info might not be the correct choice. I'm not a serious coder so I > need to "ask the audience" for suggestions on what more might be needed? I would probably start by determining what ax88179_read_cmd() is causing that print. Maybe print in addition cmd, and value. Or add a WARN() so you get a stack trace. It might be possible to figure it out by just looking at the code. How many places actually pass index=0? Andrew ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list 2024-02-05 10:40 [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list Christian Hewitt 2024-02-05 10:40 ` [PATCH 2/2] net: asix: cosmetic tidying of the usb " Christian Hewitt 2024-02-05 14:03 ` [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A " Andrew Lunn @ 2024-02-10 18:20 ` Grant Grundler 2024-02-10 19:03 ` Grant Grundler 2024-02-10 19:11 ` Christian Hewitt 2 siblings, 2 replies; 7+ messages in thread From: Grant Grundler @ 2024-02-10 18:20 UTC (permalink / raw) To: Christian Hewitt Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Grant Grundler, linux-usb, netdev, linux-kernel On Mon, Feb 5, 2024 at 2:40 AM Christian Hewitt <christianshewitt@gmail.com> wrote: > > Add a generic AX88179A entry for the 0b95:1790 device id: > > kernel: usb 2-1: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 2.00 > kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 > kernel: usb 2-1: Product: AX88179A > kernel: usb 2-1: Manufacturer: ASIX > kernel: usb 2-1: SerialNumber: 00D24DC0 > kernel: asix 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0000: -32 > kernel: asix: probe of 2-1:1.0 failed with error -32 > kernel: ax88179_178a 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0040: -32 > kernel: ax88179_178a 2-1:1.0 eth1: register 'ax88179_178a' at usb-0000:01:00.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 20:7b:d2:d2:4d:c0 > > Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> > --- > The change is tested by a LibreELEC (distro) user who reports the NIC to be working > fine (and logs support this) but the "Failed to read reg index 0x0000: -32" errors > suggest ax88178_info might not be the correct choice. I'm not a serious coder so I > need to "ask the audience" for suggestions on what more might be needed? > > drivers/net/usb/asix_devices.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c > index f7cff58fe044..9a7b1136cd98 100644 > --- a/drivers/net/usb/asix_devices.c > +++ b/drivers/net/usb/asix_devices.c > @@ -1506,6 +1506,10 @@ static const struct usb_device_id products [] = { > // ASIX AX88178 10/100/1000 > USB_DEVICE (0x0b95, 0x1780), > .driver_info = (unsigned long) &ax88178_info, > +}, { > + // ASIX AX88179A 10/100/1000 > + USB_DEVICE(0x0b95, 0x1790), > + .driver_info = (unsigned long)&ax88178_info, > }, { Hi Christian! Seems like there are two problems here: 1) The USB output is telling you this device is a AX88179A : the changes most likely should be in ax88179_178a.c using the ax881798_info: https://elixir.bootlin.com/linux/latest/source/drivers/net/usb/ax88179_178a.c#L1690 2) What Andrew Lunn said. I'll add the asix driver should not be probing (or claiming) this device - or at least be quiet about it when it does. Thanks for looking into this! cheers, grant > // Logitec LAN-GTJ/U2A > USB_DEVICE (0x0789, 0x0160), > -- > 2.34.1 > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list 2024-02-10 18:20 ` Grant Grundler @ 2024-02-10 19:03 ` Grant Grundler 2024-02-10 19:11 ` Christian Hewitt 1 sibling, 0 replies; 7+ messages in thread From: Grant Grundler @ 2024-02-10 19:03 UTC (permalink / raw) To: Christian Hewitt Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Grant Grundler, linux-usb, netdev, linux-kernel On Sat, Feb 10, 2024 at 10:20 AM Grant Grundler <grundler@google.com> wrote: > > On Mon, Feb 5, 2024 at 2:40 AM Christian Hewitt > <christianshewitt@gmail.com> wrote: > > > > Add a generic AX88179A entry for the 0b95:1790 device id: > > > > kernel: usb 2-1: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 2.00 > > kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 > > kernel: usb 2-1: Product: AX88179A > > kernel: usb 2-1: Manufacturer: ASIX > > kernel: usb 2-1: SerialNumber: 00D24DC0 > > kernel: asix 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0000: -32 > > kernel: asix: probe of 2-1:1.0 failed with error -32 > > kernel: ax88179_178a 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0040: -32 > > kernel: ax88179_178a 2-1:1.0 eth1: register 'ax88179_178a' at usb-0000:01:00.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 20:7b:d2:d2:4d:c0 > > > > Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> > > --- > > The change is tested by a LibreELEC (distro) user who reports the NIC to be working > > fine (and logs support this) but the "Failed to read reg index 0x0000: -32" errors > > suggest ax88178_info might not be the correct choice. I'm not a serious coder so I > > need to "ask the audience" for suggestions on what more might be needed? > > > > drivers/net/usb/asix_devices.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c > > index f7cff58fe044..9a7b1136cd98 100644 > > --- a/drivers/net/usb/asix_devices.c > > +++ b/drivers/net/usb/asix_devices.c > > @@ -1506,6 +1506,10 @@ static const struct usb_device_id products [] = { > > // ASIX AX88178 10/100/1000 > > USB_DEVICE (0x0b95, 0x1780), > > .driver_info = (unsigned long) &ax88178_info, > > +}, { > > + // ASIX AX88179A 10/100/1000 > > + USB_DEVICE(0x0b95, 0x1790), > > + .driver_info = (unsigned long)&ax88178_info, > > }, { > > Hi Christian! > Seems like there are two problems here: > 1) The USB output is telling you this device is a AX88179A : the > changes most likely should be in ax88179_178a.c using the > ax881798_info: > https://elixir.bootlin.com/linux/latest/source/drivers/net/usb/ax88179_178a.c#L1690 Christian, Let me restate this more clearly: ax88179_178a is already claiming this device. No need to add anything to asix_devices.c > 2) What Andrew Lunn said. I'll add the asix driver should not be > probing (or claiming) this device - or at least be quiet about it when > it does. That's why Andrew was asking about where 0x40 index is used.... and it's not obvious to me either right now since I don't see a definition for register index 0x40 in ax88179_178a.c file. Since this is happening with both drivers (asix and ax88179_178a) and it looks like this is happening before SET_NETDEV_DEV() is called, I'm going to assume this has something to do with usbnet_probe() calling pm_runtime_enable(). Andrew's advice to add a WARN_ON call to the function printing "Failed to read reg index" on failure, is really good as it will tell us the exact call path through "a maze of twisty little passages, all the same" (to quote "colossal cave adventure" game from 1977 :D). cheers, grant > Thanks for looking into this! > > cheers, > grant > > > // Logitec LAN-GTJ/U2A > > USB_DEVICE (0x0789, 0x0160), > > -- > > 2.34.1 > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list 2024-02-10 18:20 ` Grant Grundler 2024-02-10 19:03 ` Grant Grundler @ 2024-02-10 19:11 ` Christian Hewitt 2024-02-10 19:40 ` Grant Grundler 1 sibling, 1 reply; 7+ messages in thread From: Christian Hewitt @ 2024-02-10 19:11 UTC (permalink / raw) To: Grant Grundler Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Grant Grundler, linux-usb, netdev, linux-kernel > On 10 Feb 2024, at 10:20 pm, Grant Grundler <grundler@google.com> wrote: > > On Mon, Feb 5, 2024 at 2:40 AM Christian Hewitt > <christianshewitt@gmail.com> wrote: >> >> Add a generic AX88179A entry for the 0b95:1790 device id: >> >> kernel: usb 2-1: New USB device found, idVendor=0b95, idProduct=1790, bcdDevice= 2.00 >> kernel: usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 >> kernel: usb 2-1: Product: AX88179A >> kernel: usb 2-1: Manufacturer: ASIX >> kernel: usb 2-1: SerialNumber: 00D24DC0 >> kernel: asix 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0000: -32 >> kernel: asix: probe of 2-1:1.0 failed with error -32 >> kernel: ax88179_178a 2-1:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0040: -32 >> kernel: ax88179_178a 2-1:1.0 eth1: register 'ax88179_178a' at usb-0000:01:00.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 20:7b:d2:d2:4d:c0 >> >> Signed-off-by: Christian Hewitt <christianshewitt@gmail.com> >> --- >> The change is tested by a LibreELEC (distro) user who reports the NIC to be working >> fine (and logs support this) but the "Failed to read reg index 0x0000: -32" errors >> suggest ax88178_info might not be the correct choice. I'm not a serious coder so I >> need to "ask the audience" for suggestions on what more might be needed? >> >> drivers/net/usb/asix_devices.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/net/usb/asix_devices.c b/drivers/net/usb/asix_devices.c >> index f7cff58fe044..9a7b1136cd98 100644 >> --- a/drivers/net/usb/asix_devices.c >> +++ b/drivers/net/usb/asix_devices.c >> @@ -1506,6 +1506,10 @@ static const struct usb_device_id products [] = { >> // ASIX AX88178 10/100/1000 >> USB_DEVICE (0x0b95, 0x1780), >> .driver_info = (unsigned long) &ax88178_info, >> +}, { >> + // ASIX AX88179A 10/100/1000 >> + USB_DEVICE(0x0b95, 0x1790), >> + .driver_info = (unsigned long)&ax88178_info, >> }, { > > Hi Christian! > Seems like there are two problems here: > 1) The USB output is telling you this device is a AX88179A : the > changes most likely should be in ax88179_178a.c using the > ax881798_info: > https://elixir.bootlin.com/linux/latest/source/drivers/net/usb/ax88179_178a.c#L1690 Yup, having sent the patch some git grep’ing showed me the newer driver already has the ID for the card included. > 2) What Andrew Lunn said. I'll add the asix driver should not be > probing (or claiming) this device - or at least be quiet about it when > it does. So the problem now is .. I have both drivers enabled in kernel config: https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/RPi/devices/RPi5/linux/linux.aarch64.conf#L2324-L2325 And This is a Linux 6.6.10 kernel boot (without this patch): https://paste.libreelec.tv/oriented-mastodon.log The card is visible on the USB bus but why isn’t the correct (newer) driver probing? ¯\_(ツ)_/¯ Christian ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list 2024-02-10 19:11 ` Christian Hewitt @ 2024-02-10 19:40 ` Grant Grundler 0 siblings, 0 replies; 7+ messages in thread From: Grant Grundler @ 2024-02-10 19:40 UTC (permalink / raw) To: Christian Hewitt Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, Grant Grundler, linux-usb, netdev, linux-kernel On Sat, Feb 10, 2024 at 11:11 AM Christian Hewitt <christianshewitt@gmail.com> wrote: ... > > 1) The USB output is telling you this device is a AX88179A : the > > changes most likely should be in ax88179_178a.c using the > > ax881798_info: > > https://elixir.bootlin.com/linux/latest/source/drivers/net/usb/ax88179_178a.c#L1690 > > Yup, having sent the patch some git grep’ing showed me the newer driver > already has the ID for the card included. > > > 2) What Andrew Lunn said. I'll add the asix driver should not be > > probing (or claiming) this device - or at least be quiet about it when > > it does. > > So the problem now is .. I have both drivers enabled in kernel config: > > https://github.com/LibreELEC/LibreELEC.tv/blob/master/projects/RPi/devices/RPi5/linux/linux.aarch64.conf#L2324-L2325 You have: CONFIG_USB_NET_AX8817X=m CONFIG_USB_NET_AX88179_178A=m CONFIG_NET_VENDOR_ASIX=y and CONFIG_INPUT_MOUSEDEV=y But also loads of other modules ("=m"). > And This is a Linux 6.6.10 kernel boot (without this patch): > https://paste.libreelec.tv/oriented-mastodon.log > > The card is visible on the USB bus but why isn’t the correct (newer) > driver probing? ¯\_(ツ)_/¯ I'm a bit confused too since the original email showed both asix and ax88179_178a drivers getting invoked. You should have seen the same previous failure with "Failed to read reg index 0x0040: -32". But since the kernel timestamps were clipped in that email, I'm now assuming the two messages were not printed at boot time (but rather much later). Perhaps someone forgot to load the ax88179_178a driver module after rebooting to their latest kernel build? My guess is the root file system (linux distro?) doesn't include udev at the moment. Normally, udev (user space) will "discover" the USB device and load the appropriate device driver *module* (based on device IDs listed in e.g. "modinfo ax88179_178a") Note that asix driver is built-in. If CONFIG_USB_NET_AX88179_178A=y were used instead, the system won't depend on udev. If my guess is correct, you might want to review the entire list of CONFIG...=m entries and determine which ones udev can help automatically load (I would not assume all of them) and which ones should always be loaded anyway (make them "=y"). cheers, grant > > Christian > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-02-10 19:40 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-02-05 10:40 [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A device list Christian Hewitt 2024-02-05 10:40 ` [PATCH 2/2] net: asix: cosmetic tidying of the usb " Christian Hewitt 2024-02-05 14:03 ` [PATCH 1/2] net: asix: add 0b95:1790 to AX88179A " Andrew Lunn 2024-02-10 18:20 ` Grant Grundler 2024-02-10 19:03 ` Grant Grundler 2024-02-10 19:11 ` Christian Hewitt 2024-02-10 19:40 ` Grant Grundler
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®