On Wed, 2 Dec 2020 13:07:12 +0100 Oleksij Rempel wrote: > +static void ar9331_read_stats(struct ar9331_sw_port *port) > +{ > + mutex_lock(&port->lock); > + mutex_unlock(&port->lock); > +} > +static void ar9331_get_stats64(struct dsa_switch *ds, int port, > + struct rtnl_link_stats64 *s) > +{ > + struct ar9331_sw_priv *priv = (struct ar9331_sw_priv *)ds->priv; > + struct ar9331_sw_port *p = &priv->port[port]; > + > + ar9331_read_stats(p); > +} > + > static const struct dsa_switch_ops ar9331_sw_ops = { > + .get_stats64 = ar9331_get_stats64, > }; You can't take sleeping locks from .ndo_get_stats64. Also regmap may sleep? + ret = regmap_read(priv->regmap, reg, &val); Am I missing something?