Re: SG2042 SATA (DMA?) issues

Niklas Cassel <[email protected]> Wed, 3 Jun 2026 11:14:00 +0200
Newsgroups dev.linux.lists.sophgo,org.kernel.vger.linux-ide
Message-ID <ah_wWLBK5OqBCFH1@ryzen>
Hello Han,

On Tue, Jun 02, 2026 at 08:19:32PM +0800, Han Gao wrote:
> Hi, Michael
> 
> Based on the new firmware with DMA coherence, we tested the following cases.
> 
> Test method:
> mkfs.btrfs /dev/sda1
> mount /dev/sda1 /mnt
> f3write -e 128 /mnt
> sync
> f3read /mnt
> 
> case1:
> 2042pcie - asm2824 - jmb585: failed, csum failed.
> case2:
> 2042pcie - amd b650 bridge(prom 21) - asm1062: pass.
> case3:
> 2042pcie - asm2824 - amd b650 bridge(prom 21) - asm1062: pass
> case4:
> 2042pcie - asm2824 - jmb585 + kernel parameter libata.force=noncq: pass
> 
> Based on the test results of the above four cases,
> the problem is suspected to lie in the JMB585 chip itself.

+linux-ide

Original thread:
https://lore.kernel.org/sophgo/ahu57vcS0oOFmCI9@mertle/


I interpret this as, before you added 'dma-coherent' to your PCIe controller
device tree node:

Sophgo SG2042 PCIe + ASM2824 + JMB585
worked fine, without any libata.force=noncq kernel parameter which disables NCQ.


After adding 'dma-coherent' to your PCIe controller device tree node:
Sophgo SG2042 PCIe + ASM2824 + JMB585
no longer works fine, and you need to disable NCQ to not get filesystem
corruption.


If this was a problem with the JMB585 chip, why did it work fine to run with NCQ
enabled before you did firmware changes + added 'dma-coherent' to your PCIe
controller device tree node?

Disabling NCQ will significantly reduce the drive performance.


Kind regards,
Niklas