• Michal Kubecek's avatar
    epic100: allow nesting of ethtool_ops begin() and complete() · 4ac0ac84
    Michal Kubecek authored
    Unlike most networking drivers using begin() and complete() ethtool_ops
    callbacks to resume a device which is down and suspend it again when done,
    epic100 does not use standard refcounted infrastructure but sets device
    sleep state directly.
    
    With the introduction of netlink ethtool interface, we may have nested
    begin-complete blocks so that inner complete() would put the device back to
    sleep for the rest of the outer block.
    
    To avoid rewriting an old and not very actively developed driver, just add
    a nesting counter and only perform resume and suspend on the outermost
    level.
    Signed-off-by: default avatarMichal Kubecek <mkubecek@suse.cz>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    4ac0ac84
epic100.c 43.8 KB