netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Oleksij Rempel <o.rempel@pengutronix.de>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	 Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: stable@vger.kernel.org, kernel@pengutronix.de,
	linux-kernel@vger.kernel.org,  netdev@vger.kernel.org,
	Richard Cochran <richardcochran@gmail.com>,
	Tan Tee Min <tee.min.tan@intel.com>,
	Wong Vee Khee <vee.khee.wong@linux.intel.com>
Subject: Re: [PATCH net v1 1/1] net: stmmac: Assign configured channel value to EXTTS event
Date: Thu, 20 Jun 2024 11:55:42 +0200	[thread overview]
Message-ID: <f1334e4f948724df59604f56473d6ec572ebeb24.camel@redhat.com> (raw)
In-Reply-To: <20240618073821.619751-1-o.rempel@pengutronix.de>

On Tue, 2024-06-18 at 09:38 +0200, Oleksij Rempel wrote:
> @@ -243,12 +244,15 @@ static void timestamp_interrupt(struct stmmac_priv *priv)
>  	num_snapshot = (ts_status & GMAC_TIMESTAMP_ATSNS_MASK) >>
>  		       GMAC_TIMESTAMP_ATSNS_SHIFT;
>  
> +	acr_value = readl(priv->ptpaddr + PTP_ACR);
> +	channel = ilog2(FIELD_GET(PTP_ACR_MASK, acr_value));

Side note for a possible net-next follow-up: as the driver already has
an equal snippet in stmmac_enable(), you con consider factor it out in
a common, more readable helper.

Cheers,

Paolo


  parent reply	other threads:[~2024-06-20  9:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18  7:38 [PATCH net v1 1/1] net: stmmac: Assign configured channel value to EXTTS event Oleksij Rempel
2024-06-18 13:07 ` Wojciech Drewek
2024-06-20  9:55 ` Paolo Abeni [this message]
2024-06-20 10:00 ` patchwork-bot+netdevbpf

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=f1334e4f948724df59604f56473d6ec572ebeb24.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=joabreu@synopsys.com \
    --cc=kernel@pengutronix.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=richardcochran@gmail.com \
    --cc=stable@vger.kernel.org \
    --cc=tee.min.tan@intel.com \
    --cc=vee.khee.wong@linux.intel.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).