linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* macb broken on HiFive Unleashed
@ 2021-03-08 19:30 Andreas Schwab
  2021-03-09  8:55 ` Claudiu.Beznea
  0 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2021-03-08 19:30 UTC (permalink / raw)
  To: linux-riscv
  Cc: Charles Keepax, Andrew Lunn, Willy Tarreau, Nicolas Ferre,
	Claudiu Beznea, Daniel Palmer, Alexandre Belloni,
	Parshuram Thombare, netdev, linux-kernel

One of the changes to the macb driver between 5.10 and 5.11 has broken
the SiFive HiFive Unleashed.  These are the last messages before the
system hangs:

[   12.468674] libphy: Fixed MDIO Bus: probed
[   12.746518] macb 10090000.ethernet: Registered clk switch 'sifive-gemgxl-mgmt'
[   12.753119] macb 10090000.ethernet: GEM doesn't support hardware ptp.
[   12.760178] libphy: MACB_mii_bus: probed
[   12.881792] MACsec IEEE 802.1AE
[   12.944426] macb 10090000.ethernet eth0: Cadence GEM rev 0x10070109 at 0x10090000 irq 16 (70:b3:d5:92:f1:07)

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

* Re: macb broken on HiFive Unleashed
  2021-03-08 19:30 macb broken on HiFive Unleashed Andreas Schwab
@ 2021-03-09  8:55 ` Claudiu.Beznea
  2021-03-10 16:17   ` Willy Tarreau
                     ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Claudiu.Beznea @ 2021-03-09  8:55 UTC (permalink / raw)
  To: schwab, linux-riscv
  Cc: ckeepax, andrew, w, Nicolas.Ferre, daniel, alexandre.belloni,
	pthombar, netdev, linux-kernel

Hi Andreas,

On 08.03.2021 21:30, Andreas Schwab wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> One of the changes to the macb driver between 5.10 and 5.11 has broken
> the SiFive HiFive Unleashed.  These are the last messages before the
> system hangs:
> 
> [   12.468674] libphy: Fixed MDIO Bus: probed
> [   12.746518] macb 10090000.ethernet: Registered clk switch 'sifive-gemgxl-mgmt'
> [   12.753119] macb 10090000.ethernet: GEM doesn't support hardware ptp.
> [   12.760178] libphy: MACB_mii_bus: probed
> [   12.881792] MACsec IEEE 802.1AE
> [   12.944426] macb 10090000.ethernet eth0: Cadence GEM rev 0x10070109 at 0x10090000 irq 16 (70:b3:d5:92:f1:07)
> 

I don't have a SiFive HiFive Unleashed to investigate this. Can you check
if reverting commits on macb driver b/w 5.10 and 5.11 solves your issues:

git log --oneline v5.10..v5.11 -- drivers/net/ethernet/cadence/
1d0d561ad1d7 net: macb: Correct usage of MACB_CAPS_CLK_HW_CHG flag
1d608d2e0d51 Revert "macb: support the two tx descriptors on at91rm9200"
700d566e8171 net: macb: add support for sama7g5 emac interface
ec771de654e4 net: macb: add support for sama7g5 gem interface
f4de93f03ed8 net: macb: unprepare clocks in case of failure
38493da4e6a8 net: macb: add function to disable all macb clocks
daafa1d33cc9 net: macb: add capability to not set the clock rate
edac63861db7 net: macb: add userio bits as platform configuration
9e6cad531c9d net: macb: Fix passing zero to 'PTR_ERR'
0012eeb370f8 net: macb: fix NULL dereference due to no pcs_config method
e4e143e26ce8 net: macb: add support for high speed interface

Thank you,
Claudiu Beznea

> Andreas.
> 
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
> "And now for something completely different."
> 


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

* Re: macb broken on HiFive Unleashed
  2021-03-09  8:55 ` Claudiu.Beznea
@ 2021-03-10 16:17   ` Willy Tarreau
  2021-03-10 19:55   ` Andreas Schwab
  2021-03-17 16:26   ` Andreas Schwab
  2 siblings, 0 replies; 11+ messages in thread
From: Willy Tarreau @ 2021-03-10 16:17 UTC (permalink / raw)
  To: Claudiu.Beznea
  Cc: schwab, linux-riscv, ckeepax, andrew, Nicolas.Ferre, daniel,
	alexandre.belloni, pthombar, netdev, linux-kernel

Hi,

On Tue, Mar 09, 2021 at 08:55:10AM +0000, Claudiu.Beznea@microchip.com wrote:
> Hi Andreas,
> 
> On 08.03.2021 21:30, Andreas Schwab wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> > 
> > One of the changes to the macb driver between 5.10 and 5.11 has broken
> > the SiFive HiFive Unleashed.  These are the last messages before the
> > system hangs:
> > 
> > [   12.468674] libphy: Fixed MDIO Bus: probed
> > [   12.746518] macb 10090000.ethernet: Registered clk switch 'sifive-gemgxl-mgmt'
> > [   12.753119] macb 10090000.ethernet: GEM doesn't support hardware ptp.
> > [   12.760178] libphy: MACB_mii_bus: probed
> > [   12.881792] MACsec IEEE 802.1AE
> > [   12.944426] macb 10090000.ethernet eth0: Cadence GEM rev 0x10070109 at 0x10090000 irq 16 (70:b3:d5:92:f1:07)
> > 
> 
> I don't have a SiFive HiFive Unleashed to investigate this. Can you check
> if reverting commits on macb driver b/w 5.10 and 5.11 solves your issues:
> 
> git log --oneline v5.10..v5.11 -- drivers/net/ethernet/cadence/
> 1d0d561ad1d7 net: macb: Correct usage of MACB_CAPS_CLK_HW_CHG flag
> 1d608d2e0d51 Revert "macb: support the two tx descriptors on at91rm9200"
> 700d566e8171 net: macb: add support for sama7g5 emac interface
> ec771de654e4 net: macb: add support for sama7g5 gem interface
> f4de93f03ed8 net: macb: unprepare clocks in case of failure
> 38493da4e6a8 net: macb: add function to disable all macb clocks
> daafa1d33cc9 net: macb: add capability to not set the clock rate
> edac63861db7 net: macb: add userio bits as platform configuration
> 9e6cad531c9d net: macb: Fix passing zero to 'PTR_ERR'
> 0012eeb370f8 net: macb: fix NULL dereference due to no pcs_config method
> e4e143e26ce8 net: macb: add support for high speed interface

In addition, it's worth mentioning that the driver has multiple rx/tx/irq
functions depending on the platforms or chip variants, and that based on
this it should be easy to further reduce this list.

Just my two cents,
Willy

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

* Re: macb broken on HiFive Unleashed
  2021-03-09  8:55 ` Claudiu.Beznea
  2021-03-10 16:17   ` Willy Tarreau
@ 2021-03-10 19:55   ` Andreas Schwab
  2021-03-13 21:54     ` Emil Renner Berthing
  2021-03-17 16:26   ` Andreas Schwab
  2 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2021-03-10 19:55 UTC (permalink / raw)
  To: Claudiu.Beznea
  Cc: linux-riscv, ckeepax, andrew, w, Nicolas.Ferre, daniel,
	alexandre.belloni, pthombar, netdev, linux-kernel

On Mär 09 2021, Claudiu.Beznea@microchip.com wrote:

> I don't have a SiFive HiFive Unleashed to investigate this. Can you check
> if reverting commits on macb driver b/w 5.10 and 5.11 solves your issues:
>
> git log --oneline v5.10..v5.11 -- drivers/net/ethernet/cadence/
> 1d0d561ad1d7 net: macb: Correct usage of MACB_CAPS_CLK_HW_CHG flag
> 1d608d2e0d51 Revert "macb: support the two tx descriptors on at91rm9200"
> 700d566e8171 net: macb: add support for sama7g5 emac interface
> ec771de654e4 net: macb: add support for sama7g5 gem interface
> f4de93f03ed8 net: macb: unprepare clocks in case of failure
> 38493da4e6a8 net: macb: add function to disable all macb clocks
> daafa1d33cc9 net: macb: add capability to not set the clock rate
> edac63861db7 net: macb: add userio bits as platform configuration
> 9e6cad531c9d net: macb: Fix passing zero to 'PTR_ERR'
> 0012eeb370f8 net: macb: fix NULL dereference due to no pcs_config method
> e4e143e26ce8 net: macb: add support for high speed interface

Unfortunately, that didn't help.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

* Re: macb broken on HiFive Unleashed
  2021-03-10 19:55   ` Andreas Schwab
@ 2021-03-13 21:54     ` Emil Renner Berthing
  2021-03-14  7:19       ` Andreas Schwab
  0 siblings, 1 reply; 11+ messages in thread
From: Emil Renner Berthing @ 2021-03-13 21:54 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Claudiu.Beznea, linux-riscv, ckeepax, andrew, Willy Tarreau,
	Nicolas Ferre, daniel, Alexandre Belloni, pthombar,
	Network Development, Linux Kernel Mailing List

Hi Andreas

On Wed, 10 Mar 2021 at 20:55, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Mär 09 2021, Claudiu.Beznea@microchip.com wrote:
> > I don't have a SiFive HiFive Unleashed to investigate this. Can you check
> > if reverting commits on macb driver b/w 5.10 and 5.11 solves your issues:
> >
> > git log --oneline v5.10..v5.11 -- drivers/net/ethernet/cadence/
> > 1d0d561ad1d7 net: macb: Correct usage of MACB_CAPS_CLK_HW_CHG flag
> > 1d608d2e0d51 Revert "macb: support the two tx descriptors on at91rm9200"
> > 700d566e8171 net: macb: add support for sama7g5 emac interface
> > ec771de654e4 net: macb: add support for sama7g5 gem interface
> > f4de93f03ed8 net: macb: unprepare clocks in case of failure
> > 38493da4e6a8 net: macb: add function to disable all macb clocks
> > daafa1d33cc9 net: macb: add capability to not set the clock rate
> > edac63861db7 net: macb: add userio bits as platform configuration
> > 9e6cad531c9d net: macb: Fix passing zero to 'PTR_ERR'
> > 0012eeb370f8 net: macb: fix NULL dereference due to no pcs_config method
> > e4e143e26ce8 net: macb: add support for high speed interface
>
> Unfortunately, that didn't help.

Sorry, for being late to test this, but I just compiled and booted
5.11.6 and ethernet works just fine for me:
https://esmil.dk/hfu-5.11.6.txt

As you can see I haven't updated OpenSBI or u-boot in a while, don't
know if that makes a difference. You can fetch the config is used
here:
https://esmil.dk/hfu-5.11.6.config

/Emil

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

* Re: macb broken on HiFive Unleashed
  2021-03-13 21:54     ` Emil Renner Berthing
@ 2021-03-14  7:19       ` Andreas Schwab
  0 siblings, 0 replies; 11+ messages in thread
From: Andreas Schwab @ 2021-03-14  7:19 UTC (permalink / raw)
  To: Emil Renner Berthing
  Cc: Claudiu.Beznea, linux-riscv, ckeepax, andrew, Willy Tarreau,
	Nicolas Ferre, daniel, Alexandre Belloni, pthombar,
	Network Development, Linux Kernel Mailing List

On Mär 13 2021, Emil Renner Berthing wrote:

> As you can see I haven't updated OpenSBI or u-boot in a while

Does it also work if you use the u-boot SPL instead of FSBL?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

* Re: macb broken on HiFive Unleashed
  2021-03-09  8:55 ` Claudiu.Beznea
  2021-03-10 16:17   ` Willy Tarreau
  2021-03-10 19:55   ` Andreas Schwab
@ 2021-03-17 16:26   ` Andreas Schwab
  2021-03-19  8:28     ` Yixun Lan
  2 siblings, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2021-03-17 16:26 UTC (permalink / raw)
  To: Claudiu.Beznea
  Cc: linux-riscv, ckeepax, andrew, w, Nicolas.Ferre, daniel,
	alexandre.belloni, pthombar, netdev, linux-kernel

It turned out to be a broken clock driver.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

* Re: macb broken on HiFive Unleashed
  2021-03-17 16:26   ` Andreas Schwab
@ 2021-03-19  8:28     ` Yixun Lan
  2021-03-19  8:42       ` Yixun Lan
  2021-03-19  8:51       ` Andreas Schwab
  0 siblings, 2 replies; 11+ messages in thread
From: Yixun Lan @ 2021-03-19  8:28 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Claudiu.Beznea, linux-riscv, ckeepax, andrew, w, Nicolas.Ferre,
	daniel, alexandre.belloni, pthombar, netdev, linux-kernel

HI Andreas:

On Wed, Mar 17, 2021 at 4:27 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> It turned out to be a broken clock driver.
>

what's the exact root cause? and any solution?
seems I face the same issue, upgrade kernel to 5.11, then eth0 fail to bring up

Yixun Lan

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

* Re: macb broken on HiFive Unleashed
  2021-03-19  8:28     ` Yixun Lan
@ 2021-03-19  8:42       ` Yixun Lan
  2021-03-19  8:51       ` Andreas Schwab
  1 sibling, 0 replies; 11+ messages in thread
From: Yixun Lan @ 2021-03-19  8:42 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Claudiu.Beznea, linux-riscv, ckeepax, andrew, w, Nicolas.Ferre,
	daniel, alexandre.belloni, pthombar, netdev, linux-kernel

HI Andreas:

On Fri, Mar 19, 2021 at 8:28 AM Yixun Lan <yixun.lan@gmail.com> wrote:
>
> HI Andreas:
>
> On Wed, Mar 17, 2021 at 4:27 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
> >
> > It turned out to be a broken clock driver.
> >
>
> what's the exact root cause? and any solution?
> seems I face the same issue, upgrade kernel to 5.11, then eth0 fail to bring up
>
oh, sorry for the noise, just saw you already commented in another thread..

https://lkml.kernel.org/r/87v99qyjaz.fsf@igel.home

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

* Re: macb broken on HiFive Unleashed
  2021-03-19  8:28     ` Yixun Lan
  2021-03-19  8:42       ` Yixun Lan
@ 2021-03-19  8:51       ` Andreas Schwab
  2021-03-19 22:25         ` Yixun Lan
  1 sibling, 1 reply; 11+ messages in thread
From: Andreas Schwab @ 2021-03-19  8:51 UTC (permalink / raw)
  To: Yixun Lan
  Cc: Claudiu.Beznea, linux-riscv, ckeepax, andrew, w, Nicolas.Ferre,
	daniel, alexandre.belloni, pthombar, netdev, linux-kernel

On Mär 19 2021, Yixun Lan wrote:

> what's the exact root cause? and any solution?

Try reverting the five commits starting with
732374a0b440d9a79c8412f318a25cd37ba6f4e2.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

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

* Re: macb broken on HiFive Unleashed
  2021-03-19  8:51       ` Andreas Schwab
@ 2021-03-19 22:25         ` Yixun Lan
  0 siblings, 0 replies; 11+ messages in thread
From: Yixun Lan @ 2021-03-19 22:25 UTC (permalink / raw)
  To: Andreas Schwab
  Cc: Claudiu.Beznea, linux-riscv, ckeepax, andrew, w, Nicolas.Ferre,
	Daniel Palmer, alexandre.belloni, pthombar, netdev,
	linux-kernel@vger.kernel.org List

HI Andreas, Zong:

On Fri, Mar 19, 2021 at 4:51 PM Andreas Schwab <schwab@linux-m68k.org> wrote:
>
> On Mär 19 2021, Yixun Lan wrote:
>
> > what's the exact root cause? and any solution?
>
> Try reverting the five commits starting with
> 732374a0b440d9a79c8412f318a25cd37ba6f4e2.
>
I confirm reverting those five patches make the ethernet work again
tested with kernel version 5.11.7

Yixun Lan

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

end of thread, other threads:[~2021-03-19 22:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 19:30 macb broken on HiFive Unleashed Andreas Schwab
2021-03-09  8:55 ` Claudiu.Beznea
2021-03-10 16:17   ` Willy Tarreau
2021-03-10 19:55   ` Andreas Schwab
2021-03-13 21:54     ` Emil Renner Berthing
2021-03-14  7:19       ` Andreas Schwab
2021-03-17 16:26   ` Andreas Schwab
2021-03-19  8:28     ` Yixun Lan
2021-03-19  8:42       ` Yixun Lan
2021-03-19  8:51       ` Andreas Schwab
2021-03-19 22:25         ` Yixun Lan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).