diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2019-08-07 10:03:16 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-08 22:20:19 -0700 |
commit | 56e58d6c8a5640eb708e85866e9d243d0357ee54 (patch) | |
tree | 6330701501c76fc148cb14ac534353fad4264c00 /drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | |
parent | net: stmmac: selftests: Add test for VLAN and Double VLAN Filtering (diff) | |
download | linux-dev-56e58d6c8a5640eb708e85866e9d243d0357ee54.tar.xz linux-dev-56e58d6c8a5640eb708e85866e9d243d0357ee54.zip |
net: stmmac: Implement Safety Features in XGMAC core
XGMAC also supports Safety Features. This patch implements the
configuration and handling of this feature in XGMAC core.
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c index b50e275e76c2..e4a1c877f2e1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c @@ -399,6 +399,10 @@ static void dwxgmac2_get_hw_feature(void __iomem *ioaddr, ((hw_cap & XGMAC_HWFEAT_TXQCNT) >> 6) + 1; dma_cap->number_rx_queues = ((hw_cap & XGMAC_HWFEAT_RXQCNT) >> 0) + 1; + + /* MAC HW feature 3 */ + hw_cap = readl(ioaddr + XGMAC_HW_FEATURE3); + dma_cap->asp = (hw_cap & XGMAC_HWFEAT_ASP) >> 14; } static void dwxgmac2_rx_watchdog(void __iomem *ioaddr, u32 riwt, u32 nchan) |