From: Greg Ungerer <gerg@kernel.org>
To: Wei Fang <wei.fang@nxp.com>,
"linux-m68k@lists.linux-m68k.org"
<linux-m68k@lists.linux-m68k.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"arnd@kernel.org" <arnd@kernel.org>,
Greg Ungerer <gerg@linux-m68k.org>, Frank Li <frank.li@nxp.com>,
Shenwei Wang <shenwei.wang@nxp.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [RFC 1/4] net: fec: do not use readl()/writel() for ColdFire
Date: Fri, 8 May 2026 23:11:20 +1000 [thread overview]
Message-ID: <bb56ee81-dbcd-4aae-b5f9-64debb9c9bbd@kernel.org> (raw)
In-Reply-To: <DBBPR04MB750044F98B1E719AD9DBD93E883D2@DBBPR04MB7500.eurprd04.prod.outlook.com>
On 8/5/26 12:46, Wei Fang wrote:
>> static void
>> fec_stop(struct net_device *ndev)
>> {
>> struct fec_enet_private *fep = netdev_priv(ndev);
>> - u32 rmii_mode = readl(fep->hwp + FEC_R_CNTRL) & FEC_RCR_RMII;
>> + u32 rmii_mode = fec_readl(fep->hwp + FEC_R_CNTRL) & FEC_RCR_RMII;
>
> This is not an issue, but since you changed this line, the new code should
> follow the "reverse xmas tree" style.
Sure, will change in next version.
Thanks
Greg
> See: https://elixir.bootlin.com/linux/v7.0.1/source/Documentation/process/maintainer-netdev.rst#L380
>
>> u32 val;
>>
>> /* We cannot expect a graceful transmit stop without link !!! */
>> if (fep->link) {
>> - writel(1, fep->hwp + FEC_X_CNTRL); /* Graceful transmit stop */
>> + fec_writel(1, fep->hwp + FEC_X_CNTRL); /* Graceful transmit stop */
>> udelay(10);
>> - if (!(readl(fep->hwp + FEC_IEVENT) & FEC_ENET_GRA))
>> + if (!(fec_readl(fep->hwp + FEC_IEVENT) & FEC_ENET_GRA))
>> netdev_err(ndev, "Graceful transmit stop did not complete!\n");
>> }
>>
>
prev parent reply other threads:[~2026-05-08 13:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 14:26 [RFC 1/4] net: fec: do not use readl()/writel() for ColdFire Greg Ungerer
2026-05-06 14:26 ` [RFC 2/4] net: smc91x: do not use readw()/writew() on ColdFire platforms Greg Ungerer
2026-05-08 2:46 ` [RFC 1/4] net: fec: do not use readl()/writel() for ColdFire Wei Fang
2026-05-08 8:40 ` David Laight
2026-05-08 13:14 ` Greg Ungerer
2026-05-08 13:11 ` Greg Ungerer [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=bb56ee81-dbcd-4aae-b5f9-64debb9c9bbd@kernel.org \
--to=gerg@kernel.org \
--cc=arnd@kernel.org \
--cc=frank.li@nxp.com \
--cc=gerg@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=netdev@vger.kernel.org \
--cc=shenwei.wang@nxp.com \
--cc=wei.fang@nxp.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