net: dsa: felix: print error message in felix_check_xtr_pkt()
authorVladimir Oltean <vladimir.oltean@nxp.com>
Thu, 3 Mar 2022 14:01:25 +0000 (16:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 4 Mar 2022 09:21:23 +0000 (09:21 +0000)
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>
drivers/net/dsa/ocelot/felix.c

index e579ade..1e93126 100644 (file)
@@ -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;
 }