Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2de5f0a9 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "net: stmmac: handle dma fatal irq for IPA channels"

parents ae43e061 09dab559
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -2054,6 +2054,13 @@ static void stmmac_tx_err(struct stmmac_priv *priv, u32 chan)
	struct stmmac_tx_queue *tx_q = &priv->tx_queue[chan];
	int i;

	if (tx_q->skip_sw) {
		ethqos_ipa_offload_event_handler(priv, EV_DEV_CLOSE);
		ethqos_ipa_offload_event_handler(priv, EV_DEV_OPEN);
		priv->dev->stats.tx_errors++;
		return;
	}

	netif_tx_stop_queue(netdev_get_tx_queue(priv->dev, chan));

	stmmac_stop_tx_dma(priv, chan);
@@ -2129,13 +2136,12 @@ static void stmmac_dma_interrupt(struct stmmac_priv *priv)
	struct stmmac_rx_queue *rx_q;

	for (chan = 0; chan < tx_channel_count; chan++) {
		if (priv->tx_queue[chan].skip_sw)
			continue;
		rx_q = &priv->rx_queue[chan];

		status = priv->hw->dma->dma_interrupt(priv->ioaddr,
						      &priv->xstats, chan);
		if (likely((status & handle_rx)) || (status & handle_tx)) {
		if ((likely((status & handle_rx)) || (status & handle_tx)) &&
		    !rx_q->skip_sw) {
			if (likely(napi_schedule_prep(&rx_q->napi))) {
				stmmac_disable_dma_irq(priv, chan);
				__napi_schedule(&rx_q->napi);