Hi Nunya,

On 19/08/11 08:26, nunya si wrote:
On Wed, Aug 17, 2011 at 6:50 PM, Greg Ungerer<g...@snapgear.com>  wrote:
Hi Nunya,

On 17/08/11 02:22, nunya si wrote:

I have project where I take new uClinux on a coldfire 5275 dev board
and bridge both Ethernet interfaces together with brctl.

If Ethernet plugged in when I turn on the board everything work just
fine BUT if I turn on board and THEN plug in Ethernet after it has
booted then I can talk to the local address but nothing passes in/out
of the bridge. Also if I power board up with Ethernet and un-plug and
re-plug in Ethernet then same problem, talk locally but not across
bridge.

Doing "ifconfig eth0 up" every time I plug in cable will cause
everything to work.

I play with:

fec_enet_adjust_link(struct net_device *dev) function in fec.c and if
run only once:

static char rerun=0;
if(rerun++>0) return;

ácan solve up/down/up issue, but not plug in after boot issue. Not
know how to run ifconfig from driver automatic.

What can do to solve issue to make eth0... Work in bridge after plug
in/out Ethernet all by itself?

Do you have either mii-tool or ethtool on your target?
It would be good to know what they report as the link
status on eth0.

Regards
Greg




Thank You Greg,

I install ethtool and report is as follows:

/>  ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: external
        Auto-negotiation: on
        Link detected: yes

Also /proc/kmsg announces: "PHY: 1:01 - Link is Up - 100/Full

Also bridge reports after link up: br0: port 1(eth0) entering forwarding state

but still bridge is broken...

I have bad fix like this in fec.c last lines of function static void
fec_enet_adjust_link(struct net_device *dev):

        if (status_change)
        {
                phy_print_status(phy_dev);
                dev_ioctl(dev_net(dev), SIOCSIFFLAGS, "eth0");        // hack 
make eth0 work
        }

And this fixes everything so far... no right way to fix but working.

Ideas?

Sorry, no idea really. If the interfaces themselves work after
plugging in/out ethernet cables (and you see the link console trace)
then the basics are right. Something specific to the bridge interface.

Regards
Greg


------------------------------------------------------------------------
Greg Ungerer  --  Principal Engineer        EMAIL:     g...@snapgear.com
SnapGear Group, McAfee                      PHONE:       +61 7 3435 2888
8 Gardner Close                             FAX:         +61 7 3217 5323
Milton, QLD, 4064, Australia                WEB: http://www.SnapGear.com
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Reply via email to