• Marc Kleine-Budde's avatar
    can: mcp251xfd: add RX IRQ coalescing support · 60a848c5
    Marc Kleine-Budde authored
    This patch adds RX IRQ coalescing support to the driver.
    
    The mcp251xfd chip doesn't support proper hardware based coalescing,
    so this patch tries to implemented it in software. The RX-FIFO offers
    a "FIFO not empty" interrupt, which is used if no coalescing is
    active.
    
    With activated RX IRQ coalescing the "FIFO not empty" interrupt is
    disabled in the RX IRQ handler and the "FIFO half full" or "FIFO full
    interrupt" (depending on RX max coalesced frames IRQ) is used instead.
    To avoid RX CAN frame starvation a hrtimer is setup with RX coalesce
    usecs IRQ,on timer expiration the "FIFO not empty" is enabled again.
    
    Support for ethtool configuration is added in the next patch.
    
    Link: https://lore.kernel.org/20220313083640.501791-9-mkl@pengutronix.deSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
    60a848c5
mcp251xfd-rx.c 6.43 KB