diff options
author | Jose Abreu <[email protected]> | 2019-01-09 10:05:58 +0100 |
---|---|---|
committer | David S. Miller <[email protected]> | 2019-01-11 15:35:06 -0800 |
commit | 0650d4017f4d2eee67230a02285a7ae5204240c2 (patch) | |
tree | ad26020d5c0dadd0a810f7fe18f2941cae80ae63 | |
parent | fcc509eb10ff4794641e6ad3082118287a750d0a (diff) |
net: stmmac: Check if CBS is supported before configuring
Check if CBS is currently supported before trying to configure it in HW.
Cc: Joao Pinto <[email protected]>
Cc: David S. Miller <[email protected]>
Cc: Giuseppe Cavallaro <[email protected]>
Cc: Alexandre Torgue <[email protected]>
Signed-off-by: Jose Abreu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c index 531294f4978b..58ea18af9813 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c @@ -301,6 +301,8 @@ static int tc_setup_cbs(struct stmmac_priv *priv, /* Queue 0 is not AVB capable */ if (queue <= 0 || queue >= tx_queues_count) return -EINVAL; + if (!priv->dma_cap.av) + return -EOPNOTSUPP; if (priv->speed != SPEED_100 && priv->speed != SPEED_1000) return -EOPNOTSUPP; |