diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2017-10-26 05:07:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-27 10:32:56 -0400 |
commit | 6d9f0790af8d33476f936ac84a07cac42f808f6c (patch) | |
tree | b0c67323b6efaa38600882d7bca4749078b2450e | |
parent | 4894ac6b6c25b2693dc21c611621dc9fd21f4090 (diff) |
net: stmmac: First Queue must always be in DCB mode
According to DWMAC databook the first queue operating mode
must always be in DCB.
As MTL_QUEUE_DCB = 1, we need to always set the first queue
operating mode to DCB otherwise driver will think that queue
is in AVB mode (because MTL_QUEUE_AVB = 0).
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
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: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 8a280b48e3a9..6383695004a5 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | |||
@@ -150,6 +150,13 @@ static void stmmac_mtl_setup(struct platform_device *pdev, | |||
150 | plat->rx_queues_to_use = 1; | 150 | plat->rx_queues_to_use = 1; |
151 | plat->tx_queues_to_use = 1; | 151 | plat->tx_queues_to_use = 1; |
152 | 152 | ||
153 | /* First Queue must always be in DCB mode. As MTL_QUEUE_DCB = 1 we need | ||
154 | * to always set this, otherwise Queue will be classified as AVB | ||
155 | * (because MTL_QUEUE_AVB = 0). | ||
156 | */ | ||
157 | plat->rx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; | ||
158 | plat->tx_queues_cfg[0].mode_to_use = MTL_QUEUE_DCB; | ||
159 | |||
153 | rx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-rx-config", 0); | 160 | rx_node = of_parse_phandle(pdev->dev.of_node, "snps,mtl-rx-config", 0); |
154 | if (!rx_node) | 161 | if (!rx_node) |
155 | return; | 162 | return; |