From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Sun, 20 Jun 2010 23:10:56 -0700 Subject: [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check. In-Reply-To: <20100612192201.17815.3486.stgit@numalfix> References: <20100612192201.17815.3486.stgit@numalfix> Message-ID: <4C1F0270.1010706@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Juergen, On 6/12/2010 12:22 PM, Juergen Kilb wrote: > From: Juergen Kilb > > The smc911x_detect function in /net/driver/net/smc911x.c > returns a 0 if everything was ok (a chip was found) and -1 else. > In the standalone example 'smc911x_eeprom' the return value > of smc911x_detect is interpreted in a different way > (0 for error, !0 as OK). > This leads to the error that the chip will not be detected. > > Signed-of-by: Juergen Kilb > --- > > examples/standalone/smc911x_eeprom.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c > index 104047f..cb3c131 100644 > --- a/examples/standalone/smc911x_eeprom.c > +++ b/examples/standalone/smc911x_eeprom.c > @@ -240,7 +240,7 @@ static void dump_eeprom(struct eth_device *dev) > static int smc911x_init(struct eth_device *dev) > { > /* See if there is anything there */ > - if (!smc911x_detect_chip(dev)) > + if (smc911x_detect_chip(dev)) > return 1; > > smc911x_reset(dev); > > Applied to net/next. regards, Ben