]> git.baikalelectronics.ru Git - kernel.git/commit
sfp: fix module initialisation with netdev already up
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 10 Jul 2018 11:05:36 +0000 (12:05 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jul 2018 06:11:34 +0000 (23:11 -0700)
commit8cb19d6d2415628c75a8d5dcfa495fc900269bc5
treec691ff5236756d56e5fc09c8860a2225e2c48920
parent0fd9e1604d9937ccbf475fd8ec6ba6301ca44662
sfp: fix module initialisation with netdev already up

It was been observed that with a particular order of initialisation,
the netdev can be up, but the SFP module still has its TX_DISABLE
signal asserted.  This occurs when the network device brought up before
the SFP kernel module has been inserted by userspace.

This occurs because sfp-bus layer does not hear about the change in
network device state, and so assumes that it is still down.  Set
netdev->sfp when the upstream is registered to work around this problem.

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