mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
net: stmmac: Check if CBS is supported before configuring
[ Upstream commit 0650d4017f ]
Check if CBS is currently supported before trying to configure it in HW.
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fcfdb4022c
commit
e8fbb5c98b
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user