2014-01-30 Rafał Miłecki <zaj...@gmail.com>:
> * CONCLUSION *
>
> b53_switch_reset_gpio resets switch into a vulnerable state, where
> machine behind the WAN can "access" LAN machines.
> We need to put switch in some safe state before we call b53_switch_reset_gpio.
> Example of configuring ports into a safe state is b53_enable_ports.
>
> Any idea what exactly we should do before calling b53_switch_reset_gpio?

I started wondering how Broadcom does handle this. In bcmrobo.c
(bcm_robo_attach):
http://svn.dd-wrt.com/browser/src/linux/universal/linux-3.10/brcm/mipsel/shared/bcmrobo.c?rev=23025
they also do GPIO reset as the first thing.

So maybe it's something about the time when bcm_robo_attach should be
called? Can putting PHY in some specific state stop switch?

I looked at etcgmac.c (chipattach):
http://svn.dd-wrt.com/browser/src/linux/universal/linux-3.10/brcm/mipsel/et/sys/etcgmac.c?rev=23025
and Broadcom calls bcm_robo_attach right after:
/* reset phy: reset it once now */
chipphyreset(ch, etc->phyaddr);

But we do the same in bgmac.c. We call
bgmac_phy_reset(bgmac);
and then we call
bgmac_mii_register(bgmac);

-- 
Rafał
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to