]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: move netif_device_present check from ethnl_parse_header_dev_get to ethnl_ops...
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 1 Aug 2021 10:40:05 +0000 (12:40 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Aug 2021 11:58:22 +0000 (12:58 +0100)
commit0d9ea9301e2f3bb9e959dde0e13ca4a99a9cfc78
treead68924aa2b0cb7fd6341ab818a6a245f1c1d84d
parent2f162173db72876908197fce5780c091327b6e0f
ethtool: move netif_device_present check from ethnl_parse_header_dev_get to ethnl_ops_begin

If device is runtime-suspended and not accessible then it may be
flagged as not present. If checking whether device is present is
done too early then we may bail out before we have the chance to
runtime-resume the device. Therefore move this check to
ethnl_ops_begin(). This is in preparation of a follow-up patch
that tries to runtime-resume the device before executing ethtool
ops.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/netlink.c