• D
    xen-netfront: call netif_carrier_off() only once when disconnecting · f9feb1e6
    David Vrabel 提交于
    In xennet_disconnect_backend(), netif_carrier_off() was called once
    per queue when it needs to only be called once.
    
    The queue locking around the netif_carrier_off() call looked very
    odd. I think they were supposed to synchronize any NAPI instances with
    the expectation that no further NAPI instances would be scheduled
    because of the carrier being off (see the check in
    xennet_rx_interrupt()).  But I can't easily tell if this works
    correctly.
    
    Instead, add a napi_synchronize() call after disabling the interrupts.
    This is obviously correct as with no Rx interrupts, no further NAPI
    instances will be scheduled.
    Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    f9feb1e6
xen-netfront.c 60.4 KB