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

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

Merge "net: stmmac: Fix error incremented for ctxt desc"

parents 4440785e 23cdb4af
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
@@ -3568,11 +3568,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++;
		}