On 1/10/21 9:55 AM, Vincent MAILHOL wrote: [...] > Did you test it after the occurence of a can_bus_off() event? Not yet... > When the device restarts, you normally have to call > netdev_reset_queue(netdev) in order to reset all the BQL > statistics. I only included the relevant parts to illustrate the use of the changed API. There is a netdev_reset_queue() in mcp251xfd_ring_init(), which is called via: mcp251xfd_chip_start(), mcp251xfd_set_mode() > @@ -335,6 +335,8 @@ static void mcp251xfd_ring_init(struct mcp251xfd_priv *priv) > u8 len; > int i, j; > > + netdev_reset_queue(priv->ndev); > + > /* TEF */ > tef_ring = priv->tef; > tef_ring->head = 0; Marc -- Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Attachment:
signature.asc
Description: OpenPGP digital signature