Subject: ifconfig make sqphy down for ever
To: None <>
From: FengXiagen@Kobe <>
List: port-arm
Date: 05/29/2006 20:34:07
Hi, everyone.

I am now working in port NetBSD to MPCore EB which have 4 arm cores.
The most trick thing I had met till now is the SMC LAN91C111 NIC on the EB.
It should be the same NIC with the one on VIPER EB of evbarm, 
So it took us little time to port the arch/evbarm/viper/if_sm_pxaip.c to 
we also use the dev/mii/sqphy.c for PHY of this SMC LAN91C111.
The boot message about the SMC LAN91C111 on MPCore EB is as following:
sm0 at ifpga0 addr 0xfe000000 irq 28
sm0: SMC91C111, revision 1, buffer size: 8192
sm0: MAC address 00:02:f7:00:1d:c5, default media MII (internal PHY) sqphy0
at sm0 phy 0: Seeq 84220 10/100 media interface, rev. 0
sqphy0: using Seeq 84220 isolate/reset hack
sqphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto 

The problem is:
1.It cannot recognize the cable media at all.
It always output
media: Etautoselect (none)
While I have tried all cables I can find.

2.IP setting action will shut you link state DOWN for ever
Take a look at the following commands output
# ifconfig sm0
sm0: flags=8822<BT,NOTRAILERS,SIMPLEX,MULTICAST> mtu 1500
        address: 00:02:f7:00:1d:c5
sm0: link state changed to UP
        media: Etautoselect (none)
        status: active
# ifconfig sm0 inet netmask up
sm0: link state changed to DOWN
# ifconfig sm0 
        address: 00:02:f7:00:1d:c5
        media: Etautoselect (none)
        inet 192.00 netmask 0xffffff00 broadcast
# ifconfig sm0 up
(Nothing output)

Although our source base is NetBSD 3.99.17 the 
dev/mii/sqphy.c(v 1.39 2006/03/29) and
dev/mii/sqphyreg.h(v 1.4 2005/12/11) is the latest version as I wrote this

Any suggestions will be welcome.

Thanks in advanced 

Feng Xiagen