net: stmmac: Fixes for -net
Subsystems (4)
PATCH 1/3 net: stmmac: selftests: Check if filtering is available before running
In reply to Jose AbreuWe need to check if the number of available Hash Filters is enough to run the test, otherwise we will get false failures.
---
Cc: Giuseppe Cavallaro <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--- drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +7 -0
@@ -496,6 +496,9 @@ static int stmmac_test_hfilt(struct stmmac_priv *priv)if (ret)return ret; +if (netdev_mc_count (priv->dev) >= priv->hw->multicast_filter_bins) +return -EOPNOTSUPP ; + ret =dev_mc_add (priv->dev, gd_addr);if (ret)return ret;
@@ -573,6 +576,8 @@ static int stmmac_test_mcfilt(struct stmmac_priv *priv)if (stmmac_filter_check (priv))return -EOPNOTSUPP ; +if (!priv->hw->multicast_filter_bins) +return -EOPNOTSUPP ;/* Remove all MC addresses */ __dev_mc_unsync (priv->dev,NULL );
@@ -611,6 +616,8 @@ static int stmmac_test_ucfilt(struct stmmac_priv *priv)if (stmmac_filter_check (priv))return -EOPNOTSUPP ; +if (!priv->hw->multicast_filter_bins) +return -EOPNOTSUPP ;/* Remove all UC addresses */ __dev_uc_unsync (priv->dev,NULL );
Signature · 1 line
2.7.4
PATCH 2/3 net: stmmac: gmac4+: Not all Unicast addresses may be available
In reply to Jose AbreuSome setups may not have all Unicast addresses filters available. Check the number of available filters before trying to setup it.
---
Cc: Giuseppe Cavallaro <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +1 -1
@@ -448,7 +448,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw, value |=GMAC_PACKET_FILTER_HPF ;/* Handle multiple unicast addresses */ -if (netdev_uc_count (dev) >GMAC_MAX_PERFECT_ADDRESSES ) { +if (netdev_uc_count (dev) > hw->unicast_filter_entries) {/* Switch to promiscuous mode if more than 128 addrs * are required */
Signature · 1 line
2.7.4
cover net: stmmac: Fixes for -net
Fixes for -net. More info in commit logs.
---
Cc: Giuseppe Cavallaro <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
---
Jose Abreu (3):
net: stmmac: selftests: Check if filtering is available before running
net: stmmac: gmac4+: Not all Unicast addresses may be available
net: stmmac: selftests: Fix L2 Hash Filter test
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-)
Signature · 7 lines
2.7.4 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 3/3 net: stmmac: selftests: Fix L2 Hash Filter test
With the current MAC addresses hard-coded in the test we can get some false positives as we use the Hash Filtering method. Let's change the MAC addresses in the tests to be unique when hashed.
---
Cc: Giuseppe Cavallaro <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Cc: Jose Abreu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Maxime Coquelin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
--- drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +2 -2
@@ -487,8 +487,8 @@ static int stmmac_filter_check(struct stmmac_priv *priv)static int stmmac_test_hfilt (struct stmmac_priv *priv) { -unsigned char gd_addr[ETH_ALEN ] = {0x01 ,0x00 ,0xcc ,0xcc ,0xdd ,0xdd }; -unsigned char bd_addr[ETH_ALEN ] = {0x09 ,0x00 ,0xaa ,0xaa ,0xbb ,0xbb }; +unsigned char gd_addr[ETH_ALEN ] = {0x01 ,0xee ,0xdd ,0xcc ,0xbb ,0xaa }; +unsigned char bd_addr[ETH_ALEN ] = {0x01 ,0x01 ,0x02 ,0x03 ,0x04 ,0x05 };struct stmmac_packet_attrs attr = { };int ret;
Signature · 1 line
2.7.4
David Miller
maintainerFrom: Jose Abreu <[email protected]>
Date: Sun, 6 Oct 2019 13:08:54 +0200
Quoted 1 line
Fixes for -net. More info in commit logs.
Series applied, thank you.