Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: bcmgenet: don't set phydev->link from MAC

When commit 28b2e0d2cd13 ("net: phy: remove parameter new_link from
phy_mac_interrupt()") removed the new_link parameter it set the
phydev->link state from the MAC before invoking phy_mac_interrupt().

However, once commit 88d6272acaaa ("net: phy: avoid unneeded MDIO
reads in genphy_read_status") was added this initialization prevents
the proper determination of the connection parameters by the function
genphy_read_status().

This commit removes that initialization to restore the proper
functionality.

Fixes: 88d6272acaaa ("net: phy: avoid unneeded MDIO reads in genphy_read_status")
Signed-off-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Doug Berger and committed by
David S. Miller
7de48402 0cc76d2b

+1 -3
+1 -3
drivers/net/ethernet/broadcom/genet/bcmgenet.c
··· 2612 2612 spin_unlock_irq(&priv->lock); 2613 2613 2614 2614 /* Link UP/DOWN event */ 2615 - if (status & UMAC_IRQ_LINK_EVENT) { 2616 - priv->dev->phydev->link = !!(status & UMAC_IRQ_LINK_UP); 2615 + if (status & UMAC_IRQ_LINK_EVENT) 2617 2616 phy_mac_interrupt(priv->dev->phydev); 2618 - } 2619 2617 } 2620 2618 2621 2619 /* bcmgenet_isr1: handle Rx and Tx priority queues */