net: sfp: re-implement soft state polling setup
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 13 Sep 2022 19:06:27 +0000 (20:06 +0100)
committerJakub Kicinski <kuba@kernel.org>
Tue, 20 Sep 2022 14:54:13 +0000 (07:54 -0700)
commit8475c4b70b040f9d8cbc308100f2c4d865f810b3
tree56edb7db335383f20de2d95677a2fac2557c714d
parent7f32974bdc9d2adcc54cc20fe227f0a000972dc6
net: sfp: re-implement soft state polling setup

Re-implement the decision making for soft state polling. Instead of
generating the soft state mask in sfp_soft_start_poll() by looking at
which GPIOs are available, record their availability in
sfp_sm_mod_probe() in sfp->state_hw_mask.

This will then allow us to clear bits in sfp->state_hw_mask in module
specific quirks when the hardware signals should not be used, thereby
allowing us to switch to using the software state polling.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/sfp.c