summaryrefslogtreecommitdiff
path: root/drivers/net/phy/sfp.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-02-06 10:52:30 +0000
committerDavid S. Miller <davem@davemloft.net>2019-02-08 15:11:25 -0800
commitb5bfc21af5cb3d53f9cee0ef82eaa43762a90f81 (patch)
treef49ad64b215683c7e2ecec5ab695fe416deb2031 /drivers/net/phy/sfp.h
parent27b4ad621e887ce8e5eb508a0103f13d30f6b38a (diff)
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>
Diffstat (limited to 'drivers/net/phy/sfp.h')
-rw-r--r--drivers/net/phy/sfp.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/sfp.h b/drivers/net/phy/sfp.h
index 31b0acf337e2..64f54b0bbd8c 100644
--- a/drivers/net/phy/sfp.h
+++ b/drivers/net/phy/sfp.h
@@ -7,6 +7,8 @@
struct sfp;
struct sfp_socket_ops {
+ void (*attach)(struct sfp *sfp);
+ void (*detach)(struct sfp *sfp);
void (*start)(struct sfp *sfp);
void (*stop)(struct sfp *sfp);
int (*module_info)(struct sfp *sfp, struct ethtool_modinfo *modinfo);