From: Andrew Lunn <andrew@lunn.ch>
To: Jerome Brunet <jbrunet@baylibre.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
linux-amlogic@lists.infradead.org,
Kevin Hilman <khilman@baylibre.com>,
Neil Armstrong <narmstrong@baylibre.com>,
linux-kernel@vger.kernel.org,
Heiner Kallweit <hkallweit1@gmail.com>,
Qi Duan <qi.duan@amlogic.com>
Subject: Re: [PATCH net] net: mdio-mux-meson-g12a: force internal PHY off on mux switch
Date: Mon, 23 Jan 2023 15:49:11 +0100 [thread overview]
Message-ID: <Y86eZwWbhjNwrd76@lunn.ch> (raw)
In-Reply-To: <20230123135037.195157-1-jbrunet@baylibre.com>
On Mon, Jan 23, 2023 at 02:50:37PM +0100, Jerome Brunet wrote:
> Force the internal PHY off then on when switching to the internal path.
> This fixes problems where the PHY ID is not properly set.
>
> Fixes: 7090425104db ("net: phy: add amlogic g12a mdio mux support")
> Suggested-by: Qi Duan <qi.duan@amlogic.com>
> Co-developed-by: Heiner Kallweit <hkallweit1@gmail.com>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---
>
> The initial discussion about this change can be found here:
> https://lore.kernel.org/all/1j4jslwen5.fsf@starbuckisacylon.baylibre.com/
>
> drivers/net/mdio/mdio-mux-meson-g12a.c | 23 ++++++++++++++++-------
> 1 file changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/mdio/mdio-mux-meson-g12a.c b/drivers/net/mdio/mdio-mux-meson-g12a.c
> index 4a2e94faf57e..da61f00a6666 100644
> --- a/drivers/net/mdio/mdio-mux-meson-g12a.c
> +++ b/drivers/net/mdio/mdio-mux-meson-g12a.c
> @@ -4,6 +4,7 @@
> */
>
> #include <linux/bitfield.h>
> +#include <linux/delay.h>
> #include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/device.h>
> @@ -151,6 +152,7 @@ static const struct clk_ops g12a_ephy_pll_ops = {
> static int g12a_enable_internal_mdio(struct g12a_mdio_mux *priv)
> {
> int ret;
> + u32 value;
Reverse Christmas tree please. Longest first, shortest last.
Andrew
prev parent reply other threads:[~2023-01-23 14:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 13:50 [PATCH net] net: mdio-mux-meson-g12a: force internal PHY off on mux switch Jerome Brunet
2023-01-23 14:49 ` Andrew Lunn [this message]
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=Y86eZwWbhjNwrd76@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=narmstrong@baylibre.com \
--cc=netdev@vger.kernel.org \
--cc=qi.duan@amlogic.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;
as well as URLs for NNTP newsgroup(s).