• Tony Lindgren's avatar
    net: davinci_emac: Fix hangs with interrupts · cd2d6d33
    Tony Lindgren authored
    On davinci_emac, we have pulse interrupts. This means that we need to
    clear the EOI bits when disabling interrupts as otherwise the interrupts
    keep happening. And we also need to not clear the EOI bits again when
    enabling the interrupts as otherwise we will get tons of:
    
    unexpected IRQ trap at vector 00
    
    These errors almost certainly mean that the omap-intc.c is signaling
    a spurious interrupt with the reserved irq 127 as we've seen earlier
    on omap3.
    
    Let's fix the issue by clearing the EOI bits when disabling the
    interrupts. Let's also keep the comment for "Rx Threshold and Misc
    interrupts are not enabled" for both enable and disable so people
    are aware of this when potentially adding more support.
    
    Note that eventually we should handle the RX and TX interrupts
    separately like cpsw is now doing. However, so far I have not seen
    any issues with this based on my testing, so it seems to behave a
    little different compared to the cpsw that had a similar issue.
    
    Cc: Brian Hutchinson <b.hutchman@gmail.com>
    Reviewed-by: default avatarFelipe Balbi <balbi@ti.com>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    cd2d6d33
davinci_emac.c 60.5 KB