On Sun, 2006-04-30 at 21:00 -0700, David Brownell wrote: > That PHY register failure would explain things ... maybe it's > a byteswap bug in that driver code? >
This is the relevant portion from ax88772_bind(): if (((ret = asix_read_cmd(dev, AX_CMD_READ_MII_REG, 0x0010, 2, 2, buf)) < 0) || (*((u16 *)buf) != 0x003b)) { dbg("Read PHY register 2 must be 0x3b00: %d", ret); goto out2; } Looks like I need to change that to a asix_mdio_read_le() call. Try the attached patch with the caveat that I haven't tested it yet, I'm on a plane. It should be right though I might need to swap the != 0x3b00 to 0x003b. If you could try it against PPC and x86, that'd be great. I only have access to x86 myself. > - Dave > > > On Sunday 30 April 2006 7:51 pm, you wrote: > > Hi, > > > > please CC me on any replies as I'm not subscribed to the list. > > > > I'm having trouble getting my Linksys USB200M v2.0 (which uses the ASIX > > AX88772) to work on my Mac Mini (G4 with Apple's NEC USB controllers / > > ohci_hcd) running 2.6.16.11, but the interesting thing is that it works > > perfectly on my x86 machine (ALi USB controllers), also running 2.6.16.11. > > > > It inserts fine, detects fine, configures fine, but cannot exchange > > traffic. > > I see the traffic LED blinking as if it's receiving, but Linux doesn't see > > the traffic, and the LED does not blink when trying to send traffic. > > > > There is nothing else on the USB bus on the ppc. There's lots of other > > things on the bus on the x86. > > > > This is what the driver says on ppc: > > > > drivers/usb/net/asix.c: Read PHY register 2 must be 0x3b00: 2 > > eth1: register 'asix' at usb-0001:10:1b.2-2, ASIX AX88772 USB 2.0 Ethernet, > > 00:10:60:06:0f:28 > > usbcore: registered new driver asix > > eth1: rxqlen 0 --> 10 > > eth1: rxqlen 10 --> 20 > > eth1: rxqlen 20 --> 30 > > eth1: rxqlen 30 --> 40 > > eth1: rxqlen 40 --> 50 > > eth1: rxqlen 50 --> 60 > > eth1: rx throttle -71 > > > > The rx throttle message does not appear until I unplug the device. > > > > This is what the driver says on x86: > > > > asix 1-4.4:1.0: status ep1in, 8 bytes period 11 > > eth0: register 'asix' at usb-0000:00:13.3-4.4, ASIX AX88772 USB 2.0 > > Ethernet, 00:10:60:06:0f:28 > > usbcore: registered new driver asix > > eth1: rxqlen 0 --> 10 > > eth1: rxqlen 10 --> 20 > > eth1: rxqlen 20 --> 30 > > eth1: rxqlen 30 --> 40 > > eth1: rxqlen 40 --> 50 > > eth1: rxqlen 50 --> 60 > > eth1: ax8817x - Link Status is: 0 > > eth1: kevent 4 scheduled > > eth1: ax8817x - Link Status is: 1 > > > > Here's the relevant bit from /proc/bus/usb/devices on ppc: > > > > T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 11 Spd=480 MxCh= 0 > > D: Ver= 2.00 Cls=ff(vend.) Sub=ff Prot=00 MxPS=64 #Cfgs= 1 > > P: Vendor=13b1 ProdID=0018 Rev= 0.01 > > S: Manufacturer= > > S: Product=USB 2.0 Network Adapter ver.2 > > S: SerialNumber=00FFFF > > C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=250mA > > I: If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=asix > > E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=128ms > > E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms > > E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms > > > > Any help is very welcome, I'm way out of my league here. I'd be happy to > > supply more information on request. > > > > Thanks in advance! > > > > /fnord > > > > > > ------------------------------------------------------- > > Using Tomcat but need to do more? Need to support web services, security? > > Get stuff done quickly with pre-integrated technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > linux-usb-devel@lists.sourceforge.net > > To unsubscribe, use the last form field at: > > https://lists.sourceforge.net/lists/listinfo/linux-usb-devel > > -- David Hollis <[EMAIL PROTECTED]>
--- a/linux/drivers/usb/net/asix.c 2006-04-21 08:13:42.000000000 -0400 +++ a/linux/drivers/usb/net/asix.c 2006-05-01 06:42:06.000000000 -0400 @@ -618,13 +618,9 @@ } memcpy(dev->net->dev_addr, buf, ETH_ALEN); - if ((ret = asix_set_sw_mii(dev)) < 0) - goto out2; - - if (((ret = asix_read_cmd(dev, AX_CMD_READ_MII_REG, - 0x0010, 2, 2, buf)) < 0) - || (*((u16 *)buf) != 0x003b)) { - dbg("Read PHY register 2 must be 0x3b00: %d", ret); + if ((ret = asix_mdio_read_le(dev->net, + dev->mii.phy_id, MII_PHYSID1)) != 0x3b00) { + dbg("Read PHYSID1 must be 0x3b00. Read: %04x", ret); goto out2; } @@ -667,8 +663,6 @@ dbg("Write IPG,IPG1,IPG2 failed: %d", ret); goto out2; } - if ((ret = asix_set_hw_mii(dev)) < 0) - goto out2; /* Set RX_CTL to default values with 2k buffer, and enable cactus */ if ((ret = asix_write_rx_ctl(dev, 0x0088)) < 0)
signature.asc
Description: This is a digitally signed message part