Linksys Gigabit USB2.0 adapter (asix) regression
Hi, I have kind of a difficult problem with my USB network adapter. It used to work using kernel 2.6.20.3, more or less, I needed to insert and remove the network cable from the device frequently to get it working, but then, at least, it worked. Now, using 2.6.22-rc2 it's not working anymore, at all. Ethtool shows "link up", tshark shows received packets, but any traffic sent to it seems to be discarded somewhere. First I tested it directly connected to an intel GB nic (which I tend to trust), then I tested it connected to an "el cheapo" GB switch, all the same problem. Finally I connected it to another nic on the same machine (netgear PC card GB nic), directly. Then I did a broadcast flood ping on both interfaces (to circumvent arp resolving), using -I eth1 and -I eth2 respectively, while running tshark on both interfaces. The result is that when I run the ping on the working nic, tshark on both interfaces show traffic. When I run the ping on the USB nic, tstark only shows traffic on the USB nic. This suggests that the USB is not actually (physically) sending data. On the other hand, the network activity led on the working nic does show full activity while running the ping from the USB nic. I am not too familiar with this matter, but to me this looks like the packets are actually output, but malformed in a way that the receiver discards them. Having tested this with multiple "receiving" nics it can't be an issue to a specific nic. To rule out the possibility of the nic being defective, I connected the USB nic to a windows computer. There it works, although the ethernet connection is a bit flaky (just like it seems...). Then I did a diff on the respective kernel sources of 2.6.20.3 and 2.6.22-rc2 (asix.c and usbnet.c), I found a few changes, but they do not seem to be related to my problem. I am the and of my repertoire here, can anyone please do some suggestions for further testing or even better, fix it ;-) Thanx. Data: skylla root:~ $ ethtool -i eth2 driver: asix version: 14-Jun-2006 firmware-version: ASIX AX88178 USB 2.0 Ethernet bus-info: usb-:00:1d.7-7 skylla root:~ $ ethtool eth2 Settings for eth2: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Advertised auto-negotiation: Yes Speed: 1000Mb/s Duplex: Full Port: MII PHYAD: 24 Transceiver: internal Auto-negotiation: on Supports Wake-on: pg Wake-on: d Current message level: 0x0007 (7) Link detected: yes skylla root:~ $ lsusb Bus 005 Device 055: ID 1737:0039 Bus 005 Device 054: ID 04a5:7008 Acer Peripherals Inc. (now BenQ Corp.) Bus 005 Device 053: ID 046d:c00e Logitech, Inc. M-BJ69 Optical Wheel Mouse Bus 005 Device 052: ID 05e3:0605 Genesys Logic, Inc. USB 2.0 Hub [ednet] Bus 005 Device 001: ID : Bus 004 Device 001: ID : Bus 003 Device 001: ID : Bus 002 Device 005: ID 413c:8103 Dell Computer Corp. Wireless 350 Bluetooth Bus 002 Device 001: ID : Bus 001 Device 001: ID : skylla root:~ $ ifconfig eth0 Link encap:Ethernet HWaddr *** inet addr: Bcast:10.15.255.255 Mask:255.248.0.0 inet6 addr: fe80::211:43ff:fe7a:6534/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:438135 errors:0 dropped:0 overruns:0 frame:0 TX packets:157631 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:456581138 (435.4 MiB) TX bytes:11777994 (11.2 MiB) Interrupt:18 eth1 Link encap:Ethernet HWaddr inet addr:10.255.0.1 Bcast:10.255.0.255 Mask:255.255.255.0 inet6 addr: fe80::214:6cff:fe87:a2c7/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:7651 errors:0 dropped:0 overruns:0 frame:0 TX packets:5184 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:806726 (787.8 KiB) TX bytes:3941441 (3.7 MiB) Interrupt:17 Base address:0xc000 eth2 Link encap:Ethernet HWaddr * inet addr:10.255.0.2 Bcast:10.255.0.255 Mask:255.255.255.0 inet6 addr: fe80::212:17ff:fef2:1a17/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:26414 errors:38 dropped:0 overruns:0 frame:38 TX packets:27449 errors:120 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2074027 (1.9 MiB) TX bytes:18700283 (17.8 MiB) loLink encap:Local Loopback
Re: Linksys Gigabit USB2.0 adapter (asix) regression
David Hollis wrote: > You wouldn't happen to know what PHY that device is using? The AX88178 > (Gigabit USB Ethernet) support in the driver currently only supports the > Marvell PHY, which is the only one I've actually encountered to-date. I'll quote a few of strings that are spewed that I assume might be interesting: drivers/net/usb/asix.c: GPIO Status: 0x0002 drivers/net/usb/asix.c: EEPROM index 0x17 is 0x0580 drivers/net/usb/asix.c: GPIO0: 0, PhyMode: 0 drivers/net/usb/asix.c: PHYID=0x01410cc2 usb%d: MII_MARVELL_STATUS = 0x848f usb%d: MII_MARVELL_LED_CTRL (1) = 0x4100 usb%d: MII_MARVELL_LED_CTRL (2) = 0x4101 - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
On Mon, 2007-06-25 at 19:05 +0200, Erik Slagter wrote: > drivers/net/usb/asix.c: PHYID=0x01410cc2 Ok, it is using a Marvell PHY so that part should be fine. You mentioned that it looks like the packets are being transmitted, but are garbled in some way. The device does prepend a 'header' to ethernet packets as they are transmitted down the USB pipe. The device strips this off and puts the packets on the wire. This could be where the issue lies. Are you on x86 by chance or something else? -- David Hollis <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
David Hollis wrote: > On Mon, 2007-06-25 at 19:05 +0200, Erik Slagter wrote: >> drivers/net/usb/asix.c: PHYID=0x01410cc2 > > Ok, it is using a Marvell PHY so that part should be fine. You > mentioned that it looks like the packets are being transmitted, but are > garbled in some way. The device does prepend a 'header' to ethernet > packets as they are transmitted down the USB pipe. The device strips > this off and puts the packets on the wire. This could be where the > issue lies. Are you on x86 by chance or something else? They are either garbled are they are not passed on the wire. The transmitted packets are shown by tshark, but a tshark run on "the other end of the line" does not show them. Platform is indeed x86, to be precise: fedora 7, kernel 2.6.22-rc6, cpu pentium M, dell laptop inspiron 9300, ICH6. If you want me to test something please yell, it's no trouble at all to change a few lines in the driver's source and recompile the module. Please note I cannot send mail to you: "(conversation with dhollis.dyndns.org[71.251.104.159] timed out while sending MAIL FROM)" - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
David Hollis wrote: > On Mon, 2007-06-25 at 19:05 +0200, Erik Slagter wrote: >> drivers/net/usb/asix.c: PHYID=0x01410cc2 > > Ok, it is using a Marvell PHY so that part should be fine. You > mentioned that it looks like the packets are being transmitted, but are > garbled in some way. The device does prepend a 'header' to ethernet > packets as they are transmitted down the USB pipe. The device strips > this off and puts the packets on the wire. This could be where the > issue lies. Are you on x86 by chance or something else? They are either garbled are they are not passed on the wire. The transmitted packets are shown by tshark, but a tshark run on "the other end of the line" does not show them. Platform is indeed x86, to be precise: fedora 7, kernel 2.6.22-rc6, cpu pentium M, dell laptop inspiron 9300, ICH6. If you want me to test something please yell, it's no trouble at all to change a few lines in the driver's source and recompile the module. Please note I cannot send mail to you: "(conversation with dhollis.dyndns.org[71.251.104.159] timed out while sending MAIL FROM)" - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
On Mon, 2007-07-30 at 11:27 +0200, Erik Slagter wrote: > They are either garbled are they are not passed on the wire. The > transmitted packets are shown by tshark, but a tshark run on "the other > end of the line" does not show them. > > Platform is indeed x86, to be precise: fedora 7, kernel 2.6.22-rc6, cpu > pentium M, dell laptop inspiron 9300, ICH6. > > If you want me to test something please yell, it's no trouble at all to > change a few lines in the driver's source and recompile the module. > Could you send me a complete dmesg dump when the driver is compiled with DEBUG enabled (at least from then usb logs that the device was inserted to the end). I'll need to see what it reports the values of the registers. Have you tried using the F7 2.6.22 kernel? I know that has worked fine for me on my system. > Please note I cannot send mail to you: "(conversation with > dhollis.dyndns.org[71.251.104.159] timed out while sending MAIL FROM)" I've fixed that issue so my mail delivery isn't sporadic. -- David Hollis <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
David Hollis wrote: >> They are either garbled are they are not passed on the wire. The >> transmitted packets are shown by tshark, but a tshark run on "the other >> end of the line" does not show them. >> >> Platform is indeed x86, to be precise: fedora 7, kernel 2.6.22-rc6, cpu >> pentium M, dell laptop inspiron 9300, ICH6. >> >> If you want me to test something please yell, it's no trouble at all to >> change a few lines in the driver's source and recompile the module. >> > Could you send me a complete dmesg dump when the driver is compiled with > DEBUG enabled (at least from then usb logs that the device was inserted > to the end). I'll need to see what it reports the values of the > registers. Please see attachment. > Have you tried using the F7 2.6.22 kernel? I know that has worked fine > for me on my system. I tried vanilla 2.6.22 and now 2.6.23-rc1 >> Please note I cannot send mail to you: "(conversation with >> dhollis.dyndns.org[71.251.104.159] timed out while sending MAIL FROM)" > > I've fixed that issue so my mail delivery isn't sporadic. I still got it last week. usb 1-8: new high speed USB device using ehci_hcd and address 11 usb 1-8: configuration #1 chosen from 1 choice usb%d: asix_read_cmd() cmd=0x1e value=0x index=0x size=1 drivers/net/usb/asix.c: GPIO Status: 0x0002 usb%d: asix_write_cmd() cmd=0x0d value=0x index=0x size=0 usb%d: asix_read_cmd() cmd=0x0b value=0x0017 index=0x size=2 usb%d: asix_write_cmd() cmd=0x0e value=0x index=0x size=0 drivers/net/usb/asix.c: EEPROM index 0x17 is 0x0580 drivers/net/usb/asix.c: GPIO0: 0, PhyMode: 0 usb%d: asix_write_gpio() - value = 0x008c usb%d: asix_write_cmd() cmd=0x1f value=0x008c index=0x size=0 usb%d: asix_write_gpio() - value = 0x003c usb%d: asix_write_cmd() cmd=0x1f value=0x003c index=0x size=0 usb%d: asix_write_gpio() - value = 0x001c usb%d: asix_write_cmd() cmd=0x1f value=0x001c index=0x size=0 usb%d: asix_write_gpio() - value = 0x003c usb%d: asix_write_cmd() cmd=0x1f value=0x003c index=0x size=0 usb%d: asix_write_cmd() cmd=0x20 value=0x index=0x size=0 usb%d: asix_write_cmd() cmd=0x20 value=0x0048 index=0x size=0 usb%d: asix_write_rx_ctl() - mode = 0x usb%d: asix_write_cmd() cmd=0x10 value=0x index=0x size=0 usb%d: asix_read_cmd() cmd=0x13 value=0x index=0x size=6 usb%d: asix_get_phy_addr() usb%d: asix_read_cmd() cmd=0x19 value=0x index=0x size=2 usb%d: asix_get_phy_addr() returning 0x18e0 usb%d: asix_write_cmd() cmd=0x06 value=0x index=0x size=0 usb%d: asix_read_cmd() cmd=0x07 value=0x0018 index=0x0002 size=2 usb%d: asix_write_cmd() cmd=0x0a value=0x index=0x size=0 usb%d: asix_mdio_read() phy_id=0x18, loc=0x02, returns=0x0141 usb%d: asix_write_cmd() cmd=0x06 value=0x index=0x size=0 usb%d: asix_read_cmd() cmd=0x07 value=0x0018 index=0x0003 size=2 usb%d: asix_write_cmd() cmd=0x0a value=0x index=0x size=0 usb%d: asix_mdio_read() phy_id=0x18, loc=0x03, returns=0x0cc2 drivers/net/usb/asix.c: PHYID=0x01410cc2 usb%d: marvell_phy_init() usb%d: asix_write_cmd() cmd=0x06 value=0x index=0x size=0 usb%d: asix_read_cmd() cmd=0x07 value=0x0018 index=0x001b size=2 usb%d: asix_write_cmd() cmd=0x0a value=0x index=0x size=0 usb%d: asix_mdio_read() phy_id=0x18, loc=0x1b, returns=0x848f usb%d: MII_MARVELL_STATUS = 0x848f usb%d: asix_mdio_write() phy_id=0x18, loc=0x14, val=0x0082 usb%d: asix_write_cmd() cmd=0x06 value=0x index=0x size=0 usb%d: asix_write_cmd() cmd=0x08 value=0x0018 index=0x0014 size=2 usb%d: asix_write_cmd() cmd=0x0a value=0x index=0x size=0 usb%d: asix_write_cmd() cmd=0x06 value=0x index=0x size=0 usb%d: asix_read_cmd() cmd=0x07 value=0x0018 index=0x0018 size=2 usb%d: asix_write_cmd() cmd=0x0a value=0x index=0x size=0 usb%d: asix_mdio_read() phy_id=0x18, loc=0x18, returns=0x4100 usb%d: MII_MARVELL_LED_CTRL (1) = 0x4100 usb%d: asix_mdio_write() phy_id=0x18, loc=0x18, val=0x4101 usb%d: asix_write_cmd() cmd=0x06 value=0x index=0x size=0 usb%d: asix_write_cmd() cmd=0x08 value=0x0018 index=0x0018 size=2 usb%d: asix_write_cmd() cmd=0x0a value=0x index=0x size=0 usb%d: asix_write_cmd() cmd=0x06 value=0x index=0x size=0 usb%d: asix_read_cmd() cmd=0x07 value=0x0018 index=0x0018 size=2 usb%d: asix_write_cmd() cmd=0x0a value=0x index=0x size=0 usb%d: asix_mdio_read() phy_id=0x18, loc=0x18, returns=0x4101 usb%d: MII_MARVELL_LED_CTRL (2) = 0x4101 usb%d: asix_mdio_write() phy_id=0x18, loc=0x00, val=0x9000 usb%d: asix_write_cmd() cmd=0x06 value=0x index=0x size=0 usb%d: asix_write_cmd() cmd=0x08 value=0x0018 index=0x size=2 usb%d: asix_write_cmd() cmd=0x0a value=0x index=0x size=0 usb%d: asix_mdio_write() phy_id=0x18, loc=0x04, val=0x05e1 usb%d: asix_write_cmd() cmd=0x06 value=0x index=0x size=0 usb%d: asix_write_cmd() cmd=0x08 value=0x0018 index=0x0004 size=2 usb%d: asix_write_cmd() cmd=0x0a value=0x index=0x size=0
Re: Linksys Gigabit USB2.0 adapter (asix) regression
On Wed, 2007-06-20 at 13:56 +0200, Erik Slagter wrote: > To rule out the possibility of the nic being defective, I connected the > USB nic to a windows computer. There it works, although the ethernet > connection is a bit flaky (just like it seems...). > > Then I did a diff on the respective kernel sources of 2.6.20.3 and > 2.6.22-rc2 (asix.c and usbnet.c), I found a few changes, but they do not > seem to be related to my problem. > > I am the and of my repertoire here, can anyone please do some > suggestions for further testing or even better, fix it ;-) You wouldn't happen to know what PHY that device is using? The AX88178 (Gigabit USB Ethernet) support in the driver currently only supports the Marvell PHY, which is the only one I've actually encountered to-date. If you can rebuild the driver from your kernel sources but with DEBUG enabled (uncomment it at the top of asix.c) You can build the driver out-of-tree by creating a Makefile with these contents: obj-m += asix.o EXTRA_CFLAGS += -DDEBUG all: make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` clean: make -C /lib/modules/`uname -r`/build SUBDIRS=`pwd` clean (You'll also need to copy usbnet.h into that directory) After you build the module, load it with insmod ./asix.ko, plug in your device and send me the dmesg output. I'm particularly interested in the PHYID=0x12345678 line. That will tell me what PHY chip is being used in that device and if I need to add support for it. -- David Hollis <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
David Hollis wrote: >> To rule out the possibility of the nic being defective, I connected the >> USB nic to a windows computer. There it works, although the ethernet >> connection is a bit flaky (just like it seems...). >> >> Then I did a diff on the respective kernel sources of 2.6.20.3 and >> 2.6.22-rc2 (asix.c and usbnet.c), I found a few changes, but they do not >> seem to be related to my problem. >> >> I am the and of my repertoire here, can anyone please do some >> suggestions for further testing or even better, fix it ;-) > > You wouldn't happen to know what PHY that device is using? The AX88178 > (Gigabit USB Ethernet) support in the driver currently only supports the > Marvell PHY, which is the only one I've actually encountered to-date. > If you can rebuild the driver from your kernel sources but with DEBUG > enabled (uncomment it at the top of asix.c) No problem, I will do it on sunday. No need to build the driver out-of-tree btw. > After you build the module, load it with insmod ./asix.ko, plug in your > device and send me the dmesg output. I'm particularly interested in the > PHYID=0x12345678 line. That will tell me what PHY chip is being used in > that device and if I need to add support for it. Will do. Thanks! - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
David Hollis wrote: > It's a bit of a longshot, but I notice that EEPROM index 0x17 returns > 0x580 for you, 0x180 for my devices. Based on that, my devices go > through the "gpio phymode == 1 path" GPIO init sequence, and yours goes > through the other path ( if ((eeprom >> 8) != 1) { ). Comment out the > if() else portion so that you go through the "phymode == 1" path and see > if that makes a difference. That segment should look something like > this: > > /* > if ((eeprom >> 8) != 1) { > asix_write_gpio(dev, 0x003c, 30); > asix_write_gpio(dev, 0x001c, 300); > asix_write_gpio(dev, 0x003c, 30); > } else { > */ > dbg("gpio phymode == 1 path"); > asix_write_gpio(dev, AX_GPIO_GPO1EN, 30); > asix_write_gpio(dev, AX_GPIO_GPO1EN | AX_GPIO_GPO_1, > 30); > // } Tried, but now it doesn't work at all, no LEDs and no traffic. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
On Mon, 2007-08-20 at 18:23 +0200, Erik Slagter wrote: > > /* > > if ((eeprom >> 8) != 1) { > > asix_write_gpio(dev, 0x003c, 30); > > asix_write_gpio(dev, 0x001c, 300); > > asix_write_gpio(dev, 0x003c, 30); > > } else { > > */ > > dbg("gpio phymode == 1 path"); > > asix_write_gpio(dev, AX_GPIO_GPO1EN, 30); > > asix_write_gpio(dev, AX_GPIO_GPO1EN | AX_GPIO_GPO_1, > > 30); > > // } > > Tried, but now it doesn't work at all, no LEDs and no traffic. Ok, that's what I expected. It's very interesting that this was working with older kernels, and now it isn't. Very little has changed in the last few releases. I would think that it could be some type of changes in usbnet, but that would seem to affect far more devices. My AX88178 devices (not the Linksys one, they are manufacturing samples) still work fine. I may have to pickup on the Linksys ones to figure out what is up with it. -- David Hollis <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
Never mind, I plugged the adapter into a windows machine once more (another one) and now it acts exactly like it's plugged into my linux laptop, so I guess it's actually broken. I will send it back for repair. Thanks for your effort and I apologise for being a pain ;-) - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Linksys Gigabit USB2.0 adapter (asix) regression
On Wed, 2007-08-29 at 17:56 +0200, Erik Slagter wrote: > Never mind, I plugged the adapter into a windows machine once more > (another one) and now it acts exactly like it's plugged into my linux > laptop, so I guess it's actually broken. I will send it back for repair. > > Thanks for your effort and I apologise for being a pain ;-) Interesting. I hope that that actually is the case (short of the PITA for you having to deal with RMA and all of that stuff). It definitely wasn't making any sense with only the minor changes that have taken place with the driver in the past few months. -- David Hollis <[EMAIL PROTECTED]> - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html