Re: [PATCH 1/2] net: dsa: mv88e6xxx: sleep in _mv88e6xxx_stats_wait

2015-07-18 Thread Andrew Lunn
On Sat, Jul 18, 2015 at 11:23:19AM -0400, Vivien Didelot wrote: > Hi all, > > - On Jul 18, 2015, at 10:58 AM, Andrew Lunn and...@lunn.ch wrote: > > >> Good point. The timeout is most definitely quite large and for sure on > >> the safe side. It might make sense to add some statistics gatherin

Re: [PATCH 1/2] net: dsa: mv88e6xxx: sleep in _mv88e6xxx_stats_wait

2015-07-18 Thread Vivien Didelot
Hi all, - On Jul 18, 2015, at 10:58 AM, Andrew Lunn and...@lunn.ch wrote: >> Good point. The timeout is most definitely quite large and for sure on >> the safe side. It might make sense to add some statistics gathering to >> see how long the maximum observed delay actually is. > > Hi All >

Re: [PATCH 1/2] net: dsa: mv88e6xxx: sleep in _mv88e6xxx_stats_wait

2015-07-18 Thread Andrew Lunn
> Good point. The timeout is most definitely quite large and for sure on > the safe side. It might make sense to add some statistics gathering to > see how long the maximum observed delay actually is. Hi All Statistics are something which can be used a lot, i bursts and interactivily. ATU, VTU et

Re: [PATCH 1/2] net: dsa: mv88e6xxx: sleep in _mv88e6xxx_stats_wait

2015-07-10 Thread Guenter
Hi Vivien, On Fri, Jul 10, 2015 at 03:21:47PM -0400, Vivien Didelot wrote: > Hi Guenter, > >> I must have missed where is the benefit from spin reading 10 times this > >> register, rather than sleeping 1ms between tests. Does this busy bit > >> behaves differently from the phy, atu, scratch, or vt

Re: [PATCH 1/2] net: dsa: mv88e6xxx: sleep in _mv88e6xxx_stats_wait

2015-07-10 Thread Vivien Didelot
Hi Guenter, On Jul 10, 2015, at 2:36 PM, Guenter Roeck li...@roeck-us.net wrote: > Hi Vivien, > > On Fri, Jul 10, 2015 at 02:20:47PM -0400, Vivien Didelot wrote: >> > >> > is this really beneficial and/or needed ? >> >> Except using existing generic code, no. >> >> > It adds at least 1ms dela

Re: [PATCH 1/2] net: dsa: mv88e6xxx: sleep in _mv88e6xxx_stats_wait

2015-07-10 Thread Guenter Roeck
Hi Vivien, On Fri, Jul 10, 2015 at 02:20:47PM -0400, Vivien Didelot wrote: > > > > is this really beneficial and/or needed ? > > Except using existing generic code, no. > > > It adds at least 1ms delay to a loop which did not have any delay at > > all unless the register read itself was sleepin

Re: [PATCH 1/2] net: dsa: mv88e6xxx: sleep in _mv88e6xxx_stats_wait

2015-07-10 Thread Vivien Didelot
Hi Guenter, On Jul 10, 2015, at 1:10 PM, Guenter Roeck li...@roeck-us.net wrote: > On Fri, Jul 10, 2015 at 12:57:28PM -0400, Vivien Didelot wrote: >> The current _mv88e6xxx_stats_wait function does not sleep while testing >> the stats busy bit. Fix this by using the generic _mv88e6xxx_wait >> fun

Re: [PATCH 1/2] net: dsa: mv88e6xxx: sleep in _mv88e6xxx_stats_wait

2015-07-10 Thread Guenter
On Fri, Jul 10, 2015 at 12:57:28PM -0400, Vivien Didelot wrote: > The current _mv88e6xxx_stats_wait function does not sleep while testing > the stats busy bit. Fix this by using the generic _mv88e6xxx_wait > function. > > Note that it requires to move _mv88e6xxx_wait on top of > _mv88e6xxx_stats_w

[PATCH 1/2] net: dsa: mv88e6xxx: sleep in _mv88e6xxx_stats_wait

2015-07-10 Thread Vivien Didelot
The current _mv88e6xxx_stats_wait function does not sleep while testing the stats busy bit. Fix this by using the generic _mv88e6xxx_wait function. Note that it requires to move _mv88e6xxx_wait on top of _mv88e6xxx_stats_wait to avoid undefined reference compilation error. Signed-off-by: Vivien D