* [PATCH 0/5] DPAA Ethernet fixes
@ 2018-03-14 13:37 Madalin Bucur
2018-03-14 13:37 ` [PATCH 1/5] soc/fsl/qbman: fix issue in qman_delete_cgr_safe() Madalin Bucur
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel, Madalin Bucur
Hi,
This patch set is addressing several issues in the DPAA Ethernet
driver suite:
- module unload crash caused by wrong reference to device being left
in the cleanup code after the DSA related changes
- scheduling wile atomic bug in QMan code revealed during dpaa_eth
module unload
- a couple of error counter fixes, a duplicated init in dpaa_eth.
Madalin
Camelia Groza (3):
dpaa_eth: remove duplicate initialization
dpaa_eth: increment the RX dropped counter when needed
dpaa_eth: remove duplicate increment of the tx_errors counter
Madalin Bucur (2):
soc/fsl/qbman: fix issue in qman_delete_cgr_safe()
dpaa_eth: fix error in dpaa_remove()
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 8 ++++----
drivers/soc/fsl/qbman/qman.c | 28 +++++---------------------
2 files changed, 9 insertions(+), 27 deletions(-)
--
2.1.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/5] soc/fsl/qbman: fix issue in qman_delete_cgr_safe()
2018-03-14 13:37 [PATCH 0/5] DPAA Ethernet fixes Madalin Bucur
@ 2018-03-14 13:37 ` Madalin Bucur
2018-03-14 13:37 ` [PATCH 2/5] dpaa_eth: fix error in dpaa_remove() Madalin Bucur
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel, Madalin Bucur, Roy Pledge
The wait_for_completion() call in qman_delete_cgr_safe()
was triggering a scheduling while atomic bug, replacing the
kthread with a smp_call_function_single() call to fix it.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
Signed-off-by: Roy Pledge <roy.pledge@nxp.com>
---
drivers/soc/fsl/qbman/qman.c | 28 +++++-----------------------
1 file changed, 5 insertions(+), 23 deletions(-)
diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c
index e4f5bb0..ba3cfa8 100644
--- a/drivers/soc/fsl/qbman/qman.c
+++ b/drivers/soc/fsl/qbman/qman.c
@@ -2443,39 +2443,21 @@ struct cgr_comp {
struct completion completion;
};
-static int qman_delete_cgr_thread(void *p)
+static void qman_delete_cgr_smp_call(void *p)
{
- struct cgr_comp *cgr_comp = (struct cgr_comp *)p;
- int ret;
-
- ret = qman_delete_cgr(cgr_comp->cgr);
- complete(&cgr_comp->completion);
-
- return ret;
+ qman_delete_cgr((struct qman_cgr *)p);
}
void qman_delete_cgr_safe(struct qman_cgr *cgr)
{
- struct task_struct *thread;
- struct cgr_comp cgr_comp;
-
preempt_disable();
if (qman_cgr_cpus[cgr->cgrid] != smp_processor_id()) {
- init_completion(&cgr_comp.completion);
- cgr_comp.cgr = cgr;
- thread = kthread_create(qman_delete_cgr_thread, &cgr_comp,
- "cgr_del");
-
- if (IS_ERR(thread))
- goto out;
-
- kthread_bind(thread, qman_cgr_cpus[cgr->cgrid]);
- wake_up_process(thread);
- wait_for_completion(&cgr_comp.completion);
+ smp_call_function_single(qman_cgr_cpus[cgr->cgrid],
+ qman_delete_cgr_smp_call, cgr, true);
preempt_enable();
return;
}
-out:
+
qman_delete_cgr(cgr);
preempt_enable();
}
--
2.1.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/5] dpaa_eth: fix error in dpaa_remove()
2018-03-14 13:37 [PATCH 0/5] DPAA Ethernet fixes Madalin Bucur
2018-03-14 13:37 ` [PATCH 1/5] soc/fsl/qbman: fix issue in qman_delete_cgr_safe() Madalin Bucur
@ 2018-03-14 13:37 ` Madalin Bucur
2018-03-14 13:37 ` [PATCH 3/5] dpaa_eth: remove duplicate initialization Madalin Bucur
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel, Madalin Bucur
The recent changes that make the driver probing compatible with DSA
were not propagated in the dpa_remove() function, breaking the
module unload function. Using the proper device to address the issue.
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 159dc2d..128e0a4 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2871,7 +2871,7 @@ static int dpaa_remove(struct platform_device *pdev)
struct device *dev;
int err;
- dev = &pdev->dev;
+ dev = pdev->dev.parent;
net_dev = dev_get_drvdata(dev);
priv = netdev_priv(net_dev);
--
2.1.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/5] dpaa_eth: remove duplicate initialization
2018-03-14 13:37 [PATCH 0/5] DPAA Ethernet fixes Madalin Bucur
2018-03-14 13:37 ` [PATCH 1/5] soc/fsl/qbman: fix issue in qman_delete_cgr_safe() Madalin Bucur
2018-03-14 13:37 ` [PATCH 2/5] dpaa_eth: fix error in dpaa_remove() Madalin Bucur
@ 2018-03-14 13:37 ` Madalin Bucur
2018-03-14 13:37 ` [PATCH 4/5] dpaa_eth: increment the RX dropped counter when needed Madalin Bucur
` (3 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel
From: Camelia Groza <camelia.groza@nxp.com>
The fd_format has already been initialized at this point.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 128e0a4..3e83d79 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2289,7 +2289,6 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal,
vaddr = phys_to_virt(addr);
prefetch(vaddr + qm_fd_get_offset(fd));
- fd_format = qm_fd_get_format(fd);
/* The only FD types that we may receive are contig and S/G */
WARN_ON((fd_format != qm_fd_contig) && (fd_format != qm_fd_sg));
--
2.1.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/5] dpaa_eth: increment the RX dropped counter when needed
2018-03-14 13:37 [PATCH 0/5] DPAA Ethernet fixes Madalin Bucur
` (2 preceding siblings ...)
2018-03-14 13:37 ` [PATCH 3/5] dpaa_eth: remove duplicate initialization Madalin Bucur
@ 2018-03-14 13:37 ` Madalin Bucur
2018-03-14 13:37 ` [PATCH 5/5] dpaa_eth: remove duplicate increment of the tx_errors counter Madalin Bucur
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel
From: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 3e83d79..76b3c9e 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2321,8 +2321,10 @@ static enum qman_cb_dqrr_result rx_default_dqrr(struct qman_portal *portal,
skb_len = skb->len;
- if (unlikely(netif_receive_skb(skb) == NET_RX_DROP))
+ if (unlikely(netif_receive_skb(skb) == NET_RX_DROP)) {
+ percpu_stats->rx_dropped++;
return qman_cb_dqrr_consume;
+ }
percpu_stats->rx_packets++;
percpu_stats->rx_bytes += skb_len;
--
2.1.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 5/5] dpaa_eth: remove duplicate increment of the tx_errors counter
2018-03-14 13:37 [PATCH 0/5] DPAA Ethernet fixes Madalin Bucur
` (3 preceding siblings ...)
2018-03-14 13:37 ` [PATCH 4/5] dpaa_eth: increment the RX dropped counter when needed Madalin Bucur
@ 2018-03-14 13:37 ` Madalin Bucur
2018-03-14 17:17 ` [PATCH 0/5] DPAA Ethernet fixes David Miller
2018-03-14 18:43 ` Joakim Tjernlund
6 siblings, 0 replies; 10+ messages in thread
From: Madalin Bucur @ 2018-03-14 13:37 UTC (permalink / raw)
To: davem
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel, Madalin Bucur
From: Camelia Groza <camelia.groza@nxp.com>
The tx_errors counter is incremented by the dpaa_xmit caller.
Signed-off-by: Camelia Groza <camelia.groza@nxp.com>
Signed-off-by: Madalin Bucur <madalin.bucur@nxp.com>
---
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 76b3c9e..fd43f98 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -2021,7 +2021,6 @@ static inline int dpaa_xmit(struct dpaa_priv *priv,
}
if (unlikely(err < 0)) {
- percpu_stats->tx_errors++;
percpu_stats->tx_fifo_errors++;
return err;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] DPAA Ethernet fixes
2018-03-14 13:37 [PATCH 0/5] DPAA Ethernet fixes Madalin Bucur
` (4 preceding siblings ...)
2018-03-14 13:37 ` [PATCH 5/5] dpaa_eth: remove duplicate increment of the tx_errors counter Madalin Bucur
@ 2018-03-14 17:17 ` David Miller
2018-03-14 18:43 ` Joakim Tjernlund
6 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2018-03-14 17:17 UTC (permalink / raw)
To: madalin.bucur
Cc: netdev, linux-kernel, camelia.groza, leoyang.li, linuxppc-dev,
linux-arm-kernel
From: Madalin Bucur <madalin.bucur@nxp.com>
Date: Wed, 14 Mar 2018 08:37:27 -0500
> This patch set is addressing several issues in the DPAA Ethernet
> driver suite:
>
> - module unload crash caused by wrong reference to device being left
> in the cleanup code after the DSA related changes
> - scheduling wile atomic bug in QMan code revealed during dpaa_eth
> module unload
> - a couple of error counter fixes, a duplicated init in dpaa_eth.
Series applied, thank you.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] DPAA Ethernet fixes
2018-03-14 13:37 [PATCH 0/5] DPAA Ethernet fixes Madalin Bucur
` (5 preceding siblings ...)
2018-03-14 17:17 ` [PATCH 0/5] DPAA Ethernet fixes David Miller
@ 2018-03-14 18:43 ` Joakim Tjernlund
2018-03-15 9:32 ` Madalin-cristian Bucur
6 siblings, 1 reply; 10+ messages in thread
From: Joakim Tjernlund @ 2018-03-14 18:43 UTC (permalink / raw)
To: davem, madalin.bucur
Cc: linuxppc-dev, netdev, linux-kernel, leoyang.li, camelia.groza,
linux-arm-kernel
On Wed, 2018-03-14 at 08:37 -0500, Madalin Bucur wrote:
> Hi,
>
> This patch set is addressing several issues in the DPAA Ethernet
> driver suite:
>
> - module unload crash caused by wrong reference to device being left
> in the cleanup code after the DSA related changes
> - scheduling wile atomic bug in QMan code revealed during dpaa_eth
> module unload
> - a couple of error counter fixes, a duplicated init in dpaa_eth.
hmm, some of these(all?) bugs are in stable too, CC: stable perhaps?
>
> Madalin
>
> Camelia Groza (3):
> dpaa_eth: remove duplicate initialization
> dpaa_eth: increment the RX dropped counter when needed
> dpaa_eth: remove duplicate increment of the tx_errors counter
>
> Madalin Bucur (2):
> soc/fsl/qbman: fix issue in qman_delete_cgr_safe()
> dpaa_eth: fix error in dpaa_remove()
>
> drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 8 ++++----
> drivers/soc/fsl/qbman/qman.c | 28 +++++---------------------
> 2 files changed, 9 insertions(+), 27 deletions(-)
>
> --
> 2.1.0
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: [PATCH 0/5] DPAA Ethernet fixes
2018-03-14 18:43 ` Joakim Tjernlund
@ 2018-03-15 9:32 ` Madalin-cristian Bucur
2018-03-15 15:15 ` David Miller
0 siblings, 1 reply; 10+ messages in thread
From: Madalin-cristian Bucur @ 2018-03-15 9:32 UTC (permalink / raw)
To: jocke@infinera.com, davem
Cc: linuxppc-dev, netdev, linux-kernel, Leo Li,
Camelia Alexandra Groza, linux-arm-kernel
> -----Original Message-----
> From: Joakim Tjernlund [mailto:Joakim.Tjernlund@infinera.com]
> Sent: Wednesday, March 14, 2018 8:43 PM
> To: davem@davemloft.net; Madalin-cristian Bucur
> <madalin.bucur@nxp.com>
>
> On Wed, 2018-03-14 at 08:37 -0500, Madalin Bucur wrote:
> > Hi,
> >
> > This patch set is addressing several issues in the DPAA Ethernet
> > driver suite:
> >
> > - module unload crash caused by wrong reference to device being left
> > in the cleanup code after the DSA related changes
> > - scheduling wile atomic bug in QMan code revealed during dpaa_eth
> > module unload
> > - a couple of error counter fixes, a duplicated init in dpaa_eth.
>
> hmm, some of these(all?) bugs are in stable too, CC: stable perhaps?
Hi Jocke,
I did not check that, they should be added.
Thanks,
Madalin
> >
> > Madalin
> >
> > Camelia Groza (3):
> > dpaa_eth: remove duplicate initialization
> > dpaa_eth: increment the RX dropped counter when needed
> > dpaa_eth: remove duplicate increment of the tx_errors counter
> >
> > Madalin Bucur (2):
> > soc/fsl/qbman: fix issue in qman_delete_cgr_safe()
> > dpaa_eth: fix error in dpaa_remove()
> >
> > drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 8 ++++----
> > drivers/soc/fsl/qbman/qman.c | 28 +++++---------------------
> > 2 files changed, 9 insertions(+), 27 deletions(-)
> >
> > --
> > 2.1.0
> >
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 0/5] DPAA Ethernet fixes
2018-03-15 9:32 ` Madalin-cristian Bucur
@ 2018-03-15 15:15 ` David Miller
0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2018-03-15 15:15 UTC (permalink / raw)
To: madalin.bucur
Cc: joakim.tjernlund, linuxppc-dev, netdev, linux-kernel, leoyang.li,
camelia.groza, linux-arm-kernel
From: Madalin-cristian Bucur <madalin.bucur@nxp.com>
Date: Thu, 15 Mar 2018 09:32:35 +0000
>> -----Original Message-----
>> From: Joakim Tjernlund [mailto:Joakim.Tjernlund@infinera.com]
>> Sent: Wednesday, March 14, 2018 8:43 PM
>> To: davem@davemloft.net; Madalin-cristian Bucur
>> <madalin.bucur@nxp.com>
>>
>> On Wed, 2018-03-14 at 08:37 -0500, Madalin Bucur wrote:
>> > Hi,
>> >
>> > This patch set is addressing several issues in the DPAA Ethernet
>> > driver suite:
>> >
>> > - module unload crash caused by wrong reference to device being left
>> > in the cleanup code after the DSA related changes
>> > - scheduling wile atomic bug in QMan code revealed during dpaa_eth
>> > module unload
>> > - a couple of error counter fixes, a duplicated init in dpaa_eth.
>>
>> hmm, some of these(all?) bugs are in stable too, CC: stable perhaps?
>
> Hi Jocke,
>
> I did not check that, they should be added.
Networking patches are not queued to stable by CC:'ing stable.
Instead you just simply need to ask me explicitly for -stable submission
which I will do at the appropriate time after the fixes have been able
to cook in Linus's tree for a little while.
I've queued this series up for that purpose, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-03-15 15:15 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-14 13:37 [PATCH 0/5] DPAA Ethernet fixes Madalin Bucur
2018-03-14 13:37 ` [PATCH 1/5] soc/fsl/qbman: fix issue in qman_delete_cgr_safe() Madalin Bucur
2018-03-14 13:37 ` [PATCH 2/5] dpaa_eth: fix error in dpaa_remove() Madalin Bucur
2018-03-14 13:37 ` [PATCH 3/5] dpaa_eth: remove duplicate initialization Madalin Bucur
2018-03-14 13:37 ` [PATCH 4/5] dpaa_eth: increment the RX dropped counter when needed Madalin Bucur
2018-03-14 13:37 ` [PATCH 5/5] dpaa_eth: remove duplicate increment of the tx_errors counter Madalin Bucur
2018-03-14 17:17 ` [PATCH 0/5] DPAA Ethernet fixes David Miller
2018-03-14 18:43 ` Joakim Tjernlund
2018-03-15 9:32 ` Madalin-cristian Bucur
2018-03-15 15:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).