From: Doug Berger <opendmb@gmail.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Doug Berger <opendmb@gmail.com>
Subject: [PATCH net 1/4] net: bcmgenet: don't set phydev->link from MAC
Date: Wed, 16 Oct 2019 16:06:29 -0700 [thread overview]
Message-ID: <1571267192-16720-2-git-send-email-opendmb@gmail.com> (raw)
In-Reply-To: <1571267192-16720-1-git-send-email-opendmb@gmail.com>
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>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 12cb77ef1081..10d68017ff6c 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2612,10 +2612,8 @@ static void bcmgenet_irq_task(struct work_struct *work)
spin_unlock_irq(&priv->lock);
/* Link UP/DOWN event */
- if (status & UMAC_IRQ_LINK_EVENT) {
- priv->dev->phydev->link = !!(status & UMAC_IRQ_LINK_UP);
+ if (status & UMAC_IRQ_LINK_EVENT)
phy_mac_interrupt(priv->dev->phydev);
- }
}
/* bcmgenet_isr1: handle Rx and Tx priority queues */
--
2.7.4
next prev parent reply other threads:[~2019-10-16 23:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-16 23:06 [PATCH net 0/4] net: bcmgenet: restore internal EPHY support Doug Berger
2019-10-16 23:06 ` Doug Berger [this message]
2019-10-17 3:50 ` [PATCH net 1/4] net: bcmgenet: don't set phydev->link from MAC Florian Fainelli
2019-10-16 23:06 ` [PATCH net 2/4] net: phy: bcm7xxx: define soft_reset for 40nm EPHY Doug Berger
2019-10-17 3:53 ` Florian Fainelli
2019-10-16 23:06 ` [PATCH net 3/4] net: bcmgenet: soft reset 40nm EPHYs before MAC init Doug Berger
2019-10-17 3:53 ` Florian Fainelli
2019-10-31 18:57 ` Doug Berger
2019-10-16 23:06 ` [PATCH net 4/4] net: bcmgenet: reset 40nm EPHY on energy detect Doug Berger
2019-10-17 3:56 ` Florian Fainelli
2019-10-17 4:00 ` [PATCH net 0/4] net: bcmgenet: restore internal EPHY support Florian Fainelli
2019-10-18 17:01 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1571267192-16720-2-git-send-email-opendmb@gmail.com \
--to=opendmb@gmail.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).