Skip to content

Commit

Permalink
[bot] AutoMerging: merge all upstream's changes:
Browse files Browse the repository at this point in the history
* https://github.com/coolsnowwolf/lede:
  kernel: rework Huawei-compatible OEM SFP GE-T
  kernel: add support for HALNy HL-GSFP and other related fixes
  Revert "ramips: disable wlan nat as workaround"
  ramips: disable wlan hnat as workaround
  kernel: bump 5.19 to 5.19.7 (coolsnowwolf#10059)
  • Loading branch information
github-actions[bot] committed Sep 6, 2022
2 parents 5f65a59 + 6eaf356 commit 9493b6d
Show file tree
Hide file tree
Showing 15 changed files with 672 additions and 49 deletions.
4 changes: 2 additions & 2 deletions include/kernel-5.19
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-5.19 = .6
LINUX_KERNEL_HASH-5.19.6 = 41a4f824af614460c429a7c723e8dcbb0e042f0047d328c18b4ed6f2b4efa63a
LINUX_VERSION-5.19 = .7
LINUX_KERNEL_HASH-5.19.7 = b8bb6019d4255f39196726f9d0f82f76179d1c3d7c6b603431ef04b38201199f
80 changes: 49 additions & 31 deletions target/linux/generic/hack-5.15/790-SFP-GE-T-ignore-TX_FAULT.patch
Original file line number Diff line number Diff line change
@@ -1,36 +1,54 @@
From 7cc39a6bedbd85f3ff7e16845f310e4ce8d9833f Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Tue, 6 Sep 2022 00:31:19 +0100
Subject: [PATCH] net: sfp: add quirk for ATS SFP-GE-T 1000Base-TX module
To: netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
Russell King <linux@armlinux.org.uk>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>
Cc: David S. Miller <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Josef Schlehofer <pepe.schlehofer@gmail.com>

This copper module comes with broken TX_FAULT indicator which must be
ignored for it to work. Implement ignoring TX_FAULT state bit also
during reset/insertion and mute the warning telling the user that the
module indicates TX_FAULT.

Co-authored-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/phy/sfp.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)

--- a/drivers/net/phy/sfp.c
+++ b/drivers/net/phy/sfp.c
@@ -1803,6 +1803,7 @@ static int sfp_sm_mod_probe(struct sfp *
struct sfp_eeprom_id id;
bool cotsworks_sfbg;
bool cotsworks;
+ bool oem_ge_t;
u8 check;
int ret;

@@ -1851,6 +1852,10 @@ static int sfp_sm_mod_probe(struct sfp *
}
}

+ /* Some cheap SFP-GE-T modules always indicate TX fault */
+ oem_ge_t = !memcmp(id.base.vendor_name, "OEM ", 16) &&
+ !memcmp(id.base.vendor_pn, "SFP-GE-T ", 12);
+
/* Cotsworks do not seem to update the checksums when they
* do the final programming with the final module part number,
* serial number and date code.
@@ -1946,8 +1951,8 @@ static int sfp_sm_mod_probe(struct sfp *
else
sfp->module_t_start_up = T_START_UP;

- if (!memcmp(id.base.vendor_name, "HUAWEI ", 16) &&
- !memcmp(id.base.vendor_pn, "MA5671A ", 16))
+ if ((!memcmp(id.base.vendor_name, "HUAWEI ", 16) &&
+ !memcmp(id.base.vendor_pn, "MA5671A ", 16)) || oem_ge_t)
sfp->tx_fault_ignore = true;
else
sfp->tx_fault_ignore = false;
@@ -2404,10 +2409,12 @@ static void sfp_check_state(struct sfp *
@@ -369,6 +369,11 @@ static const struct sfp_quirk sfp_quirks
.modes = sfp_quirk_2500basex,
.fixup = sfp_fixup_ignore_tx_fault,
}, {
+ // OEM SFP-GE-T is 1000Base-T module
+ .vendor = "OEM",
+ .part = "SFP-GE-T",
+ .fixup = sfp_fixup_ignore_tx_fault,
+ }, {
// Lantech 8330-262D-E can operate at 2500base-X, but
// incorrectly report 2500MBd NRZ in their EEPROM
.vendor = "Lantech",
@@ -2303,7 +2308,8 @@ static void sfp_sm_main(struct sfp *sfp,
* or t_start_up, so assume there is a fault.
*/
sfp_sm_fault(sfp, SFP_S_INIT_TX_FAULT,
- sfp->sm_fault_retries == N_FAULT_INIT);
+ !sfp->tx_fault_ignore &&
+ (sfp->sm_fault_retries == N_FAULT_INIT));
} else if (event == SFP_E_TIMEOUT || event == SFP_E_TX_CLEAR) {
init_done:
sfp->sm_phy_retries = R_PHY_RETRY;
@@ -2526,10 +2532,12 @@ static void sfp_check_state(struct sfp *
mutex_lock(&sfp->st_mutex);
state = sfp_get_state(sfp);
changed = state ^ sfp->state;
Expand Down
4 changes: 2 additions & 2 deletions target/linux/generic/hack-5.19/250-netfilter_depends.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -254,7 +254,6 @@ config NF_CONNTRACK_FTP
@@ -253,7 +253,6 @@ config NF_CONNTRACK_FTP

config NF_CONNTRACK_H323
tristate "H.323 protocol support"
- depends on IPV6 || IPV6=n
depends on NETFILTER_ADVANCED
help
H.323 is a VoIP signalling protocol from ITU-T. As one of the most
@@ -1111,7 +1110,6 @@ config NETFILTER_XT_TARGET_SECMARK
@@ -1110,7 +1109,6 @@ config NETFILTER_XT_TARGET_SECMARK

config NETFILTER_XT_TARGET_TCPMSS
tristate '"TCPMSS" target support'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -713,8 +713,6 @@ config NFT_REJECT_NETDEV
@@ -712,8 +712,6 @@ config NFT_REJECT_NETDEV

endif # NF_TABLES_NETDEV

Expand All @@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
config NF_FLOW_TABLE_INET
tristate "Netfilter flow table mixed IPv4/IPv6 module"
depends on NF_FLOW_TABLE
@@ -723,11 +721,12 @@ config NF_FLOW_TABLE_INET
@@ -722,11 +720,12 @@ config NF_FLOW_TABLE_INET

To compile it as a module, choose M here.

Expand All @@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
help
This option adds the flow table core infrastructure.

@@ -1016,6 +1015,15 @@ config NETFILTER_XT_TARGET_NOTRACK
@@ -1015,6 +1014,15 @@ config NETFILTER_XT_TARGET_NOTRACK
depends on NETFILTER_ADVANCED
select NETFILTER_XT_TARGET_CT

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
#if defined(CONFIG_NF_CONNTRACK_LABELS)
--- a/net/netfilter/Kconfig
+++ b/net/netfilter/Kconfig
@@ -162,6 +162,14 @@ config NF_CONNTRACK_EVENTS
@@ -161,6 +161,14 @@ config NF_CONNTRACK_EVENTS

If unsure, say `N'.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@

len = skb->len;
trace_net_dev_start_xmit(skb, dev);
@@ -5232,6 +5240,11 @@ void netdev_rx_handler_unregister(struct
@@ -5233,6 +5241,11 @@ void netdev_rx_handler_unregister(struct
}
EXPORT_SYMBOL_GPL(netdev_rx_handler_unregister);

Expand All @@ -123,7 +123,7 @@
/*
* Limit the use of PFMEMALLOC reserves to those protocols that implement
* the special handling of PFMEMALLOC skbs.
@@ -5280,6 +5293,10 @@ static int __netif_receive_skb_core(stru
@@ -5281,6 +5294,10 @@ static int __netif_receive_skb_core(stru
int ret = NET_RX_DROP;
__be16 type;

Expand All @@ -134,7 +134,7 @@
net_timestamp_check(!READ_ONCE(netdev_tstamp_prequeue), skb);

trace_netif_receive_skb(skb);
@@ -5317,6 +5334,15 @@ another_round:
@@ -5318,6 +5335,15 @@ another_round:
goto out;
}

Expand Down
Loading

0 comments on commit 9493b6d

Please sign in to comment.