diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2019-09-30 10:19:06 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-01 10:12:37 -0700 |
commit | c11986b9fa74cd3ce218e0ca7e0de88d30e6f497 (patch) | |
tree | 62edc33b2487106b20e8a32b7ad5de8c062a770e /drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | |
parent | net: stmmac: xgmac: Not all Unicast addresses may be available (diff) | |
download | linux-dev-c11986b9fa74cd3ce218e0ca7e0de88d30e6f497.tar.xz linux-dev-c11986b9fa74cd3ce218e0ca7e0de88d30e6f497.zip |
net: stmmac: xgmac: Detect Hash Table size dinamically
Since commit b8ef7020d6e5 ("net: stmmac: add support for hash table size
128/256 in dwmac4"), we can detect the Hash Table dinamically.
Let's implement this feature in XGMAC cores and fix possible setups that
don't support the maximum size for Hash Table.
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c index 53c4a40d8386..965cbe3e6f51 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c @@ -380,6 +380,7 @@ static void dwxgmac2_get_hw_feature(void __iomem *ioaddr, /* MAC HW feature 1 */ hw_cap = readl(ioaddr + XGMAC_HW_FEATURE1); dma_cap->l3l4fnum = (hw_cap & XGMAC_HWFEAT_L3L4FNUM) >> 27; + dma_cap->hash_tb_sz = (hw_cap & XGMAC_HWFEAT_HASHTBLSZ) >> 24; dma_cap->rssen = (hw_cap & XGMAC_HWFEAT_RSSEN) >> 20; dma_cap->tsoen = (hw_cap & XGMAC_HWFEAT_TSOEN) >> 18; dma_cap->sphen = (hw_cap & XGMAC_HWFEAT_SPHEN) >> 17; |