aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/mv88e6xxx/chip.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-01-06 13:54:55 -0800
committerDavid S. Miller <davem@davemloft.net>2020-01-06 13:54:55 -0800
commit50d31037e430791a517d74631a28dc5e218242d2 (patch)
tree740867ad738275f4cbf4068f50e4aea0b3b572bd /drivers/net/dsa/mv88e6xxx/chip.h
parentfcnal-test: Fix vrf argument in local tcp tests (diff)
parentepic100: allow nesting of ethtool_ops begin() and complete() (diff)
downloadlinux-dev-50d31037e430791a517d74631a28dc5e218242d2.tar.xz
linux-dev-50d31037e430791a517d74631a28dc5e218242d2.zip
Merge branch 'ethtool-allow-nesting-of-begin-and-complete-callbacks'
Michal Kubecek says: ==================== ethtool: allow nesting of begin() and complete() callbacks The ethtool ioctl interface used to guarantee that ethtool_ops callbacks were always called in a block between calls to ->begin() and ->complete() (if these are defined) and that this whole block was executed with RTNL lock held: rtnl_lock(); ops->begin(); /* other ethtool_ops calls */ ops->complete(); rtnl_unlock(); This prevented any nesting or crossing of the begin-complete blocks. However, this is no longer guaranteed even for ioctl interface as at least ethtool_phys_id() releases RTNL lock while waiting for a timer. With the introduction of netlink ethtool interface, the begin-complete pairs are naturally nested e.g. when a request triggers a netlink notification. Fortunately, only minority of networking drivers implements begin() and complete() callbacks and most of those that do, fall into three groups: - wrappers for pm_runtime_get_sync() and pm_runtime_put() - wrappers for clk_prepare_enable() and clk_disable_unprepare() - begin() checks netif_running() (fails if false), no complete() First two have their own refcounting, third is safe w.r.t. nesting of the blocks. Only three in-tree networking drivers need an update to deal with nesting of begin() and complete() calls: via-velocity and epic100 perform resume and suspend on their own and wil6210 completely serializes the calls using its own mutex (which would lead to a deadlock if a request request triggered a netlink notification). The series addresses these problems. changes between v1 and v2: - fix inverted condition in epic100 ethtool_begin() (thanks to Andrew Lunn) ==================== Reviewed-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions