mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
net: sfp: create/destroy I2C mdiobus before PHY probe/after PHY release
Instead of configuring the I2C mdiobus when SFP driver is probed, create/destroy the mdiobus before the PHY is probed for/after it is released. This way we can tell the mdio-i2c code which protocol to use for each SFP transceiver. Move the code that determines MDIO I2C protocol from sfp_sm_probe_for_phy() to sfp_sm_mod_probe(), where most of the SFP ID parsing is done. Don't allocate I2C bus if no PHY is expected. Signed-off-by: Marek Behún <kabel@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
13c8adcf22
commit
e85b1347ac
@@ -11,6 +11,12 @@ struct device;
|
||||
struct i2c_adapter;
|
||||
struct mii_bus;
|
||||
|
||||
enum mdio_i2c_proto {
|
||||
MDIO_I2C_NONE,
|
||||
MDIO_I2C_MARVELL_C22,
|
||||
MDIO_I2C_C45,
|
||||
};
|
||||
|
||||
struct mii_bus *mdio_i2c_alloc(struct device *parent, struct i2c_adapter *i2c);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user