Re: [PATCH v2] can: kvaser_pciefd: Use a single write when releasing RX buffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 30.08.2024 17:31:13, Martin Jocic wrote:
> Kvaser's PCIe cards uses the KCAN FPGA IP block which has dual 4K buffers for
> incoming messages shared by all (currently up to eight) channels. While the
> driver processes messages in one buffer, new incoming messages are stored in
> the other and so on.
> 
> The design of KCAN is such that a buffer must be fully read and then released.
> Releasing a buffer will make the FPGA switch buffers. If the other buffer
> contains at least one incoming message the FPGA will also instantly issue a
> new interrupt, if not the interrupt will be issued after receiving the first
> new message.
> 
> With IRQx interrupts, it takes a little time for the interrupt to happen,
> enough for any previous ISR call to do it's business and return, but MSI
> interrupts are way faster so this time is reduced to almost nothing.
> 
> So with MSI, releasing the buffer HAS to be the very last action of the ISR
> before returning, otherwise the new interrupt might be "masked" by the kernel
> because the previous ISR call hasn't returned. And the interrupts are edge-
> triggered so we cannot loose one, or the ping-pong reading process will stop.
> 
> This is why this patch modifies the driver to use a single write to the SRB_CMD
> register before returning.
> 
> Signed-off-by: Martin Jocic <martin.jocic@xxxxxxxxxx>

Thanks for the detailed commit message. I've added a fixed tag:

Fixes: 26ad340e582d ("can: kvaser_pciefd: Add driver for Kvaser PCIEcan devices")

Thanks,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux