From: Julia Lawall <julia.lawall@inria.fr>
To: sergei.shtylyov@cogentembedded.com, horms+renesas@verge.net.au,
tho.vu.wh@rvc.renesas.com, uli+renesas@fpond.eu
Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org, joe@perches.com
Subject: question about drivers/net/ethernet/renesas/ravb_main.c
Date: Fri, 3 Apr 2020 16:04:38 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.2004031559240.2694@hadrien> (raw)
Hello,
In the function ravb_hwtstamp_get in ravb_main.c, the following code looks
suspicious:
if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_V2_L2_EVENT)
config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
else if (priv->tstamp_rx_ctrl & RAVB_RXTSTAMP_TYPE_ALL)
config.rx_filter = HWTSTAMP_FILTER_ALL;
else
config.rx_filter = HWTSTAMP_FILTER_NONE;
According to drivers/net/ethernet/renesas/ravb.h,
RAVB_RXTSTAMP_TYPE_V2_L2_EVENT is 0x00000002 and RAVB_RXTSTAMP_TYPE_ALL is
0x00000006. Therefore, if the test on RAVB_RXTSTAMP_TYPE_ALL should be
true, it will never be reached. How should the code be changed?
thanks,
julia
next reply other threads:[~2020-04-03 14:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-03 14:04 Julia Lawall [this message]
2020-04-06 21:14 ` question about drivers/net/ethernet/renesas/ravb_main.c Sergei Shtylyov
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=alpine.DEB.2.21.2004031559240.2694@hadrien \
--to=julia.lawall@inria.fr \
--cc=horms+renesas@verge.net.au \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=tho.vu.wh@rvc.renesas.com \
--cc=uli+renesas@fpond.eu \
/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).