1 From 4c247e982b2e0f35371195241528282aade02899 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 755/773] Revert "net: bcmgenet: Workaround for Pi 4B network
7 This reverts commit 9c0770ea7682a84a22c33410ef6870af258abacc.
9 .../net/ethernet/broadcom/genet/bcmgenet.c | 22 -------------------
10 1 file changed, 22 deletions(-)
12 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
13 +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
15 #define GENET_RDMA_REG_OFF (priv->hw_params->rdma_offset + \
16 TOTAL_DESC * DMA_DESC_SIZE)
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");
22 static inline void bcmgenet_writel(u32 value, void __iomem *offset)
24 /* MIPS chips strapped for BE will automagically configure the
25 @@ -2614,7 +2610,6 @@ static void bcmgenet_irq_task(struct wor
27 struct bcmgenet_priv *priv = container_of(
28 work, struct bcmgenet_priv, bcmgenet_irq_work);
29 - static int first_link = 1;
31 netif_dbg(priv, intr, priv->dev, "%s\n", __func__);
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);
38 - if (priv->dev->phydev->link && first_link) {
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.
49 - dev_info(&priv->pdev->dev,
50 - "Forcing renegotiation\n");
51 - genphy_restart_aneg(priv->dev->phydev);