1
0
Fork 0

staging: fsl-dpaa2/mac: reverse order of handling stop/start IRQs

Both the LINK_UP_REQ and the LINK_DOWN_REQ IRQs can be received in the
same time when a reset is performed on the DPMAC's partner.
Handle first the link down and then the link up so that we do not
trigger a phylib WARNING like the following:

[  446.272011] called from state NOLINK
[  446.275604] WARNING: CPU: 0 PID: 473 at drivers/net/phy/phy.c:874
phy_start+0x44/0xa8

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Ioana Ciornei 2019-12-11 17:06:40 +02:00
parent e814c1c730
commit fd7102c32b
1 changed files with 2 additions and 3 deletions

View File

@ -482,12 +482,11 @@ static irqreturn_t dpaa2_mac_irq_handler(int irq_num, void *arg)
configure_link(priv, &link_cfg);
}
if (status & DPMAC_IRQ_EVENT_LINK_UP_REQ)
phy_start(ndev->phydev);
if (status & DPMAC_IRQ_EVENT_LINK_DOWN_REQ)
phy_stop(ndev->phydev);
if (status & DPMAC_IRQ_EVENT_LINK_UP_REQ)
phy_start(ndev->phydev);
out:
dpmac_clear_irq_status(mc_dev->mc_io, 0, mc_dev->mc_handle,
DPMAC_IRQ_INDEX, status);