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

Commit 283614e4 authored by Sunil Paidimarri's avatar Sunil Paidimarri
Browse files

net: stmmac: Fix error incremented for ctxt desc



Fix error incremented for ctxt desc.

Change-Id: I18bb3cddb4eda61da8d27765e286e065ec5ab761
Acked-by: default avatarRahul Kawadgave <rahulak@qti.qualcomm.com>
Signed-off-by: default avatarSunil Paidimarri <hisunil@codeaurora.org>
parent cf38de2b
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
@@ -3509,7 +3509,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