linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jose Abreu <jose.abreu@synopsys.com>
To: Alexandre Torgue <alexandre.torgue@st.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Jose Abreu <jose.abreu@synopsys.com>, <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [net-next, PATCH] net: stmmac: use correct define to get rx timestamp on GMAC4
Date: Thu, 14 Feb 2019 14:18:02 +0000	[thread overview]
Message-ID: <7c03dff4-5185-dbd2-eeb4-867972512f2b@synopsys.com> (raw)
In-Reply-To: <1550153571-14404-1-git-send-email-alexandre.torgue@st.com>

Hi Alexandre,

On 2/14/2019 2:12 PM, Alexandre Torgue wrote:
> In dwmac4_wrback_get_rx_timestamp_status we looking for a RX timestamp.
> For that receive descriptors are handled and so we should use defines
> related to receive descriptors. It'll no change the functional behavior
> as RDES3_RDES1_VALID=TDES3_RS1V=BIT(26) but it makes code easier to read.
> 
> Signed-off-by: Alexandre Torgue <alexandre.torgue@st.com>
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
> index 20299f6..9f062b3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_descs.c
> @@ -268,7 +268,7 @@ static int dwmac4_wrback_get_rx_timestamp_status(void *desc, void *next_desc,
>  	int ret = -EINVAL;
>  
>  	/* Get the status from normal w/b descriptor */
> -	if (likely(p->des3 & TDES3_RS1V)) {
> +	if (likely(p->des3 & RDES3_RDES1_VALID)) {

Shouldn't this also use le32_to_cpu() like bellow ?

Thanks,
Jose Miguel Abreu

>  		if (likely(le32_to_cpu(p->des1) & RDES1_TIMESTAMP_AVAILABLE)) {
>  			int i = 0;
>  
> 

  reply	other threads:[~2019-02-14 14:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 14:12 [net-next, PATCH] net: stmmac: use correct define to get rx timestamp on GMAC4 Alexandre Torgue
2019-02-14 14:18 ` Jose Abreu [this message]
2019-02-14 15:00   ` Alexandre Torgue
2019-02-14 15:30     ` Jose Abreu
2019-02-14 15:56       ` Alexandre Torgue

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=7c03dff4-5185-dbd2-eeb4-867972512f2b@synopsys.com \
    --to=jose.abreu@synopsys.com \
    --cc=alexandre.torgue@st.com \
    --cc=davem@davemloft.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.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).