From: Jacky Chou <jacky_chou@aspeedtech.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "hkallweit1@gmail.com" <hkallweit1@gmail.com>,
"linux@armlinux.org.uk" <linux@armlinux.org.uk>,
"davem@davemloft.net" <davem@davemloft.net>,
"edumazet@google.com" <edumazet@google.com>,
"kuba@kernel.org" <kuba@kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"joel@jms.id.au" <joel@jms.id.au>,
"andrew@codeconstruct.com.au" <andrew@codeconstruct.com.au>,
"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 回覆: [PATCH net v2] net: mdio: aspeed: Add dummy read for fire control
Date: Wed, 20 Nov 2024 02:34:56 +0000 [thread overview]
Message-ID: <SEYPR06MB513421BF046C1478303E8C299D212@SEYPR06MB5134.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <27a39b05-3029-4b31-ada7-542e23e4de8b@lunn.ch>
Hi Andrew Lunn,
Thank you for your reply.
> > When the command bus is sometimes busy, it may cause the command is
> > not arrived to MDIO controller immediately. On software, the driver
> > issues a write command to the command bus does not wait for command
> > complete and it returned back to code immediately. But a read command
> > will wait for the data back, once a read command was back indicates
> > the previous write command had arrived to controller.
> > Add a dummy read to ensure triggering mdio controller before starting
> > polling the status of mdio controller to avoid polling unexpected timeout.
>
> Please have another attempt at writing the commit message.
>
> > Fixes: a9770eac511a ("net: mdio: Move MDIO drivers into a new
> > subdirectory")
> > 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 c2170650415c..373902d33b96
> > 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);
>
> Maybe: /* Dummy read to flush previous write to controller */
Agree. I will change the title in next version.
Thanks,
Jacky
next prev parent reply other threads:[~2024-11-20 2:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 9:51 [PATCH net v2] net: mdio: aspeed: Add dummy read for fire control Jacky Chou
2024-11-19 13:55 ` Andrew Lunn
2024-11-20 2:34 ` Jacky Chou [this message]
2024-11-20 4:43 ` Andrew Jeffery
2024-11-20 5:45 ` 回覆: " Jacky Chou
2024-11-20 13:44 ` Andrew Lunn
2024-11-21 4:29 ` Andrew Jeffery
2024-11-20 9:42 ` Russell King (Oracle)
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=SEYPR06MB513421BF046C1478303E8C299D212@SEYPR06MB5134.apcprd06.prod.outlook.com \
--to=jacky_chou@aspeedtech.com \
--cc=andrew@codeconstruct.com.au \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=joel@jms.id.au \
--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 \
/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