[OpenWrt-Devel] [PATCH V2] b53: override CPU port state on BCM5301X with CPU port other than 8

Ian Kent raven at themaw.net
Wed Apr 15 03:35:37 EDT 2015


On Wed, 2015-04-15 at 09:01 +0200, Rafał Miłecki wrote:
> On 15 April 2015 at 07:37, Ian Kent <raven at themaw.net> wrote:
> > On Sun, 2015-04-12 at 19:01 +0200, Rafał Miłecki wrote:
> >> Newer revisions (5+) of BCM53011 and probably all revs of BCM53012
> >> require overriding CPU port to work. So far we were handling it only for
> >> CPU port 8, but some devices may use e.g. port 5. In such case we need
> >> to use recently defined GMII_PORT registers.
> >> It was tested for regressions on BCM53011 revs 2 & 3. It was also
> >> confirmed to fix switch on some internal Broadcom board.
> >
> > CPU port as 5 also allows the switch on my R8000 (BCM53012) rev 5 device
> > to function.
> >
> > The puzzle is the the Vendor firmware uses port 8 as the cpu port (+ 5
> > and 7 for some unknown purpose) for these higher rev switches. We
> > clearly don't know what the relationship is between ports 5, 7 and 8 and
> > I suspect there's more to it than just configuring the three ports
> > properly. But my code to set ports 5, 7 and 8 when cpu is 8 might not be
> > correct either, don't know yet.
> 
> I guess this is simply for performance reasons. Imagine there are two
> 1 Gbps devices connected to the router and that they want to "talk"
> with router system (for whatever reason). To achieve max speeds we
> need router system to Tx/Rx with 2 Gbps. This is impossible if switch
> is connected to CPU with a single 1 Gbps port. By combining 2/3 ports
> this should be possible (of course you're still limited by CPU
> performance).

I think so too.

It might be related to the "Flow Accelerator" that appears to live in
the GMAC-3 address space and (I'm not sure about this) may be connected
to the third PCIE device that's currently not configured by bgmac being
the reason nothing works when using port 8 as cpu.

But that also looks to be related to the mystery Cut Through Forward
code so I'm not sure we would benefit putting effort into working out
how this all works. The Flow Accelerator code isn't present in the
Netgear GPL code either so it becomes a guessing game as to what changes
may have been made looking at other router GPL code.

Even more it appears the Netgear GPL code is configured to disable the
Flow Accelerator code but, from what I've seen of other routers features
that are supposedly disabled but aren't in the Actual firmware release,
we can't assume that is really the case either.

Anyway, food for thought.

Ian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list