All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: "fugang.duan@freescale.com" <fugang.duan@freescale.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"shawn.guo@linaro.org" <shawn.guo@linaro.org>
Subject: Re: [PATCH v3 1/1] net: fec: ptp: avoid register access when ipg clock is disabled
Date: Mon, 18 Aug 2014 21:42:10 +0200	[thread overview]
Message-ID: <20140818194151.GA4048@netboy> (raw)
In-Reply-To: <b50df5011728419887508cbf3af0a5a7@BLUPR03MB373.namprd03.prod.outlook.com>

On Mon, Aug 18, 2014 at 06:07:00AM +0000, fugang.duan@freescale.com wrote:
> 1. Set the flag to false firstly.

Yes.

> 2. Don't need to add mutex to protect the flag.(My previous mail ask one mutex to protect the flag)

You *do* need a mutex to protect the state of the physical clock. One
process might turn it off while another process is still reading it.

>    Just pull the flag into the protected field by spin_lock_irqsave() like :
> fec_time_keep()

No, the spin only protects the register access.

Thanks,
Richard

  reply	other threads:[~2014-08-18 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15  5:52 [PATCH v3 0/1] net: fec: ptp: avoid register access when ipg clock is disabled Fugang Duan
2014-08-15  5:52 ` [PATCH v3 1/1] " Fugang Duan
2014-08-15 18:08   ` Richard Cochran
2014-08-18  5:26     ` fugang.duan
2014-08-18  6:07     ` fugang.duan
2014-08-18 19:42       ` Richard Cochran [this message]
2014-08-19  1:50         ` fugang.duan

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=20140818194151.GA4048@netboy \
    --to=richardcochran@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fugang.duan@freescale.com \
    --cc=netdev@vger.kernel.org \
    --cc=shawn.guo@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.