Poor performance on network card on NanoPC

ChuchHL
I am having a performance issue with my NanoPC and hope you guys can help
me with it. It has a network card that it is supposed to support speeds up
to 100mbps full duplex. The problem is that whenever I transfer files to or
from it, my speed drops to 10mbps half duplex making everything really
slow. The box is currently running Ubuntu.

Running ethtool when IDLE shows the following 
root@NanoPC:~# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  100baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  100baseT/Full
        Link partner advertised pause frame use: Symmetric
        Link partner advertised auto-negotiation: No
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pg
        Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

And running lshw when IDLE shows the following 
root@NanoPC:~# sudo lshw -C network
  *-network
       description: Ethernet interface
       physical id: 1
       logical name: eth0
       serial: 00:00:ff:ff:00:00
       size: 100Mbit/s
       capacity: 100Mbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd
autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=dm9620
driverversion=22-Aug-2005 duplex=full firmware=Davicom DM9620 USB Ethernet
ip=100.100.0.35 link=yes multicast=yes port=MII speed=100Mbit/s

Running ethtool when TRANSFERING files shows the following 
root@NanoPC:~# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  100baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pg
        Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

And running lshw when TRANSFERING files shows the following 
root@NanoPC:~# sudo lshw -C network
  *-network
       description: Ethernet interface
       physical id: 1
       logical name: eth0
       serial: 00:00:ff:ff:00:00
       size: 10Mbit/s
       capacity: 100Mbit/s
       capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd
autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=dm9620
driverversion=22-Aug-2005 duplex=half firmware=Davicom DM9620 USB Ethernet
ip=100.100.0.35 link=yes multicast=yes port=MII speed=10Mbit/s

I tried using ethtool to force 100mbps and disable autoneg but it has not
worked at all. 
root@NanoPC:~# ethtool -s eth0 speed 100 duplex full autoneg off

Regarding the background of the connection: The NanoPC is connected to a
Linksys E1500 running Tomato Shibby (latest version). I tried connecting
the NanoPC to another Linksys E2500 also running Tomato Shibby and to a
Encore router and it did no difference. I also connected it a ethernet
switch that I have and nothing fixed it. I tested it using other ethernet
cables that I know are good since my laptops use them and still I got the
same result.

Any ideas on how to fix this will be truly appreciated.

Regards

davef
If this unit has the same ethernet hardware as the ODROID U3 you might find
some clues on their forum.

Does the NanoPC have a dedicated ethernet controller?

ChuchHL
Hello Davef,

Thanks for your reply. I will look into the ODROID U3. Regarding the
dedicated ethernet controller, how can I check that? I'm not linux savvy
but I can follow guidelines and run commands to check that. On the vendors
webiste it does not say.

Is there a command I can run on linux to get that information?

Regards

davef
Sorry, all I know is that the U3 is using some form of USB part for the
ethernet interface and there has been discussion regarding ethernet speed. 
The U3 and the NanoPC use a similar 4412 chip.

lsusb will list all the USB devices and maybe that might provide a clue.

ChuchHL
Thanks for the tip. I believe you are accurate in that this device has an
ethernet connection that somehow is considered a USB device. I'll search on
the U3 forum to see if there are similar problems.

I ran the command you mentioned and got the following

root@NanoPC:~# lsusb
Bus 001 Device 005: ID 0424:2530 Standard Microsystems Corp.
Bus 001 Device 006: ID 1058:0741 Western Digital Technologies, Inc.
Bus 001 Device 004: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 003: ID 0a46:9621 Davicom Semiconductor, Inc.
Bus 001 Device 002: ID 0424:4604 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Judging from the output, I believe the Davicom device is my ethernet card
since it also appears when I run lshw -C network (firmware=Davicom DM9620
USB Ethernet).

Regards

davef
You are welcome and good luck!

smiles
[root@DC /dc]$ lsusb -t
lsusb: cannot open "/usr/share/hwdata/usb.ids", No such file or directory
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=s5p-ehci/3p, 480M
    |__ Port 2: Dev 2, If 0, Class=, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=, Driver=dm9620, 12M
        |__ Port 5: Dev 4, If 0, Class=, Driver=, 480M


dm9620 chip is attatched to USB 1.1 Full Speed(12MBps).
I don't know why it is connected by full speed.
I guess it's usb ethernet driver or hardware design miss.

ChuchHL
Thank you both for your input. Running Smiles command, I was able to learn
that my ethernet adapter is truly hooked to a USB1.1 interface (in my
opinion, very bad design).

root@NanoPC:~# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=s5p-ehci/3p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 1: Dev 3, If 0, Class=(Defined at Interface level),
Driver=dm9620, 12M
        |__ Port 4: Dev 4, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 2: Dev 6, If 0, Class=Mass Storage,
Driver=usb-storage, 480M
        |__ Port 5: Dev 5, If 0, Class=Vendor Specific Class, Driver=, 480M


Now, I have a new problem, I am trying to connect another usb-ethernet
adapter on the USB2.0 port. I need to compile the driver but when I try to
use the make command I get an error that the build command is missing.
Digging a little bit found the following. 

root@NanoPC:~# ls -l /lib/modules/3.8.13.16/build
lrwxrwxrwx 1 root root 61 Feb 11 04:49 /lib/modules/3.8.13.16/build ->
/data/fix500/builder/kernel-3.8/odroid-3.8.y-2014.02.11-09.16

the problem here is that build is in red (since the path
/data/fix500/...etc. does not exist). So what kernel should I compile, the
one that I can download from the NanoPC website, or the one from odroid
(since the build path shows they used odroid in the past).

Regards