Re: [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address

2009-06-05 Thread Wolfgang Denk
Dear Ben,

In message 4a14e0ab.7010...@googlemail.com Dirk Behme wrote:

  If the MAX address is given by the environment, write it back to the
  hardware.
 
  Signed-off-by: Daniel Mack dan...@caiaq.de
  Cc: Sascha Hauer s.ha...@pengutronix.de
...
  Applied to net/next branch.
 
 Could we get this asap into mainline? Sounds like an urgent bugfix to me:
 
 http://lists.denx.de/pipermail/u-boot/2009-May/053079.html

I agree with Dirk here.

Can we pull this into master, please?

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: w...@denx.de
The flow chart is a most thoroughly oversold piece of  program  docu-
mentation.  -- Frederick Brooks, The Mythical Man Month
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address

2009-05-20 Thread Dirk Behme
Ben Warren wrote:
 Daniel Mack wrote:
 If the MAX address is given by the environment, write it back to the
 hardware.

 Signed-off-by: Daniel Mack dan...@caiaq.de
 Cc: Sascha Hauer s.ha...@pengutronix.de
 ---
  drivers/net/smc911x.c |9 +++--
  1 files changed, 7 insertions(+), 2 deletions(-)

 diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
 index 30f2dc2..8c9a2a8 100644
 --- a/drivers/net/smc911x.c
 +++ b/drivers/net/smc911x.c
 @@ -41,8 +41,13 @@ static int smx911x_handle_mac_address(bd_t *bd)
  unsigned long addrh, addrl;
  uchar m[6];
  
 -/* if the environment has a valid mac address then use it */
 -if (!eth_getenv_enetaddr(ethaddr, m)) {
 +if (eth_getenv_enetaddr(ethaddr, m)) {
 +/* if the environment has a valid mac address then use it */
 +addrl = m[0] | (m[1]  8) | (m[2]  16) | (m[3]  24);
 +addrh = m[4] | (m[5]  8);
 +smc911x_set_mac_csr(ADDRL, addrl);
 +smc911x_set_mac_csr(ADDRH, addrh);
 +} else {
  /* if not, try to get one from the eeprom */
  addrh = smc911x_get_mac_csr(ADDRH);
  addrl = smc911x_get_mac_csr(ADDRL);
 Applied to net/next branch.

Could we get this asap into mainline? Sounds like an urgent bugfix to me:

http://lists.denx.de/pipermail/u-boot/2009-May/053079.html

Many thanks

Dirk

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address

2009-05-05 Thread Mike Frysinger
On Wednesday 08 April 2009 07:23:37 Daniel Mack wrote:
 If the MAX address is given by the environment, write it back to the
 hardware.

Signed-off-by: Mike Frysinger vap...@gentoo.org
-mike


signature.asc
Description: This is a digitally signed message part.
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address

2009-04-21 Thread Daniel Mack
On Wed, Apr 08, 2009 at 01:23:37PM +0200, Daniel Mack wrote:
 Signed-off-by: Daniel Mack dan...@caiaq.de
 Cc: Sascha Hauer s.ha...@pengutronix.de

ping.


 ---
  drivers/net/smc911x.c |9 +++--
  1 files changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
 index 30f2dc2..8c9a2a8 100644
 --- a/drivers/net/smc911x.c
 +++ b/drivers/net/smc911x.c
 @@ -41,8 +41,13 @@ static int smx911x_handle_mac_address(bd_t *bd)
   unsigned long addrh, addrl;
   uchar m[6];
  
 - /* if the environment has a valid mac address then use it */
 - if (!eth_getenv_enetaddr(ethaddr, m)) {
 + if (eth_getenv_enetaddr(ethaddr, m)) {
 + /* if the environment has a valid mac address then use it */
 + addrl = m[0] | (m[1]  8) | (m[2]  16) | (m[3]  24);
 + addrh = m[4] | (m[5]  8);
 + smc911x_set_mac_csr(ADDRL, addrl);
 + smc911x_set_mac_csr(ADDRH, addrh);
 + } else {
   /* if not, try to get one from the eeprom */
   addrh = smc911x_get_mac_csr(ADDRH);
   addrl = smc911x_get_mac_csr(ADDRL);
 -- 
 1.6.2.1
 
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address

2009-04-21 Thread Daniel Mack
Hi Sascha,

On Tue, Apr 21, 2009 at 01:38:23PM +0200, Sascha Hauer wrote:
 On Wed, Apr 08, 2009 at 01:23:37PM +0200, Daniel Mack wrote:
  If the MAX address is given by the environment, write it back to the
  hardware.
  
  Signed-off-by: Daniel Mack dan...@caiaq.de
  Cc: Sascha Hauer s.ha...@pengutronix.de
 
 Acked-by: Sascha Hauer s.ha...@pengutronix.de
 
 Anyway, you shouldn't rely on this. I'm the original author of this
 driver, but I do not use U-Boot-v1 anymore, so I can't tell if this
 breaks something or not.

No problem. I just Cc'ed all email addresses I could find in the code.

Who will pick that one and the one regarding support for the 9220
controller for mainline?

Thanks,
Daniel

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address

2009-04-21 Thread Sascha Hauer
On Wed, Apr 08, 2009 at 01:23:37PM +0200, Daniel Mack wrote:
 If the MAX address is given by the environment, write it back to the
 hardware.
 
 Signed-off-by: Daniel Mack dan...@caiaq.de
 Cc: Sascha Hauer s.ha...@pengutronix.de

Acked-by: Sascha Hauer s.ha...@pengutronix.de

Anyway, you shouldn't rely on this. I'm the original author of this
driver, but I do not use U-Boot-v1 anymore, so I can't tell if this
breaks something or not.

Sascha

 ---
  drivers/net/smc911x.c |9 +++--
  1 files changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
 index 30f2dc2..8c9a2a8 100644
 --- a/drivers/net/smc911x.c
 +++ b/drivers/net/smc911x.c
 @@ -41,8 +41,13 @@ static int smx911x_handle_mac_address(bd_t *bd)
   unsigned long addrh, addrl;
   uchar m[6];
  
 - /* if the environment has a valid mac address then use it */
 - if (!eth_getenv_enetaddr(ethaddr, m)) {
 + if (eth_getenv_enetaddr(ethaddr, m)) {
 + /* if the environment has a valid mac address then use it */
 + addrl = m[0] | (m[1]  8) | (m[2]  16) | (m[3]  24);
 + addrh = m[4] | (m[5]  8);
 + smc911x_set_mac_csr(ADDRL, addrl);
 + smc911x_set_mac_csr(ADDRH, addrh);
 + } else {
   /* if not, try to get one from the eeprom */
   addrh = smc911x_get_mac_csr(ADDRH);
   addrl = smc911x_get_mac_csr(ADDRL);
 -- 
 1.6.2.1
 
 

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address

2009-04-21 Thread Ben Warren
Hi Daniel,

On Tue, Apr 21, 2009 at 4:44 AM, Daniel Mack dan...@caiaq.de wrote:

 Hi Sascha,

 On Tue, Apr 21, 2009 at 01:38:23PM +0200, Sascha Hauer wrote:
  On Wed, Apr 08, 2009 at 01:23:37PM +0200, Daniel Mack wrote:
   If the MAX address is given by the environment, write it back to the
   hardware.
  
   Signed-off-by: Daniel Mack dan...@caiaq.de
   Cc: Sascha Hauer s.ha...@pengutronix.de
 
  Acked-by: Sascha Hauer s.ha...@pengutronix.de
 
  Anyway, you shouldn't rely on this. I'm the original author of this
  driver, but I do not use U-Boot-v1 anymore, so I can't tell if this
  breaks something or not.

 No problem. I just Cc'ed all email addresses I could find in the code.

 Who will pick that one and the one regarding support for the 9220
 controller for mainline?

Network drivers are my responsibility.  Please CC me in the future as it
stands out more clearly.  I guess I was waiting on you to resolve 3/3, but
instead can pick up parts 1 and 2 if you like.


 Thanks,
 Daniel

regards,
Ben
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address

2009-04-21 Thread Daniel Mack
On Tue, Apr 21, 2009 at 06:28:34AM -0700, Ben Warren wrote:
   Anyway, you shouldn't rely on this. I'm the original author of this
   driver, but I do not use U-Boot-v1 anymore, so I can't tell if this
   breaks something or not.
 
  No problem. I just Cc'ed all email addresses I could find in the code.
 
  Who will pick that one and the one regarding support for the 9220
  controller for mainline?
 
 Network drivers are my responsibility.  Please CC me in the future as it
 stands out more clearly.  I guess I was waiting on you to resolve 3/3, but
 instead can pick up parts 1 and 2 if you like.

I'll try to solve 3/3 in another fashion, so feel free to merge the
other two.

Thanks,
Daniel
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 1/3] smc911x: write back the manually set MAC address

2009-04-08 Thread Daniel Mack
If the MAX address is given by the environment, write it back to the
hardware.

Signed-off-by: Daniel Mack dan...@caiaq.de
Cc: Sascha Hauer s.ha...@pengutronix.de
---
 drivers/net/smc911x.c |9 +++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 30f2dc2..8c9a2a8 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -41,8 +41,13 @@ static int smx911x_handle_mac_address(bd_t *bd)
unsigned long addrh, addrl;
uchar m[6];
 
-   /* if the environment has a valid mac address then use it */
-   if (!eth_getenv_enetaddr(ethaddr, m)) {
+   if (eth_getenv_enetaddr(ethaddr, m)) {
+   /* if the environment has a valid mac address then use it */
+   addrl = m[0] | (m[1]  8) | (m[2]  16) | (m[3]  24);
+   addrh = m[4] | (m[5]  8);
+   smc911x_set_mac_csr(ADDRL, addrl);
+   smc911x_set_mac_csr(ADDRH, addrh);
+   } else {
/* if not, try to get one from the eeprom */
addrh = smc911x_get_mac_csr(ADDRH);
addrl = smc911x_get_mac_csr(ADDRL);
-- 
1.6.2.1

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot