18cc3edd6f7adc4ac4b1787aa118f3b59cd37f07
[openwrt/staging/nbd.git] /
1 From 93a6cc6b04f305aca589828b70449a873474847d 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/782] 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 @@ -2614,7 +2610,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 @@ -2627,23 +2622,6 @@ static void bcmgenet_irq_task(struct wor
34 if (status & UMAC_IRQ_LINK_EVENT) {
35 priv->dev->phydev->link = !!(status & UMAC_IRQ_LINK_UP);
36 phy_mac_interrupt(priv->dev->phydev);
37 -
38 - if (priv->dev->phydev->link && first_link) {
39 - first_link = 0;
40 - /*
41 - * HACK: Some Pi4Bs, when paired with some switches,
42 - * come up in a strange state where they are unable to
43 - * transmit, causing them to fail to get an IP address.
44 - * Although the failure mechanism is not yet understood,
45 - * forcing renegotiation at this point has been shown
46 - * to be effective in avoiding the problem.
47 - */
48 - if (force_reneg) {
49 - dev_info(&priv->pdev->dev,
50 - "Forcing renegotiation\n");
51 - genphy_restart_aneg(priv->dev->phydev);
52 - }
53 - }
54 }
55 }
56