public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net/designware: revert MAC-address setup on init
@ 2015-07-01 13:59 Alexey Brodkin
  2015-07-01 14:22 ` Bin Meng
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Brodkin @ 2015-07-01 13:59 UTC (permalink / raw)
  To: u-boot

http://git.denx.de/?p=u-boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
broke DW GMAC operation if !DM_ETH because eth_write_hwaddr() doesn't
exist if !DM_NET.

As for DM_ETH case I'm still not sure if existing implementation will
fly.

The point is as it is said in the comment on "soft reset" that is
triggered with setting DMAMAC_SRST in "busmode" register HW address gets
reset as well. And we inevitably need to set HW address again.

So probably better solution is to move mentioned "soft-reset" from
"init" (that is used on start of any network activity) to "initialize"
(which is only executed once in "board_r" sequence). But that's a bit of
a different story and for now let's just get DW GMAC functional again.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
---
 drivers/net/designware.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index ae51cf3..07281a6 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -243,6 +243,10 @@ static int _dw_eth_init(struct dw_eth_dev *priv, u8 *enetaddr)
 		mdelay(100);
 	};
 
+	/* Soft reset above clears HW address registers.
+	 * So we have to set it here once again */
+	_dw_write_hwaddr(priv, enetaddr);
+
 	rx_descs_init(priv);
 	tx_descs_init(priv);
 
-- 
2.4.3

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

* [U-Boot] [PATCH] net/designware: revert MAC-address setup on init
  2015-07-01 13:59 [U-Boot] [PATCH] net/designware: revert MAC-address setup on init Alexey Brodkin
@ 2015-07-01 14:22 ` Bin Meng
  2015-07-01 14:25   ` Alexey Brodkin
  0 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2015-07-01 14:22 UTC (permalink / raw)
  To: u-boot

Hi Alexey,

On Wed, Jul 1, 2015 at 9:59 PM, Alexey Brodkin
<Alexey.Brodkin@synopsys.com> wrote:
> http://git.denx.de/?p=u-boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
> broke DW GMAC operation if !DM_ETH because eth_write_hwaddr() doesn't
> exist if !DM_NET.
>
> As for DM_ETH case I'm still not sure if existing implementation will
> fly.
>
> The point is as it is said in the comment on "soft reset" that is
> triggered with setting DMAMAC_SRST in "busmode" register HW address gets
> reset as well. And we inevitably need to set HW address again.
>
> So probably better solution is to move mentioned "soft-reset" from
> "init" (that is used on start of any network activity) to "initialize"
> (which is only executed once in "board_r" sequence). But that's a bit of
> a different story and for now let's just get DW GMAC functional again.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Joe Hershberger <joe.hershberger@ni.com>
> Cc: Michal Simek <michal.simek@xilinx.com>
> Cc: Tom Rini <trini@konsulko.com>
> ---
>  drivers/net/designware.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> index ae51cf3..07281a6 100644
> --- a/drivers/net/designware.c
> +++ b/drivers/net/designware.c
> @@ -243,6 +243,10 @@ static int _dw_eth_init(struct dw_eth_dev *priv, u8 *enetaddr)
>                 mdelay(100);
>         };
>
> +       /* Soft reset above clears HW address registers.
> +        * So we have to set it here once again */
> +       _dw_write_hwaddr(priv, enetaddr);
> +
>         rx_descs_init(priv);
>         tx_descs_init(priv);
>
> --

There is already a patch submitted. Please check
http://patchwork.ozlabs.org/patch/484214/

Regards,
Bin

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

* [U-Boot] [PATCH] net/designware: revert MAC-address setup on init
  2015-07-01 14:22 ` Bin Meng
@ 2015-07-01 14:25   ` Alexey Brodkin
  2015-07-01 15:26     ` Joe Hershberger
  0 siblings, 1 reply; 9+ messages in thread
From: Alexey Brodkin @ 2015-07-01 14:25 UTC (permalink / raw)
  To: u-boot

Hi Tom, Joe,

On Wed, 2015-07-01 at 22:22 +0800, Bin Meng wrote:
> Hi Alexey,
> 
> On Wed, Jul 1, 2015 at 9:59 PM, Alexey Brodkin
> <Alexey.Brodkin@synopsys.com> wrote:
> > http://git.denx.de/?p=u
> > -boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
> > broke DW GMAC operation if !DM_ETH because eth_write_hwaddr() 
> > doesn't
> > exist if !DM_NET.
> > 
> > As for DM_ETH case I'm still not sure if existing implementation 
> > will
> > fly.
> > 
> > The point is as it is said in the comment on "soft reset" that is
> > triggered with setting DMAMAC_SRST in "busmode" register HW address 
> > gets
> > reset as well. And we inevitably need to set HW address again.
> > 
> > So probably better solution is to move mentioned "soft-reset" from
> > "init" (that is used on start of any network activity) to 
> > "initialize"
> > (which is only executed once in "board_r" sequence). But that's a 
> > bit of
> > a different story and for now let's just get DW GMAC functional 
> > again.
> > 
> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > Cc: Joe Hershberger <joe.hershberger@ni.com>
> > Cc: Michal Simek <michal.simek@xilinx.com>
> > Cc: Tom Rini <trini@konsulko.com>
> > ---
> >  drivers/net/designware.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> > index ae51cf3..07281a6 100644
> > --- a/drivers/net/designware.c
> > +++ b/drivers/net/designware.c
> > @@ -243,6 +243,10 @@ static int _dw_eth_init(struct dw_eth_dev 
> > *priv, u8 *enetaddr)
> >                 mdelay(100);
> >         };
> > 
> > +       /* Soft reset above clears HW address registers.
> > +        * So we have to set it here once again */
> > +       _dw_write_hwaddr(priv, enetaddr);
> > +
> >         rx_descs_init(priv);
> >         tx_descs_init(priv);
> > 
> > --
> 
> There is already a patch submitted. Please check
> http://patchwork.ozlabs.org/patch/484214/

Any chance for mentioned patch "net: designware: Program MAC address to
hardware after soft reset" to be applied?

This really fixes GMAC operation and it would be nice to have this fix
in upcoming release.

-Alexey

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

* [U-Boot] [PATCH] net/designware: revert MAC-address setup on init
  2015-07-01 14:25   ` Alexey Brodkin
@ 2015-07-01 15:26     ` Joe Hershberger
  2015-07-01 22:02       ` Tom Rini
  0 siblings, 1 reply; 9+ messages in thread
From: Joe Hershberger @ 2015-07-01 15:26 UTC (permalink / raw)
  To: u-boot

Hi Alexey,

On Wed, Jul 1, 2015 at 9:25 AM, Alexey Brodkin
<Alexey.Brodkin@synopsys.com> wrote:
> Hi Tom, Joe,
>
> On Wed, 2015-07-01 at 22:22 +0800, Bin Meng wrote:
>> Hi Alexey,
>>
>> On Wed, Jul 1, 2015 at 9:59 PM, Alexey Brodkin
>> <Alexey.Brodkin@synopsys.com> wrote:
>> > http://git.denx.de/?p=u
>> > -boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
>> > broke DW GMAC operation if !DM_ETH because eth_write_hwaddr()
>> > doesn't
>> > exist if !DM_NET.
>> >
>> > As for DM_ETH case I'm still not sure if existing implementation
>> > will
>> > fly.
>> >
>> > The point is as it is said in the comment on "soft reset" that is
>> > triggered with setting DMAMAC_SRST in "busmode" register HW address
>> > gets
>> > reset as well. And we inevitably need to set HW address again.
>> >
>> > So probably better solution is to move mentioned "soft-reset" from
>> > "init" (that is used on start of any network activity) to
>> > "initialize"
>> > (which is only executed once in "board_r" sequence). But that's a
>> > bit of
>> > a different story and for now let's just get DW GMAC functional
>> > again.
>> >
>> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>> > Cc: Joe Hershberger <joe.hershberger@ni.com>
>> > Cc: Michal Simek <michal.simek@xilinx.com>
>> > Cc: Tom Rini <trini@konsulko.com>
>> > ---
>> >  drivers/net/designware.c | 4 ++++
>> >  1 file changed, 4 insertions(+)
>> >
>> > diff --git a/drivers/net/designware.c b/drivers/net/designware.c
>> > index ae51cf3..07281a6 100644
>> > --- a/drivers/net/designware.c
>> > +++ b/drivers/net/designware.c
>> > @@ -243,6 +243,10 @@ static int _dw_eth_init(struct dw_eth_dev
>> > *priv, u8 *enetaddr)
>> >                 mdelay(100);
>> >         };
>> >
>> > +       /* Soft reset above clears HW address registers.
>> > +        * So we have to set it here once again */
>> > +       _dw_write_hwaddr(priv, enetaddr);
>> > +
>> >         rx_descs_init(priv);
>> >         tx_descs_init(priv);
>> >
>> > --
>>
>> There is already a patch submitted. Please check
>> http://patchwork.ozlabs.org/patch/484214/
>
> Any chance for mentioned patch "net: designware: Program MAC address to
> hardware after soft reset" to be applied?
>
> This really fixes GMAC operation and it would be nice to have this fix
> in upcoming release.

I think that sounds appropriate. Tom?

-Joe

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

* [U-Boot] [PATCH] net/designware: revert MAC-address setup on init
  2015-07-01 15:26     ` Joe Hershberger
@ 2015-07-01 22:02       ` Tom Rini
  2015-07-04 15:12         ` Alexey Brodkin
  2015-07-06 21:55         ` Joe Hershberger
  0 siblings, 2 replies; 9+ messages in thread
From: Tom Rini @ 2015-07-01 22:02 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 01, 2015 at 10:26:21AM -0500, Joe Hershberger wrote:
> Hi Alexey,
> 
> On Wed, Jul 1, 2015 at 9:25 AM, Alexey Brodkin
> <Alexey.Brodkin@synopsys.com> wrote:
> > Hi Tom, Joe,
> >
> > On Wed, 2015-07-01 at 22:22 +0800, Bin Meng wrote:
> >> Hi Alexey,
> >>
> >> On Wed, Jul 1, 2015 at 9:59 PM, Alexey Brodkin
> >> <Alexey.Brodkin@synopsys.com> wrote:
> >> > http://git.denx.de/?p=u
> >> > -boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
> >> > broke DW GMAC operation if !DM_ETH because eth_write_hwaddr()
> >> > doesn't
> >> > exist if !DM_NET.
> >> >
> >> > As for DM_ETH case I'm still not sure if existing implementation
> >> > will
> >> > fly.
> >> >
> >> > The point is as it is said in the comment on "soft reset" that is
> >> > triggered with setting DMAMAC_SRST in "busmode" register HW address
> >> > gets
> >> > reset as well. And we inevitably need to set HW address again.
> >> >
> >> > So probably better solution is to move mentioned "soft-reset" from
> >> > "init" (that is used on start of any network activity) to
> >> > "initialize"
> >> > (which is only executed once in "board_r" sequence). But that's a
> >> > bit of
> >> > a different story and for now let's just get DW GMAC functional
> >> > again.
> >> >
> >> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> >> > Cc: Joe Hershberger <joe.hershberger@ni.com>
> >> > Cc: Michal Simek <michal.simek@xilinx.com>
> >> > Cc: Tom Rini <trini@konsulko.com>
> >> > ---
> >> >  drivers/net/designware.c | 4 ++++
> >> >  1 file changed, 4 insertions(+)
> >> >
> >> > diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> >> > index ae51cf3..07281a6 100644
> >> > --- a/drivers/net/designware.c
> >> > +++ b/drivers/net/designware.c
> >> > @@ -243,6 +243,10 @@ static int _dw_eth_init(struct dw_eth_dev
> >> > *priv, u8 *enetaddr)
> >> >                 mdelay(100);
> >> >         };
> >> >
> >> > +       /* Soft reset above clears HW address registers.
> >> > +        * So we have to set it here once again */
> >> > +       _dw_write_hwaddr(priv, enetaddr);
> >> > +
> >> >         rx_descs_init(priv);
> >> >         tx_descs_init(priv);
> >> >
> >> > --
> >>
> >> There is already a patch submitted. Please check
> >> http://patchwork.ozlabs.org/patch/484214/
> >
> > Any chance for mentioned patch "net: designware: Program MAC address to
> > hardware after soft reset" to be applied?
> >
> > This really fixes GMAC operation and it would be nice to have this fix
> > in upcoming release.
> 
> I think that sounds appropriate. Tom?

Yes.  Of the handful of recent (in my mind anyhow) net patches, are you
going to do a PR for them or should I just grab things?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150701/58f85e11/attachment.sig>

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

* [U-Boot] [PATCH] net/designware: revert MAC-address setup on init
  2015-07-01 22:02       ` Tom Rini
@ 2015-07-04 15:12         ` Alexey Brodkin
  2015-07-06 21:55         ` Joe Hershberger
  1 sibling, 0 replies; 9+ messages in thread
From: Alexey Brodkin @ 2015-07-04 15:12 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On Wed, 2015-07-01 at 18:02 -0400, Tom Rini wrote:
> On Wed, Jul 01, 2015 at 10:26:21AM -0500, Joe Hershberger wrote:
> > Hi Alexey,
> > 
> > On Wed, Jul 1, 2015 at 9:25 AM, Alexey Brodkin
> > <Alexey.Brodkin@synopsys.com> wrote:
> > > Hi Tom, Joe,
> > > 
> > > On Wed, 2015-07-01 at 22:22 +0800, Bin Meng wrote:
> > > > Hi Alexey,
> > > > 
> > > > On Wed, Jul 1, 2015 at 9:59 PM, Alexey Brodkin
> > > > <Alexey.Brodkin@synopsys.com> wrote:
> > > > > http://git.denx.de/?p=u
> > > > > -boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
> > > > > broke DW GMAC operation if !DM_ETH because eth_write_hwaddr()
> > > > > doesn't
> > > > > exist if !DM_NET.
> > > > > 
> > > > > As for DM_ETH case I'm still not sure if existing 
> > > > > implementation
> > > > > will
> > > > > fly.
> > > > > 
> > > > > The point is as it is said in the comment on "soft reset" 
> > > > > that is
> > > > > triggered with setting DMAMAC_SRST in "busmode" register HW 
> > > > > address
> > > > > gets
> > > > > reset as well. And we inevitably need to set HW address 
> > > > > again.
> > > > > 
> > > > > So probably better solution is to move mentioned "soft-reset" 
> > > > > from
> > > > > "init" (that is used on start of any network activity) to
> > > > > "initialize"
> > > > > (which is only executed once in "board_r" sequence). But 
> > > > > that's a
> > > > > bit of
> > > > > a different story and for now let's just get DW GMAC 
> > > > > functional
> > > > > again.
> > > > > 
> > > > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> > > > > Cc: Joe Hershberger <joe.hershberger@ni.com>
> > > > > Cc: Michal Simek <michal.simek@xilinx.com>
> > > > > Cc: Tom Rini <trini@konsulko.com>
> > > > > ---
> > > > >  drivers/net/designware.c | 4 ++++
> > > > >  1 file changed, 4 insertions(+)
> > > > > 
> > > > > diff --git a/drivers/net/designware.c 
> > > > > b/drivers/net/designware.c
> > > > > index ae51cf3..07281a6 100644
> > > > > --- a/drivers/net/designware.c
> > > > > +++ b/drivers/net/designware.c
> > > > > @@ -243,6 +243,10 @@ static int _dw_eth_init(struct 
> > > > > dw_eth_dev
> > > > > *priv, u8 *enetaddr)
> > > > >                 mdelay(100);
> > > > >         };
> > > > > 
> > > > > +       /* Soft reset above clears HW address registers.
> > > > > +        * So we have to set it here once again */
> > > > > +       _dw_write_hwaddr(priv, enetaddr);
> > > > > +
> > > > >         rx_descs_init(priv);
> > > > >         tx_descs_init(priv);
> > > > > 
> > > > > --
> > > > 
> > > > There is already a patch submitted. Please check
> > > > http://patchwork.ozlabs.org/patch/484214/
> > > 
> > > Any chance for mentioned patch "net: designware: Program MAC 
> > > address to
> > > hardware after soft reset" to be applied?
> > > 
> > > This really fixes GMAC operation and it would be nice to have 
> > > this fix
> > > in upcoming release.
> > 
> > I think that sounds appropriate. Tom?
> 
> Yes.  Of the handful of recent (in my mind anyhow) net patches, are 
> you
> going to do a PR for them or should I just grab things?

Any chance to see that patch upstream anytime soon?

-Alexey

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

* [U-Boot] [PATCH] net/designware: revert MAC-address setup on init
  2015-07-01 22:02       ` Tom Rini
  2015-07-04 15:12         ` Alexey Brodkin
@ 2015-07-06 21:55         ` Joe Hershberger
  2015-07-08  3:46           ` Bin Meng
  1 sibling, 1 reply; 9+ messages in thread
From: Joe Hershberger @ 2015-07-06 21:55 UTC (permalink / raw)
  To: u-boot

Hey Tom,

On Wed, Jul 1, 2015 at 5:02 PM, Tom Rini <trini@konsulko.com> wrote:
> On Wed, Jul 01, 2015 at 10:26:21AM -0500, Joe Hershberger wrote:
>> Hi Alexey,
>>
>> On Wed, Jul 1, 2015 at 9:25 AM, Alexey Brodkin
>> <Alexey.Brodkin@synopsys.com> wrote:
>> > Hi Tom, Joe,
>> >
>> > On Wed, 2015-07-01 at 22:22 +0800, Bin Meng wrote:
>> >> Hi Alexey,
>> >>
>> >> On Wed, Jul 1, 2015 at 9:59 PM, Alexey Brodkin
>> >> <Alexey.Brodkin@synopsys.com> wrote:
>> >> > http://git.denx.de/?p=u
>> >> > -boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
>> >> > broke DW GMAC operation if !DM_ETH because eth_write_hwaddr()
>> >> > doesn't
>> >> > exist if !DM_NET.
>> >> >
>> >> > As for DM_ETH case I'm still not sure if existing implementation
>> >> > will
>> >> > fly.
>> >> >
>> >> > The point is as it is said in the comment on "soft reset" that is
>> >> > triggered with setting DMAMAC_SRST in "busmode" register HW address
>> >> > gets
>> >> > reset as well. And we inevitably need to set HW address again.
>> >> >
>> >> > So probably better solution is to move mentioned "soft-reset" from
>> >> > "init" (that is used on start of any network activity) to
>> >> > "initialize"
>> >> > (which is only executed once in "board_r" sequence). But that's a
>> >> > bit of
>> >> > a different story and for now let's just get DW GMAC functional
>> >> > again.
>> >> >
>> >> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>> >> > Cc: Joe Hershberger <joe.hershberger@ni.com>
>> >> > Cc: Michal Simek <michal.simek@xilinx.com>
>> >> > Cc: Tom Rini <trini@konsulko.com>
>> >> > ---
>> >> >  drivers/net/designware.c | 4 ++++
>> >> >  1 file changed, 4 insertions(+)
>> >> >
>> >> > diff --git a/drivers/net/designware.c b/drivers/net/designware.c
>> >> > index ae51cf3..07281a6 100644
>> >> > --- a/drivers/net/designware.c
>> >> > +++ b/drivers/net/designware.c
>> >> > @@ -243,6 +243,10 @@ static int _dw_eth_init(struct dw_eth_dev
>> >> > *priv, u8 *enetaddr)
>> >> >                 mdelay(100);
>> >> >         };
>> >> >
>> >> > +       /* Soft reset above clears HW address registers.
>> >> > +        * So we have to set it here once again */
>> >> > +       _dw_write_hwaddr(priv, enetaddr);
>> >> > +
>> >> >         rx_descs_init(priv);
>> >> >         tx_descs_init(priv);
>> >> >
>> >> > --
>> >>
>> >> There is already a patch submitted. Please check
>> >> http://patchwork.ozlabs.org/patch/484214/
>> >
>> > Any chance for mentioned patch "net: designware: Program MAC address to
>> > hardware after soft reset" to be applied?
>> >
>> > This really fixes GMAC operation and it would be nice to have this fix
>> > in upcoming release.
>>
>> I think that sounds appropriate. Tom?
>
> Yes.  Of the handful of recent (in my mind anyhow) net patches, are you
> going to do a PR for them or should I just grab things?

Sorry, was on vacation. I think you can just grab this one. Is there
another you are thinking of that is a bug fix for this release?

Thanks,
-Joe

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

* [U-Boot] [PATCH] net/designware: revert MAC-address setup on init
  2015-07-06 21:55         ` Joe Hershberger
@ 2015-07-08  3:46           ` Bin Meng
  2015-07-08  4:00             ` Joe Hershberger
  0 siblings, 1 reply; 9+ messages in thread
From: Bin Meng @ 2015-07-08  3:46 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On Tue, Jul 7, 2015 at 5:55 AM, Joe Hershberger
<joe.hershberger@gmail.com> wrote:
> Hey Tom,
>
> On Wed, Jul 1, 2015 at 5:02 PM, Tom Rini <trini@konsulko.com> wrote:
>> On Wed, Jul 01, 2015 at 10:26:21AM -0500, Joe Hershberger wrote:
>>> Hi Alexey,
>>>
>>> On Wed, Jul 1, 2015 at 9:25 AM, Alexey Brodkin
>>> <Alexey.Brodkin@synopsys.com> wrote:
>>> > Hi Tom, Joe,
>>> >
>>> > On Wed, 2015-07-01 at 22:22 +0800, Bin Meng wrote:
>>> >> Hi Alexey,
>>> >>
>>> >> On Wed, Jul 1, 2015 at 9:59 PM, Alexey Brodkin
>>> >> <Alexey.Brodkin@synopsys.com> wrote:
>>> >> > http://git.denx.de/?p=u
>>> >> > -boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
>>> >> > broke DW GMAC operation if !DM_ETH because eth_write_hwaddr()
>>> >> > doesn't
>>> >> > exist if !DM_NET.
>>> >> >
>>> >> > As for DM_ETH case I'm still not sure if existing implementation
>>> >> > will
>>> >> > fly.
>>> >> >
>>> >> > The point is as it is said in the comment on "soft reset" that is
>>> >> > triggered with setting DMAMAC_SRST in "busmode" register HW address
>>> >> > gets
>>> >> > reset as well. And we inevitably need to set HW address again.
>>> >> >
>>> >> > So probably better solution is to move mentioned "soft-reset" from
>>> >> > "init" (that is used on start of any network activity) to
>>> >> > "initialize"
>>> >> > (which is only executed once in "board_r" sequence). But that's a
>>> >> > bit of
>>> >> > a different story and for now let's just get DW GMAC functional
>>> >> > again.
>>> >> >
>>> >> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>>> >> > Cc: Joe Hershberger <joe.hershberger@ni.com>
>>> >> > Cc: Michal Simek <michal.simek@xilinx.com>
>>> >> > Cc: Tom Rini <trini@konsulko.com>
>>> >> > ---
>>> >> >  drivers/net/designware.c | 4 ++++
>>> >> >  1 file changed, 4 insertions(+)
>>> >> >
>>> >> > diff --git a/drivers/net/designware.c b/drivers/net/designware.c
>>> >> > index ae51cf3..07281a6 100644
>>> >> > --- a/drivers/net/designware.c
>>> >> > +++ b/drivers/net/designware.c
>>> >> > @@ -243,6 +243,10 @@ static int _dw_eth_init(struct dw_eth_dev
>>> >> > *priv, u8 *enetaddr)
>>> >> >                 mdelay(100);
>>> >> >         };
>>> >> >
>>> >> > +       /* Soft reset above clears HW address registers.
>>> >> > +        * So we have to set it here once again */
>>> >> > +       _dw_write_hwaddr(priv, enetaddr);
>>> >> > +
>>> >> >         rx_descs_init(priv);
>>> >> >         tx_descs_init(priv);
>>> >> >
>>> >> > --
>>> >>
>>> >> There is already a patch submitted. Please check
>>> >> http://patchwork.ozlabs.org/patch/484214/
>>> >
>>> > Any chance for mentioned patch "net: designware: Program MAC address to
>>> > hardware after soft reset" to be applied?
>>> >
>>> > This really fixes GMAC operation and it would be nice to have this fix
>>> > in upcoming release.
>>>
>>> I think that sounds appropriate. Tom?
>>
>> Yes.  Of the handful of recent (in my mind anyhow) net patches, are you
>> going to do a PR for them or should I just grab things?
>
> Sorry, was on vacation. I think you can just grab this one. Is there
> another you are thinking of that is a bug fix for this release?
>

I think you want Tom to grab the previous one here
http://patchwork.ozlabs.org/patch/484214/

Regards,
Bin

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

* [U-Boot] [PATCH] net/designware: revert MAC-address setup on init
  2015-07-08  3:46           ` Bin Meng
@ 2015-07-08  4:00             ` Joe Hershberger
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Hershberger @ 2015-07-08  4:00 UTC (permalink / raw)
  To: u-boot

Hi Bin,

On Tue, Jul 7, 2015 at 10:46 PM, Bin Meng <bmeng.cn@gmail.com> wrote:
> Hi Joe,
>
> On Tue, Jul 7, 2015 at 5:55 AM, Joe Hershberger
> <joe.hershberger@gmail.com> wrote:
>> Hey Tom,
>>
>> On Wed, Jul 1, 2015 at 5:02 PM, Tom Rini <trini@konsulko.com> wrote:
>>> On Wed, Jul 01, 2015 at 10:26:21AM -0500, Joe Hershberger wrote:
>>>> Hi Alexey,
>>>>
>>>> On Wed, Jul 1, 2015 at 9:25 AM, Alexey Brodkin
>>>> <Alexey.Brodkin@synopsys.com> wrote:
>>>> > Hi Tom, Joe,
>>>> >
>>>> > On Wed, 2015-07-01 at 22:22 +0800, Bin Meng wrote:
>>>> >> Hi Alexey,
>>>> >>
>>>> >> On Wed, Jul 1, 2015 at 9:59 PM, Alexey Brodkin
>>>> >> <Alexey.Brodkin@synopsys.com> wrote:
>>>> >> > http://git.denx.de/?p=u
>>>> >> > -boot.git;a=patch;h=f566c9949fbdce2e09a900c5343ca9986e5ba360
>>>> >> > broke DW GMAC operation if !DM_ETH because eth_write_hwaddr()
>>>> >> > doesn't
>>>> >> > exist if !DM_NET.
>>>> >> >
>>>> >> > As for DM_ETH case I'm still not sure if existing implementation
>>>> >> > will
>>>> >> > fly.
>>>> >> >
>>>> >> > The point is as it is said in the comment on "soft reset" that is
>>>> >> > triggered with setting DMAMAC_SRST in "busmode" register HW address
>>>> >> > gets
>>>> >> > reset as well. And we inevitably need to set HW address again.
>>>> >> >
>>>> >> > So probably better solution is to move mentioned "soft-reset" from
>>>> >> > "init" (that is used on start of any network activity) to
>>>> >> > "initialize"
>>>> >> > (which is only executed once in "board_r" sequence). But that's a
>>>> >> > bit of
>>>> >> > a different story and for now let's just get DW GMAC functional
>>>> >> > again.
>>>> >> >
>>>> >> > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
>>>> >> > Cc: Joe Hershberger <joe.hershberger@ni.com>
>>>> >> > Cc: Michal Simek <michal.simek@xilinx.com>
>>>> >> > Cc: Tom Rini <trini@konsulko.com>
>>>> >> > ---
>>>> >> >  drivers/net/designware.c | 4 ++++
>>>> >> >  1 file changed, 4 insertions(+)
>>>> >> >
>>>> >> > diff --git a/drivers/net/designware.c b/drivers/net/designware.c
>>>> >> > index ae51cf3..07281a6 100644
>>>> >> > --- a/drivers/net/designware.c
>>>> >> > +++ b/drivers/net/designware.c
>>>> >> > @@ -243,6 +243,10 @@ static int _dw_eth_init(struct dw_eth_dev
>>>> >> > *priv, u8 *enetaddr)
>>>> >> >                 mdelay(100);
>>>> >> >         };
>>>> >> >
>>>> >> > +       /* Soft reset above clears HW address registers.
>>>> >> > +        * So we have to set it here once again */
>>>> >> > +       _dw_write_hwaddr(priv, enetaddr);
>>>> >> > +
>>>> >> >         rx_descs_init(priv);
>>>> >> >         tx_descs_init(priv);
>>>> >> >
>>>> >> > --
>>>> >>
>>>> >> There is already a patch submitted. Please check
>>>> >> http://patchwork.ozlabs.org/patch/484214/
>>>> >
>>>> > Any chance for mentioned patch "net: designware: Program MAC address to
>>>> > hardware after soft reset" to be applied?
>>>> >
>>>> > This really fixes GMAC operation and it would be nice to have this fix
>>>> > in upcoming release.
>>>>
>>>> I think that sounds appropriate. Tom?
>>>
>>> Yes.  Of the handful of recent (in my mind anyhow) net patches, are you
>>> going to do a PR for them or should I just grab things?
>>
>> Sorry, was on vacation. I think you can just grab this one. Is there
>> another you are thinking of that is a bug fix for this release?
>>
>
> I think you want Tom to grab the previous one here
> http://patchwork.ozlabs.org/patch/484214/

You are correct. I forgot this was a duplicate.

Cheers,
-Joe

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

end of thread, other threads:[~2015-07-08  4:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01 13:59 [U-Boot] [PATCH] net/designware: revert MAC-address setup on init Alexey Brodkin
2015-07-01 14:22 ` Bin Meng
2015-07-01 14:25   ` Alexey Brodkin
2015-07-01 15:26     ` Joe Hershberger
2015-07-01 22:02       ` Tom Rini
2015-07-04 15:12         ` Alexey Brodkin
2015-07-06 21:55         ` Joe Hershberger
2015-07-08  3:46           ` Bin Meng
2015-07-08  4:00             ` Joe Hershberger

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