2013/2/19 Jonas Gorski <[email protected]>: > On 19 February 2013 17:11, Rafał Miłecki <[email protected]> wrote: >> 2013/2/19 Jonas Gorski <[email protected]>: >>> On 19 February 2013 16:17, Rafał Miłecki <[email protected]> wrote: >>>> Setting this bit stops BCM53125 (bgmac actually) from receiving any >>>> packets. In theory setting "managed" mode makes sense when enabling VLAN >>>> (at least for me?) but for some reason it breaks configuration. >>>> >>>> This bit is cleared in b53_switch_reset and it seems the same is done in >>>> bcmrobo.c which never sets that bit again. >>> >>> The bit is a bit misnamed, it doesn't enable management per se but >>> actually enables special treatment for the CPU port and certain >>> ethernet frames (IIRC multicast joins/leaves etc). It's probably fine >>> to keep it disabled until we want to use multicast snooping or 802.1x >>> authentication (which IIRC require this to allow "trap to CPU" to >>> work), or want to implement open vswitch support (as if ;-). >> >> Thanks for explaining. Can you suggest any better name for this bit? >> Something we could replace SM_SW_FWD_MODE with? > > Well that's the name broadcom uses it its documentation, so I wouldn't > want to go too far from it, else it will be confusing for people > comparing it with the documentation ;-) > >>>> I'm not sure about clearing SM_SW_FWD_MODE bit in the "else" inside of >>>> b53_enable_vlan. Should be drop that too? >>> >>> Probably just clear it unconditionally. I need to make sure first it >>> doesn't break 5325 or 53115. >> >> We already clear it unconditionally in the "else" of b53_enable_vlan >> :) So... is that alright, or maybe we should do the opposite and *set* >> that bit in the "else" of b53_enable_vlan (when *disabling* VLAN)? > > Definitely not. The bit is for telling the switch that there is > "management software" running behind the CPU port, so enabling it in > the non-vlan case makes even less sense. I think the 5365 programmer's > guide explains it a bit.
Wow, I didn't know we have programming guide for switch! :) I've checked if SM_SW_FWD_MODE can be set in case of *disabling* VLAN. I've replaced mgmt &= ~SM_SW_FWD_MODE; with the mgmt |= SM_SW_FWD_MODE; After that change disabling VLAN didn't work anymore. I didn't get network running after swconfig dev eth0 set enable_vlan 0 swconfig dev eth0 set apply (and it was working before the change). -- Rafał _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
