[OpenWrt-Devel] [LEDE-DEV] [PATCH] linux/arc*: disable MAC frame filter in DW GMAC

Alexey Brodkin Alexey.Brodkin at synopsys.com
Wed Jul 27 17:52:59 EDT 2016

Hi Felix,

On Wed, 2016-07-27 at 17:19 +0200, Felix Fietkau wrote:
> On 2016-07-27 14:11, Alexey Brodkin wrote:
> > 
> > For some [still unknown] reason in ARC SDP boards
> > DW GMAC doesn't enter promiscuous mode if eth0 gets
> > added to the br-lan interface before Ethernet PHY finishes
> > autonegotiation (PHY gets reset on DW GMAC start).
> I think this is something we need to look at more closely instead of
> just papering over it in this way. By the way, arc* aren't the only ones
> using stmmac, ipq806x uses it as well and might be equally affected.
> Did you check if the network stack tells the driver to go into promisc
> mode? Or does the frame filtering registers simply get clobbered
> somewhere internally?
> Let's do some more testing and get this fixed properly...

Yeah I know DW GMAC is used a lot around the globe in different forms.
For example I have Cubieboard2 where it is used and there I cannot reproduce
the same problem.

Luckily I have access to GMAC documentation and so I was able to check that
Linux driver correctly programs "MAC frame filter" in different situations
and still in some cases even if "PR" bit (bit #0) is set CPU doesn't get
packages which DST MAC differs from GMAC's one.

I.e. it looks like hardware for some reason operates not in the mode it was
instructed/programmed to be in.

I tried to check if "MAC frame filter" register gets corrupted every time
new value was about to be written there but I haven't seen unexpected values.
So either that "corruption" happens as a side-effect of some other operations
or internal state-machine enters unexpected state based on some external events.

If someone may try my reproduction scenario on other boards with DW GMAC 
it might give us more datapoints here.

So what I do (before connection of network cable!) is:
ifconfig eth0 up
brctl addbr br0
brctl addif br0 eth0
ifconfig br0 up
tcpdump -vv -i eth0 -n -e

Then connect network cable and see if tcpdump shows anything.

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list