• Samuel Mendoza-Jonas's avatar
    net/ncsi: Reset channel state in ncsi_start_dev() · 2878a2cf
    Samuel Mendoza-Jonas authored
    When the NCSI driver is stopped with ncsi_stop_dev() the channel
    monitors are stopped and the state set to "inactive". However the
    channels are still configured and active from the perspective of the
    network controller. We should suspend each active channel but in the
    context of ncsi_stop_dev() the transmit queue has been or is about to be
    stopped so we won't have time to do so.
    
    Instead when ncsi_start_dev() is called if the NCSI topology has already
    been probed then call ncsi_reset_dev() to suspend any channels that were
    previously active. This resets the network controller to a known state,
    provides an up to date view of channel link state, and makes sure that
    mode flags such as NCSI_MODE_TX_ENABLE are properly reset.
    
    In addition to ncsi_start_dev() use ncsi_reset_dev() in ncsi-netlink.c
    to update the channel configuration more cleanly.
    Signed-off-by: default avatarSamuel Mendoza-Jonas <sam@mendozajonas.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    2878a2cf
internal.h 15.1 KB