From: Jose Abreu <Jose.Abreu@synopsys.com> Date: 2017-10-26 09:07:35
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 <redacted>
Cc: Joao Pinto <redacted>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <redacted>
Cc: Alexandre Torgue <redacted>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++
1 file changed, 7 insertions(+)
@@ -150,6 +150,13 @@ static void stmmac_mtl_setup(struct platform_device *pdev,plat->rx_queues_to_use=1;plat->tx_queues_to_use=1;+/* First Queue must always be in DCB mode. As MTL_QUEUE_DCB = 1 we need+*toalwayssetthis,otherwiseQueuewillbeclassifiedasAVB+*(becauseMTL_QUEUE_AVB=0).+*/+plat->rx_queues_cfg[0].mode_to_use=MTL_QUEUE_DCB;+plat->tx_queues_cfg[0].mode_to_use=MTL_QUEUE_DCB;+rx_node=of_parse_phandle(pdev->dev.of_node,"snps,mtl-rx-config",0);if(!rx_node)return;
-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-
owner@vger.kernel.org] On Behalf Of Jose Abreu
Sent: Thursday, October 26, 2017 2:37 PM
To: netdev@vger.kernel.org; linux-kernel@vger.kernel.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>; Joao Pinto
[off-list ref]; David S. Miller [off-list ref];
Giuseppe Cavallaro [off-list ref]; Alexandre Torgue
[off-list ref]
Subject: [PATCH net] 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 <redacted>
Cc: Joao Pinto <redacted>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <redacted>
Cc: Alexandre Torgue <redacted>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++
1 file changed, 7 insertions(+)
platform_device *pdev,
plat->rx_queues_to_use = 1;
plat->tx_queues_to_use = 1;
+ /* First Queue must always be in DCB mode. As MTL_QUEUE_DCB =
1 we need
+ * to always set this, otherwise Queue will be classified as AVB
+ * (because MTL_QUEUE_AVB = 0).
+ */
Its better if we can check whether IP HW features (register - 0x120) supports the DCB or not. If yes, then set the DCB mode.
There is possibility that DCB feature not enable for few of the Synopsys IP's.
Thanks,
Bhadram.
From: Jose Abreu <Jose.Abreu@synopsys.com> Date: 2017-10-26 11:49:34
Hi Bhadram,
On 26-10-2017 11:51, Bhadram Varka wrote:
Hi Jose,
quoted
-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-
owner@vger.kernel.org] On Behalf Of Jose Abreu
Sent: Thursday, October 26, 2017 2:37 PM
To: netdev@vger.kernel.org; linux-kernel@vger.kernel.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>; Joao Pinto
[off-list ref]; David S. Miller [off-list ref];
Giuseppe Cavallaro [off-list ref]; Alexandre Torgue
[off-list ref]
Subject: [PATCH net] 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 <redacted>
Cc: Joao Pinto <redacted>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <redacted>
Cc: Alexandre Torgue <redacted>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++
1 file changed, 7 insertions(+)
platform_device *pdev,
plat->rx_queues_to_use = 1;
plat->tx_queues_to_use = 1;
+ /* First Queue must always be in DCB mode. As MTL_QUEUE_DCB =
1 we need
+ * to always set this, otherwise Queue will be classified as AVB
+ * (because MTL_QUEUE_AVB = 0).
+ */
Its better if we can check whether IP HW features (register - 0x120) supports the DCB or not. If yes, then set the DCB mode.
There is possibility that DCB feature not enable for few of the Synopsys IP's.
A queue can either be in Generic/DCB or AVB mode. The sequence to
enable a DCB or a Generic queue is the same so there is no need
to check for DCB capability in HW.
Best Regards,
Jose Miguel Abreu
-----Original Message-----
From: Jose Abreu [mailto:Jose.Abreu@synopsys.com]
Sent: Thursday, October 26, 2017 5:19 PM
To: Bhadram Varka <redacted>; netdev@vger.kernel.org;
linux-kernel@vger.kernel.org
Cc: Joao Pinto <redacted>; David S. Miller
[off-list ref]; Giuseppe Cavallaro [off-list ref];
Alexandre Torgue [off-list ref]
Subject: Re: [PATCH net] net: stmmac: First Queue must always be in DCB
mode
Hi Bhadram,
On 26-10-2017 11:51, Bhadram Varka wrote:
quoted
Hi Jose,
quoted
-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-
owner@vger.kernel.org] On Behalf Of Jose Abreu
Sent: Thursday, October 26, 2017 2:37 PM
To: netdev@vger.kernel.org; linux-kernel@vger.kernel.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>; Joao Pinto
[off-list ref]; David S. Miller [off-list ref];
Giuseppe Cavallaro [off-list ref]; Alexandre Torgue
[off-list ref]
Subject: [PATCH net] 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 <redacted>
Cc: Joao Pinto <redacted>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <redacted>
Cc: Alexandre Torgue <redacted>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++
1 file changed, 7 insertions(+)
platform_device *pdev,
plat->rx_queues_to_use = 1;
plat->tx_queues_to_use = 1;
+ /* First Queue must always be in DCB mode. As MTL_QUEUE_DCB =
1 we need
+ * to always set this, otherwise Queue will be classified as AVB
+ * (because MTL_QUEUE_AVB = 0).
+ */
Its better if we can check whether IP HW features (register - 0x120)
supports the DCB or not. If yes, then set the DCB mode.
quoted
There is possibility that DCB feature not enable for few of the Synopsys
IP's.
A queue can either be in Generic/DCB or AVB mode. The sequence to enable
a DCB or a Generic queue is the same so there is no need to check for DCB
capability in HW.
Point is that we don't have DCB enabled for the IP.
From your point it will work in Generic (legacy) mode if we set DCB filed. If this is the understanding then we are fine.
From: Jose Abreu <Jose.Abreu@synopsys.com> Date: 2017-10-27 08:11:09
On 26-10-2017 15:44, Bhadram Varka wrote:
Hi Jose,
quoted
-----Original Message-----
From: Jose Abreu [mailto:Jose.Abreu@synopsys.com]
Sent: Thursday, October 26, 2017 5:19 PM
To: Bhadram Varka <redacted>; netdev@vger.kernel.org;
linux-kernel@vger.kernel.org
Cc: Joao Pinto <redacted>; David S. Miller
[off-list ref]; Giuseppe Cavallaro [off-list ref];
Alexandre Torgue [off-list ref]
Subject: Re: [PATCH net] net: stmmac: First Queue must always be in DCB
mode
Hi Bhadram,
On 26-10-2017 11:51, Bhadram Varka wrote:
quoted
Hi Jose,
quoted
-----Original Message-----
From: netdev-owner@vger.kernel.org [mailto:netdev-
owner@vger.kernel.org] On Behalf Of Jose Abreu
Sent: Thursday, October 26, 2017 2:37 PM
To: netdev@vger.kernel.org; linux-kernel@vger.kernel.org
Cc: Jose Abreu <Jose.Abreu@synopsys.com>; Joao Pinto
[off-list ref]; David S. Miller [off-list ref];
Giuseppe Cavallaro [off-list ref]; Alexandre Torgue
[off-list ref]
Subject: [PATCH net] 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 <redacted>
Cc: Joao Pinto <redacted>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <redacted>
Cc: Alexandre Torgue <redacted>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++
1 file changed, 7 insertions(+)
platform_device *pdev,
plat->rx_queues_to_use = 1;
plat->tx_queues_to_use = 1;
+ /* First Queue must always be in DCB mode. As MTL_QUEUE_DCB =
1 we need
+ * to always set this, otherwise Queue will be classified as AVB
+ * (because MTL_QUEUE_AVB = 0).
+ */
Its better if we can check whether IP HW features (register - 0x120)
supports the DCB or not. If yes, then set the DCB mode.
quoted
There is possibility that DCB feature not enable for few of the Synopsys
IP's.
A queue can either be in Generic/DCB or AVB mode. The sequence to enable
a DCB or a Generic queue is the same so there is no need to check for DCB
capability in HW.
Point is that we don't have DCB enabled for the IP.
From your point it will work in Generic (legacy) mode if we set DCB filed. If this is the understanding then we are fine.
Yes, thats true. Generic and DCB have the same configuration.
Best Regards,
Jose Miguel Abreu
From: David Miller <davem@davemloft.net> Date: 2017-10-27 14:34:10
From: Jose Abreu <Jose.Abreu@synopsys.com>
Date: Thu, 26 Oct 2017 10:07:12 +0100
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 <redacted>