diff mbox

[U-Boot] net/eth: fix a bug in on_ethaddr()

Message ID 1440992083-26061-1-git-send-email-Qianyu.Gong@freescale.com
State Accepted
Delegated to: Joe Hershberger
Headers show

Commit Message

Gong Qianyu Aug. 31, 2015, 3:34 a.m. UTC
The loop should check all ethenet devices, not only the first device,
to set each specified ethaddr, or it'll cause failure when we use other
devices.

Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>

Comments

Joe Hershberger Sept. 3, 2015, 9:45 p.m. UTC | #1
Hi Gong,

On Sun, Aug 30, 2015 at 10:34 PM, Gong Qianyu <Qianyu.Gong@freescale.com> wrote:
> The loop should check all ethenet devices, not only the first device,
> to set each specified ethaddr, or it'll cause failure when we use other
> devices.
>
> Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Gong Qianyu Oct. 16, 2015, 11:21 a.m. UTC | #2
> -----Original Message-----
> From: Joe Hershberger [mailto:joe.hershberger@gmail.com]
> Sent: Friday, September 04, 2015 5:46 AM
> To: Gong Qianyu-B52263
> Cc: Joe Hershberger; u-boot; Hu Mingkai-B21284
> Subject: Re: [U-Boot] [PATCH] net/eth: fix a bug in on_ethaddr()
> 
> Hi Gong,
> 
> On Sun, Aug 30, 2015 at 10:34 PM, Gong Qianyu <Qianyu.Gong@freescale.com>
> wrote:
> > The loop should check all ethenet devices, not only the first device,
> > to set each specified ethaddr, or it'll cause failure when we use
> > other devices.
> >
> > Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
> 
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Hi,

The problem still exists. Please help to merge this patch.
Thanks!

Regards,
Qianyu
Mingkai Hu Oct. 21, 2015, 10:07 a.m. UTC | #3
Hi Joe,

Would you please kindly help to pick up this patch which fixed the issue when using multiple Ethernet ports?

Thanks,
Mingkai

-----Original Message-----
From: Gong Qianyu-B52263 
Sent: Friday, October 16, 2015 7:22 PM
To: Joe Hershberger
Cc: Joe Hershberger; u-boot; Hu Mingkai-B21284
Subject: RE: [U-Boot] [PATCH] net/eth: fix a bug in on_ethaddr()


> -----Original Message-----
> From: Joe Hershberger [mailto:joe.hershberger@gmail.com]
> Sent: Friday, September 04, 2015 5:46 AM
> To: Gong Qianyu-B52263
> Cc: Joe Hershberger; u-boot; Hu Mingkai-B21284
> Subject: Re: [U-Boot] [PATCH] net/eth: fix a bug in on_ethaddr()
> 
> Hi Gong,
> 
> On Sun, Aug 30, 2015 at 10:34 PM, Gong Qianyu 
> <Qianyu.Gong@freescale.com>
> wrote:
> > The loop should check all ethenet devices, not only the first 
> > device, to set each specified ethaddr, or it'll cause failure when 
> > we use other devices.
> >
> > Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
> 
> Acked-by: Joe Hershberger <joe.hershberger@ni.com>

Hi,

The problem still exists. Please help to merge this patch.
Thanks!

Regards,
Qianyu
Joe Hershberger Oct. 23, 2015, 5:38 p.m. UTC | #4
On Wed, Oct 21, 2015 at 5:07 AM, Hu Vincent <Mingkai.Hu@freescale.com> wrote:
> Hi Joe,
>
> Would you please kindly help to pick up this patch which fixed the issue when using multiple Ethernet ports?

Yes, now that the merge window is open, I will be pulling in all
patches assigned to me in patchwork and testing.

-Joe
Mingkai Hu Oct. 26, 2015, 5:17 a.m. UTC | #5
Hi Joe,

Do you have any objection about this patch? If yes, then please share your comments then we can refine it. If no, would you please help to pick up the patch?

Thanks in advance.
Mingkai

> -----Original Message-----
> From: Hu Mingkai-B21284
> Sent: Wednesday, October 21, 2015 6:07 PM
> To: Gong Qianyu-B52263; Joe Hershberger
> Cc: Joe Hershberger; u-boot
> Subject: RE: [U-Boot] [PATCH] net/eth: fix a bug in on_ethaddr()
> 
> Hi Joe,
> 
> Would you please kindly help to pick up this patch which fixed the issue
> when using multiple Ethernet ports?
> 
> Thanks,
> Mingkai
> 
> -----Original Message-----
> From: Gong Qianyu-B52263
> Sent: Friday, October 16, 2015 7:22 PM
> To: Joe Hershberger
> Cc: Joe Hershberger; u-boot; Hu Mingkai-B21284
> Subject: RE: [U-Boot] [PATCH] net/eth: fix a bug in on_ethaddr()
> 
> 
> > -----Original Message-----
> > From: Joe Hershberger [mailto:joe.hershberger@gmail.com]
> > Sent: Friday, September 04, 2015 5:46 AM
> > To: Gong Qianyu-B52263
> > Cc: Joe Hershberger; u-boot; Hu Mingkai-B21284
> > Subject: Re: [U-Boot] [PATCH] net/eth: fix a bug in on_ethaddr()
> >
> > Hi Gong,
> >
> > On Sun, Aug 30, 2015 at 10:34 PM, Gong Qianyu
> > <Qianyu.Gong@freescale.com>
> > wrote:
> > > The loop should check all ethenet devices, not only the first
> > > device, to set each specified ethaddr, or it'll cause failure when
> > > we use other devices.
> > >
> > > Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>
> >
> > Acked-by: Joe Hershberger <joe.hershberger@ni.com>
> 
> Hi,
> 
> The problem still exists. Please help to merge this patch.
> Thanks!
> 
> Regards,
> Qianyu
> 
>
Joe Hershberger Oct. 29, 2015, 7:32 p.m. UTC | #6
On Sun, Aug 30, 2015 at 10:34 PM, Gong Qianyu <Qianyu.Gong@freescale.com> wrote:
> The loop should check all ethenet devices, not only the first device,
> to set each specified ethaddr, or it'll cause failure when we use other
> devices.
>
> Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com>

Applied to u-boot-net/master, thanks!
-Joe
diff mbox

Patch

diff --git a/net/eth.c b/net/eth.c
index d3ec8d6..e3ef80e 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -677,6 +677,7 @@  static int on_ethaddr(const char *name, const char *value, enum env_op op,
 				memset(dev->enetaddr, 0, 6);
 			}
 		}
+		dev = dev->next;
 	} while (dev != eth_devices);
 
 	return 0;