• Michal Kubecek's avatar
    via-velocity: allow nesting of ethtool_ops begin() and complete() · 71f711a4
    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,
    via-velocity 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>
    71f711a4
via-velocity.h 40.6 KB