2

I'm working on a custom board equipped with a iMX28 module and the LAN9500A USB to Ethernet controller without EEPROM for the network interface. Operating system is Linux (kernel v3.16). The LAN9500A is connected to a RJ45 jack with integrated Magnetics and LEDs.

I check the reference schematics of Microchip against my design. http://ww1.microchip.com/downloads/en/DeviceDoc/9500a_sch.pdf

I can see the LAN9500A is detected and correct driver is loaded...,

# dmesg | grep -i smsc
[    1.549126] usbcore: registered new interface driver smsc95xx
[    2.186356] smsc95xx v1.0.4
[    2.258622] smsc95xx 1-1:1.0 eth2: register 'smsc95xx' at usb-ci_hdrc.1-1, smsc95xx USB 2.0 Ethernet, 62:94:6a:f1:ec:26
[    9.588663] fec 800f0000.ethernet eth0: Freescale FEC PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=800f0000.etherne:00, irq=-1)

After the system is turned on, the link and activity LEDs are lit ...

# ifconfig eth2 up
IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready
root@imx28evk:~# IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
smsc95xx 1-1:1.0 eth2: link up, 100Mbps, full-duplex, lpa 0x4DE1
IPv6: eth2: IPv6 duplicate address fe80::fa:25ff:fe59:cf38 detected!

# ifconfig eth2 down

LEDs are still on ...

# ifconfig eth2 up
smsc95xx 1-1:1.0 eth2: link up, 100Mbps, full-duplex, lpa 0xC5E1

# ifconfig eth2 down 

LEDs are still on ...

$ ifconfig eth2 up 

Now the LEDs are off ...

# ethtool eth2
Settings for eth2:
        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:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbag
        Wake-on: d
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: no

# mii-tool eth2
eth2: no link

# ifconfig eth2 down 

$ ifconfig eth2 up
smsc95xx 1-1:1.0 eth2: link up, 100Mbps, full-duplex, lpa 0xC5E1

LEDs light up

ethtool eth2
Settings for eth2:
        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:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
        Link partner advertised pause frame use: Symmetric
        Link partner advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbag
        Wake-on: d
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

# mii-tool eth2
eth2: negotiated 1000baseT-HD flow-control, link ok

Another issue is that when I unplug and plug the Ethernet cable from the RJ45 socket, Linux does not detect it, ...

Has anyone else seen this? I really appreciate any help you can provide.

  • 1
    Your kernel is very old, 3.16 wasn't today. We are now around at 4.12 . I suggest to refresh your kernel. – peterh says reinstate Monica Aug 31 '17 at 11:01
  • I tested 4.4 and 4.9... The problem still occurs. – BachehKaraji Aug 31 '17 at 11:17
  • I couldn't compile kernel 4.12 for imx28... – BachehKaraji Aug 31 '17 at 11:25
  • Then it looks as a driver problem. If it is, then - unless you aren't a hardcore kernel hacker, with windows driver reverse engineering skills - you have no chance. A possible workaround would be 1) using ndiswrapper OR 2) to install a minimal-configuration winxp in a virtual machine, giving it direct access to the usb device. However, if I understand you well, you are on an embedded, non-x86 architecture, it makes the things far more hard (although still not impossible). – peterh says reinstate Monica Aug 31 '17 at 12:03
  • You could also run a virtual x86 linux in a qemu, and using ndiswrapper on it. – peterh says reinstate Monica Aug 31 '17 at 12:04
0

I realize this problem has been somewhat solved in Linux Kernel 3.16.48.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.