|
| 1 | +From patchwork Fri Mar 6 12:29:55 2026 |
| 2 | +Content-Type: text/plain; charset="utf-8" |
| 3 | +MIME-Version: 1.0 |
| 4 | +Content-Transfer-Encoding: 8bit |
| 5 | +X-Patchwork-Submitter: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= |
| 6 | + <noltari@gmail.com> |
| 7 | +X-Patchwork-Id: 14457090 |
| 8 | +X-Patchwork-Delegate: kuba@kernel.org |
| 9 | +Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com |
| 10 | + [209.85.221.48]) |
| 11 | + (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) |
| 12 | + (No client certificate requested) |
| 13 | + by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF3F4386459 |
| 14 | + for <netdev@vger.kernel.org>; Fri, 6 Mar 2026 12:52:18 +0000 (UTC) |
| 15 | +Authentication-Results: smtp.subspace.kernel.org; |
| 16 | + arc=none smtp.client-ip=209.85.221.48 |
| 17 | +ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; |
| 18 | + t=1772801540; cv=none; |
| 19 | + b=LVeywxv8ajenPZ8Kr1arieKosbrf60O9l+ouIPKPFNt5btxWDZ59pIU9BfZjv5n9ifEOyUA/UD0phxnG77+oB/k6UCd7DdGQQASZB3NHq5cvmErbgXm0XG3C8BBxVXU5pF7atPS23kBqM9ptxsv3IaeH/fDFcj6k6SH61rGEpuQ= |
| 20 | +ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; |
| 21 | + s=arc-20240116; t=1772801540; c=relaxed/simple; |
| 22 | + bh=HAy43ssDo0xlUcBDIU7vQZtNnpxG03JPCL6Ldi51ASI=; |
| 23 | + h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; |
| 24 | + b=OBk8kI0I91psFRaIxb6nCnAzQlsc7jrXkOPW8lL7cYCosY08yfQDwAlWBFfdFs/VDuVJjD5VEdeQeMt2K4kWGgjLNXhTrRqgs6JNe7PxALDJKvt+kcJ833TRz3hKl2eb2Ft6WnKPf/6hp5Q3qm8+/Q703ixD4sF/0aDNw1BrDY4= |
| 25 | +ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; |
| 26 | + dmarc=pass (p=none dis=none) header.from=gmail.com; |
| 27 | + spf=pass smtp.mailfrom=gmail.com; |
| 28 | + dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com |
| 29 | + header.b=RCEse1HL; arc=none smtp.client-ip=209.85.221.48 |
| 30 | +Authentication-Results: smtp.subspace.kernel.org; |
| 31 | + dmarc=pass (p=none dis=none) header.from=gmail.com |
| 32 | +Authentication-Results: smtp.subspace.kernel.org; |
| 33 | + spf=pass smtp.mailfrom=gmail.com |
| 34 | +Authentication-Results: smtp.subspace.kernel.org; |
| 35 | + dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com |
| 36 | + header.b="RCEse1HL" |
| 37 | +Received: by mail-wr1-f48.google.com with SMTP id |
| 38 | + ffacd0b85a97d-439b7c2788dso4008389f8f.1 |
| 39 | + for <netdev@vger.kernel.org>; Fri, 06 Mar 2026 04:52:18 -0800 (PST) |
| 40 | +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; |
| 41 | + d=gmail.com; s=20230601; t=1772801537; x=1773406337; |
| 42 | + darn=vger.kernel.org; |
| 43 | + h=content-transfer-encoding:mime-version:message-id:date:subject:cc |
| 44 | + :to:from:from:to:cc:subject:date:message-id:reply-to; |
| 45 | + bh=y8B8kg8ACcCsMXy3SgsyRYngVEpIsqkcoCsLOS/nNqQ=; |
| 46 | + b=RCEse1HLoUtQApOdbPXFvYItGrEKWhMZ5FH1L4npAxteGeWOhAEAekijg3Ur83ovNu |
| 47 | + D7j0Aio5nwazNQz3y4rO88a+svlEbLx5fyxypjkMFUV4PDnOpv7HYjT9Aw1NVdIwO6l+ |
| 48 | + sTgZ1jssfWdVnLQwQe6naotyBRoBV2AugdTmASE0Okxrsi3juIOafyTCxnp4K0weRpaH |
| 49 | + XodiSWNrkHzZSWM6/wl3D42yExGGPiuDybF+9otR/5TaBWNzrcLkSb73hvP6va35kQWK |
| 50 | + mnp6OV+L7iHTbxYpTfTm4axD+IZ/Q/dtFxxA6XolA28oMQbRPK0SIHepheSZx4bgl64w |
| 51 | + FM4w== |
| 52 | +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; |
| 53 | + d=1e100.net; s=20230601; t=1772801537; x=1773406337; |
| 54 | + h=content-transfer-encoding:mime-version:message-id:date:subject:cc |
| 55 | + :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date |
| 56 | + :message-id:reply-to; |
| 57 | + bh=y8B8kg8ACcCsMXy3SgsyRYngVEpIsqkcoCsLOS/nNqQ=; |
| 58 | + b=KomubXrbvHQI4WbFxBztyfrvNNRRWm7V46yQSwx0bP8PXKIJP38kAYzK+ZKWhmcd7e |
| 59 | + LpS7422VcYyLywLRxlevD2YaXsF0CK6e00YpTtixakHxYs/4KxGaU21vfwYV8mRhfu7g |
| 60 | + HVmxKvNQ6DTdC7wAIGT6TrcZCK4VCvgCx3z9yC62hQc8C6w+9mDnnGPvXNR74ofvvXdC |
| 61 | + eVZjm56layRoEr4PTpR2F33OVSt8+HRikH7eBzIKtQ5n/lEKtmJKDHRaodAaCyFGWMWa |
| 62 | + qDVoOR8VI4NIJABfsOT6OqisXLPLf+jkKpGkCY2ioRPRKK9GzW4PgIuNcKvPQilQQkgD |
| 63 | + Xlnw== |
| 64 | +X-Forwarded-Encrypted: i=1; |
| 65 | + AJvYcCVcziiSg1n0cDakmiQXH3869FECP24dcIqrZzs8zKakP+vHT958hnq9Bp0alDnLeVtXgo0B8T4=@vger.kernel.org |
| 66 | +X-Gm-Message-State: AOJu0Yx2OF1e3PiuR4Zqpe9qXA6kz6T2CCtro6kv8eL2j4Zh2HCjWywo |
| 67 | + /rZTavazOZRoq7zTvc4fGZ/yupjkTT9xRPZCKRkM9pc0UuK/KDSP4pan |
| 68 | +X-Gm-Gg: ATEYQzx75s3OlYg8XKMgu042++2+ZPa/CZDw09DYtnwEHHBsuylQF0+eXzcFM166JtP |
| 69 | + EMuM6Nq/sGQx2WNTPNEyu1BRGci/SV005CzkExhd1KK52D/nC1c76MBxvAtioaI/+5tgNoyCg8v |
| 70 | + ZFRyiqDReKfJ6JHa3YRI213dTzMluN1sZTYNSqlWI1MwW66gaDCf0myU81ehAfiAff34wmxnm8C |
| 71 | + PUF0YrLYtgZl1I/ZcYM1npoL3PBOnrhaulSqhbn7S5NaZMkHLrNQm6ns1lof+7Ciju05dQpEcBe |
| 72 | + pumVg15Dy+PcSXQSSQt4CULH7bbuJvZ0PHJ7dS+74i/OqFSgxD4E7LCqM5ufHYdbESx0/ERaR/z |
| 73 | + CAyT3oTz6S1oMQCUTPevHjHjTbDOWhu74SqyTZETzwGnjZnfrPMa56ebQVRfYgOYW0bbx6j3O2M |
| 74 | + v3CSEBiXpdFTdaLuRcqIb56JeDryaHx87SOThqnYP6gMiu7EljKYIhr572Rpgz+UIRkrYyNjL9c |
| 75 | + BLmrcmhsXX4hU4X5KocoApkO04w |
| 76 | +X-Received: by 2002:a05:600c:8b8b:b0:483:103c:b1ee with SMTP id |
| 77 | + 5b1f17b1804b1-48526922599mr34173745e9.8.1772801536778; |
| 78 | + Fri, 06 Mar 2026 04:52:16 -0800 (PST) |
| 79 | +Received: from skynet.lan |
| 80 | + (2a02-9142-4581-3c00-0000-0000-0000-0008.red-2a02-914.customerbaf.ipv6.rima-tde.net. |
| 81 | + [2a02:9142:4581:3c00::8]) |
| 82 | + by smtp.gmail.com with ESMTPSA id |
| 83 | + 5b1f17b1804b1-48527681a3esm76085715e9.4.2026.03.06.04.52.14 |
| 84 | + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); |
| 85 | + Fri, 06 Mar 2026 04:52:15 -0800 (PST) |
| 86 | +From: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <noltari@gmail.com> |
| 87 | +To: linux@armlinux.org.uk, |
| 88 | + andrew@lunn.ch, |
| 89 | + hkallweit1@gmail.com, |
| 90 | + davem@davemloft.net, |
| 91 | + edumazet@google.com, |
| 92 | + kuba@kernel.org, |
| 93 | + pabeni@redhat.com, |
| 94 | + mnhagan88@gmail.com, |
| 95 | + netdev@vger.kernel.org, |
| 96 | + linux-kernel@vger.kernel.org |
| 97 | +Cc: =?utf-8?q?=C3=81lvaro_Fern=C3=A1ndez_Rojas?= <noltari@gmail.com> |
| 98 | +Subject: [PATCH net v3] net: sfp: improve Huawei MA5671a fixup |
| 99 | +Date: Fri, 6 Mar 2026 13:29:55 +0100 |
| 100 | +Message-ID: <20260306125139.213637-1-noltari@gmail.com> |
| 101 | +X-Mailer: git-send-email 2.47.3 |
| 102 | +Precedence: bulk |
| 103 | +X-Mailing-List: netdev@vger.kernel.org |
| 104 | +List-Id: <netdev.vger.kernel.org> |
| 105 | +List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> |
| 106 | +List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> |
| 107 | +MIME-Version: 1.0 |
| 108 | +X-Patchwork-Delegate: kuba@kernel.org |
| 109 | + |
| 110 | +With the current sfp_fixup_ignore_tx_fault() fixup we ignore the TX_FAULT |
| 111 | +signal, but we also need to apply sfp_fixup_ignore_los() in order to be |
| 112 | +able to communicate with the module even if the fiber isn't connected for |
| 113 | +configuration purposes. |
| 114 | +This is needed for all the MA5671a firmwares, excluding the FS modded |
| 115 | +firmware. |
| 116 | + |
| 117 | +Fixes: 2069624dac19 ("net: sfp: Add tx-fault workaround for Huawei MA5671A SFP ONT") |
| 118 | +Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> |
| 119 | +--- |
| 120 | + v3: avoid using a vendor name in the function |
| 121 | + v2: rebase on top of net/main instead of linux/master |
| 122 | + |
| 123 | + drivers/net/phy/sfp.c | 8 +++++++- |
| 124 | + 1 file changed, 7 insertions(+), 1 deletion(-) |
| 125 | + |
| 126 | +--- a/drivers/net/phy/sfp.c |
| 127 | ++++ b/drivers/net/phy/sfp.c |
| 128 | +@@ -360,6 +360,12 @@ static void sfp_fixup_ignore_tx_fault(st |
| 129 | + sfp->state_ignore_mask |= SFP_F_TX_FAULT; |
| 130 | + } |
| 131 | + |
| 132 | ++static void sfp_fixup_ignore_tx_fault_and_los(struct sfp *sfp) |
| 133 | ++{ |
| 134 | ++ sfp_fixup_ignore_tx_fault(sfp); |
| 135 | ++ sfp_fixup_ignore_los(sfp); |
| 136 | ++} |
| 137 | ++ |
| 138 | + static void sfp_fixup_ignore_hw(struct sfp *sfp, unsigned int mask) |
| 139 | + { |
| 140 | + sfp->state_hw_mask &= ~mask; |
| 141 | +@@ -523,7 +529,7 @@ static const struct sfp_quirk sfp_quirks |
| 142 | + // Huawei MA5671A can operate at 2500base-X, but report 1.2GBd NRZ in |
| 143 | + // their EEPROM |
| 144 | + SFP_QUIRK("HUAWEI", "MA5671A", sfp_quirk_2500basex, |
| 145 | +- sfp_fixup_ignore_tx_fault), |
| 146 | ++ sfp_fixup_ignore_tx_fault_and_los), |
| 147 | + |
| 148 | + // Lantech 8330-262D-E can operate at 2500base-X, but incorrectly report |
| 149 | + // 2500MBd NRZ in their EEPROM |
0 commit comments