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

Commit 93c31f7f 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 69ea156d 283614e4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -263,6 +263,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
@@ -86,6 +86,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;
+3 −2
Original line number Diff line number Diff line
@@ -3517,7 +3517,8 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
							   &priv->xstats,
							   rx_q->dma_erx +
							   entry);
		if (unlikely(status == discard_frame)) {
		if (unlikely(status & discard_frame)) {
			if (!(status & ctxt_desc))
				priv->dev->stats.rx_errors++;
			if (priv->hwts_rx_en && !priv->extend_desc) {
				/* DESC2 & DESC3 will be overwritten by device