]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
net: phy: tja11xx: add cable-test support
authorOleksij Rempel <o.rempel@pengutronix.de>
Wed, 13 May 2020 12:34:40 +0000 (14:34 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 May 2020 19:35:47 +0000 (12:35 -0700)
commitea13d71887bd589d2f08ca74a3e1961dd68b678d
treeec9c24c91c775f08f3bc8f13877bcc17c701fe23
parent6e8a4f9dda3823274fa8a4c1aa5e6a93f9775749
net: phy: tja11xx: add cable-test support

Add initial cable testing support.
This PHY needs only 100usec for this test and it is recommended to run it
before the link is up. For now, provide at least ethtool support, so it
can be tested by more developers.

This patch was tested with TJA1102 PHY with following results:
- No cable, is detected as open
- 1m cable, with no connected other end and detected as open
- a 40m cable (out of spec, max lenght should be 15m) is detected as OK.

Current patch do not provide polarity test support. This test would
indicate not proper wire connection, where "+" wire of main phy is
connected to the "-" wire of the link partner.

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