X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=target%2Flinux%2Fgeneric%2Fbackport-5.4%2F725-v5.5-net-sfp-parse-SFP-power-requirement-earlier.patch;h=df5ef9f79e03bacb85eb28f4101ad20f381a1a68;hb=4e0c54bc5bc8381e031af5147b66b4dadeecc626;hp=0b358f86d23b5d14d5f75a67fc09ba5e47cff9cd;hpb=c16517d26de30c90dabce1e456615fd7fbdce07c;p=oweals%2Fopenwrt.git diff --git a/target/linux/generic/backport-5.4/725-v5.5-net-sfp-parse-SFP-power-requirement-earlier.patch b/target/linux/generic/backport-5.4/725-v5.5-net-sfp-parse-SFP-power-requirement-earlier.patch index 0b358f86d2..df5ef9f79e 100644 --- a/target/linux/generic/backport-5.4/725-v5.5-net-sfp-parse-SFP-power-requirement-earlier.patch +++ b/target/linux/generic/backport-5.4/725-v5.5-net-sfp-parse-SFP-power-requirement-earlier.patch @@ -13,7 +13,7 @@ Signed-off-by: Russell King --- a/drivers/net/phy/sfp.c +++ b/drivers/net/phy/sfp.c -@@ -196,6 +196,8 @@ struct sfp { +@@ -198,6 +198,8 @@ struct sfp { unsigned int sm_retries; struct sfp_eeprom_id id; @@ -22,7 +22,7 @@ Signed-off-by: Russell King #if IS_ENABLED(CONFIG_HWMON) struct sfp_diag diag; struct device *hwmon_dev; -@@ -1309,17 +1311,14 @@ static void sfp_sm_mod_init(struct sfp * +@@ -1374,17 +1376,14 @@ static void sfp_sm_mod_init(struct sfp * sfp_sm_probe_phy(sfp); } @@ -44,7 +44,7 @@ Signed-off-by: Russell King if (sfp->id.ext.sff8472_compliance == SFP_SFF8472_COMPLIANCE_NONE && (sfp->id.ext.diagmon & (SFP_DIAGMON_DDM | SFP_DIAGMON_ADDRMODE)) != -@@ -1328,23 +1327,33 @@ static int sfp_sm_mod_hpower(struct sfp +@@ -1393,23 +1392,33 @@ static int sfp_sm_mod_hpower(struct sfp * or requires an address change sequence, so assume that * the module powers up in the indicated power mode. */ @@ -83,7 +83,7 @@ Signed-off-by: Russell King return 0; err = sfp_read(sfp, true, SFP_EXT_STATUS, &val, sizeof(val)); -@@ -1364,7 +1373,8 @@ static int sfp_sm_mod_hpower(struct sfp +@@ -1429,7 +1438,8 @@ static int sfp_sm_mod_hpower(struct sfp } dev_info(sfp->dev, "Module switched to %u.%uW power level\n", @@ -93,7 +93,7 @@ Signed-off-by: Russell King return T_HPOWER_LEVEL; err: -@@ -1451,6 +1461,11 @@ static int sfp_sm_mod_probe(struct sfp * +@@ -1516,6 +1526,11 @@ static int sfp_sm_mod_probe(struct sfp * dev_warn(sfp->dev, "module address swap to access page 0xA2 is not supported.\n"); @@ -105,7 +105,7 @@ Signed-off-by: Russell King ret = sfp_hwmon_insert(sfp); if (ret < 0) return ret; -@@ -1474,6 +1489,7 @@ static void sfp_sm_mod_remove(struct sfp +@@ -1539,6 +1554,7 @@ static void sfp_sm_mod_remove(struct sfp sfp_module_tx_disable(sfp); memset(&sfp->id, 0, sizeof(sfp->id));