* [PATCH v2 net-next] net: fix dma operation mode config for older versions
@ 2017-03-21 18:00 Joao Pinto
2017-03-21 18:56 ` Florian Fainelli
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Joao Pinto @ 2017-03-21 18:00 UTC (permalink / raw)
To: davem
Cc: peppe.cavallaro, alexandre.torgue, clabbe.montjoie,
thierry.reding, ^Crgei.shtylyov, netdev, Joao Pinto
This patch fixes a bug introduced in:
commit 6deee2221e11 ("net: stmmac: prepare dma op mode config for multiple
queues")
The dma operation mode configuration routine was wrongly moved to a
function (stmmac_mtl_configuration) that is only executed if the
core version is >= 4.00.
Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: Joao Pinto <jpinto@synopsys.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index d3a2151..225a3a3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1945,9 +1945,6 @@ static void stmmac_mtl_configuration(struct stmmac_priv *priv)
/* Enable MAC RX Queues */
if (rx_queues_count > 1 && priv->hw->mac->rx_queue_enable)
stmmac_mac_enable_rx_queues(priv);
-
- /* Set the HW DMA mode and the COE */
- stmmac_dma_operation_mode(priv);
}
/**
@@ -2014,6 +2011,9 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
else
stmmac_set_mac(priv->ioaddr, true);
+ /* Set the HW DMA mode and the COE */
+ stmmac_dma_operation_mode(priv);
+
stmmac_mmc_setup(priv);
if (init_ptp) {
--
2.9.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 net-next] net: fix dma operation mode config for older versions
2017-03-21 18:00 [PATCH v2 net-next] net: fix dma operation mode config for older versions Joao Pinto
@ 2017-03-21 18:56 ` Florian Fainelli
2017-03-22 11:07 ` Joao Pinto
2017-03-21 20:42 ` Thierry Reding
2017-03-21 20:46 ` Thierry Reding
2 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2017-03-21 18:56 UTC (permalink / raw)
To: Joao Pinto, davem
Cc: peppe.cavallaro, alexandre.torgue, clabbe.montjoie,
thierry.reding, sergei.shtylyov, netdev
On 03/21/2017 11:02 AM, Joao Pinto wrote:
> This patch fixes a bug introduced in:
> commit 6deee2221e11 ("net: stmmac: prepare dma op mode config for multiple
> queues")
So even though this is against net-next which is the only tree so far
having the offending commit, it is nice to see this appear later in the
commit messages as:
Fixes: 6deee2221e11 ("net: stmmac: prepare dma op mode config for
multiple queues")
Also, your subject for this patch should be:
net: stmmac: fix dma operation mode config for older versions
>
> The dma operation mode configuration routine was wrongly moved to a
> function (stmmac_mtl_configuration) that is only executed if the
> core version is >= 4.00.
>
> Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index d3a2151..225a3a3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1945,9 +1945,6 @@ static void stmmac_mtl_configuration(struct stmmac_priv *priv)
> /* Enable MAC RX Queues */
> if (rx_queues_count > 1 && priv->hw->mac->rx_queue_enable)
> stmmac_mac_enable_rx_queues(priv);
> -
> - /* Set the HW DMA mode and the COE */
> - stmmac_dma_operation_mode(priv);
> }
>
> /**
> @@ -2014,6 +2011,9 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
> else
> stmmac_set_mac(priv->ioaddr, true);
>
> + /* Set the HW DMA mode and the COE */
> + stmmac_dma_operation_mode(priv);
> +
> stmmac_mmc_setup(priv);
>
> if (init_ptp) {
>
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 net-next] net: fix dma operation mode config for older versions
2017-03-21 18:00 [PATCH v2 net-next] net: fix dma operation mode config for older versions Joao Pinto
2017-03-21 18:56 ` Florian Fainelli
@ 2017-03-21 20:42 ` Thierry Reding
2017-03-21 20:46 ` Thierry Reding
2 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2017-03-21 20:42 UTC (permalink / raw)
To: Joao Pinto
Cc: davem, peppe.cavallaro, alexandre.torgue, clabbe.montjoie,
^Crgei.shtylyov, netdev
[-- Attachment #1: Type: text/plain, Size: 706 bytes --]
On Tue, Mar 21, 2017 at 06:00:53PM +0000, Joao Pinto wrote:
> This patch fixes a bug introduced in:
> commit 6deee2221e11 ("net: stmmac: prepare dma op mode config for multiple
> queues")
>
> The dma operation mode configuration routine was wrongly moved to a
> function (stmmac_mtl_configuration) that is only executed if the
> core version is >= 4.00.
>
> Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
With Florian's comments addressed, this is:
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 net-next] net: fix dma operation mode config for older versions
2017-03-21 18:00 [PATCH v2 net-next] net: fix dma operation mode config for older versions Joao Pinto
2017-03-21 18:56 ` Florian Fainelli
2017-03-21 20:42 ` Thierry Reding
@ 2017-03-21 20:46 ` Thierry Reding
2 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2017-03-21 20:46 UTC (permalink / raw)
To: Joao Pinto
Cc: davem, peppe.cavallaro, alexandre.torgue, clabbe.montjoie,
sergei.shtylyov, netdev
[-- Attachment #1: Type: text/plain, Size: 755 bytes --]
Resending with Sergei's proper email address.
On Tue, Mar 21, 2017 at 06:02:36PM +0000, Joao Pinto wrote:
> This patch fixes a bug introduced in:
> commit 6deee2221e11 ("net: stmmac: prepare dma op mode config for multiple
> queues")
>
> The dma operation mode configuration routine was wrongly moved to a
> function (stmmac_mtl_configuration) that is only executed if the
> core version is >= 4.00.
>
> Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
With Florian's comments addressed, this is:
Reviewed-by: Thierry Reding <thierry.reding@gmail.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 net-next] net: fix dma operation mode config for older versions
2017-03-21 18:56 ` Florian Fainelli
@ 2017-03-22 11:07 ` Joao Pinto
0 siblings, 0 replies; 5+ messages in thread
From: Joao Pinto @ 2017-03-22 11:07 UTC (permalink / raw)
To: Florian Fainelli, Joao Pinto, davem
Cc: peppe.cavallaro, alexandre.torgue, clabbe.montjoie,
thierry.reding, sergei.shtylyov, netdev
Às 6:56 PM de 3/21/2017, Florian Fainelli escreveu:
> On 03/21/2017 11:02 AM, Joao Pinto wrote:
>> This patch fixes a bug introduced in:
>> commit 6deee2221e11 ("net: stmmac: prepare dma op mode config for multiple
>> queues")
>
> So even though this is against net-next which is the only tree so far
> having the offending commit, it is nice to see this appear later in the
> commit messages as:
>
> Fixes: 6deee2221e11 ("net: stmmac: prepare dma op mode config for
> multiple queues")
>
> Also, your subject for this patch should be:
>
> net: stmmac: fix dma operation mode config for older versions
Ok, I will do that! Thanks.
>
>>
>> The dma operation mode configuration routine was wrongly moved to a
>> function (stmmac_mtl_configuration) that is only executed if the
>> core version is >= 4.00.
>>
>> Reported-by: Corentin Labbe <clabbe.montjoie@gmail.com>
>> Signed-off-by: Joao Pinto <jpinto@synopsys.com>
>> ---
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> index d3a2151..225a3a3 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> @@ -1945,9 +1945,6 @@ static void stmmac_mtl_configuration(struct stmmac_priv *priv)
>> /* Enable MAC RX Queues */
>> if (rx_queues_count > 1 && priv->hw->mac->rx_queue_enable)
>> stmmac_mac_enable_rx_queues(priv);
>> -
>> - /* Set the HW DMA mode and the COE */
>> - stmmac_dma_operation_mode(priv);
>> }
>>
>> /**
>> @@ -2014,6 +2011,9 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
>> else
>> stmmac_set_mac(priv->ioaddr, true);
>>
>> + /* Set the HW DMA mode and the COE */
>> + stmmac_dma_operation_mode(priv);
>> +
>> stmmac_mmc_setup(priv);
>>
>> if (init_ptp) {
>>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-03-22 11:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-21 18:00 [PATCH v2 net-next] net: fix dma operation mode config for older versions Joao Pinto
2017-03-21 18:56 ` Florian Fainelli
2017-03-22 11:07 ` Joao Pinto
2017-03-21 20:42 ` Thierry Reding
2017-03-21 20:46 ` Thierry Reding
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.