From: Wei Fang <wei.fang@nxp.com>
To: Greg Ungerer <gerg@kernel.org>,
"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 02:46:38 +0000 [thread overview]
Message-ID: <DBBPR04MB750044F98B1E719AD9DBD93E883D2@DBBPR04MB7500.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20260506142644.3234270-2-gerg@kernel.org>
> 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.
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");
> }
>
next prev parent reply other threads:[~2026-05-08 2:46 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 ` Wei Fang [this message]
2026-05-08 8:40 ` [RFC 1/4] net: fec: do not use readl()/writel() for ColdFire David Laight
2026-05-08 13:14 ` Greg Ungerer
2026-05-08 13:11 ` Greg Ungerer
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=DBBPR04MB750044F98B1E719AD9DBD93E883D2@DBBPR04MB7500.eurprd04.prod.outlook.com \
--to=wei.fang@nxp.com \
--cc=arnd@kernel.org \
--cc=frank.li@nxp.com \
--cc=gerg@kernel.org \
--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 \
/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