All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] can: mcp251xfd: mcp251xfd_stop(): add missing hrtimer_cancel()
@ 2022-06-20 14:39 Marc Kleine-Budde
  2022-06-23 15:06 ` Manivannan Sadhasivam
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2022-06-20 14:39 UTC (permalink / raw)
  To: linux-can; +Cc: kernel, Manivannan Sadhasivam, Thomas Kopp, Marc Kleine-Budde

In commit 169d00a25658 ("can: mcp251xfd: add TX IRQ coalescing
support") software based TX coalescing was added to the driver. The
key idea is to keep the TX complete IRQ disabled for some time after
processing it and re-enable later by a hrtimer. When bringing the
interface down, this timer has to be stopped.

Add the missing hrtimer_cancel() of the tx_irq_time hrtimer to
mcp251xfd_stop().

Fixes: 169d00a25658 ("can: mcp251xfd: add TX IRQ coalescing support")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
 drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
index b21252390216..34b160024ce3 100644
--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
+++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
@@ -1650,6 +1650,7 @@ static int mcp251xfd_stop(struct net_device *ndev)
 	netif_stop_queue(ndev);
 	set_bit(MCP251XFD_FLAGS_DOWN, priv->flags);
 	hrtimer_cancel(&priv->rx_irq_timer);
+	hrtimer_cancel(&priv->tx_irq_timer);
 	mcp251xfd_chip_interrupts_disable(priv);
 	free_irq(ndev->irq, priv);
 	can_rx_offload_disable(&priv->offload);
-- 
2.35.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-23 15:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-20 14:39 [PATCH] can: mcp251xfd: mcp251xfd_stop(): add missing hrtimer_cancel() Marc Kleine-Budde
2022-06-23 15:06 ` Manivannan Sadhasivam

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.