]> git.baikalelectronics.ru Git - kernel.git/commit
net: sfp: do not probe SFP module before we're attached
authorRussell King <rmk+kernel@armlinux.org.uk>
Wed, 6 Feb 2019 10:52:30 +0000 (10:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Feb 2019 23:11:25 +0000 (15:11 -0800)
commite0e5a4b6b1a0451cb517cf59fc3f72b644b6d597
treef49ad64b215683c7e2ecec5ab695fe416deb2031
parent78ab4f851076841df4fbea57567f53dea2e77a6f
net: sfp: do not probe SFP module before we're attached

When we probe a SFP module, we expect to be able to call the upstream
device's module_insert() function so that the upstream link can be
configured.  However, when the upstream device is delayed, we currently
may end up probing the module before the upstream device is available,
and lose the module_insert() call.

Avoid this by holding off probing the module until the SFP bus is
properly connected to both the SFP socket driver and the upstream
driver.

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