# axe USB driver freezing after some traffic



## sub_mesa (Nov 25, 2009)

Hello forum!

I have a USB gigabit ethernet adapter with ASIX Electronics AX88178 chip supported by the axe(4) driver in FreeBSD 8 (RC2).

It works, but not for long. After some serious traffic (~50Mbps) it just freezes with no more packets being received or sent. The only thing to make it work again it to re-plug the device or use a usbreset command.

Googling on the problem i found this mailinglist thread:
http://lists.freebsd.org/pipermail/freebsd-current/2009-April/005738.html

However, there doesn't seem to be a single conclusion. Even though my product ("Belkin F5D5055") seems to be supported according to the axe(4) manpage, it doesn't get detected as such, rather with a vendor id. Quoting dmesg output:


```
axe0: <vendor 0x050d product 0x5055, rev 2.00/0.01, addr 2> on usbus4
axe0: PHYADDR 0xe0:0x01
miibus1: <MII bus> on axe0
ue0: <USB Ethernet> on axe0
```

I'm on FreeBSD 8.0RC2 amd64 this time. Are there any suggestions i could try to make this driver work without freezing?

Thanks in advance,

- Sub


----------



## deepdish (Nov 28, 2009)

Can you reproduce the issue in FreeBSD 8.0-RELEASE?


----------



## sub_mesa (Nov 29, 2009)

Yes, i have reported this as PR in FreeBSD's GNATS also, filed under:
http://www.freebsd.org/cgi/query-pr.cgi?pr=140883

It is not amd64 by the way, but i386. Details are in the PR.

I have been asked to enable debugging in order to try to analyse the problem. Once i do that and get some feedback, i would be able to try patches also if they were given.

I would have expected this product to work though, since it was explicitly mentioned by the manual page. Since the mentioned mailinglist thread about similar issues with axe, i wonder if other people could get their gigabit axe product working.


----------



## Syam (Apr 5, 2010)

Same issue with an Ethernet Adapter D-Link DUB-E100 rev. B1

It freeze silently after some traffic (using skype make it freeze faster)
I guess constant upload produce the freeze, because i can hear friend on skype for a while, but they don't hear me, and then i lose my active connections ...


```
Apr  5 19:06:00 core kernel: ugen4.2: <vendor 0x2001> at usbus4
Apr  5 19:06:00 core kernel: axe0: <vendor 0x2001 product 0x3c05, rev 2.00/0.01, addr 2> on usbus4
Apr  5 19:06:00 core kernel: axe0: PHYADDR 0xe0:0x03
Apr  5 19:06:01 core kernel: miibus1: <MII bus> on axe0
Apr  5 19:06:01 core kernel: rlphy0: <IC Plus 10/100 PHY> PHY 3 on miibus1
Apr  5 19:06:01 core kernel: rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
Apr  5 19:06:01 core kernel: ue0: <USB Ethernet> on axe0
Apr  5 19:06:01 core kernel: ue0: Ethernet address: 00:80:c8:39:cc:ec
Apr  5 19:06:01 core kernel: ue0: link state changed to DOWN
Apr  5 19:06:03 core kernel: ue0: link state changed to UP
```


----------



## Syam (Apr 5, 2010)

I omit to write my FreeBSD release :


```
FreeBSD core.home.lan 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2
```


----------



## unstable23 (May 6, 2010)

*"Me too."*

Same problem, same axe driver.
Different PHY, as it's a "GWC AE2300 Gigabit USB 2.0 Ethernet Adapter".


```
FreeBSD garnet 8.0-RELEASE-p2 FreeBSD 8.0-RELEASE-p2 #0: Tue Jan  5 16:02:27 UTC 2010     [email]root@i386-
builder.daemonology.net[/email]:/usr/obj/usr/src/sys/GENERIC  i386
```


```
ugen4.2: <vendor 0x0b95> at usbus4
axe0: <vendor 0x0b95 product 0x1780, rev 2.00/0.01, addr 2> on usbus4
axe0: PHYADDR 0xe0:0x18
miibus1: <MII bus> on axe0
ciphy0: <Cicada VSC8211 10/100/1000TX PHY> PHY 24 on miibus1
ciphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
ue0: <USB Ethernet> on axe0
ue0: Ethernet address: 00:xx:xx:xx:xx:xx
ue0: link state changed to DOWN
ue0: link state changed to UP
```


----------



## M1xa1L (May 17, 2010)

The same problem with my Dlink Dub-e100 b1

```
FreeBSD M1xa1L_GW.lan 8.0-STABLE FreeBSD 8.0-STABLE #1: Sat May  8 17:22:25 MSD 2010     mihail@M1xa1L_GW.lan:/usr/src/sys/i386/compile/main_kernel_18.04.2010  i386
```


```
ugen2.2: <D-Link> at usbus2
May 16 23:07:16 M1xa1L_GW kernel: axe0: <D-Link DUB-E100 rev B1, rev 2.00/0.01, addr 2> on usbus2
May 16 23:07:16 M1xa1L_GW kernel: axe0: PHYADDR 0xe0:0x03
May 16 23:07:17 M1xa1L_GW kernel: miibus1: <MII bus> on axe0
May 16 23:07:17 M1xa1L_GW kernel: rlphy0: <IC Plus 10/100 PHY> PHY 3 on miibus1
May 16 23:07:17 M1xa1L_GW kernel: rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
May 16 23:07:17 M1xa1L_GW kernel: ue0: <USB Ethernet> on axe0
May 16 23:07:17 M1xa1L_GW kernel: ue0: Ethernet address: 00:80:c8:3b:8f:e6
```


----------



## M1xa1L (May 17, 2010)

sub_mesa said:
			
		

> The only thing to make it work again it to re-plug the device or use a usbreset command.


How make usbreset?


----------



## sub_mesa (May 18, 2010)

Using usbconfig i believe. Not sure on the exact command; try googling a bit you should find it.


----------



## jb_fvwm2 (May 18, 2010)

(Maybe the following applies, maybe not...)

see if the command works:
in a terminal

```
dhclient wlan0
```
(or ue0 as the case may be, I don't see the
rc.conf's )
if so, make an alias 
"wifireset" or somthing simpler "wr"


----------



## sub_mesa (May 20, 2010)

This is a wired ethernet controller; not a wireless controller.

DHCP etc. all works, it just hangs after some amount of traffic; intensive traffic appears to trigger it within 30-90 seconds.


----------



## Mei0gesh (Jul 27, 2010)

Hello, dear FreeBSD developers! The same bug plagues my router! I confirm the problem on FreeBSD 7.3, 8.0 and 8.1, adapter model is TRENDnet TU2-ET100.


```
axe0: <vendor 0x0b95 product 0x7720, rev 2.00/0.01, addr 2> on usbus4
axe0: PHYADDR 0xe0:0x10
miibus1: <MII bus> on axe0
ukphy0: <Generic IEEE 802.3u media interface> PHY 16 on miibus1
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ue0: <USB Ethernet> on axe0
ue0: Ethernet address: 00:30:ad:b4:06:cc
ue0: link state changed to DOWN
ue0: link state changed to UP
```


----------



## Mei0gesh (Aug 2, 2010)

Just a couple of links, the driver logs:
http://svn.freebsd.org/viewvc/base/head/sys/dev/usb/net/if_axe.c?view=log
http://svn.freebsd.org/viewvc/base/head/sys/dev/usb/net/if_axereg.h?view=log

...and the latest update:
http://people.freebsd.org/~yongari/axe/


----------



## Mei0gesh (Aug 10, 2010)

A similar problem was reported in the neighbouring thread:

http://forums.freebsd.org/showthread.php?t=14702

The reporter describes the bug:



> Once it's connected, after a sufficient amount of data has passed across the external interface (somewhere in the neighborhood of a gigabyte), it again loses its ability to talk to the outside. When I try to ping various IPs, I get error messages like "no buffer space available". A restart (painfully) cures this problem.



After a small discussion he makes a conclusion:



> I bought a Linksys USB100TX, which uses the aue driver, and all issues were resolved. [...] no more connection dying after enough traffic across the interface. That axe drive[r] really ought to be fixed.


----------



## RusArtm (Sep 7, 2010)

So has this problem other solution than buying a new adapter?

My Adapter D-Link DUB-E100 and FreeBSD 8.1-STABLE. It seems it fails with much lower speed than 50MBps becaause I have only bout 11

http://people.freebsd.org/~yongari/axe/ has the same problem.


----------



## Mei0gesh (Sep 16, 2010)

Drivers other than "axe" seem to support only older 10baseT hardware. It is sad that the issue was not commented by the developers, given so many reports exist already. Here's another one, popped up on bsdportal.ru (in Russian):

http://bsdportal.ru/viewtopic.php?t=21973


----------



## bobdoll (Sep 30, 2010)

i noticed my ue0 goes  down every 10 minutes, and there is nothing in the cron that has this 10 minutes cycle:


```
Sep 30 08:00:47 BSDLAP kernel: ue0: link state changed to DOWN
Sep 30 08:00:47 BSDLAP kernel: ue0: link state changed to UP
Sep 30 08:10:32 BSDLAP kernel: ue0: link state changed to DOWN
Sep 30 08:10:32 BSDLAP kernel: ue0: link state changed to UP
Sep 30 08:10:47 BSDLAP kernel: ue0: link state changed to DOWN
Sep 30 08:10:47 BSDLAP kernel: ue0: link state changed to UP
Sep 30 08:20:47 BSDLAP kernel: ue0: link state changed to DOWN
Sep 30 08:20:47 BSDLAP kernel: ue0: link state changed to UP
Sep 30 08:30:17 BSDLAP kernel: ue0: link state changed to DOWN
Sep 30 08:30:17 BSDLAP kernel: ue0: link state changed to UP
Sep 30 08:30:32 BSDLAP kernel: ue0: link state changed to DOWN
Sep 30 08:30:32 BSDLAP kernel: ue0: link state changed to UP
Sep 30 08:41:03 BSDLAP kernel: ue0: link state changed to DOWN
Sep 30 08:41:03 BSDLAP kernel: ue0: link state changed to UP
```


----------



## fulgar (Oct 4, 2010)

My D-Link DUB-E100 (axe driver) on FreeBSD 8.1-STABLE  also stops working every few hours. I bought this adapter after reading http://www.freebsd.org/releases/8.1R/hardware.html where it's listed as supported. It'a a pity that nobody removed the device from the page on time. I'm going to check it out on linux.


----------



## RusArtm (Oct 5, 2010)

It works on linux (I've tried Suse).


----------



## nicblais (Oct 25, 2010)

My bridge interface which my ue0 is part of (Apple Ethernet USB adapter) freezes after a while, perhaps this is related to the same problem.  Difference with me is that a usbcontrol reset on the device doesn't fix it, neither does removing/inserting it back.


----------



## strobe33333 (Dec 18, 2010)

I'm seeing something similar. I use an apple usb 100TX ethernet adapter as the interface with my cable modem.  If it gets "high" traffic for even a few minutes, the entire interface ceases to transmit data.  This is particularly true if the adapter is put into promiscuous mode (e.g. running ntop, tcpdump, etc..)  I've disabled my ntop instance and I get a bit more time of constant data transmittal, but in the end, I'm still having to reboot the machine on a regular basis. If there's a driver developer who wants to use me as a test case, I'm willing to be a guinea pig. Let me know all of the items you need. 

Thanks


----------



## strobe33333 (Dec 29, 2010)

Update: I had to snag/write a cron script that checks the interface for uptime every 5 minutes and if its down, it fires the usb reset command to re-init the connection....    In short.. LAME.  If anyone has any better ideas, I'm all ears.


```
#!/bin/sh
# add ip / hostname separated by white space
HOSTS="xxx.xxx.xxx.1"
 
# no ping request
COUNT=1
 
for myHost in $HOSTS
do
  count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
  if [ $count -eq 0 ]; then
    echo 'Firing' >> /var/log/usbreboot 
    usbconfig -u 5 -a 2 reset
  fi
done
```


----------



## yongari@ (Jan 1, 2011)

I think the issue was fixed in HEAD.
You can copy if_axe.c and if_axereg.h from HEAD to 8.2-RC1 and rebuild kernel.


----------



## strobe33333 (Jan 24, 2011)

Okay I gave it a shot, only time will tell.  Thanks for the info.


----------



## Spoozilla (Apr 7, 2011)

Sorry for the necromancy.

I have a D-Link DUB-E100 connected to my amd64 8.2 machine that's showing these issues. 


```
FreeBSD erebus 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Thu Feb 17 02:41:51 UTC 2011
[email]root@mason.cse.buffalo.edu[/email]:/usr/obj/usr/src/sys/GENERIC  amd64

axe0: <vendor 0x2001 product 0x3c05, rev 2.00/0.01, addr 9> on usbus4
miibus1: <MII bus> on axe0
rlphy0: <IC Plus 10/100 PHY> PHY 3 on miibus1
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ue0: <USB Ethernet> on axe0
ue0: Ethernet address: 00:80:c8:3b:16:b2
```
It seems to be related to the number of open connections not the volume of traffic. For instance I can *sftp* an entire file system dump (34G) to another machine without incident but if I use a p2p application like *transmission* the connection goes down after a few minutes with barely tens of megabytes transferred.

If I use the *usbconfig* configuration as demonstrated in strobe33333's post the connection does reset.

I can provide any information required and more than willing to test any changes.


----------



## yongari@ (Apr 8, 2011)

8.2-RELEASE does not include patch I mentioned. Use latest stable/8 or manually patch axe driver from HEAD/stable/8.


----------



## Spoozilla (Apr 9, 2011)

Thanks for your reply.

I took the if_axe.c and if_axereg.h from RELENG_8 and recompiled my kernel. I've been doing some testing for about four hours and it looks to be rock solid.


----------



## Flappjakk (Jun 10, 2011)

*if_axe driver problems*

Hi all,

I'm trying to use a Linksys USB200M USB wired network adapter.  This USB network adapter also uses the axe(4) driver, from what I can tell.  I'm trying to install and use FreeBSD 8.2-RELEASE i386 on an admittedly old laptop.  It's a Toshiba Satellite 2105CDS, it has an AMD K6-2 processor at 400MHz, 160MB RAM and a 4GB hard drive.  I had a 100GB hard drive in there but after installing FreeBSD 9 and trying to go back to FreeBSD 8, the FreeBSD 8 installer can't partition the hard drive (even though Windows still can), but that's a topic for another forum post.

Anyway I know the laptop is slow and old but I'm not expecting the world out of it.  After the FreeBSD 8 install DHCP from my router to the USB200M takes forever, and once it finally gets an IP address pings to my router (192.168.1.1) take upwards of 3000 ms (3 seconds) to reply. 

I tried FreeBSD 7 and the axe(4) driver there works for a few minutes and dies out with watchdog errors.  FreeBSD 9 has the same problem as FreeBSD 8.  I found this thread and took the advice to update if_axe.c and if_axereg.h files to HEAD in the kernel source directory and try to rebuild the kernel, which is very painful on that old laptop, and once it finally made it to if_axe.c, I get a compiler error about PHY_RESET being used without being declared. 

I found a #define for PHY_RESET in /usr/src/sys/dev/mii/miivar.h.  Can I just add a #include for this file to fix the compiler error, or will that just open another can of worms?  

Any help is appreciated.  Sorry to resurrect the thread yet again.


----------



## Flappjakk (Jun 11, 2011)

*Still Not Working*

So adding that #include didn't change anything, but changing PHY_RESET to mii_phy_reset did fix the compiler error.  It didn't seem to matter though because after hours of compiling the kernel and installing it, the driver still doesn't perform any better.  Pings to my router (192.168.1.1) still take upwards of 3000ms (3 seconds).  I don't know what else to try.  If anyone has any ideas, please reply.


----------



## Flappjakk (Jun 11, 2011)

*Still Not Working*

FreeBSD 8.1 has the same problem.  Is no one reading this?


----------



## wblock@ (Jun 11, 2011)

Post #26 says it's in recent 8-stable.  That would be long after 8.1 came out.  If you don't want to upgrade, the snapshot of 9-current on the FTP site can run as a live CD for testing.


----------



## Flappjakk (Jun 12, 2011)

I installed 8.0 this morning and the axe driver seems to be working much better.  What I was saying in my above posts is 8.1, 8.2 and 9.0 all have the same slow problem and 7.4 has watchdog failures.  I just decided I'd start trying versions older and older until one worked.  8.0 works, but now pkg_add fails.  I think the reason is because 8.0 is old enough that the binaries aren't on the ftp server pkg_add wants to use.  Just as a quick try I ran *pkg_add -r nano* and I get:


```
Error: Unable to get [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.0-release/Latest/nano.tbz:[/url] File unavailable (e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.0-release/Latest/nano.tbz' by URL
pkg_add: 1 package addition(s) failed
```

And sure enough manual ftp to ftp.freebsd.org shows that packages-8.0-RELEASE doesn't exist in FreeBSD/ports/i386.  I found an environment variable to change, PACKAGEROOT I think, but that didn't help.  Any futher suggestions?


----------



## Flappjakk (Jun 13, 2011)

Fixed:

`setenv PACKAGESITE 'ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-8.0-release/Latest/'`

Thanks for the help.


----------

