aboutsummaryrefslogtreecommitdiff
path: root/pkgs/patches-linux-5.15/116-net-sfp-change-HALNy-to-ignore-hardware-pins.patch
blob: 11b3e31656b5d96bb41137c1026eeefab22c52ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 8852f9aa3c1ae0c58a64b8517f11ae62309b84ad Mon Sep 17 00:00:00 2001
From: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Date: Fri, 26 Aug 2022 08:48:25 +0100
Subject: [PATCH 2/2] net: sfp: change HALNy to ignore hardware pins

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/sfp.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/drivers/net/phy/sfp.c b/drivers/net/phy/sfp.c
index 8db84e0dbc04..1df5d5008ab2 100644
--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -321,21 +321,9 @@ static void sfp_fixup_ignore_tx_fault(struct sfp *sfp)
 	sfp->tx_fault_ignore = true;
 }
 
-static void sfp_fixup_inverted_los(struct sfp *sfp)
-{
-	const __be16 los_inverted = cpu_to_be16(SFP_OPTIONS_LOS_INVERTED);
-	const __be16 los_normal = cpu_to_be16(SFP_OPTIONS_LOS_NORMAL);
-
-	sfp->id.ext.options &= ~los_normal;
-	sfp->id.ext.options |= los_inverted;
-}
-
 static void sfp_fixup_halny_gsfp(struct sfp *sfp)
 {
-	/* LOS is inverted */
-	sfp_fixup_inverted_los(sfp);
-	/* TX fault might be inverted, but we don't know for certain. */
-	sfp_fixup_ignore_tx_fault(sfp);
+	sfp->state_ignore_hw_mask |= SFP_F_TX_FAULT | SFP_F_LOS;
 }
 
 static void sfp_quirk_2500basex(const struct sfp_eeprom_id *id,
-- 
2.34.1