On Monday 11 April 2011, Peter Lebbing wrote:
> On 11/04/11 11:08, Yeoh Chun Yeow wrote:
> > However, even the board is up without Ethernet cable connecting to the
> > LAN port 1 or port 0, the message "eth1: link up (100Mbps/Full duplex)
> > is already printed there.
> 
> Yeah, it's still not completely clear to me how these ports are all
> connected. If one of the Ethernet MACs is connected to the switch, and it
> would not make sense if that was not the case, then that port will
> immediately go up.
> 
> You can compare this with the case where you have an external switch. The
> only difference is that the switch is integrated in your RouterStation,
> and you can actually talk to the switch to make it do interesting stuff.
> 
> If you would have an external switch, there would be a cable between your
> Ethernet device eth1 and the switch. On the switch, there are two more
> ports, which are the two sockets on your RouterStation. As soon as eth1 is
> started, it will go up, because it is connected to the switch. It does not
> matter if you plug any other cables into the switch. If there are no other
> cables plugged into the switch, your eth1 is still connected to the switch
> and the link for eth1 is up. It's just that any packets you send don't go
> anywhere because no other devices are connected to the switch.
> 
> You can't even see if any other cables are plugged into the switch without
> writing specific support code to check for this, just like you wouldn't see
> in your log whether any other cables are plugged into the external switch.
> 
> It gets really confusing when the ports you call port 0 and port 1 aren't
> numbered the same on the switch chip. Like I mentioned somewhere before,
> port 0 on my switch chip is connected to the port labeled "LAN 4" on my
> router. Port 1 is "LAN 3", 2 is "LAN 2", 3 is "LAN 1". The only thing you
> can reasonably expect is that your CPU is connected on port 5.
> 
> So I wrote a kludge that indeed checks the link state of the attached
> ports. Could you please use the attached driver and map which sockets on
> your board connect to which switch ports? If you do
> 
> # swconfig dev eth1 get link_state
> 
> It will answer with a list of ports that are up. Please connect and
> disconnect cables to the three Ethernet sockets on your board and note the
> effect on that link_state list.
> 
> I suspect your WAN port might be connected to port 4 of the switch. This is
> a bit of a special port on the switch chip.
This is correct.  It is connected to eth0 on the AR7130, and eth1 is connected
through the other switch port to the two LAN ports.

David
> 
> The attached driver also checks the chip model. I really hope your log says
> "ADM6996FC PHY detected." Could you send me the whole log of your
> RouterStation? It might give me some more clues on how stuff is connected.
> 
> HTH,
> 
> Peter.

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to