Re: [U-Boot] [PATCH] e1000: fix bugs from recent commits

2011-10-29 Thread Wolfgang Denk
Dear Mike Frysinger, In message you wrote: > > yes, the actual implementation is a read. however, the API implied by > the naming (xxx_WRITE_xxx) is a write command. sometimes that means a > read of the status register (if they're R1C bits), or a write (if > they're W1C bits), but the forward

Re: [U-Boot] [PATCH] e1000: fix bugs from recent commits

2011-10-28 Thread Mike Frysinger
On Fri, Oct 28, 2011 at 22:19, Wolfgang Denk wrote: > Mike Frysinger wrote: >> On Fri, Oct 28, 2011 at 07:49, Wolfgang Denk wrote: >> > --- a/drivers/net/e1000.h >> > +++ b/drivers/net/e1000.h >> > >> >  #define E1000_WRITE_FLUSH(a) \ >> > -       do { uint32_t x = E1000_READ_REG(a, STATUS); } whil

Re: [U-Boot] [PATCH] e1000: fix bugs from recent commits

2011-10-28 Thread Marek Vasut
> Commit 114d7fc0 "e1000: Rewrite EEPROM checksum error to give more > information" failed to initialize the checksum variable which should > result in random results. Fix that. > [I wonder if that code has _ever_ been tested!!] > > Commit 2326a94d caused a ton of "unused variable 'x'" warnings. >

Re: [U-Boot] [PATCH] e1000: fix bugs from recent commits

2011-10-28 Thread Wolfgang Denk
Dear "Moffett, Kyle D", In message you wrote: > > The correct E1000_WRITE_FLUSH macro should be: > #define E1000_WRITE_FLUSH(a) \ > do { uint32_t x =3D E1000_READ_REG(a, STATUS); (void)x; } while(0= > ) > > It shouldn't return a value, it's just ensuring that writes are properly > po

Re: [U-Boot] [PATCH] e1000: fix bugs from recent commits

2011-10-28 Thread Wolfgang Denk
Dear Mike Frysinger, In message you wrote: > On Fri, Oct 28, 2011 at 07:49, Wolfgang Denk wrote: > > --- a/drivers/net/e1000.h > > +++ b/drivers/net/e1000.h > > > > #define E1000_WRITE_FLUSH(a) \ > > - do { uint32_t x = E1000_READ_REG(a, STATUS); } while (0) > > + E1000_READ_REG(a,

Re: [U-Boot] [PATCH] e1000: fix bugs from recent commits

2011-10-28 Thread Moffett, Kyle D
On Oct 28, 2011, at 01:49, Wolfgang Denk wrote: > Commit 114d7fc0 "e1000: Rewrite EEPROM checksum error to give more > information" failed to initialize the checksum variable which should > result in random results. Fix that. > [I wonder if that code has _ever_ been tested!!] > > I wonder if you

Re: [U-Boot] [PATCH] e1000: fix bugs from recent commits

2011-10-27 Thread Mike Frysinger
On Fri, Oct 28, 2011 at 07:49, Wolfgang Denk wrote: > --- a/drivers/net/e1000.h > +++ b/drivers/net/e1000.h > >  #define E1000_WRITE_FLUSH(a) \ > -       do { uint32_t x = E1000_READ_REG(a, STATUS); } while (0) > +       E1000_READ_REG(a, STATUS) i think we want the do{}while as this is a write co