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>
This commit is contained in:
Martin Schiller
2025-03-10 08:42:18 +01:00
parent 79aae6ff42
commit bbe58f9830
8 changed files with 392 additions and 10 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
@@ -1557,6 +1557,10 @@ static void sfp_hwmon_probe(struct work_
@@ -1570,6 +1570,10 @@ static void sfp_hwmon_probe(struct work_
struct sfp *sfp = container_of(work, struct sfp, hwmon_probe.work);
int err;
@@ -21,7 +21,7 @@ Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
/* hwmon interface needs to access 16bit registers in atomic way to
* guarantee coherency of the diagnostic monitoring data. If it is not
* possible to guarantee coherency because EEPROM is broken in such way
@@ -2416,6 +2420,13 @@ static void sfp_sm_module(struct sfp *sf
@@ -2430,6 +2434,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
@@ -663,10 +663,64 @@ static int sfp_i2c_write(struct sfp *sfp
@@ -676,10 +676,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;
@@ -698,6 +752,29 @@ static int sfp_i2c_mdiobus_create(struct
@@ -711,6 +765,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);
@@ -1875,9 +1952,15 @@ static void sfp_sm_fault(struct sfp *sfp
@@ -1888,9 +1965,15 @@ static void sfp_sm_fault(struct sfp *sfp
static int sfp_sm_add_mdio_bus(struct sfp *sfp)
{