From: Andrew Lunn <andrew@lunn.ch>
To: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Jacky Chou <jacky_chou@aspeedtech.com>,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org, joel@jms.id.au,
hkallweit1@gmail.com, linux@armlinux.org.uk,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [net-next 3/3] net: mdio: aspeed: Add dummy read for fire control
Date: Tue, 19 Nov 2024 02:52:11 +0100 [thread overview]
Message-ID: <b8986779-27eb-4b60-b180-24d84ca9a501@lunn.ch> (raw)
In-Reply-To: <0d53f5fbb6b3f1eb01e601255f7e5ee3d1c45f93.camel@codeconstruct.com.au>
On Tue, Nov 19, 2024 at 09:35:39AM +1030, Andrew Jeffery wrote:
> Hi Jacky,
>
> On Mon, 2024-11-18 at 18:47 +0800, Jacky Chou wrote:
> > Add a dummy read to ensure triggering mdio controller before starting
> > polling the status of mdio controller.
> >
> > Signed-off-by: Jacky Chou <jacky_chou@aspeedtech.com>
> > ---
> > drivers/net/mdio/mdio-aspeed.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/net/mdio/mdio-aspeed.c b/drivers/net/mdio/mdio-
> > aspeed.c
> > index 4d5a115baf85..feae30bc3e78 100644
> > --- a/drivers/net/mdio/mdio-aspeed.c
> > +++ b/drivers/net/mdio/mdio-aspeed.c
> > @@ -62,6 +62,8 @@ static int aspeed_mdio_op(struct mii_bus *bus, u8
> > st, u8 op, u8 phyad, u8 regad,
> > | FIELD_PREP(ASPEED_MDIO_DATA_MIIRDATA, data);
> >
> > iowrite32(ctrl, ctx->base + ASPEED_MDIO_CTRL);
> > + /* Add dummy read to ensure triggering mdio controller */
> > + (void)ioread32(ctx->base + ASPEED_MDIO_CTRL);
>
> Why do this when the same register is immediately read by
> readl_poll_timeout() below?
>
> If there is a reason, I'd like some more explanation in the comment
> you've added, discussing the details of the problem it's solving when
> taking into account the readl_poll_timeout() call.
Also, is this a fix? Should it have a Fixes: tag? If so, it should not
be part of this series, assuming the older devices have the same
issue.
Andrew
next prev parent reply other threads:[~2024-11-19 1:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-18 10:47 [net-next 0/3] Add Aspeed G7 MDIO support Jacky Chou
2024-11-18 10:47 ` [net-next 1/3] dt-bindings: net: add support for AST2700 Jacky Chou
2024-11-19 18:18 ` Rob Herring
2024-11-20 2:38 ` 回覆: " Jacky Chou
2024-11-18 10:47 ` [net-next 2/3] net: mdio: aspeed: Add " Jacky Chou
2024-11-19 18:20 ` Rob Herring
2024-11-18 10:47 ` [net-next 3/3] net: mdio: aspeed: Add dummy read for fire control Jacky Chou
2024-11-18 23:05 ` Andrew Jeffery
2024-11-19 1:52 ` Andrew Lunn [this message]
2024-11-19 5:51 ` 回覆: " Jacky Chou
2024-11-19 5:46 ` Jacky Chou
2024-11-19 1:50 ` [net-next 0/3] Add Aspeed G7 MDIO support Andrew Lunn
2024-11-19 5:35 ` 回覆: " Jacky Chou
2024-11-19 13:25 ` Andrew Lunn
[not found] ` <SEYPR06MB513478C462915513DE7BE1AE9DFCA@SEYPR06MB5134.apcprd06.prod.outlook.com>
2025-10-27 12:34 ` Andrew Lunn
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=b8986779-27eb-4b60-b180-24d84ca9a501@lunn.ch \
--to=andrew@lunn.ch \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@codeconstruct.com.au \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=jacky_chou@aspeedtech.com \
--cc=joel@jms.id.au \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@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
all inboxes | Powered by JetHome®