[PATCH] kernal: skip hpower setting for the module which has no revs

teruyama at springboard-inc.jp teruyama at springboard-inc.jp
Sun Nov 28 06:02:10 PST 2021


From: "S.Teruyama" <teruyama at springboard-inc.jp>

Signed-off-by: S.Teruyama <teruyama at springboard-inc.jp>
---
 .../pending-5.4/771-net-sfp-skip-hpowr-if-no-revision.patch  | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 target/linux/generic/pending-5.4/771-net-sfp-skip-hpowr-if-no-revision.patch

diff --git a/target/linux/generic/pending-5.4/771-net-sfp-skip-hpowr-if-no-revision.patch b/target/linux/generic/pending-5.4/771-net-sfp-skip-hpowr-if-no-revision.patch
new file mode 100644
index 0000000..ffcf5ab
--- /dev/null
+++ b/target/linux/generic/pending-5.4/771-net-sfp-skip-hpowr-if-no-revision.patch
@@ -0,0 +1,12 @@
+@@ -0,0 +1,11 @@
+--- a/drivers/net/phy/sfp.c
++++ b/drivers/net/phy/sfp.c
+@@ -1590,6 +1590,8 @@ static int sfp_module_parse_power(struct
+
+ static int sfp_sm_mod_hpower(struct sfp *sfp, bool enable)
+ {
++	if (sfp->id.ext.sff8472_compliance == SFP_SFF8472_COMPLIANCE_NONE)
++		return 0;
+ 	u8 val;
+ 	int err;
+
-- 
1.8.3.1




More information about the openwrt-devel mailing list