]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: stmmac: selftests: Flow Control test can also run with ASYM Pause
authorJose Abreu <Jose.Abreu@synopsys.com>
Mon, 23 Sep 2019 07:49:08 +0000 (09:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Sep 2019 11:58:25 +0000 (13:58 +0200)
The Flow Control selftest is also available with ASYM Pause. Lets add
this check to the test and fix eventual false positive failures.

Fixes: 27b280e05184 ("net: stmmac: Introduce selftests support")
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c

index 9c8d210b2d6a184a4e461d6d749d47b8a5cca002..5f66f6161629a3d0e4bb89e42f011f4db4f39931 100644 (file)
@@ -670,7 +670,7 @@ static int stmmac_test_flowctrl(struct stmmac_priv *priv)
        unsigned int pkt_count;
        int i, ret = 0;
 
-       if (!phydev || !phydev->pause)
+       if (!phydev || (!phydev->pause && !phydev->asym_pause))
                return -EOPNOTSUPP;
 
        tpriv = kzalloc(sizeof(*tpriv), GFP_KERNEL);