All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Cc: David Miller <davem@davemloft.net>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] dsa: mv88e6xxx: Timeout based on iterations
Date: Thu, 18 Aug 2016 20:39:46 +0200	[thread overview]
Message-ID: <20160818183946.GD13458@lunn.ch> (raw)
In-Reply-To: <87oa4rat8o.fsf@ketchup.mtl.sfl>

> >  static int mv88e6xxx_wait(struct mv88e6xxx_chip *chip, int addr, int reg,
> >  			  u16 mask)
> >  {
> > -	unsigned long timeout = jiffies + HZ / 10;
> > +	int i;
> >  
> > -	while (time_before(jiffies, timeout)) {
> > +	for (i = 0; i < 16; i++) {
> >  		u16 val;
> >  		int err;
> >  
> 
> Since we remove the elapsed time here, can we use mv88e6xxx_wait in
> mv88e6xxx_update? It'd be good to have a consistent wait routine
> everywhere.

Hi Vivien

Yes, it looks like that should work. I will add a second patch to do
this.

	Andrew

      reply	other threads:[~2016-08-19  2:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-17 21:27 [PATCH net-next] dsa: mv88e6xxx: Timeout based on iterations Andrew Lunn
2016-08-17 23:08 ` Vivien Didelot
2016-08-18 18:39   ` Andrew Lunn [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=20160818183946.GD13458@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@savoirfairelinux.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 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.