]> git.baikalelectronics.ru Git - kernel.git/commit
net: ethtool: Add infrastructure for reporting cable test results
authorAndrew Lunn <andrew@lunn.ch>
Sun, 10 May 2020 19:12:36 +0000 (21:12 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sun, 10 May 2020 19:28:41 +0000 (12:28 -0700)
commita93c39a89904af6fd9555109007df9bab782d868
treede9a4697a11d2968403b1de30b5f00a8974941d8
parent4c85849d86d2cf2e7193a3555503c9d62db5ab00
net: ethtool: Add infrastructure for reporting cable test results

Provide infrastructure for PHY drivers to report the cable test
results.  A netlink skb is associated to the phydev. Helpers will be
added which can add results to this skb. Once the test has finished
the results are sent to user space.

When netlink ethtool is not part of the kernel configuration stubs are
provided. It is also impossible to trigger a cable test, so the error
code returned by the alloc function is of no consequence.

v2:
Include the status complete in the netlink notification message

v4:
Replace -EINVAL with -EMSGSIZE

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Michal Kubecek <mkubecek@suse.cz>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy.c
include/linux/ethtool_netlink.h
include/linux/phy.h
net/ethtool/cabletest.c