* [U-Boot] [PATCH] net/eth.c: bug-fix
@ 2010-02-12 4:08 Teh Kok How
2010-02-12 5:53 ` Ben Warren
2010-02-12 9:26 ` Teh Kok How
0 siblings, 2 replies; 9+ messages in thread
From: Teh Kok How @ 2010-02-12 4:08 UTC (permalink / raw)
To: u-boot
--- 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)
^ permalink raw reply [flat|nested] 9+ messages in thread* [U-Boot] [PATCH] net/eth.c: bug-fix
2010-02-12 4:08 [U-Boot] [PATCH] net/eth.c: bug-fix Teh Kok How
@ 2010-02-12 5:53 ` Ben Warren
2010-02-12 6:57 ` Teh Kok How
2010-02-12 9:26 ` Teh Kok How
1 sibling, 1 reply; 9+ messages in thread
From: Ben Warren @ 2010-02-12 5:53 UTC (permalink / raw)
To: u-boot
On 2/11/2010 8:08 PM, Teh Kok How wrote:
> --- 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);
>
>
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] net/eth.c: bug-fix
2010-02-12 5:53 ` Ben Warren
@ 2010-02-12 6:57 ` Teh Kok How
2010-02-12 15:19 ` Ben Warren
0 siblings, 1 reply; 9+ messages in thread
From: Teh Kok How @ 2010-02-12 6:57 UTC (permalink / raw)
To: u-boot
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
On 2/11/2010 8:08 PM, Teh Kok How wrote:
> --- 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);
>
>
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] net/eth.c: bug-fix
2010-02-12 6:57 ` Teh Kok How
@ 2010-02-12 15:19 ` Ben Warren
0 siblings, 0 replies; 9+ messages in thread
From: Ben Warren @ 2010-02-12 15:19 UTC (permalink / raw)
To: u-boot
Hello Teh Kok How,
On Thu, Feb 11, 2010 at 10:57 PM, Teh Kok How <khteh@smartbridges.com>wrote:
> 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.
>
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] net/eth.c: bug-fix
2010-02-12 4:08 [U-Boot] [PATCH] net/eth.c: bug-fix Teh Kok How
2010-02-12 5:53 ` Ben Warren
@ 2010-02-12 9:26 ` Teh Kok How
2010-03-21 20:38 ` Wolfgang Denk
1 sibling, 1 reply; 9+ messages in thread
From: Teh Kok How @ 2010-02-12 9:26 UTC (permalink / raw)
To: u-boot
Fixes: 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.
Signed-off-by: Kok How, Teh <k_h_teh@yahoo.com>
--- u-boot-2009.11.1.orig/net/eth.c 2010-01-25 16:35:12.000000000 +0800
+++ u-boot-2009.11.1.new/net/eth.c 2010-02-12 17:20:32.864273873 +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)
^ permalink raw reply [flat|nested] 9+ messages in thread* [U-Boot] [PATCH] net/eth.c: bug-fix
2010-02-12 9:26 ` Teh Kok How
@ 2010-03-21 20:38 ` Wolfgang Denk
2010-03-23 17:15 ` Ben Warren
0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2010-03-21 20:38 UTC (permalink / raw)
To: u-boot
Dear Ben,
In message <3270DCAC1B1540C7B13D9BC718F543BF@smartbridges.com> Teh Kok How wrote:
> Fixes: 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.
>
>
> Signed-off-by: Kok How, Teh <k_h_teh@yahoo.com>
> --- u-boot-2009.11.1.orig/net/eth.c 2010-01-25 16:35:12.000000000 +0800
> +++ u-boot-2009.11.1.new/net/eth.c 2010-02-12 17:20:32.864273873 +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)
>
Do you have this patch in your queue?
Best regards,
Wolfgang Denk
--
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] net/eth.c: bug-fix
2010-03-21 20:38 ` Wolfgang Denk
@ 2010-03-23 17:15 ` Ben Warren
2010-03-23 19:52 ` Wolfgang Denk
0 siblings, 1 reply; 9+ messages in thread
From: Ben Warren @ 2010-03-23 17:15 UTC (permalink / raw)
To: u-boot
Wolfgang,
On 3/21/2010 1:38 PM, Wolfgang Denk wrote:
> Dear Ben,
>
> In message<3270DCAC1B1540C7B13D9BC718F543BF@smartbridges.com> Teh Kok How wrote:
>
>> Fixes: 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.
>>
>>
>> Signed-off-by: Kok How, Teh<k_h_teh@yahoo.com>
>> --- u-boot-2009.11.1.orig/net/eth.c 2010-01-25 16:35:12.000000000 +0800
>> +++ u-boot-2009.11.1.new/net/eth.c 2010-02-12 17:20:32.864273873 +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)
>>
>>
> 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.
> Best regards,
>
> Wolfgang Denk
>
regards,
Ben
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] net/eth.c: bug-fix
2010-03-23 17:15 ` Ben Warren
@ 2010-03-23 19:52 ` Wolfgang Denk
2010-03-23 20:23 ` Ben Warren
0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2010-03-23 19:52 UTC (permalink / raw)
To: u-boot
Dear Ben Warren,
In message <4BA8F738.3050806@gmail.com> you wrote:
> >>
> > 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
--
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] net/eth.c: bug-fix
2010-03-23 19:52 ` Wolfgang Denk
@ 2010-03-23 20:23 ` Ben Warren
0 siblings, 0 replies; 9+ messages in thread
From: Ben Warren @ 2010-03-23 20:23 UTC (permalink / raw)
To: u-boot
Hi Wolfgang,
On 3/23/2010 12:52 PM, Wolfgang Denk wrote:
> Dear Ben Warren,
>
> In message<4BA8F738.3050806@gmail.com> you wrote:
>
>>>>
>>>>
>>> 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.
>
>
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.
> Best regards,
>
> Wolfgang Denk
>
>
regards,
Ben
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-03-23 20:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-12 4:08 [U-Boot] [PATCH] net/eth.c: bug-fix Teh Kok How
2010-02-12 5:53 ` Ben Warren
2010-02-12 6:57 ` Teh Kok How
2010-02-12 15:19 ` Ben Warren
2010-02-12 9:26 ` Teh Kok How
2010-03-21 20:38 ` Wolfgang Denk
2010-03-23 17:15 ` Ben Warren
2010-03-23 19:52 ` Wolfgang Denk
2010-03-23 20:23 ` Ben Warren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox