openwrt/target/linux/bcm27xx/patches-6.1/950-0513-net-bcmgenet-Add-eee-module-parameter.patch
Zxl hhyccc 2d6cedab27 kernel: bump 6.1 to 6.1.92
https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.92

Removed upstreamed:
 bcm27xx/patches-6.1/950-0270-net-bcmgenet-Reset-RBUF-on-first-open.patch
 generic/backport-6.1/600-v6.9-03-net-gro-add-flush-check-in-udp_gro_receive_segment.patch
 generic/pending-6.1/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
 generic/pending-6.1/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
 generic/pending-6.1/684-net-bridge-fix-corrupted-ethernet-header-on-multicas.patch
 generic/pending-6.1/778-net-l2tp-drop-flow-hash-on-forward.patch
 imx/patches-6.1/002-6.2-phy-freescale-imx8m-pcie-Refine-i.MX8MM-PCIe-PHY-dri.patch

All other patches automatically rebased.

Signed-off-by: Zxl hhyccc <zxlhhy@gmail.com>
2024-06-08 14:16:19 +02:00

47 lines
1.5 KiB
Diff

From d69cdb1cc4e3f717f63910cb2c40ca26f912ea34 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Wed, 14 Dec 2022 15:00:51 +0000
Subject: [PATCH] net: bcmgenet: Add 'eee' module parameter
On some switches, having EEE enabled causes the link to become
unstable. With this patch, adding 'genet.eee=N' to the kernel command
line will cause EEE to be disabled on the link.
See: https://github.com/raspberrypi/linux/issues/4289
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -70,6 +70,9 @@ static void bcmgenet_set_rx_mode(struct
static bool skip_umac_reset = false;
module_param(skip_umac_reset, bool, 0444);
MODULE_PARM_DESC(skip_umac_reset, "Skip UMAC reset step");
+static bool eee = true;
+module_param(eee, bool, 0444);
+MODULE_PARM_DESC(eee, "Enable EEE (default Y)");
static inline void bcmgenet_writel(u32 value, void __iomem *offset)
{
@@ -3448,6 +3451,17 @@ static int bcmgenet_open(struct net_devi
bcmgenet_phy_pause_set(dev, priv->rx_pause, priv->tx_pause);
+ if (!eee) {
+ struct ethtool_eee eee_data;
+
+ ret = bcmgenet_get_eee(dev, &eee_data);
+ if (ret == 0) {
+ eee_data.eee_enabled = 0;
+ bcmgenet_set_eee(dev, &eee_data);
+ netdev_warn(dev, "EEE disabled\n");
+ }
+ }
+
bcmgenet_netif_start(dev);
netif_tx_start_all_queues(dev);