From: Florian Fainelli <f.fainelli@gmail.com>
To: Doug Berger <opendmb@gmail.com>, "David S. Miller" <davem@davemloft.net>
Cc: Florian Fainelli <f.fainelli@gmail.com>,
bcm-kernel-feedback-list@broadcom.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 2/2] net: bcmgenet: keep MAC in reset until PHY is up
Date: Mon, 16 Mar 2020 19:22:08 -0700 [thread overview]
Message-ID: <b5fe5c07-584b-92bc-1dad-5f46931fbd5e@gmail.com> (raw)
In-Reply-To: <1584395096-41674-3-git-send-email-opendmb@gmail.com>
On 3/16/2020 2:44 PM, Doug Berger wrote:
> As noted in commit 28c2d1a7a0bf ("net: bcmgenet: enable loopback
> during UniMAC sw_reset") the UniMAC must be clocked at least 5
> cycles while the sw_reset is asserted to ensure a clean reset.
>
> That commit enabled local loopback to provide an Rx clock from the
> GENET sourced Tx clk. However, when connected in MII mode the Tx
> clk is sourced by the PHY so if an EPHY is not supplying clocks
> (e.g. when the link is down) the UniMAC does not receive the
> necessary clocks.
>
> This commit extends the sw_reset window until the PHY reports that
> the link is up thereby ensuring that the clocks are being provided
> to the MAC to produce a clean reset.
>
> One consequence is that if the system attempts to enter a Wake on
> LAN suspend state when the PHY link has not been active the MAC
> may not have had a chance to initialize cleanly. In this case, we
> remove the sw_reset and enable the WoL reception path as normal
> with the hope that the PHY will provide the necessary clocks to
> drive the WoL blocks if the link becomes active after the system
> has entered suspend.
>
> Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
> Signed-off-by: Doug Berger <opendmb@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
--
Florian
next prev parent reply other threads:[~2020-03-17 2:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-16 21:44 [PATCH net 0/2] net: bcmgenet: revisit MAC reset Doug Berger
2020-03-16 21:44 ` [PATCH net 1/2] Revert "net: bcmgenet: use RGMII loopback for MAC reset" Doug Berger
2020-03-17 2:21 ` Florian Fainelli
2020-03-17 19:43 ` Doug Berger
2020-03-16 21:44 ` [PATCH net 2/2] net: bcmgenet: keep MAC in reset until PHY is up Doug Berger
2020-03-17 2:22 ` Florian Fainelli [this message]
2020-03-18 4:02 ` [PATCH net 0/2] net: bcmgenet: revisit MAC reset 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=b5fe5c07-584b-92bc-1dad-5f46931fbd5e@gmail.com \
--to=f.fainelli@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=opendmb@gmail.com \
/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
all inboxes | Powered by JetHome®