• broonie@sirena.org.uk's avatar
    natsemi: Fix NAPI for interrupt sharing · 069f8256
    broonie@sirena.org.uk authored
    The interrupt status register for the natsemi chips is clear on read and
    was read unconditionally from both the interrupt and from the NAPI poll
    routine, meaning that if the interrupt service routine was called (for
    example, due to a shared interrupt) while a NAPI poll was scheduled
    interrupts could be missed.  This patch fixes that by ensuring that the
    interrupt status register is only read by the interrupt handler when
    interrupts are enabled from the chip.
    
    It also reverts a workaround for this problem from the netpoll hook and
    improves the trace for interrupt events.
    
    Thanks to Sergei Shtylyov <sshtylyov@ru.mvista.com> for spotting the
    issue, Mark Huth <mhuth@mvista.com> for a simpler method and Simon
    Blake <simon@citylink.co.nz> for testing resources.
    Signed-Off-By: default avatarMark Brown <broonie@sirena.org.uk>
    Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
    069f8256
natsemi.c 91 KB