ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0348-staging-fsl-dpaa2-mac-reverse-order-of-handling-stop.patch
1 From c9db7ecdd08e38fb1af207c2a7e810b4bd0d1043 Mon Sep 17 00:00:00 2001
2 From: Ioana Ciornei <ioana.ciornei@nxp.com>
3 Date: Wed, 11 Dec 2019 17:06:40 +0200
4 Subject: [PATCH] staging: fsl-dpaa2/mac: reverse order of handling stop/start
5  IRQs
6
7 Both the LINK_UP_REQ and the LINK_DOWN_REQ IRQs can be received in the
8 same time when a reset is performed on the DPMAC's partner.
9 Handle first the link down and then the link up so that we do not
10 trigger a phylib WARNING like the following:
11
12 [  446.272011] called from state NOLINK
13 [  446.275604] WARNING: CPU: 0 PID: 473 at drivers/net/phy/phy.c:874
14 phy_start+0x44/0xa8
15
16 Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
17 ---
18  drivers/staging/fsl-dpaa2/mac/mac.c | 5 ++---
19  1 file changed, 2 insertions(+), 3 deletions(-)
20
21 --- a/drivers/staging/fsl-dpaa2/mac/mac.c
22 +++ b/drivers/staging/fsl-dpaa2/mac/mac.c
23 @@ -482,12 +482,11 @@ static irqreturn_t dpaa2_mac_irq_handler
24                 configure_link(priv, &link_cfg);
25         }
26  
27 -       if (status & DPMAC_IRQ_EVENT_LINK_UP_REQ)
28 -               phy_start(ndev->phydev);
29 -
30         if (status & DPMAC_IRQ_EVENT_LINK_DOWN_REQ)
31                 phy_stop(ndev->phydev);
32  
33 +       if (status & DPMAC_IRQ_EVENT_LINK_UP_REQ)
34 +               phy_start(ndev->phydev);
35  out:
36         dpmac_clear_irq_status(mc_dev->mc_io, 0, mc_dev->mc_handle,
37                                DPMAC_IRQ_INDEX, status);