From: Scott Wood <scottwood@freescale.com>
To: Manfred Rudigier <Manfred.Rudigier@omicron.at>
Cc: "'netdev@vger.kernel.org'" <netdev@vger.kernel.org>,
"'sandeep.kumar@freescale.com'" <sandeep.kumar@freescale.com>,
"'linuxppc-dev@lists.ozlabs.org'" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [RFC PATCH net-next 2/4] gianfar: Added timer feature for eTSEC
Date: Wed, 7 Apr 2010 11:21:09 -0500 [thread overview]
Message-ID: <20100407162109.GA9220@loki.buserror.net> (raw)
In-Reply-To: <95DC1AA8EC908B48939B72CF375AA5E311A9F4E0@alice.at.omicron.at>
On Wed, Apr 07, 2010 at 11:46:24AM +0200, Manfred Rudigier wrote:
> switch (config.tx_type) {
> case HWTSTAMP_TX_OFF:
> + priv->hwts_tx_en = 0;
> break;
> case HWTSTAMP_TX_ON:
> + if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER))
> + return -ERANGE;
> + priv->hwts_tx_en = 1;
> return -ERANGE;
> default:
> return -ERANGE;
> @@ -796,8 +802,12 @@ static int gfar_hwtstamp_ioctl(struct net_device *netdev,
>
> switch (config.rx_filter) {
> case HWTSTAMP_FILTER_NONE:
> + priv->hwts_rx_en = 0;
> break;
> default:
> + if (!(priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER))
> + return -ERANGE;
> + priv->hwts_rx_en = 1;
> return -ERANGE;
> }
You need to acquire bflock (or avoid using bitfields for this), or you could
race with the setting of wol_en or rx_csum_enable.
-Scott
prev parent reply other threads:[~2010-04-07 16:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 9:46 [RFC PATCH net-next 2/4] gianfar: Added timer feature for eTSEC Manfred Rudigier
2010-04-07 16:21 ` Scott Wood [this message]
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=20100407162109.GA9220@loki.buserror.net \
--to=scottwood@freescale.com \
--cc=Manfred.Rudigier@omicron.at \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=sandeep.kumar@freescale.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).