netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: "Csókás, Bence" <csokas.bence@prolan.hu>
Cc: Laurent Badel <laurentbadel@eaton.com>,
	Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
	imx@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Michal Swiatkowski <michal.swiatkowski@linux.intel.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Wei Fang <wei.fang@nxp.com>, Shenwei Wang <shenwei.wang@nxp.com>,
	Clark Wang <xiaoning.wang@nxp.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH] net: fec: Refactor MAC reset to function
Date: Wed, 5 Feb 2025 13:28:32 +0000	[thread overview]
Message-ID: <20250205132832.GC554665@kernel.org> (raw)
In-Reply-To: <20250204093604.253436-2-csokas.bence@prolan.hu>

On Tue, Feb 04, 2025 at 10:36:03AM +0100, Csókás, Bence wrote:
> The core is reset both in `fec_restart()` (called on link-up) and
> `fec_stop()` (going to sleep, driver remove etc.). These two functions
> had their separate implementations, which was at first only a register
> write and a `udelay()` (and the accompanying block comment). However,
> since then we got soft-reset (MAC disable) and Wake-on-LAN support, which
> meant that these implementations diverged, often causing bugs.
> 
> For instance, as of now, `fec_stop()` does not check for
> `FEC_QUIRK_NO_HARD_RESET`, meaning the MII/RMII mode is cleared on eg.
> a PM power-down event; and `fec_restart()` missed the refactor renaming
> the "magic" constant `1` to `FEC_ECR_RESET`.
> 
> To harmonize current implementations, and eliminate this source of
> potential future bugs, refactor implementation to a common function.
> 
> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> Fixes: c730ab423bfa ("net: fec: Fix temporary RMII clock reset on link up")
> Fixes: ff049886671c ("net: fec: Refactor: #define magic constants")
> Signed-off-by: Csókás, Bence <csokas.bence@prolan.hu>

Reviewed-by: Simon Horman <horms@kernel.org>


  reply	other threads:[~2025-02-05 13:28 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04  9:36 [PATCH] net: fec: Refactor MAC reset to function Csókás, Bence
2025-02-05 13:28 ` Simon Horman [this message]
2025-02-05 13:48   ` Simon Horman
2025-02-06 13:02     ` Csókás Bence
2025-02-06 18:32       ` Simon Horman
  -- strict thread matches above, loose matches on Subject: below --
2025-01-22 16:39 Csókás, Bence
2025-01-22 19:47 ` Jacob Keller
2025-01-23  1:24 ` Wei Fang
2025-01-21 10:38 Csókás, Bence
2025-01-21 14:10 ` Michal Swiatkowski
2025-01-21 14:36 ` Ahmad Fatoum
2025-01-21 15:19 ` Simon Horman
2025-01-21 15:51   ` Csókás Bence
2025-01-21 18:07     ` Jakub Kicinski
2025-01-21 17:28 ` Andrew Lunn
2025-01-22  2:50 ` Wei Fang

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=20250205132832.GC554665@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=csokas.bence@prolan.hu \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=imx@lists.linux.dev \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=laurentbadel@eaton.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.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;
as well as URLs for NNTP newsgroup(s).