Linux 5.2 leaves Banana Pi networkless

185 views
Skip to first unread message

Marc Haber

unread,
Jul 10, 2019, 4:50:37 PM7/10/19
to linux...@googlegroups.com
Hi,

5.2 is another mainline kernel that doesn't work on the Banana Pi. On
boot, the syslog is spewed with hundreds of lines of

| sun4i-ss 1c15000.crypto-engine: ERROR: Invalid keylen 26

and the running system has no network interface. Suspicious entries
would be:

|Jul 10 22:39:15 entrada kernel: [ 6.510668] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
|Jul 10 22:39:15 entrada kernel: [ 6.516592] sun7i-dwmac 1c50000.ethernet: no reset control found
|Jul 10 22:39:15 entrada kernel: [ 6.527634] sun7i-dwmac 1c50000.ethernet: could not get tx clock

while a working kernel (5.1.16 with the three patches that are crucial
for the Banana Pi but never made it into one of Greg's releases) shows
this:

|Jul 10 22:40:47 entrada kernel: [ 6.531594] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
|Jul 10 22:40:47 entrada kernel: [ 6.537596] sun7i-dwmac 1c50000.ethernet: no reset control found
|Jul 10 22:40:47 entrada kernel: [ 6.659144] sun7i-dwmac 1c50000.ethernet: Version ID not available
|Jul 10 22:40:47 entrada kernel: [ 6.665491] sun7i-dwmac 1c50000.ethernet: DWMAC1000
|Jul 10 22:40:47 entrada kernel: [ 6.670577] sun7i-dwmac 1c50000.ethernet: DMA HW capability register supported
|Jul 10 22:40:47 entrada kernel: [ 6.677877] sun7i-dwmac 1c50000.ethernet: Normal descriptors
|Jul 10 22:40:47 entrada kernel: [ 6.683664] sun7i-dwmac 1c50000.ethernet: Ring mode enabled
|Jul 10 22:40:47 entrada kernel: [ 12.814713] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
|Jul 10 22:40:47 entrada kernel: [ 12.814735] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
|Jul 10 22:40:47 entrada kernel: [ 12.814750] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
|Jul 10 22:40:47 entrada kernel: [ 12.814763] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
|Jul 10 22:40:50 entrada kernel: [ 17.928555] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off

Am I the only Banana Pi user left, or why do so many mainline kernel
releases have crippling bugs for the BPi?

Greetings
Marc

--
-----------------------------------------------------------------------------
Marc Haber | "I don't trust Computers. They | Mailadresse im Header
Leimen, Germany | lose things." Winona Ryder | Fon: *49 6224 1600402
Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421

Corentin Labbe

unread,
Jul 11, 2019, 3:28:07 AM7/11/19
to Marc Haber, linux...@googlegroups.com
On Wed, Jul 10, 2019 at 10:50:35PM +0200, Marc Haber wrote:
> Hi,
>
> 5.2 is another mainline kernel that doesn't work on the Banana Pi. On


Hello, which banana pi ? there are so many.


> boot, the syslog is spewed with hundreds of lines of
>
> | sun4i-ss 1c15000.crypto-engine: ERROR: Invalid keylen 26
>

This is due to extended crypto tests and is removed in my latest version of crypto engine.
And this is unrelated to your network issue.


> and the running system has no network interface. Suspicious entries
> would be:
>
> |Jul 10 22:39:15 entrada kernel: [ 6.510668] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
> |Jul 10 22:39:15 entrada kernel: [ 6.516592] sun7i-dwmac 1c50000.ethernet: no reset control found
> |Jul 10 22:39:15 entrada kernel: [ 6.527634] sun7i-dwmac 1c50000.ethernet: could not get tx clock
>
> while a working kernel (5.1.16 with the three patches that are crucial
> for the Banana Pi but never made it into one of Greg's releases) shows
> this:

What are thoses 3 patches ?

>
> |Jul 10 22:40:47 entrada kernel: [ 6.531594] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
> |Jul 10 22:40:47 entrada kernel: [ 6.537596] sun7i-dwmac 1c50000.ethernet: no reset control found
> |Jul 10 22:40:47 entrada kernel: [ 6.659144] sun7i-dwmac 1c50000.ethernet: Version ID not available
> |Jul 10 22:40:47 entrada kernel: [ 6.665491] sun7i-dwmac 1c50000.ethernet: DWMAC1000
> |Jul 10 22:40:47 entrada kernel: [ 6.670577] sun7i-dwmac 1c50000.ethernet: DMA HW capability register supported
> |Jul 10 22:40:47 entrada kernel: [ 6.677877] sun7i-dwmac 1c50000.ethernet: Normal descriptors
> |Jul 10 22:40:47 entrada kernel: [ 6.683664] sun7i-dwmac 1c50000.ethernet: Ring mode enabled
> |Jul 10 22:40:47 entrada kernel: [ 12.814713] sun7i-dwmac 1c50000.ethernet eth0: No Safety Features support found
> |Jul 10 22:40:47 entrada kernel: [ 12.814735] sun7i-dwmac 1c50000.ethernet eth0: RX IPC Checksum Offload disabled
> |Jul 10 22:40:47 entrada kernel: [ 12.814750] sun7i-dwmac 1c50000.ethernet eth0: No MAC Management Counters available
> |Jul 10 22:40:47 entrada kernel: [ 12.814763] sun7i-dwmac 1c50000.ethernet eth0: PTP not supported by HW
> |Jul 10 22:40:50 entrada kernel: [ 17.928555] sun7i-dwmac 1c50000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
>
> Am I the only Banana Pi user left, or why do so many mainline kernel
> releases have crippling bugs for the BPi?
>

As I said there are lot of different sunxi hardware availlable and testing all of them is hard.
I have started to add more sunxi devices in kernelci, but work is not done.

Regards

Marc Haber

unread,
Jul 11, 2019, 7:52:05 AM7/11/19
to linux...@googlegroups.com
On Thu, Jul 11, 2019 at 09:28:02AM +0200, Corentin Labbe wrote:
> On Wed, Jul 10, 2019 at 10:50:35PM +0200, Marc Haber wrote:
> > Hi,
> >
> > 5.2 is another mainline kernel that doesn't work on the Banana Pi. On
>
>
> Hello, which banana pi ? there are so many.

How do I find out? The dtb that is being used is the
sun7i-a20-bananapi.dtb, it's an Cortex-A7 CPU stepping r0p4. I just
bought it as a "Banana Pi", it has SATA and Gigabit Ethernet.

> > boot, the syslog is spewed with hundreds of lines of
> >
> > | sun4i-ss 1c15000.crypto-engine: ERROR: Invalid keylen 26
> >
>
> This is due to extended crypto tests and is removed in my latest version of crypto engine.
> And this is unrelated to your network issue.

... so I can ignore it and the box will run just fine?

> > and the running system has no network interface. Suspicious entries
> > would be:
> >
> > |Jul 10 22:39:15 entrada kernel: [ 6.510668] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
> > |Jul 10 22:39:15 entrada kernel: [ 6.516592] sun7i-dwmac 1c50000.ethernet: no reset control found
> > |Jul 10 22:39:15 entrada kernel: [ 6.527634] sun7i-dwmac 1c50000.ethernet: could not get tx clock
> >
> > while a working kernel (5.1.16 with the three patches that are crucial
> > for the Banana Pi but never made it into one of Greg's releases) shows
> > this:
>
> What are thoses 3 patches ?

0ae1f46c55f87e864c14fc46bd6cf0496fd391d7,
179930a62f3182eb384ae1e4d1ad47e97f6f5e90 and
82b3ad7445968ba70edc42d97ba3510c4623679a

There is also a fourth one preventing a soft CPU lockup at boot that
made it into Greg's releases, I'm currently searching for it again to be
able to bisect.

Marc Haber

unread,
Jul 11, 2019, 7:56:06 AM7/11/19
to linux...@googlegroups.com
On Thu, Jul 11, 2019 at 01:52:03PM +0200, Marc Haber wrote:
> 0ae1f46c55f87e864c14fc46bd6cf0496fd391d7,
> 179930a62f3182eb384ae1e4d1ad47e97f6f5e90 and
> 82b3ad7445968ba70edc42d97ba3510c4623679a
>
> There is also a fourth one preventing a soft CPU lockup at boot that
> made it into Greg's releases, I'm currently searching for it again to be
> able to bisect.

That one would be f87391558acf816b48f325a493d81d45dec40da0

Marc Haber

unread,
Jul 11, 2019, 11:46:08 AM7/11/19
to linux...@googlegroups.com
On Wed, Jul 10, 2019 at 10:50:35PM +0200, Marc Haber wrote:
> and the running system has no network interface. Suspicious entries
> would be:
>
> |Jul 10 22:39:15 entrada kernel: [ 6.510668] sun7i-dwmac 1c50000.ethernet: PTP uses main clock
> |Jul 10 22:39:15 entrada kernel: [ 6.516592] sun7i-dwmac 1c50000.ethernet: no reset control found
> |Jul 10 22:39:15 entrada kernel: [ 6.527634] sun7i-dwmac 1c50000.ethernet: could not get tx clock

This is the unsuccessful result of an afternoon of bisecting:

git bisect start
# bad: [0ecfebd2b52404ae0c54a878c872bb93363ada36] Linux 5.2
git bisect bad 0ecfebd2b52404ae0c54a878c872bb93363ada36
# good: [e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd] Linux 5.1
git bisect good e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd
# good: [e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd] Linux 5.1
git bisect good e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd
# good: [a2d635decbfa9c1e4ae15cb05b68b2559f7f827c] Merge tag
# 'drm-next-2019-05-09' of git://anongit.freedesktop.org/drm/drm
git bisect good a2d635decbfa9c1e4ae15cb05b68b2559f7f827c
# bad: [22c58fd70ca48a29505922b1563826593b08cc00] Merge tag 'armsoc-soc'
# of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
git bisect bad 22c58fd70ca48a29505922b1563826593b08cc00
# bad: [c367dc8d0dd2a1e1ed9fdc2dd831053bdfdf0968] Merge branch
# 'next-tomoyo2' of
# git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
git bisect bad c367dc8d0dd2a1e1ed9fdc2dd831053bdfdf0968
# good: [45182e4e1f8ac04708ca7508c51d9103f07d81ab] Merge branch
# 'i2c/for-5.2' of
# git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
git bisect good 45182e4e1f8ac04708ca7508c51d9103f07d81ab
# bad: [9b6c9e96f941c5ab13dad7278a3622f58e5672fc] Merge
# git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
git bisect bad 9b6c9e96f941c5ab13dad7278a3622f58e5672fc
# bad: [c1157f60d72e8b20efc670cef28883832f42406c] Merge branch
# 'clk-parent-rewrite-1' into clk-next
git bisect bad c1157f60d72e8b20efc670cef28883832f42406c

Already c1157f60d72e8b20efc670cef28883832f42406c wouldn't boot,
but one can see the error message "could not get tx clock" before both
CPU cores get stalled.

The next commit was f6111b9d7970df07f783d3891735003fef2bc37e, which also
stalls on both CPU cores, but without emitting the "could not get tx
clock" message. I don't know whether this kernel is good or bad.

git log 45182e4e1f8ac04708ca7508c51d9103f07d81ab..c1157f60d72e8b20efc670cef28883832f42406c

lets me end up with 189 lines of log

A second unsuccessful result of bisecting just
drivers/net/ethernet/stmicro/stmmac:

git bisect start 'drivers/net/ethernet/stmicro/stmmac'
# bad: [0ecfebd2b52404ae0c54a878c872bb93363ada36] Linux 5.2
git bisect bad 0ecfebd2b52404ae0c54a878c872bb93363ada36
# good: [e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd] Linux 5.1
git bisect good e93c9c99a629c61837d5a7fc2120cd2b6c70dbdd
# bad: [f75b6f303bd80249a56cce9028954b4f731270e3] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
git bisect bad f75b6f303bd80249a56cce9028954b4f731270e3
# bad: [d4c26eb6e721683a0f93e346ce55bc8dc3cbb175] net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering
git bisect bad d4c26eb6e721683a0f93e346ce55bc8dc3cbb175

e9989339063dd3a566b67caaa857e6077bfee2cb ends up in a CPU soft lockup as
well.

Am therefore out of ideas. Help?

Chen-Yu Tsai

unread,
Jul 11, 2019, 11:54:28 AM7/11/19
to mh+linu...@zugschlus.de, linux-sunxi
Hi,
Do you have

CONFIG_CLK_SUNXI=y
CONFIG_CLK_SUNXI_CLOCKS=y

in your config?

The A20 GMAC clock driver has not been ported to the newer
sunxi-ng / SUNXI_CCU driver bundle, so you need to enable
the legacy clock drivers.

ChenYu

Eckhardt Ulrich

unread,
Jul 11, 2019, 1:09:27 PM7/11/19
to linux-sunxi


Am Mittwoch, 10. Juli 2019 22:50:37 UTC+2 schrieb Marc Haber:
5.2 is another mainline kernel that doesn't work on the Banana Pi. On
boot, the syslog is spewed with hundreds of lines of

Am I the only Banana Pi user left, or why do so many mainline kernel
releases have crippling bugs for the BPi?

 
I use the 5.1.x and now 5.2 vanilla kernels without any problems on two BPis. Maybe there is a problem with a special kernel config option?

Best Regards
Ulrich Eckhardt

Marc Haber

unread,
Jul 11, 2019, 4:32:31 PM7/11/19
to linux-sunxi
On Thu, Jul 11, 2019 at 11:54:12PM +0800, Chen-Yu Tsai wrote:
> CONFIG_CLK_SUNXI=y
> CONFIG_CLK_SUNXI_CLOCKS=y
>
> in your config?
>
> The A20 GMAC clock driver has not been ported to the newer
> sunxi-ng / SUNXI_CCU driver bundle, so you need to enable
> the legacy clock drivers.

That nailed it. Set the two options, and the box runs again. Thanks!

Diego Karbon

unread,
Aug 23, 2019, 10:24:41 PM8/23/19
to linux-sunxi


On Thursday, 11 July 2019 22:32:31 UTC+2, Marc Haber wrote:
On Thu, Jul 11, 2019 at 11:54:12PM +0800, Chen-Yu Tsai wrote:
> CONFIG_CLK_SUNXI=y
> CONFIG_CLK_SUNXI_CLOCKS=y
>
> in your config?
>

That nailed it. Set the two options, and the box runs again. Thanks!

Greetings
Marc

Guys, I have similar problem with OLinuXino Lime. Where should I set those options? In config for recompiling the kernel or in the other place?

D

Marc Haber

unread,
Aug 25, 2019, 6:36:38 AM8/25/19
to Diego Karbon, linux-sunxi
Yes, those configuration options go in the kernel config (make
menuconfig/nconfig et al) and recompile the kernel.

Diego Karbon

unread,
Aug 27, 2019, 1:49:38 PM8/27/19
to Marc Haber, linux-sunxi
Thanks! 
It would be a bit inconvenient for me, since every kernel update will force me to recompile. I'll try one more option: armbian.
Regards :)

Reply all
Reply to author
Forward
0 new messages