]> git.baikalelectronics.ru Git - kernel.git/commit
net: sfp: allow sfp to probe slow to initialise GPON modules
authorRussell King <rmk+kernel@armlinux.org.uk>
Sun, 10 Nov 2019 14:07:30 +0000 (14:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Nov 2019 00:17:01 +0000 (16:17 -0800)
commit3e2ff7167c023507e2a53f7aedc9c3b03cfd4bd6
tree7b95b100c9cc1b5c04aa43ea6c7455df8267f4f9
parent4cb476ab46457b00ca77a989179b22c14f2078c3
net: sfp: allow sfp to probe slow to initialise GPON modules

Some GPON modules (e.g. Huawei MA5671A) take a significant amount of
time to start responding on the I2C bus, contary to the SFF
specifications.

Work around this by implementing a two-level timeout strategy, where
we initially quickly retry for the module, and then use a slower retry
after we exceed a maximum number of quick attempts.

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