Skip to contentSkip to conversation

net: sync env ethaddr to device enetaddr in eth_init()

PATCH New Mike Frysinger 4 participants 6 messages Jul 16, 2009 – Aug 13, 2009 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: sync env ethaddr to device enetaddr in eth_init()

In the previous enetaddr refactoring, the assumption with commit 56b555a644 was that the eth layer would handle the env -> device enetaddr syncing. This was not the case as eth_initialize() is called only once and the sync occurs there. So make sure the eth_init() function does the env -> device sync with every network init.

---
Andrzej: please try this patch instead for your macb troubles

 include/net.h |    2 +-
 net/eth.c     |   52 +++++++++++++++++++++++-----------------------------
 2 files changed, 24 insertions(+), 30 deletions(-)
include/net.h +1 -1
index 5a1d36e..c0bde71 100644
@@ -119,10 +119,10 @@ extern struct eth_device *eth_get_dev(void);	/* get the current device MAC */
 extern struct eth_device *eth_get_dev_by_name(char *devname); /* get device */
 extern struct eth_device *eth_get_dev_by_index(int index); /* get dev @ index */
 extern int eth_get_dev_index (void);		/* get the device index */
-extern void eth_set_enetaddr(int num, char* a);	/* Set new MAC address */
 extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
 extern int eth_getenv_enetaddr(char *name, uchar *enetaddr);
 extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr);
+extern int eth_getenv_enetaddr_by_index(int index, uchar *enetaddr);
 
 extern int eth_init(bd_t *bis);			/* Initialize the device */
 extern int eth_send(volatile void *packet, int length);	   /* Send a packet */
net/eth.c +23 -29

88 lines not on this page · raw message

Signature · 1 line
1.6.3.3
#1 lore raw

PATCH 1/1 net: sync env ethaddr to device enetaddr in eth_init()

Quoted 10 lines

In the previous enetaddr refactoring, the assumption with commit 56b555a644 was that the eth layer would handle the env -> device enetaddr syncing. This was not the case as eth_initialize() is called only once and the sync occurs there. So make sure the eth_init() function does the env -> device sync with every network init.

---
Andrzej: please try this patch instead for your macb troubles

Now it works fine. Thanks!

Andrzej Wolski

----------------------------------------------------------------------
Rowerem do pracy? Czemu nie!
Kliknij >>> http://link.interia.pl/f2256

#2 lore raw

PATCH 1/1 net: sync env ethaddr to device enetaddr in eth_init()

In reply to Mike Frysinger

Dear Ben,

Quoted 6 lines · In message <[email protected]> Mike Frysinger…

In the previous enetaddr refactoring, the assumption with commit 56b555a644 was that the eth layer would handle the env -> device enetaddr syncing. This was not the case as eth_initialize() is called only once and the sync occurs there. So make sure the eth_init() function does the env -> device sync with every network init.

Quoted 8 lines

---
Andrzej: please try this patch instead for your macb troubles

 include/net.h |    2 +-
 net/eth.c     |   52 +++++++++++++++++++++++-----------------------------
 2 files changed, 24 insertions(+), 30 deletions(-)

Ping...

Best regards,

Wolfgang Denk

Signature · 4 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
The greatest threat towards future is indifference.
#3 lore raw

PATCH 1/1 net: sync env ethaddr to device enetaddr in eth_init()

Quoted 20 lines · Wolfgang Denk

Dear Ben,

Quoted 6 lines · In message <[email protected]> Mike Frysinger…

In the previous enetaddr refactoring, the assumption with commit 56b555a644 was that the eth layer would handle the env -> device enetaddr syncing. This was not the case as eth_initialize() is called only once and the sync occurs there. So make sure the eth_init() function does the env -> device sync with every network init.

Quoted 9 lines

---
Andrzej: please try this patch instead for your macb troubles

 include/net.h |    2 +-
 net/eth.c     |   52 +++++++++++++++++++++++-----------------------------
 2 files changed, 24 insertions(+), 30 deletions(-)
Quoted 7 lines

Ping...

Best regards,

Wolfgang Denk

This came after the merge window closed, but appears to be a bug fix so I'll process tonight.

regards,
Ben

#4 lore raw

PATCH 1/1 net: sync env ethaddr to device enetaddr in eth_init()

Quoted 18 lines · On Wednesday 05 August 2009 17:26:50 Ben Warren wrote:
Quoted 17 lines · Wolfgang Denk
Quoted 15 lines · Mike Frysinger

In the previous enetaddr refactoring, the assumption with commit 56b555a644 was that the eth layer would handle the env -> device enetaddr syncing. This was not the case as eth_initialize() is called only once and the sync occurs there. So make sure the eth_init() function does the env -> device sync with every network init.

---
Andrzej: please try this patch instead for your macb troubles

 include/net.h |    2 +-
 net/eth.c     |   52

+++++++++++++++++++++++----------------------------- 2 files changed, 24 insertions(+), 30 deletions(-)

Quoted 4 lines
Quoted 1 line

Ping...

This came after the merge window closed, but appears to be a bug fix so I'll process tonight.

point of information: i'm pretty sure this was posted before the window closed. dates:
15 Jul 2009 - patch posted
17 Jul 2009 - net summary posted
19 Jul 2009 - merge window closed
-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/20090813/6fb026dd/attachment.pgp

Applied
#5 lore raw

PATCH 1/1 net: sync env ethaddr to device enetaddr in eth_init()

In reply to Mike Frysinger

Mike,

Quoted 9 lines · Mike Frysinger

In the previous enetaddr refactoring, the assumption with commit 56b555a644 was that the eth layer would handle the env -> device enetaddr syncing. This was not the case as eth_initialize() is called only once and the sync occurs there. So make sure the eth_init() function does the env -> device sync with every network init.

---

Applied to net repo.

thanks,
Ben