New kernels

AmigaOne X5000 platform specific issues related to Linux only.
User avatar
xeno74
Posts: 9320
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Skateman wrote: Thu Dec 29, 2022 4:43 pm Let me know if you want to bisect so i can help you testing the kernels needed.

Dave
Thank you for your help.

Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Skateman
Posts: 858
Joined: Thu Aug 10, 2017 8:36 pm
Location: The Netherlands

Re: New kernels

Post by Skateman »

xeno74 wrote: Thu Dec 29, 2022 4:04 pm OK, I have a hint because of the CRC error and DPAA issue.

Kernel 6.1 final. No CRC error and no DPAA issue:

Code: Select all

[    3.016487] fsl_dpaa_mac ffe4e8000.ethernet: FMan dTSEC version: 0x08240101
[    3.016862] fsl_dpaa_mac ffe4e8000.ethernet: FMan MAC address: 00:04:a3:6b:41:65
[    3.017133] fsl_dpaa_mac ffe4f0000.ethernet: of_get_mac_address(/soc@ffe000000/fman@400000/ethernet@f0000) failed
[    3.017346] fsl_dpaa_mac ffe4f0000.ethernet: of_get_phy_mode() for /soc@ffe000000/fman@400000/ethernet@f0000 failed. Defaulting to SGMII
[    3.017570] fsl_dpaa_mac: 10G MAC driver only support 10G speed
[    3.017668] fsl_dpaa_mac ffe4f0000.ethernet: mac_dev->init() = -22
[    3.017767] fsl_dpaa_mac: probe of ffe4f0000.ethernet failed with error -22
[    3.017975] fsl_dpaa_mac ffe5e8000.ethernet: FMan dTSEC version: 0x08240101
[    3.018316] fsl_dpaa_mac ffe5e8000.ethernet: FMan MAC address: 00:1e:c0:f8:01:59
[    3.018566] fsl_dpaa_mac ffe5f0000.ethernet: of_get_mac_address(/soc@ffe000000/fman@500000/ethernet@f0000) failed
[    3.018785] fsl_dpaa_mac ffe5f0000.ethernet: of_get_phy_mode() for /soc@ffe000000/fman@500000/ethernet@f0000 failed. Defaulting to SGMII
[    3.019016] fsl_dpaa_mac: 10G MAC driver only support 10G speed
[    3.019113] fsl_dpaa_mac ffe5f0000.ethernet: mac_dev->init() = -22
[    3.019212] fsl_dpaa_mac: probe of ffe5f0000.ethernet failed with error -22
[    3.021614] fsl_dpaa_mac ffe4e8000.ethernet eth0: Probed interface eth0
[    3.023900] fsl_dpaa_mac ffe5e8000.ethernet eth1: Probed interface eth1
Kernel 6.2-rc1 with CRC error and DPAA issue:

Code: Select all

[    3.016644] fsl_dpaa_mac ffe4e8000.ethernet: error -EINVAL: TBI PCS node is not available
[    3.016804] fsl_dpaa_mac: probe of ffe4e8000.ethernet failed with error -22
[    3.016989] fsl_dpaa_mac ffe4f0000.ethernet: of_get_mac_address(/soc@ffe000000/fman@400000/ethernet@f0000) failed
[    3.017210] fsl_dpaa_mac ffe4f0000.ethernet: of_get_phy_mode() for /soc@ffe000000/fman@400000/ethernet@f0000 failed. Defaulting to SGMII
[    3.017442] fsl_dpaa_mac: FMan XGEC version: 0x00010330
[    3.017706] fsl_dpaa_mac ffe5e8000.ethernet: error -EINVAL: TBI PCS node is not available
[    3.017844] fsl_dpaa_mac: probe of ffe5e8000.ethernet failed with error -22
[    3.018026] fsl_dpaa_mac ffe5f0000.ethernet: of_get_mac_address(/soc@ffe000000/fman@500000/ethernet@f0000) failed
[    3.018248] fsl_dpaa_mac ffe5f0000.ethernet: of_get_phy_mode() for /soc@ffe000000/fman@500000/ethernet@f0000 failed. Defaulting to SGMII
[    3.018476] fsl_dpaa_mac: FMan XGEC version: 0x00010330
[    3.020561] fsl_dpaa_mac ffe4f0000.ethernet: Using random MAC address: 6e:06:f4:54:9f:bf
[    3.021882] fsl_dpaa_mac ffe4f0000.ethernet eth0: Probed interface eth0
[    3.023828] fsl_dpaa_mac ffe5f0000.ethernet: Using random MAC address: ea:96:eb:45:0a:a2
[    3.025153] fsl_dpaa_mac ffe5f0000.ethernet eth1: Probed interface eth1
I don't know what the reason is but I think the kernel 6.1 output is the correct one. With these outputs I can try a bisect. I would like to know which commit is responsible for the second output.
I have the same output. The 6.2 kernel (not loading the DTB correct) cannot probe the the DPAA onboard ethernet, and therefor it starts to generate some random mac address etc...
Would be great if you find the commit where the kernel seems to overlap the memory addresses which are needed for loading the DTB.
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 570 / Radeon X1950 / M-Audio 5.1 -> AmigaOS / Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
Vampire 4SA - RPi4 Running AmiKitXE Full
User avatar
caseycullen
Posts: 519
Joined: Sat Dec 17, 2016 7:12 am
Location: Madison, WI USA
Contact:

Re: New kernels

Post by caseycullen »

Skateman wrote: Thu Dec 29, 2022 12:31 pm Thats correct, but the DTB will not be loaded correctly and the onboard NIC will not be adressed correctly and is disabled.
There still is something wong....
Unfortunately I'm still using a PCI ethernet card and not the onboard NIC, so I didn't notice this issue.
User avatar
xeno74
Posts: 9320
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Hi All,

I bisected today because of the CRC error and DPAA issues of the X5000.

About bisecting:
Git bisect is like a little wizard that walks you through recent commits, asks you if they are good or bad, and narrows down the broken commit.
Git bisect starts with the midpoint commit. The midpoint commit is between the initial good commit and the initial bad commit.
If the midpoint commit was good, you know the commit that introduced the change is between your midpoint and the initial bad commit.
If the midpoint commit was bad, you know the commit that introduced the change is between your midpoint and the initial good commit.
After that git bisect selects a new midpoint in the area where the commit was bad. And this is repeated over and over again till the bad commit has been found.
  1. Code: Select all

    git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a
    or

    Code: Select all

    git clone --depth=1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a
  2. Code: Select all

    git bisect start
  3. Code: Select all

    git bisect good 830b3c68c1fb1e9176028d02ef86f3cf76aa2476
    (Good: Linux 6.1)
  4. Code: Select all

    git bisect bad 1b929c02afd37871d5afb9d498426f83432e71c2
    (Bad: Linux 6.2-rc1)
    Output:

    Code: Select all

    Bisecting: 7297 revisions left to test after this (roughly 13 steps)
    [8b9ed79c2d587bec5f603d66801478a5af9af842] Merge tag 'x86_asm_for_v6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
  5. git bisect good
    Output:

    Code: Select all

    Bisecting: 3624 revisions left to test after this (roughly 12 steps)
    [041fae9c105ae342a4245cf1e0dc56a23fbb9d3c] Merge tag 'f2fs-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs
  6. git bisect bad
    Output:

    Code: Select all

    Bisecting: 1835 revisions left to test after this (roughly 11 steps)
    [2b53d8698a47a3f6879b3c5cd2a90906422971cc] Merge branch 'mptcp-miscellaneous-cleanup'
  7. git bisect bad
    Output:

    Code: Select all

    Bisecting: 918 revisions left to test after this (roughly 10 steps)
    [6728aea7216c0c06c98e2e58d753a5e8b2ae1c6f] bpf: Refactor btf_struct_access
  8. git bisect bad
    Output:

    Code: Select all

    Bisecting: 458 revisions left to test after this (roughly 9 steps)
    [82fd151d38d9fda714c5bb2e9e79ecd6bdc72da6] gve: Reduce alloc and copy costs in the GQ rx path
  9. git bisect bad
    Output:

    Code: Select all

    Bisecting: 229 revisions left to test after this (roughly 8 steps)
    [d1e96cc4fbe031c19d6fd9d8d2e63c03452fa290] mptcp: fix tracking issue in mptcp_subflow_create_socket()
  10. git bisect bad
    Output:

    Code: Select all

    Bisecting: 114 revisions left to test after this (roughly 7 steps)
    [b29e0dece45174f8c791853cbf40a24212148b47] Merge branch 'udp-false-sharing'
  11. git bisect bad
    Output:

    Code: Select all

    Bisecting: 56 revisions left to test after this (roughly 6 steps)
    [5cacb2c7c9a4035238cbd7cbd3cf751f825d9f90] Merge branch 'dpaa-phylink'
  12. git bisect bad
    Output:

    Code: Select all

    Bisecting: 28 revisions left to test after this (roughly 5 steps)
    [35a855509e6ee3442477c8ebc6827b5b5d32a7b5] libbpf: Deal with section with no data gracefully
  13. git bisect good
    Output:

    Code: Select all

    Bisecting: 14 revisions left to test after this (roughly 4 steps)
    [e2ac2a00dae10997b71870ecf26ca69f4d726537] enic: define constants for legacy interrupts offset
  14. git bisect good
    Output:

    Code: Select all

    Bisecting: 7 revisions left to test after this (roughly 3 steps)
    [045d05018a2da6cb0944a40f3811fbecce6401c1] dt-bindings: net: fman: Add additional interface properties
  15. git bisect good
    Output:

    Code: Select all

    Bisecting: 3 revisions left to test after this (roughly 2 steps)
    [5d93cfcf7360eac9903774fe94f626c9ead2049d] net: dpaa: Convert to phylink
  16. git bisect bad
    Output:

    Code: Select all

    Bisecting: 1 revision left to test after this (roughly 1 step)
    [0fc83bd79589b3e354535a4761a4b2a483f2f14c] net: fman: memac: Add serdes support
  17. git bisect good
    Output:

    Code: Select all

    Bisecting: 0 revisions left to test after this (roughly 0 steps)
    [a7c2a32e7f22cf5648c52e05a21725a9d0675649] net: fman: memac: Use lynx pcs driver
  18. git bisect good
    Output:

    Code: Select all

    5d93cfcf7360eac9903774fe94f626c9ead2049d is the first bad commit
    commit 5d93cfcf7360eac9903774fe94f626c9ead2049d
    Author: Sean Anderson <sean.anderson@seco.com>
    Date:   Mon Oct 17 16:22:38 2022 -0400
    
        net: dpaa: Convert to phylink
    
        This converts DPAA to phylink. All macs are converted. This should work
        with no device tree modifications (including those made in this series),
        except for QSGMII (as noted previously).
    
        The mEMAC configuration is one of the tricker areas. I have tried to
        capture all the restrictions across the various models. Most of the time,
        we assume that if the serdes supports a mode or the phy-interface-mode
        specifies it, then we support it. The only place we can't do this is
        (RG)MII, since there's no serdes. In that case, we rely on a (new)
        devicetree property. There are also several cases where half-duplex is
        broken. Unfortunately, only a single compatible is used for the MAC, so we
        have to use the board compatible instead.
    
        The 10GEC conversion is very straightforward, since it only supports XAUI.
        There is generally nothing to configure.
    
        The dTSEC conversion is broadly similar to mEMAC, but is simpler because we
        don't support configuring the SerDes (though this can be easily added) and
        we don't have multiple PCSs. From what I can tell, there's nothing
        different in the driver or documentation between SGMII and 1000BASE-X
        except for the advertising. Similarly, I couldn't find anything about
        2500BASE-X. In both cases, I treat them like SGMII. These modes aren't used
        by any in-tree boards. Similarly, despite being mentioned in the driver, I
        couldn't find any documented SoCs which supported QSGMII.  I have left it
        unimplemented for now.
    
        Signed-off-by: Sean Anderson <sean.anderson@seco.com>
        Signed-off-by: David S. Miller <davem@davemloft.net>
    
     drivers/net/ethernet/freescale/dpaa/Kconfig        |   4 +-
     drivers/net/ethernet/freescale/dpaa/dpaa_eth.c     |  89 +---
     drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c |  90 +---
     drivers/net/ethernet/freescale/fman/Kconfig        |   1 -
     drivers/net/ethernet/freescale/fman/fman_dtsec.c   | 458 ++++++++---------
     drivers/net/ethernet/freescale/fman/fman_mac.h     |  10 -
     drivers/net/ethernet/freescale/fman/fman_memac.c   | 547 +++++++++++----------
     drivers/net/ethernet/freescale/fman/fman_tgec.c    | 131 +++--
     drivers/net/ethernet/freescale/fman/mac.c          | 168 +------
     drivers/net/ethernet/freescale/fman/mac.h          |  23 +-
     10 files changed, 612 insertions(+), 909 deletions(-)
Result: 5d93cfcf7360eac9903774fe94f626c9ead2049d (net: dpaa: Convert to phylink) is the first bad commit.

I was able to revert the first bad commit with the following commands.

Code: Select all

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a

Code: Select all

cd a

Code: Select all

git checkout 5d93cfcf7360eac9903774fe94f626c9ead2049d

Code: Select all

Updating files: 100% (14688/14688), done.
Note: switching to '5d93cfcf7360eac9903774fe94f626c9ead2049d'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 5d93cfcf7360 net: dpaa: Convert to phylink

Code: Select all

cd ..

Code: Select all

cp -R a a.bak

Code: Select all

cd a

Code: Select all

git revert 5d93cfcf7360eac9903774fe94f626c9ead2049d

Code: Select all

Revert "net: dpaa: Convert to phylink"

This reverts commit 5d93cfcf7360eac9903774fe94f626c9ead2049d.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# HEAD detached at 5d93cfcf7360
# Changes to be committed:
#       modified:   drivers/net/ethernet/freescale/dpaa/Kconfig
#       modified:   drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
#       modified:   drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
#       modified:   drivers/net/ethernet/freescale/fman/Kconfig
#       modified:   drivers/net/ethernet/freescale/fman/fman_dtsec.c
#       modified:   drivers/net/ethernet/freescale/fman/fman_mac.h
#       modified:   drivers/net/ethernet/freescale/fman/fman_memac.c
#       modified:   drivers/net/ethernet/freescale/fman/fman_tgec.c
#       modified:   drivers/net/ethernet/freescale/fman/mac.c
#       modified:   drivers/net/ethernet/freescale/fman/mac.h

Code: Select all

[detached HEAD 485c0ea996d8] Revert "net: dpaa: Convert to phylink"
 10 files changed, 909 insertions(+), 612 deletions(-)
I created a patch for reverting the bad commit.

Code: Select all

cd ..

Code: Select all

mv a b

Code: Select all

cp -R a.bak a

Code: Select all

rm -rf b/.git
rm -rf a/.git

Code: Select all

diff -rupN a b > dpaa-phylink.patch
dpaa-phylink.patch: pastebin.com

I compiled a new kernel without the first bad commit and it works without any problems.

Additionally, I compiled the kernel with the dpaa-phylink.patch and it also works.

patch -p0 < dpaa-phylink.patch

Code: Select all

patching file a/drivers/net/ethernet/freescale/dpaa/Kconfig
patching file a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
patching file a/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c
patching file a/drivers/net/ethernet/freescale/fman/Kconfig
patching file a/drivers/net/ethernet/freescale/fman/fman_dtsec.c
patching file a/drivers/net/ethernet/freescale/fman/fman_mac.h
patching file a/drivers/net/ethernet/freescale/fman/fman_memac.c
patching file a/drivers/net/ethernet/freescale/fman/fman_tgec.c
patching file a/drivers/net/ethernet/freescale/fman/mac.c
patching file a/drivers/net/ethernet/freescale/fman/mac.h
Cheers,
Christian
Last edited by xeno74 on Sat Dec 31, 2022 2:53 pm, edited 32 times in total.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Skateman
Posts: 858
Joined: Thu Aug 10, 2017 8:36 pm
Location: The Netherlands

Re: New kernels

Post by Skateman »

Great work Christian!
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 570 / Radeon X1950 / M-Audio 5.1 -> AmigaOS / Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
Vampire 4SA - RPi4 Running AmiKitXE Full
User avatar
Skateman
Posts: 858
Joined: Thu Aug 10, 2017 8:36 pm
Location: The Netherlands

Re: New kernels

Post by Skateman »

caseycullen wrote: Sat Dec 31, 2022 5:36 am
Skateman wrote: Thu Dec 29, 2022 12:31 pm Thats correct, but the DTB will not be loaded correctly and the onboard NIC will not be adressed correctly and is disabled.
There still is something wong....
Unfortunately I'm still using a PCI ethernet card and not the onboard NIC, so I didn't notice this issue.
I can understand that :-)

I have been using the onboard NICs (as there are two) for a long time now, and for me work well in all OSes.. AmigaOS, Linux and MorphOS
If the issue could be resolved, that would be great.
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 570 / Radeon X1950 / M-Audio 5.1 -> AmigaOS / Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
Vampire 4SA - RPi4 Running AmiKitXE Full
User avatar
xeno74
Posts: 9320
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Hi Skateman,

The kernel developers have rewrote the complete dpaa code. They started with the rewriting with the commit "dpaa: Convert to phylink". After that, they modified a lot of the new code.
That means, that the first patch (dpaa-phylink.patch) doesn't work with the RC1 of kernel 6.2.

I created a new patch for reverting all changes in the dpaa code.

Link: dpaa-phylink-v2.patch

This patch is really big. I compiled a new RC1 of kernel 6.2 with this patch.

Download: uImage-6.2-rc1-old-dpaa

Please test it. You can use it with the kernel modules from the RC1 package.

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Skateman
Posts: 858
Joined: Thu Aug 10, 2017 8:36 pm
Location: The Netherlands

Re: New kernels

Post by Skateman »

Hi Christian,

Great to hear, and will test tomorrow.

Dave
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 570 / Radeon X1950 / M-Audio 5.1 -> AmigaOS / Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
Vampire 4SA - RPi4 Running AmiKitXE Full
User avatar
Skateman
Posts: 858
Joined: Thu Aug 10, 2017 8:36 pm
Location: The Netherlands

Re: New kernels

Post by Skateman »

Yess!

With the old dpaa kernel you compiled the issue has resolved.

I did use the 1000000 - 2000000 addresses to boot due to the CRC error when using 1000000 - 1c00000

Image

Big picture: https://www.skateman.nl/wp-content/uplo ... -02-15.png

Dave
AmigaOne X5000 -> 2GHz / 16GB RAM / Radeon RX 570 / Radeon X1950 / M-Audio 5.1 -> AmigaOS / Linux
Amiga 1200 -> Recapped / 68ec020 ACA 1221ec / CF HDD / RetroNET connected to the world
Vampire 4SA - RPi4 Running AmiKitXE Full
User avatar
xeno74
Posts: 9320
Joined: Fri Mar 23, 2012 7:58 am

Re: New kernels

Post by xeno74 »

Skateman wrote: Sun Jan 01, 2023 11:08 am Yess!

With the old dpaa kernel you compiled the issue has resolved.

I did use the 1000000 - 2000000 addresses to boot due to the CRC error when using 1000000 - 1c00000
Hi Dave,

Happy New Year! Thanks a lot for testing the RC1 of kernel 6.2 with the old dpaa driver! :-)

It seems, that the new driver doesn’t work with our onboard network interfaces. :-(

I will report this issue to the kernel developers.

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
Post Reply