generic: net: phy: sfp: backport some FS copper SFP fixes

This fixes the handling of some FS copper SFP modules using the RollBall
protocol and needing some extra treatment.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
(cherry picked from commit bbe58f9830)
This commit is contained in:
Martin Schiller
2025-03-10 08:42:18 +01:00
committed by Daniel Golle
parent a53d175865
commit b394fa6819
8 changed files with 391 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -2418,6 +2418,13 @@ static void sfp_sm_module(struct sfp *sf
@@ -2432,6 +2432,13 @@ static void sfp_sm_module(struct sfp *sf
return;
}

View File

@@ -10,7 +10,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -665,10 +665,64 @@ static int sfp_i2c_write(struct sfp *sfp
@@ -678,10 +678,64 @@ static int sfp_i2c_write(struct sfp *sfp
return ret == ARRAY_SIZE(msgs) ? len : 0;
}
@@ -77,7 +77,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
sfp->i2c = i2c;
sfp->read = sfp_i2c_read;
@@ -700,6 +754,29 @@ static int sfp_i2c_mdiobus_create(struct
@@ -713,6 +767,29 @@ static int sfp_i2c_mdiobus_create(struct
return 0;
}
@@ -107,7 +107,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
static void sfp_i2c_mdiobus_destroy(struct sfp *sfp)
{
mdiobus_unregister(sfp->i2c_mii);
@@ -1873,8 +1950,15 @@ static void sfp_sm_fault(struct sfp *sfp
@@ -1886,8 +1963,15 @@ static void sfp_sm_fault(struct sfp *sfp
static int sfp_sm_add_mdio_bus(struct sfp *sfp)
{