]> 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)
commit7fa98b59038dad56f268d660743e73caae2f97ac
treeee7bc18ef6055edf07f488b23ba77cfb1f5d1197
parenta3ceee072021650cdc531e6e96cd63ef35b6a5d1
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