Page 8 of 14

Re: Kernel 5.4

Posted: Tue Oct 15, 2019 4:50 pm
by xeno74
Roland wrote:
xeno74 wrote: Component: PPC-64
Severity: P1 normal
Hardware: PPC-64 Linux
Thanks! It is now there...(Bug 205201).
Many thanks! I added me to the CC List.

Link to the bug report: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M

Re: Kernel 5.4

Posted: Tue Oct 15, 2019 4:59 pm
by xeno74
FYI because of the issue with the onboard SD card:
xeno74 wrote: Hello,

We have patched the RC2 [1] and RC3 [2] of kernel 5.4 with the mmc3 patch [3] and after that the onboard SD card works without any problems with them.

Could you please add this patch or do you have another solution?

Thanks,
Christian

[1] http://www.xenosoft.de/linux-image-5.4- ... 222.tar.gz
[2] http://www.xenosoft.de/linux-image-5.4- ... 222.tar.gz
[3] http://www.xenosoft.de/mmc3.patch
Russell King wrote: The patch which you are reverting fixes exactly the same error on
ARM64 boards.

I had tried to get some additional information from you, but I never
received a response to my query.

While it is regrettable that fixing that has caused a regression
for yours (which we need to fix) we really need to find a way to
solve this for both situations.

Merely reverting the patch and then sitting on our hands with no
possible solution for ARM64 isn't really an acceptable way forward.

The only solution I can see at the moment to this is to #ifdef in
the driver based on whether we are building for ARM64 or PowerPC.

Maybe someone else can come up with a better idea?
xeno74 wrote: Hello Russell,

You asked me about "dma-coherent" in the Cyrus device tree. Unfortunately I don't find the property "dma-coherent" in the dtb source files.

Output of "fdtdump cyrus_p5020_eth_poweroff.dtb | grep dma":

dma0 = "/soc@ffe000000/dma@100300";
dma1 = "/soc@ffe000000/dma@101300";
dma@100300 {
compatible = "fsl,eloplus-dma";
dma-channel@0 {
compatible = "fsl,eloplus-dma-channel";
dma-channel@80 {
compatible = "fsl,eloplus-dma-channel";
dma-channel@100 {
compatible = "fsl,eloplus-dma-channel";
dma-channel@180 {
compatible = "fsl,eloplus-dma-channel";
dma@101300 {
compatible = "fsl,eloplus-dma";
dma-channel@0 {
compatible = "fsl,eloplus-dma-channel";
dma-channel@80 {
compatible = "fsl,eloplus-dma-channel";
dma-channel@100 {
compatible = "fsl,eloplus-dma-channel";
dma-channel@180 {
compatible = "fsl,eloplus-dma-channel";

Thanks,
Christian
Russell King wrote: Hmm, so it looks like PowerPC doesn't mark devices that are dma
coherent with a property that describes them as such.

I think this opens a wider question - what should of_dma_is_coherent()
return for PowerPC? It seems right now that it returns false for
devices that are DMA coherent, which seems to me to be a recipe for
future mistakes.

Any ideas from the PPC maintainers?
Ulf Hansson wrote: Perhaps implement the arch_setup_dma_ops() for PPC, that set
"dev->dma_coherent = true" could work?

[...]

Kind regards
Uffe

Re: Kernel 5.4

Posted: Tue Oct 15, 2019 7:55 pm
by Skateman
Hi Christian,

This DMA thingy triggerd my attention and here i am again with the DPAA Ethernet issues of our X5000 board.

I started looking for DMA Coherency in combination with DPAA Ethernet and did find some clues...

Things like FMAN DMA always issues snoopable transactions for buffers.


We do have some sort of buffer issue where traffic dies...and somehow its hard for me to let it go :-)

Is there something we can check based on one of the early stage kernels with working Ethernet and where we are now?

I also found this which might be of use.. http://cache.freescale.com/files/traini ... -F0246.pdf

In the Linux Init part of the document in the link above, the errors we experience are named: (slide 20)

• BMan initialization failure
Bman err interrupt handler present
Can't get /buffer-pool@9 property 'fsl,bpid'
• QMan driver initalization failure
Qman err interrupt handler present
• Ethernet driver initialization failure
fsl_dpa ethernet.16: dev_get_drvdata(ffe4f0000.ethernet) failed
fsl_dpa: probe of ethernet.16 failed with error -22
fsl_dpa_proxy-proxy ethernet.16: dev_get_drvdata(ffe4f0000.ethernet) failed
fsl_dpa_proxy-proxy: probe of ethernet.16 failed with error -22
• MAC driver initalization error
fsl_mac ffe4f0000.ethernet: of_get_mac_address(/soc@ffe000000/fman@400000/ethernet@f0000)
failed
fsl_mac: probe of ffe4f0000.ethernet failed with error -22

Re: Kernel 5.4

Posted: Wed Oct 16, 2019 9:10 am
by xeno74
Hi Skateman,
Skateman wrote: Is there something we can check based on one of the early stage kernels with working Ethernet and where we are now?
Unfortunately I don't have any early stage kernels with working Ethernet. Maybe Darren could provide them.
Skateman wrote: I also found this which might be of use.. http://cache.freescale.com/files/traini ... -F0246.pdf

In the Linux Init part of the document in the link above, the errors we experience are named: (slide 20)

• BMan initialization failure
Bman err interrupt handler present
Can't get /buffer-pool@9 property 'fsl,bpid'
• QMan driver initalization failure
Qman err interrupt handler present
• Ethernet driver initialization failure
fsl_dpa ethernet.16: dev_get_drvdata(ffe4f0000.ethernet) failed
fsl_dpa: probe of ethernet.16 failed with error -22
fsl_dpa_proxy-proxy ethernet.16: dev_get_drvdata(ffe4f0000.ethernet) failed
fsl_dpa_proxy-proxy: probe of ethernet.16 failed with error -22
• MAC driver initalization error
fsl_mac ffe4f0000.ethernet: of_get_mac_address(/soc@ffe000000/fman@400000/ethernet@f0000)
failed
fsl_mac: probe of ffe4f0000.ethernet failed with error -22
Do we have a bug report because of this issue with the Ethernet?

Cheers,
Christian

Re: Kernel 5.4

Posted: Wed Oct 16, 2019 9:25 am
by xeno74
Skateman wrote: This DMA thingy triggerd my attention and here i am again with the DPAA Ethernet issues of our X5000 board.

...

I also found this which might be of use.. http://cache.freescale.com/files/traini ... -F0246.pdf
Hi Skateman,

This PDF is great! Thanks for posting the link! I think you're right because of the DMA part. Could you please create a bug report?

Thanks,
Christian

Re: Kernel 5.4

Posted: Wed Oct 16, 2019 6:29 pm
by Skateman
@Christian

I have submitted a bug report.

Bug 205215 - Amiga X5000 Cyrus board DPAA network driver issue

We have been busy for quite some time already so if it could be fixed that would be fantastic.

http://linuxppc.10917.n7.nabble.com/DPA ... 32277.html

Re: Kernel 5.4

Posted: Wed Oct 16, 2019 11:49 pm
by xeno74
xeno74 wrote:
Roland wrote: Thanks! It is now there...(Bug 205201).
Many thanks! I added me to the CC List.

Link to the bug report: Bug 205201 - Booting halts if Dawicontrol DC-2976 UW SCSI board installed, unless RAM size limited to 3500M
Hi Roland,

I have the same problem with my analog PCI TV card Typhoon TView RDS + FM Stereo (BT878 chip) in my AmigaOne X5000. It only works with reducing the mem size to 3500MB (mem=3500M). I updated the bug report today.

Cheers,
Christian

Re: Kernel 5.4

Posted: Thu Oct 17, 2019 9:35 am
by xeno74
FYI because of the issue with the onboard SD card:
Russell King wrote: Hmm, so it looks like PowerPC doesn't mark devices that are dma
coherent with a property that describes them as such.

I think this opens a wider question - what should of_dma_is_coherent()
return for PowerPC? It seems right now that it returns false for
devices that are DMA coherent, which seems to me to be a recipe for
future mistakes.

Any ideas from the PPC maintainers?
Benjamin Herrenschmidt wrote: The historical powerpc OF machines were all coherent. OF didn't define
such attributes iirc.

We could add some kind of arch/platform override for that, all the
native OF platforms are coherent at this point afaik, only embedded
with fdt aren't always.

Our *code* knows whether DMA is coherent, but it's not exposed in the
DT for those historical reasons.

Cheers,
Ben.
Ulf Hansson wrote: Perhaps implement the arch_setup_dma_ops() for PPC, that set
"dev->dma_coherent = true" could work?

[...]

Kind regards
Uffe
Benjamin Herrenschmidt wrote: Only for coherent ops

Cheers,
Ben.

Re: Kernel 5.4

Posted: Thu Oct 17, 2019 9:42 am
by xeno74
Skateman wrote:@Christian

I have submitted a bug report.

Bug 205215 - Amiga X5000 Cyrus board DPAA network driver issue

We have been busy for quite some time already so if it could be fixed that would be fantastic.

http://linuxppc.10917.n7.nabble.com/DPA ... 32277.html
Many thanks for creating the bug report! :-)

I added me to the CC List.

Link to the bug report: Bug 205215 - Amiga X5000 Cyrus board DPAA network driver issue

Cheers,
Christian

Re: Kernel 5.4

Posted: Fri Oct 18, 2019 10:04 am
by xeno74
Hi Skateman,

Could you please post a serial log of your X5000/20? I would like to compare it with my log.

Thanks,
Christian