Jonas Gorski írta:
> Hi,
> 
> *sigh* shortly after it got committed to trunk, I think I see how I
> broke ar8216 on ar71xx (actually it was already "broken" before):

Nah, it was not "broken". The AR8216 driver was disabled by default because it
is not usable on the AR913x based boards. The reason behind this is that you
can't communicate with the switch via the MDIO bus, because its speed is too
fast for the switch.

The speed of the MDIO bus depends on the speed of the AHB bus.

In theory it would be possible to decrease the speed of the AHB bus in the board
init code, but that would affect the performance of the whole system.

Another solution is to decrease the speed of the AHB bus before each MDIO bus
access, and restore it after, but i don't know how it would affect other devices
on the AHB bus.

To be precise, there is yet another solution: configuring the AR8216 switch with
special ethernet packets.

> The header mode gets handled by the ar8216 driver itself, in theory,
> but the ar8216_netif_rx never gets called by the ag71xx driver. This
> leads to following situations:
> 
> Header mode is disabled (= no VLANs):
> rx: ag71xx tries to remove header, fails => no rx
> tx: ag71xx adds header => packet gets dropped by switch
> 
> Header mode is enabled:
> rx: ag71xx tries to remove header, succeeds => ok
> tx: ar8216 driver adds header, ag71xx adds header => packet gets dropped
> 
> 
> I'll take a look at where the ag71xx should call the phy's netif_rx(),
> this should make the special ar8216 support obselete in general.

The automatic detection won't work with this switch due to the MDIO bus issue,
so it won't be registered never. At the end, you can't use the netif_rx function
of the phy device.

Regards,
Gabor

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

Reply via email to