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
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 @@ -2616,7 +2612,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 @@ -2630,26 +2625,9 @@ static void bcmgenet_irq_task(struct wor
34 phy_init_hw(priv->dev->phydev);
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);
41 - if (priv->dev->phydev->link && first_link) {
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.
52 - dev_info(&priv->pdev->dev,
53 - "Forcing renegotiation\n");
54 - genphy_restart_aneg(priv->dev->phydev);
60 /* bcmgenet_isr1: handle Rx and Tx priority queues */