]> asedeno.scripts.mit.edu Git - linux.git/commit
epic100: allow nesting of ethtool_ops begin() and complete()
authorMichal Kubecek <mkubecek@suse.cz>
Mon, 6 Jan 2020 06:39:41 +0000 (07:39 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jan 2020 21:54:55 +0000 (13:54 -0800)
commit4ac0ac847f05bc49efb6ea9e8770f1dfec31f540
tree740867ad738275f4cbf4068f50e4aea0b3b572bd
parent71f711a4f1dd1f6ebc26870ef17ae79581f37ae7
epic100: allow nesting of ethtool_ops begin() and complete()

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: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/smsc/epic100.c