mac80211: refresh patches
[openwrt/staging/chunkeey.git] / target / linux / brcm2708 / patches-4.19 / 950-0754-Revert-net-bcmgenet-Workaround-for-Pi-4B-network-iss.patch
1 From 024173b78ac6c6ce9dca879274b1e8a8e9000738 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Fri, 9 Aug 2019 08:52:16 +0100
4 Subject: [PATCH 754/806] Revert "net: bcmgenet: Workaround for Pi 4B network
5 issue"
6
7 This reverts commit 9c0770ea7682a84a22c33410ef6870af258abacc.
8 ---
9 .../net/ethernet/broadcom/genet/bcmgenet.c | 22 -------------------
10 1 file changed, 22 deletions(-)
11
12 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
13 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
14 @@ -72,10 +72,6 @@
15 #define GENET_RDMA_REG_OFF (priv->hw_params->rdma_offset + \
16 TOTAL_DESC * DMA_DESC_SIZE)
17
18 -static bool force_reneg = false;
19 -module_param(force_reneg, bool, 0444);
20 -MODULE_PARM_DESC(force_reneg, "Force a renegotiation after the initial link-up");
21 -
22 static inline void bcmgenet_writel(u32 value, void __iomem *offset)
23 {
24 /* MIPS chips strapped for BE will automagically configure the
25 @@ -2616,7 +2612,6 @@ static void bcmgenet_irq_task(struct wor
26 unsigned int status;
27 struct bcmgenet_priv *priv = container_of(
28 work, struct bcmgenet_priv, bcmgenet_irq_work);
29 - static int first_link = 1;
30
31 netif_dbg(priv, intr, priv->dev, "%s\n", __func__);
32
33 @@ -2630,26 +2625,9 @@ static void bcmgenet_irq_task(struct wor
34 phy_init_hw(priv->dev->phydev);
35
36 /* Link UP/DOWN event */
37 - if (status & UMAC_IRQ_LINK_EVENT) {
38 + if (status & UMAC_IRQ_LINK_EVENT)
39 phy_mac_interrupt(priv->dev->phydev);
40
41 - if (priv->dev->phydev->link && first_link) {
42 - first_link = 0;
43 - /*
44 - * HACK: Some Pi4Bs, when paired with some switches,
45 - * come up in a strange state where they are unable to
46 - * transmit, causing them to fail to get an IP address.
47 - * Although the failure mechanism is not yet understood,
48 - * forcing renegotiation at this point has been shown
49 - * to be effective in avoiding the problem.
50 - */
51 - if (force_reneg) {
52 - dev_info(&priv->pdev->dev,
53 - "Forcing renegotiation\n");
54 - genphy_restart_aneg(priv->dev->phydev);
55 - }
56 - }
57 - }
58 }
59
60 /* bcmgenet_isr1: handle Rx and Tx priority queues */