net/eth.c: bug-fix
PATCH 1/1 net/eth.c: bug-fix
--- u-boot-2009.11.1.orig/net/eth.c 2010-01-25 16:35:12.000000000 +0800
+++ u-boot-2009.11.1/net/eth.c 2010-02-12 11:18:23.558229895 +0800
@@ -199,7 +199,7 @@
#endif
/* Try board-specific initialization first. If it fails or isn't
* present, try the cpu-specific initialization */
- if (board_eth_init(bis) < 0)
+ if (board_eth_init(bis) <= 0)
cpu_eth_init(bis);
#if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750)
PATCH 1/1 net/eth.c: bug-fix
Quoted 9 lines · Teh Kok How
---
u-boot-2009.11.1.orig/net/eth.c2010-01-25 16:35:12.000000000 +0800+++
u-boot-2009.11.1/net/eth.c2010-02-12 11:18:23.558229895 +0800(quoted diff) +0
-0@@ -199,7 +199,7 @@ #endif
Review
Quoted 10 lines
(quoted diff) +1
-1/* Try board-specific initialization first. If it fails or isn't * present, try the cpu-specific initialization */ - if (board_eth_init(bis)< 0) + if (board_eth_init(bis)<= 0) cpu_eth_init(bis);
That's not a bug. The check is meant to indicate whether the weak board_eth_init() function has been overridden, not whether there was an error. I have a clarification patch that hasn't been submitted yet.
regards,
Ben
PATCH 1/1 net/eth.c: bug-fix
No, it is a bug. Board_eth_init() calls pci_eth_init() (include/netdev.h) and if ethernet is soc, CONFIG_PCI is not defined, pci_eth_init() returns 0. This patch allows cpu_eth_init() to be called.
-----Original Message-----
From: Ben Warren [mailto:biggerbadderben at gmail.com]
Sent: Friday, February 12, 2010 1:54 PM
To: Teh Kok How
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH] net/eth.c: bug-fix
Quoted 1 line · Teh Kok How
---
u-boot-2009.11.1.orig/net/eth.c2010-01-25 16:35:12.000000000
+0800
Quoted 8 lines
+++
u-boot-2009.11.1/net/eth.c2010-02-12 11:18:23.558229895 +0800(quoted diff) +0
-0@@ -199,7 +199,7 @@ #endif
Review
Quoted 10 lines
(quoted diff) +1
-1/* Try board-specific initialization first. If it fails or isn't * present, try the cpu-specific initialization */ - if (board_eth_init(bis)< 0) + if (board_eth_init(bis)<= 0) cpu_eth_init(bis);
That's not a bug. The check is meant to indicate whether the weak board_eth_init() function has been overridden, not whether there was an error. I have a clarification patch that hasn't been submitted yet.
regards,
Ben
PATCH 1/1 net/eth.c: bug-fix
Hello Teh Kok How,
Quoted 6 lines · Teh Kok How
No, it is a bug.
Board_eth_init()callspci_eth_init()(include/netdev.h) and if ethernet is soc,CONFIG_PCIis not defined,pci_eth_init()returns 0.
This patch allowscpu_eth_init()to be called.Sorry, still not a bug. The behavior you've described should be handled
internally to your specific board_eth_init() function. If no PCI devices are found either because none are present or because you didn't specify the CONFIG_PCI option, you can call cpu_eth_init().
regards,
Ben
PATCH 1/1 net/eth.c: bug-fix
In reply to Teh Kok HowFixes: Board_eth_init() calls pci_eth_init() (include/netdev.h) and if ethernet is soc, CONFIG_PCI is not defined, pci_eth_init() returns 0. This patch allows cpu_eth_init() to be called.
net/eth.c 2010-02-12 17:20:32.864273873 +0800 renamed from net/eth.c 2010-01-25 16:35:12.000000000 +0800 +1 -1
@@ -199,7 +199,7 @@ #endif /* Try board-specific initialization first. If it fails or isn't * present, try the cpu-specific initialization */ - if (board_eth_init(bis) < 0) + if (board_eth_init(bis) <= 0) cpu_eth_init(bis); #if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750)
PATCH 1/1 net/eth.c: bug-fix
Dear Ben,
Quoted 10 lines · In message <[email protected]> Teh Kok How…
Fixes:
Board_eth_init()callspci_eth_init()(include/netdev.h) and if ethernet is soc,CONFIG_PCIis not defined,pci_eth_init()returns 0. This patch allowscpu_eth_init()to be called.Signed-off-by Kok How, Teh <[email protected]>
net/eth.c 2010-02-12 17:20:32.864273873 +0800 line 205
Quoted 8 lines
net/eth.c 2010-02-12 17:20:32.864273873 +0800 renamed from net/eth.c 2010-01-25 16:35:12.000000000 +0800 +1
-1@@ -199,7 +199,7 @@ #endif /* Try board-specific initialization first. If it fails or isn't * present, try the cpu-specific initialization */ - if (board_eth_init(bis) < 0) + if (board_eth_init(bis) <= 0) cpu_eth_init(bis); #if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750)
Do you have this patch in your queue?
Best regards,
Wolfgang Denk
Signature · 7 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Abstainer: A weak person who yields to the temptation of denying him- self a pleasure. A total abstainer is one who abstains from every- thing but abstention, and especially from inactivity in the affairs of others. - Ambrose Bierce
PATCH 1/1 net/eth.c: bug-fix
Wolfgang,
Quoted 20 lines · Wolfgang Denk
Dear Ben,
Quoted 16 lines · In message<[email protected]> Teh Kok How…
Fixes:
Board_eth_init()callspci_eth_init()(include/netdev.h) and if ethernet is soc,CONFIG_PCIis not defined,pci_eth_init()returns 0. This patch allowscpu_eth_init()to be called.Signed-off-by Kok How, Teh<[email protected]>net/eth.c 2010-02-12 17:20:32.864273873 +0800 renamed from net/eth.c 2010-01-25 16:35:12.000000000 +0800 +1
-1@@ -199,7 +199,7 @@ #endif /* Try board-specific initialization first. If it fails or isn't * present, try the cpu-specific initialization */ - if (board_eth_init(bis)< 0) + if (board_eth_init(bis)<= 0) cpu_eth_init(bis);
Quoted 6 lines
net/eth.c 2010-02-12 17:20:32.864273873 +0800 line 205
Quoted 3 lines
net/eth.c 2010-02-12 17:20:32.864273873 +0800 renamed from net/eth.c 2010-01-25 16:35:12.000000000 +0800 +0
-0#if defined(CONFIG_DB64360) || defined(CONFIG_CPCI750)Do you have this patch in your queue?
No, I don't. This patch is wrong, and I believe I already responded about it. The code does need a subtle clean-up, but I haven't quite found the time to do it. Hopefully in the next couple of days I'll get to it.
Quoted 4 lines
Best regards,
Wolfgang Denk
regards,
Ben
PATCH 1/1 net/eth.c: bug-fix
Dear Ben Warren,
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Quoted 1 line
Do you have this patch in your queue?
No, I don't. This patch is wrong, and I believe I already responded about it. The code does need a subtle clean-up, but I haven't quite found the time to do it. Hopefully in the next couple of days I'll get to it.
Thanks. I asked because after your reply there was a "But..." from Teh Kok How which AFAICT remained unreplied, so I wa snot sure.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Punishment becomes ineffective after a certain point. Men become in- sensitive. -- Eneg, "Patterns of Force", stardate 2534.7
PATCH 1/1 net/eth.c: bug-fix
Hi Wolfgang,
Quoted 9 lines · Wolfgang Denk
Dear Ben Warren,
Quoted 5 lines · In message<[email protected]> you wrote:
Quoted 5 lines
Quoted 2 lines
Do you have this patch in your queue?
Quoted 9 lines
Quoted 5 lines
No, I don't. This patch is wrong, and I believe I already responded about it. The code does need a subtle clean-up, but I haven't quite found the time to do it. Hopefully in the next couple of days I'll get to it.
Thanks. I asked because after your reply there was a "But..." from Teh Kok How which AFAICT remained unreplied, so I wa snot sure.
I see that now. Thought I'd responded, but I guess not. Anyway, the right fix for the problem Teh Kok How is (was?) seeing is to have a smarter board_eth_init() function.
Quoted 5 lines
Best regards,
Wolfgang Denk
regards,
Ben