• Russell King's avatar
    net: sfp: track upstream's attachment state in state machine · 6b0da5c9
    Russell King authored
    Track the upstream's attachment state in the state machine rather than
    maintaining a boolean, which ensures that we have a strict order of
    ATTACH followed by an UP event - we can never believe that a newly
    attached upstream will be anything but down.
    
    Rearrange the order of state machines so we run the module state
    machine after the upstream device's state machine, so the module state
    machine can check the current state of the device and take action to
    e.g. reset back to empty state when the upstream is detached.
    
    This is to allow the module detection to run independently of the
    network device becoming available.
    Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    6b0da5c9
sfp.c 48.6 KB