Thread (28 messages) 28 messages, 6 authors, 2015-04-15

Re: [PATCH resend] Renesas Ethernet AVB driver

From: Ben Hutchings <hidden>
Date: 2015-04-13 23:08:04
Also in: linux-devicetree, linux-sh

On Tue, 2015-04-14 at 00:53 +0200, Lino Sanfilippo wrote:
On 14.04.2015 00:31, Ben Hutchings wrote:
quoted
quoted
quoted
quoted
This driver looks somewhat similar to sh-eth, but lacks some of the
recent bug fixes made to that.  At least commit 283e38db65e7 ("sh_eth:
Fix serialisation of interrupt disable with interrupt & NAPI handler")
appears to be applicable, but there are probably others.
    I suspect this issue applies to many drivers...
    I couldn't reproduce the bug that patch was fixing, so left this fix out 
for the time being. Others cases were fixed (if applicable).
Maybe its just harder to trigger but it indeed looks similar to what Ben
has fixed for sh-eth. I wonder if that shutdown flag in the fix is
really needed though. IMHO it should be save if we simply call
napi_disable first, then disable irqs on hardware and finally
synchronize_irq...
In sh_eth: if we call napi_disable() first, EESR_RX_CHECK can still be
set and nothing will clear it.  If only one CPU is online this can hard
hang the system.  Please trust that I did consider and rule out the
simpler approaches first.
The idea was to check the return value from napi_schedule_prep() and in
case it returns "false" use this as an indication for a shutdown. In
case of sh_eth this would be sh_eth_write(ndev, 0, EESIPR) for example.
Might work - but please give it a thorough test.

Ben.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help