]> git.baikalelectronics.ru Git - kernel.git/commit
net: sfp: add debugfs support
authorRussell King <rmk+kernel@armlinux.org.uk>
Sun, 10 Jan 2021 10:59:38 +0000 (10:59 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 13 Jan 2021 04:01:56 +0000 (20:01 -0800)
commitbee00047e5d1448ca4f369399de034576fa61ee7
treeee7bc18ef6055edf07f488b23ba77cfb1f5d1197
parentef15b4c7dbc0992310a539295efb051a1469b233
net: sfp: add debugfs support

Add debugfs support to SFP so that the internal state of the SFP state
machines and hardware signal state can be viewed from userspace, rather
than having to compile a debug kernel to view state transitions in the
kernel log.  The 'state' output looks like:

Module state: empty
Module probe attempts: 0 0
Device state: up
Main state: down
Fault recovery remaining retries: 5
PHY probe remaining retries: 12
moddef0: 0
rx_los: 1
tx_fault: 1
tx_disable: 1

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1kyYRe-0004kN-3F@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/sfp.c