Commit 3ba07deb authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller

net: stmmac: Only disable interrupts if NAPI is scheduled

Only disable the interrupts if RX NAPI gets to be scheduled. Also,
schedule the TX NAPI only when the interrupts are disabled.
Signed-off-by: default avatarJose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 858a31ff
...@@ -2053,12 +2053,12 @@ static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan) ...@@ -2053,12 +2053,12 @@ static int stmmac_napi_check(struct stmmac_priv *priv, u32 chan)
&priv->xstats, chan); &priv->xstats, chan);
struct stmmac_channel *ch = &priv->channel[chan]; struct stmmac_channel *ch = &priv->channel[chan];
if (status)
status |= handle_rx | handle_tx;
if ((status & handle_rx) && (chan < priv->plat->rx_queues_to_use)) { if ((status & handle_rx) && (chan < priv->plat->rx_queues_to_use)) {
stmmac_disable_dma_irq(priv, priv->ioaddr, chan); if (napi_schedule_prep(&ch->rx_napi)) {
napi_schedule_irqoff(&ch->rx_napi); stmmac_disable_dma_irq(priv, priv->ioaddr, chan);
__napi_schedule_irqoff(&ch->rx_napi);
status |= handle_tx;
}
} }
if ((status & handle_tx) && (chan < priv->plat->tx_queues_to_use)) if ((status & handle_tx) && (chan < priv->plat->tx_queues_to_use))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment