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

Commit 23cdb4af authored by Suraj Jaiswal's avatar Suraj Jaiswal
Browse files

net: stmmac: Fix error incremented for ctxt desc



Fix error incremented for ctxt desc.

Change-Id: I18bb3cddb4eda61da8d27765e286e065ec5ab761
Acked-by: default avatarNagarjuna Chaganti <nchagant@qti.qualcomm.com>
Signed-off-by: default avatarSuraj Jaiswal <jsuraj@codeaurora.org>
parent b5a3e719
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -272,6 +272,7 @@ enum rx_frame_status {
	llc_snap = 0x4,
	dma_own = 0x8,
	rx_not_ls = 0x10,
	ctxt_desc = 0x20,
};

/* Tx status */
+3 −0
Original line number Diff line number Diff line
@@ -83,6 +83,9 @@ static int dwmac4_wrback_get_rx_status(void *data, struct stmmac_extra_stats *x,
	if (unlikely(rdes3 & RDES3_OWN))
		return dma_own;

	if (likely((rdes3 & RDES3_CONTEXT_DESCRIPTOR)))
		return (discard_frame | ctxt_desc);

	/* Verify rx error by looking at the last segment. */
	if (likely(!(rdes3 & RDES3_LAST_DESCRIPTOR)))
		return discard_frame;
+2 −2
Original line number Diff line number Diff line
@@ -3567,11 +3567,11 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
		if (priv->extend_desc)
			stmmac_rx_extended_status(priv, &priv->dev->stats,
					&priv->xstats, rx_q->dma_erx + entry);
		if (unlikely(status == discard_frame)) {
		if (unlikely(status & discard_frame)) {
			page_pool_recycle_direct(rx_q->page_pool, buf->page);
			buf->page = NULL;
			error = 1;
			if (!priv->hwts_rx_en)
			if (!(status & ctxt_desc) && !priv->hwts_rx_en)
				priv->dev->stats.rx_errors++;
		}