* [U-Boot] [PATCH/next branch] powerpc: Only use eth_getenv_enetaddr() if networking is enabled
@ 2009-02-23 15:52 Stefan Roese
2009-02-25 9:16 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2009-02-23 15:52 UTC (permalink / raw)
To: u-boot
Signed-off-by: Stefan Roese <sr@denx.de>
---
lib_ppc/board.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index f1b62f5..fc3cef6 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -888,8 +888,10 @@ void board_init_r (gd_t *id, ulong dest_addr)
bd->bi_ethspeed = 0xFFFF;
#endif
+#ifdef CONFIG_CMD_NET
/* kept around for legacy kernels only ... ignore the next section */
eth_getenv_enetaddr("ethaddr", bd->bi_enetaddr);
+#endif
#ifdef CONFIG_HAS_ETH1
eth_getenv_enetaddr("eth1addr", bd->bi_enet1addr);
#endif
--
1.6.1.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH/next branch] powerpc: Only use eth_getenv_enetaddr() if networking is enabled
2009-02-23 15:52 [U-Boot] [PATCH/next branch] powerpc: Only use eth_getenv_enetaddr() if networking is enabled Stefan Roese
@ 2009-02-25 9:16 ` Wolfgang Denk
2009-02-25 9:29 ` Stefan Roese
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2009-02-25 9:16 UTC (permalink / raw)
To: u-boot
Dear Stefan Roese,
In message <1235404365-3041-1-git-send-email-sr@denx.de> you wrote:
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
> lib_ppc/board.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/lib_ppc/board.c b/lib_ppc/board.c
> index f1b62f5..fc3cef6 100644
> --- a/lib_ppc/board.c
> +++ b/lib_ppc/board.c
> @@ -888,8 +888,10 @@ void board_init_r (gd_t *id, ulong dest_addr)
> bd->bi_ethspeed = 0xFFFF;
> #endif
>
> +#ifdef CONFIG_CMD_NET
> /* kept around for legacy kernels only ... ignore the next section */
> eth_getenv_enetaddr("ethaddr", bd->bi_enetaddr);
> +#endif
> #ifdef CONFIG_HAS_ETH1
> eth_getenv_enetaddr("eth1addr", bd->bi_enet1addr);
> #endif
Should that #ifdef not include the code for "eth1addr" etc., too?
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
The Gates in my computer are AND, OR and NOT; they are not Bill.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH/next branch] powerpc: Only use eth_getenv_enetaddr() if networking is enabled
2009-02-25 9:16 ` Wolfgang Denk
@ 2009-02-25 9:29 ` Stefan Roese
2009-02-25 10:54 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Roese @ 2009-02-25 9:29 UTC (permalink / raw)
To: u-boot
On Wednesday 25 February 2009, Wolfgang Denk wrote:
> > +++ b/lib_ppc/board.c
> > @@ -888,8 +888,10 @@ void board_init_r (gd_t *id, ulong dest_addr)
> > bd->bi_ethspeed = 0xFFFF;
> > #endif
> >
> > +#ifdef CONFIG_CMD_NET
> > /* kept around for legacy kernels only ... ignore the next section */
> > eth_getenv_enetaddr("ethaddr", bd->bi_enetaddr);
> > +#endif
> > #ifdef CONFIG_HAS_ETH1
> > eth_getenv_enetaddr("eth1addr", bd->bi_enet1addr);
> > #endif
>
> Should that #ifdef not include the code for "eth1addr" etc., too?
I don't think this is needed. If a board has a 2nd (or 3rd...) ethernet
interface, it sets CONFIG_HAS_ETH1. I can't think of a board setting this
define and not enabling CONFIG_CMD_NET.
But if you prefer it, I could change the patch to include all eth interfaces
in the #ifdef CONFIG_CMD_NET part. Just let me know.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH/next branch] powerpc: Only use eth_getenv_enetaddr() if networking is enabled
2009-02-25 9:29 ` Stefan Roese
@ 2009-02-25 10:54 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2009-02-25 10:54 UTC (permalink / raw)
To: u-boot
Dear Stefan Roese,
In message <200902251029.42273.sr@denx.de> you wrote:
>
> > Should that #ifdef not include the code for "eth1addr" etc., too?
>
> I don't think this is needed. If a board has a 2nd (or 3rd...) ethernet
> interface, it sets CONFIG_HAS_ETH1. I can't think of a board setting this
> define and not enabling CONFIG_CMD_NET.
Well, I can see such problems happen by accident - for example, when
you usualy have Ethernet enabled and just disable it for a test or to
shrink the image size or ...
> But if you prefer it, I could change the patch to include all eth interfaces
> in the #ifdef CONFIG_CMD_NET part. Just let me know.
I think it would be cleaner, so please do. Thanks.
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
"The POP3 server service depends on the SMTP server service, which
failed to start because of the following error: The operation comple-
ted successfully." -- Windows NT Server v3.51
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-25 10:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-23 15:52 [U-Boot] [PATCH/next branch] powerpc: Only use eth_getenv_enetaddr() if networking is enabled Stefan Roese
2009-02-25 9:16 ` Wolfgang Denk
2009-02-25 9:29 ` Stefan Roese
2009-02-25 10:54 ` Wolfgang Denk
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.