All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core
@ 2019-05-08 19:34 Matt Pelland
  2019-05-08 21:53 ` Joe Hershberger
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Matt Pelland @ 2019-05-08 19:34 UTC (permalink / raw)
  To: u-boot

mvpp2 already has support for setting MAC addresses but this
functionality was not exposed to the ethernet core. This commit exposes
this functionality so that MAC address assignments stored in U-Boot's
environment are correctly applied before Linux boots.

Signed-off-by: Matt Pelland <mpelland@starry.com>
---
 drivers/net/mvpp2.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index bcc6fe92a9..d2d17f1417 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -5321,6 +5321,13 @@ static void mvpp2_stop(struct udevice *dev)
 	mvpp2_cleanup_txqs(port);
 }
 
+static mvpp2_write_hwaddr(struct udevice *dev)
+{
+	struct mvpp2_port *port = dev_get_priv(dev);
+
+	mvpp2_prs_update_mac_da(port, port->dev_addr);
+}
+
 static int mvpp22_smi_phy_addr_cfg(struct mvpp2_port *port)
 {
 	writel(port->phyaddr, port->priv->iface_base +
@@ -5525,6 +5532,7 @@ static const struct eth_ops mvpp2_ops = {
 	.send		= mvpp2_send,
 	.recv		= mvpp2_recv,
 	.stop		= mvpp2_stop,
+	.write_hwaddr	= mvpp2_write_hwaddr
 };
 
 static struct driver mvpp2_driver = {
-- 
2.21.0

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

* [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core
  2019-05-08 19:34 [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core Matt Pelland
@ 2019-05-08 21:53 ` Joe Hershberger
  2019-05-09  5:17 ` Stefan Roese
  2019-06-01 18:40 ` Joe Hershberger
  2 siblings, 0 replies; 9+ messages in thread
From: Joe Hershberger @ 2019-05-08 21:53 UTC (permalink / raw)
  To: u-boot

On Wed, May 8, 2019 at 2:36 PM Matt Pelland <mpelland@starry.com> wrote:
>
> mvpp2 already has support for setting MAC addresses but this
> functionality was not exposed to the ethernet core. This commit exposes
> this functionality so that MAC address assignments stored in U-Boot's
> environment are correctly applied before Linux boots.
>
> Signed-off-by: Matt Pelland <mpelland@starry.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

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

* [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core
  2019-05-08 19:34 [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core Matt Pelland
  2019-05-08 21:53 ` Joe Hershberger
@ 2019-05-09  5:17 ` Stefan Roese
  2019-06-01 18:40 ` Joe Hershberger
  2 siblings, 0 replies; 9+ messages in thread
From: Stefan Roese @ 2019-05-09  5:17 UTC (permalink / raw)
  To: u-boot

On 08.05.19 21:34, Matt Pelland wrote:
> mvpp2 already has support for setting MAC addresses but this
> functionality was not exposed to the ethernet core. This commit exposes
> this functionality so that MAC address assignments stored in U-Boot's
> environment are correctly applied before Linux boots.
> 
> Signed-off-by: Matt Pelland <mpelland@starry.com>

Reviewed-by: Stefan Roese <sr@denx.de>

Thanks,
Stefan

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

* [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core
  2019-05-08 19:34 [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core Matt Pelland
  2019-05-08 21:53 ` Joe Hershberger
  2019-05-09  5:17 ` Stefan Roese
@ 2019-06-01 18:40 ` Joe Hershberger
  2019-07-08 19:00   ` Joe Hershberger
  2 siblings, 1 reply; 9+ messages in thread
From: Joe Hershberger @ 2019-06-01 18:40 UTC (permalink / raw)
  To: u-boot

On Wed, May 8, 2019 at 2:36 PM Matt Pelland <mpelland@starry.com> wrote:
>
> mvpp2 already has support for setting MAC addresses but this
> functionality was not exposed to the ethernet core. This commit exposes
> this functionality so that MAC address assignments stored in U-Boot's
> environment are correctly applied before Linux boots.
>
> Signed-off-by: Matt Pelland <mpelland@starry.com>
> ---
>  drivers/net/mvpp2.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
> index bcc6fe92a9..d2d17f1417 100644
> --- a/drivers/net/mvpp2.c
> +++ b/drivers/net/mvpp2.c
> @@ -5321,6 +5321,13 @@ static void mvpp2_stop(struct udevice *dev)
>         mvpp2_cleanup_txqs(port);
>  }
>
> +static mvpp2_write_hwaddr(struct udevice *dev)

This breaks the build. The function must return an int.

> +{
> +       struct mvpp2_port *port = dev_get_priv(dev);
> +
> +       mvpp2_prs_update_mac_da(port, port->dev_addr);

Missing status return from the result of mvpp2_prs_update_mac_da().

> +}
> +
>  static int mvpp22_smi_phy_addr_cfg(struct mvpp2_port *port)
>  {
>         writel(port->phyaddr, port->priv->iface_base +
> @@ -5525,6 +5532,7 @@ static const struct eth_ops mvpp2_ops = {
>         .send           = mvpp2_send,
>         .recv           = mvpp2_recv,
>         .stop           = mvpp2_stop,
> +       .write_hwaddr   = mvpp2_write_hwaddr
>  };
>
>  static struct driver mvpp2_driver = {
> --
> 2.21.0
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

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

* [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core
  2019-06-01 18:40 ` Joe Hershberger
@ 2019-07-08 19:00   ` Joe Hershberger
  2019-07-30 13:40     ` Matt Pelland
  0 siblings, 1 reply; 9+ messages in thread
From: Joe Hershberger @ 2019-07-08 19:00 UTC (permalink / raw)
  To: u-boot

On Sat, Jun 1, 2019 at 1:39 PM Joe Hershberger <joe.hershberger@ni.com> wrote:
>
> On Wed, May 8, 2019 at 2:36 PM Matt Pelland <mpelland@starry.com> wrote:
> >
> > mvpp2 already has support for setting MAC addresses but this
> > functionality was not exposed to the ethernet core. This commit exposes
> > this functionality so that MAC address assignments stored in U-Boot's
> > environment are correctly applied before Linux boots.
> >
> > Signed-off-by: Matt Pelland <mpelland@starry.com>
> > ---
> >  drivers/net/mvpp2.c | 8 ++++++++
> >  1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
> > index bcc6fe92a9..d2d17f1417 100644
> > --- a/drivers/net/mvpp2.c
> > +++ b/drivers/net/mvpp2.c
> > @@ -5321,6 +5321,13 @@ static void mvpp2_stop(struct udevice *dev)
> >         mvpp2_cleanup_txqs(port);
> >  }
> >
> > +static mvpp2_write_hwaddr(struct udevice *dev)
>
> This breaks the build. The function must return an int.

Should we expect an update to this patch or drop it from patchwork?

>
> > +{
> > +       struct mvpp2_port *port = dev_get_priv(dev);
> > +
> > +       mvpp2_prs_update_mac_da(port, port->dev_addr);
>
> Missing status return from the result of mvpp2_prs_update_mac_da().
>
> > +}
> > +
> >  static int mvpp22_smi_phy_addr_cfg(struct mvpp2_port *port)
> >  {
> >         writel(port->phyaddr, port->priv->iface_base +
> > @@ -5525,6 +5532,7 @@ static const struct eth_ops mvpp2_ops = {
> >         .send           = mvpp2_send,
> >         .recv           = mvpp2_recv,
> >         .stop           = mvpp2_stop,
> > +       .write_hwaddr   = mvpp2_write_hwaddr
> >  };
> >
> >  static struct driver mvpp2_driver = {
> > --
> > 2.21.0
> >
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot

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

* [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core
  2019-07-08 19:00   ` Joe Hershberger
@ 2019-07-30 13:40     ` Matt Pelland
  2019-07-30 13:40       ` [U-Boot] [PATCH v2] " Matt Pelland
  0 siblings, 1 reply; 9+ messages in thread
From: Matt Pelland @ 2019-07-30 13:40 UTC (permalink / raw)
  To: u-boot

> On Sat, Jun 1, 2019 at 1:39 PM Joe Hershberger <joe.hershberger@ni.com> wrote:
> >
> > On Wed, May 8, 2019 at 2:36 PM Matt Pelland <mpelland@starry.com> wrote:
> > >
> > > mvpp2 already has support for setting MAC addresses but this
> > > functionality was not exposed to the ethernet core. This commit exposes
> > > this functionality so that MAC address assignments stored in U-Boot's
> > > environment are correctly applied before Linux boots.
> > >
> > > Signed-off-by: Matt Pelland <mpelland@starry.com>
> > > ---
> > >  drivers/net/mvpp2.c | 8 ++++++++
> > >  1 file changed, 8 insertions(+)
> > >
> > > diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
> > > index bcc6fe92a9..d2d17f1417 100644
> > > --- a/drivers/net/mvpp2.c
> > > +++ b/drivers/net/mvpp2.c
> > > @@ -5321,6 +5321,13 @@ static void mvpp2_stop(struct udevice *dev)
> > >         mvpp2_cleanup_txqs(port);
> > >  }
> > >
> > > +static mvpp2_write_hwaddr(struct udevice *dev)
> >
> > This breaks the build. The function must return an int.
> 
> Should we expect an update to this patch or drop it from patchwork?

Hi Joe,

Many apologies for the delay on this. I had my email filters misconfigured and
things were getting sent to an archive instead of my inbox. I've cleaned up the
patch in question.

Thanks,
Matt

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

* [U-Boot] [PATCH v2] net: mvpp2: support setting hardware addresses from ethernet core
  2019-07-30 13:40     ` Matt Pelland
@ 2019-07-30 13:40       ` Matt Pelland
  2019-07-30 22:19         ` Joe Hershberger
  2019-09-04 16:40         ` [U-Boot] " Joe Hershberger
  0 siblings, 2 replies; 9+ messages in thread
From: Matt Pelland @ 2019-07-30 13:40 UTC (permalink / raw)
  To: u-boot

mvpp2 already has support for setting MAC addresses but this
functionality was not exposed to the ethernet core. This commit exposes
this functionality so that MAC address assignments stored in U-Boot's
environment are correctly applied before Linux boots.

Signed-off-by: Matt Pelland <mpelland@starry.com>
---
Changes since v1:
 - Correctly specify the return type of mvpp2_write_hwaddr
 - Correctly return the status code of mvpp2_prs_update_mac_da

 drivers/net/mvpp2.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index bcc6fe92a9..bd89725e77 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -5321,6 +5321,13 @@ static void mvpp2_stop(struct udevice *dev)
 	mvpp2_cleanup_txqs(port);
 }
 
+static int mvpp2_write_hwaddr(struct udevice *dev)
+{
+	struct mvpp2_port *port = dev_get_priv(dev);
+
+	return mvpp2_prs_update_mac_da(port, port->dev_addr);
+}
+
 static int mvpp22_smi_phy_addr_cfg(struct mvpp2_port *port)
 {
 	writel(port->phyaddr, port->priv->iface_base +
@@ -5525,6 +5532,7 @@ static const struct eth_ops mvpp2_ops = {
 	.send		= mvpp2_send,
 	.recv		= mvpp2_recv,
 	.stop		= mvpp2_stop,
+	.write_hwaddr	= mvpp2_write_hwaddr
 };
 
 static struct driver mvpp2_driver = {
-- 
2.21.0

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

* [U-Boot] [PATCH v2] net: mvpp2: support setting hardware addresses from ethernet core
  2019-07-30 13:40       ` [U-Boot] [PATCH v2] " Matt Pelland
@ 2019-07-30 22:19         ` Joe Hershberger
  2019-09-04 16:40         ` [U-Boot] " Joe Hershberger
  1 sibling, 0 replies; 9+ messages in thread
From: Joe Hershberger @ 2019-07-30 22:19 UTC (permalink / raw)
  To: u-boot

On Tue, Jul 30, 2019 at 8:41 AM Matt Pelland <mpelland@starry.com> wrote:
>
> mvpp2 already has support for setting MAC addresses but this
> functionality was not exposed to the ethernet core. This commit exposes
> this functionality so that MAC address assignments stored in U-Boot's
> environment are correctly applied before Linux boots.
>
> Signed-off-by: Matt Pelland <mpelland@starry.com>

Acked-by: Joe Hershberger <joe.hershberger@ni.com>

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

* [U-Boot] net: mvpp2: support setting hardware addresses from ethernet core
  2019-07-30 13:40       ` [U-Boot] [PATCH v2] " Matt Pelland
  2019-07-30 22:19         ` Joe Hershberger
@ 2019-09-04 16:40         ` Joe Hershberger
  1 sibling, 0 replies; 9+ messages in thread
From: Joe Hershberger @ 2019-09-04 16:40 UTC (permalink / raw)
  To: u-boot

Hi Matt,

https://patchwork.ozlabs.org/patch/1138980/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git

Thanks!
-Joe

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

end of thread, other threads:[~2019-09-04 16:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 19:34 [U-Boot] [PATCH] net: mvpp2: support setting hardware addresses from ethernet core Matt Pelland
2019-05-08 21:53 ` Joe Hershberger
2019-05-09  5:17 ` Stefan Roese
2019-06-01 18:40 ` Joe Hershberger
2019-07-08 19:00   ` Joe Hershberger
2019-07-30 13:40     ` Matt Pelland
2019-07-30 13:40       ` [U-Boot] [PATCH v2] " Matt Pelland
2019-07-30 22:19         ` Joe Hershberger
2019-09-04 16:40         ` [U-Boot] " Joe Hershberger

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.