* [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check.
@ 2010-06-12 19:22 Juergen Kilb
2010-06-13 2:28 ` Mike Frysinger
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Juergen Kilb @ 2010-06-12 19:22 UTC (permalink / raw)
To: u-boot
From: Juergen Kilb <j.jilb@phytec.de>
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 <j.kilb@phytec.de>
---
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);
^ permalink raw reply related [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check.
2010-06-12 19:22 [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check Juergen Kilb
@ 2010-06-13 2:28 ` Mike Frysinger
2010-06-21 6:10 ` Ben Warren
2010-07-09 22:11 ` Mike Frysinger
2 siblings, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2010-06-13 2:28 UTC (permalink / raw)
To: u-boot
On Sat, Jun 12, 2010 at 3:22 PM, Juergen Kilb wrote:
> 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.
Acked-by: Mike Frysinger <vapier@gentoo.org>
-mike
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check.
2010-06-12 19:22 [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check Juergen Kilb
2010-06-13 2:28 ` Mike Frysinger
@ 2010-06-21 6:10 ` Ben Warren
2010-07-09 22:11 ` Mike Frysinger
2 siblings, 0 replies; 5+ messages in thread
From: Ben Warren @ 2010-06-21 6:10 UTC (permalink / raw)
To: u-boot
Hi Juergen,
On 6/12/2010 12:22 PM, Juergen Kilb wrote:
> From: Juergen Kilb<j.jilb@phytec.de>
>
> 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<j.kilb@phytec.de>
> ---
>
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread* [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check.
2010-06-12 19:22 [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check Juergen Kilb
2010-06-13 2:28 ` Mike Frysinger
2010-06-21 6:10 ` Ben Warren
@ 2010-07-09 22:11 ` Mike Frysinger
2010-07-09 23:31 ` Ben Warren
2 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2010-07-09 22:11 UTC (permalink / raw)
To: u-boot
On Saturday, June 12, 2010 15:22:01 Juergen Kilb wrote:
> Signed-of-by: Juergen Kilb <j.kilb@phytec.de>
should be "off", not "of". you'll have to fix the commit in your net/next
tree too Ben ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100709/9dd9a69b/attachment.pgp
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check.
2010-07-09 22:11 ` Mike Frysinger
@ 2010-07-09 23:31 ` Ben Warren
0 siblings, 0 replies; 5+ messages in thread
From: Ben Warren @ 2010-07-09 23:31 UTC (permalink / raw)
To: u-boot
On 7/9/2010 3:11 PM, Mike Frysinger wrote:
> On Saturday, June 12, 2010 15:22:01 Juergen Kilb wrote:
>> Signed-of-by: Juergen Kilb<j.kilb@phytec.de>
> should be "off", not "of". you'll have to fix the commit in your net/next
> tree too Ben ...
> -mike
thanks for pointing this out. I'll take care of it this W/E
regards,
Ben
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-09 23:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-12 19:22 [U-Boot] [PATCH] smc91xx_eeprom: Correct chip detection check Juergen Kilb
2010-06-13 2:28 ` Mike Frysinger
2010-06-21 6:10 ` Ben Warren
2010-07-09 22:11 ` Mike Frysinger
2010-07-09 23:31 ` Ben Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox