OSDN Git Service

net: phy: tja11xx: execute cable test on link up
authorOleksij Rempel <o.rempel@pengutronix.de>
Thu, 14 May 2020 19:42:18 +0000 (21:42 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 May 2020 18:03:03 +0000 (11:03 -0700)
commitca1c933bcee9393d8a83c6be1093471e0c3b655d
treeea219d0a20f6dff69e7946dcf62065a70b4b22bb
parentb0ed0bbfb3046ed127f6004b5893ccb6cdd9ba90
net: phy: tja11xx: execute cable test on link up

A typical 100Base-T1 link should be always connected. If the link is in
a shot or open state, it is a failure. In most cases, we won't be able
to automatically handle this issue, but we need to log it or notify user
(if possible).

With this patch, the cable will be tested on "ip l s dev .. up" attempt
and send ethnl notification to the user space.

This patch was tested with TJA1102 PHY and "ethtool --monitor" command.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/nxp-tja11xx.c