mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] net: smc1111: fix ethernet mac setting
@ 2015-12-05 21:58 Robert Jarzmik
  2015-12-05 22:31 ` Sam Ravnborg
  2015-12-07  9:47 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Robert Jarzmik @ 2015-12-05 21:58 UTC (permalink / raw)
  To: barebox

Even if the setting of the MAC address does work correctly, the function
return an error.

In the former barebox version, this didn't seem to be a problem. In
v2015.11.0 version, the "ifup eth0" command fails because of this, and
as a consequence the network interface doesn't work.

The fix is straightforward.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
---
 drivers/net/smc91111.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c
index 5ea1bc3..1199b37 100644
--- a/drivers/net/smc91111.c
+++ b/drivers/net/smc91111.c
@@ -1392,7 +1392,7 @@ static int smc91c111_set_ethaddr(struct eth_device *edev,
 		SMC_outw(priv, address, (ADDR0_REG + i));
 	}
 
-	return -1;
+	return 0;
 }
 
 #if (SMC_DEBUG > 2 )
-- 
2.1.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: smc1111: fix ethernet mac setting
  2015-12-05 21:58 [PATCH] net: smc1111: fix ethernet mac setting Robert Jarzmik
@ 2015-12-05 22:31 ` Sam Ravnborg
  2015-12-07  9:47 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sam Ravnborg @ 2015-12-05 22:31 UTC (permalink / raw)
  To: Robert Jarzmik; +Cc: barebox

On Sat, Dec 05, 2015 at 10:58:00PM +0100, Robert Jarzmik wrote:
> Even if the setting of the MAC address does work correctly, the function
> return an error.
> 
> In the former barebox version, this didn't seem to be a problem. In
> v2015.11.0 version, the "ifup eth0" command fails because of this, and
> as a consequence the network interface doesn't work.
I just spent a few minutes to audit all other set_ethaddr..() functions.
This was the only function that returns -1 in the normal case.

netx_eth.c has the following code:

     return -0;

This looks strange but is ok.

	Sam

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: smc1111: fix ethernet mac setting
  2015-12-05 21:58 [PATCH] net: smc1111: fix ethernet mac setting Robert Jarzmik
  2015-12-05 22:31 ` Sam Ravnborg
@ 2015-12-07  9:47 ` Sascha Hauer
  1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2015-12-07  9:47 UTC (permalink / raw)
  To: Robert Jarzmik; +Cc: barebox

On Sat, Dec 05, 2015 at 10:58:00PM +0100, Robert Jarzmik wrote:
> Even if the setting of the MAC address does work correctly, the function
> return an error.
> 
> In the former barebox version, this didn't seem to be a problem. In
> v2015.11.0 version, the "ifup eth0" command fails because of this, and
> as a consequence the network interface doesn't work.
> 
> The fix is straightforward.
> 
> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
> ---
>  drivers/net/smc91111.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha


-- 
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-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-07  9:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-05 21:58 [PATCH] net: smc1111: fix ethernet mac setting Robert Jarzmik
2015-12-05 22:31 ` Sam Ravnborg
2015-12-07  9:47 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox