]> git.baikalelectronics.ru Git - kernel.git/commit
net: sfp: split power mode switching from probe
authorRussell King <rmk+kernel@armlinux.org.uk>
Sun, 10 Nov 2019 14:07:20 +0000 (14:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Nov 2019 00:17:01 +0000 (16:17 -0800)
commit4ff6d4c42eead50e24bde709302ef127e8f322f8
tree5207b1740f908e34c79ecb61344994f47af7c151
parent55f9f0cfbfb515a1f7e50e044e1b46b10c2718e0
net: sfp: split power mode switching from probe

Switch the power mode switching from the probe, so that we don't
repeatedly re-probe the SFP device if there is a problem accessing
the registers at I2C address 0x51.

In splitting this out, we can also fix a bug where we leave the module
in high-power mode when the upstream device is detached but the module
is still inserted.

Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/sfp.c