RE: [v5, PATCH] net: stmmac: add support for hash table size 128/256 in dwmac4

From: biao huang
Date: Wed May 29 2019 - 23:35:27 EST


Hi Jose,
I also try "ethtool -A eth0 tx on rx on", and selftests pass.

But there are bugs in dwmac4_flow_ctrl:
flow control will keep on once enabled.
ethtool -A eth0 tx off rx off can't change it.

if (fc & FLOW_RX) {
pr_debug ...
flow |= GMAC_RX_FLOW_CTRL_RFE;
writel(flow, ioaddr + GMAC_RX_FLOW_CTRL);
>> this should move outside to enasure rx flow control will be off
when execute "ethtool -A eth0 rx off"
}

same for tx.

On Wed, 2019-05-29 at 10:30 +0000, Jose Abreu wrote:
> From: Biao Huang <biao.huang@xxxxxxxxxxxx>
> Date: Wed, May 29, 2019 at 10:31:08
>
> > 1. get hash table size in hw feature reigster, and add support
> > for taller hash table(128/256) in dwmac4.
> > 2. only clear GMAC_PACKET_FILTER bits used in this function,
> > to avoid side effect to functions of other bits.
> >
> > stmmac selftests output log:
> > ethtool -t eth0
> > The test result is FAIL
> > The test extra info:
> > 1. MAC Loopback 0
> > 2. PHY Loopback -95
> > 3. MMC Counters 0
> > 4. EEE -95
> > 5. Hash Filter MC 0
> > 6. Perfect Filter UC 0
> > 7. MC Filter 0
> > 8. UC Filter 0
> > 9. Flow Control 1
>
> Thanks for testing, this patch looks good to me.
>
> Do you want to check why Flow Control selftest is failing ?
>
>
> Thanks,
> Jose Miguel Abreu