Subject: Re: [PATCH net-next] dsa: mv88e6xxx: Timeout based on iterations

From: Andrew Lunn <[email-masked]>
Date: Thu, 18 Aug 2016 20:39:46 +0200

> >  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