Skip to content

Commit

Permalink
net: dsa: felix: print error message in felix_check_xtr_pkt()
Browse files Browse the repository at this point in the history
Packet extraction failures over register-based MMIO are silent, and
difficult to pinpoint. Add an error message to remedy this.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Vladimir Oltean authored and David S. Miller committed Mar 4, 2022
1 parent dbd0328 commit 5d3bb7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/dsa/ocelot/felix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1506,8 +1506,12 @@ static bool felix_check_xtr_pkt(struct ocelot *ocelot)
}

out:
if (err < 0)
if (err < 0) {
dev_err_ratelimited(ocelot->dev,
"Error during packet extraction: %pe\n",
ERR_PTR(err));
ocelot_drain_cpu_queue(ocelot, 0);
}

return true;
}
Expand Down

0 comments on commit 5d3bb7d

Please sign in to comment.