Thread (6 messages) 6 messages, 3 authors, 2018-02-08

Re: [PATCH v2 1/2] net, can, ifi: fix "write buffer full" error

From: Marek Vasut <marex@denx.de>
Date: 2018-02-08 20:09:43
Also in: linux-can, lkml

On 02/08/2018 03:46 PM, Marc Kleine-Budde wrote:
On 02/08/2018 07:47 AM, Heiko Schocher wrote:
quoted
the driver reads in the ISR first the IRQpending register,
and clears after that in a write *all* bits in it.

It could happen that the isr register raise bits between
this 2 register accesses, which leads in lost bits ...

In case it clears "TX message sent successfully", the driver
never sends any Tx data, and buffers to userspace run over.

Fixed this:
clear only the bits in the IRQpending register, the
driver had read.

Signed-off-by: Heiko Schocher <redacted>
Reviewed-by: Marek Vasut <marex@denx.de>
Applied both to linux-can.
Can you also apply them to stable, so they get into 4.9.x etc ?

Thanks!

-- 
Best regards,
Marek Vasut
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help