• Florian Fainelli's avatar
    net: systemport: enable RX interrupts after NAPI · 8edf0047
    Florian Fainelli authored
    There is currently a small window during which the SYSTEMPORT adapter
    enables its RX interrupts without having enabled its NAPI handler, which
    can result in packets to be discarded during interface bringup.
    
    A similar but more serious window exists in bcm_sysport_resume() during
    which we can have the RDMA engine not fully prepared to receive packets
    and yet having RX interrupts enabled.
    
    Fix this my moving the RX interrupt enable down to
    bcm_sysport_netif_start() after napi_enable() for the RX path is called,
    which fixes both call sites: bcm_sysport_open() and
    bcm_sysport_resume().
    
    Fixes: b02e6d9b ("net: systemport: add bcm_sysport_netif_{enable,stop}")
    Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8edf0047
bcmsysport.c 50.6 KB