]> git.baikalelectronics.ru Git - kernel.git/commit
net: sfp: move module insert reporting out of probe
authorRussell King <rmk+kernel@armlinux.org.uk>
Sun, 10 Nov 2019 14:07:25 +0000 (14:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Nov 2019 00:17:01 +0000 (16:17 -0800)
commit4cb476ab46457b00ca77a989179b22c14f2078c3
treebfd2090b986a5d3f5166c1830c37769696b343bb
parent4ff6d4c42eead50e24bde709302ef127e8f322f8
net: sfp: move module insert reporting out of probe

Move the module insertion reporting out of the probe handling, but
after we have detected that the upstream has attached (since that is
whom we are reporting insertion to.)

Only report module removal if we had previously reported a module
insertion.

This gives cleaner semantics, and means we can probe the module before
we have an upstream attached.

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