Re: SG2042 SATA (DMA?) issues

Chen Wang <[email protected]> Mon, 1 Jun 2026 14:06:29 +0800
Newsgroups dev.linux.lists.sophgo
Message-ID <MA5PR01MB12500AE1ED1AD25C00C4BA706FE152@MA5PR01MB12500.INDPRD01.PROD.OUTLOOK.COM>
Thanks for your info. Some more quick questions:


On 6/1/2026 10:22 AM, Michael Orlitzky wrote:
> On 2026-06-01 08:31:21, Chen Wang wrote:
>> Changes related to DMA can be referred to at
>> https://lore.kernel.org/linux-riscv/[email protected]/
>>
>> Hi Michael,
>>
>> please confirm whether you have updated the firmware mentioned in the
>> patch email. If there are still issues after updating the firmware, this
>> patch may need to be reassessed.
> Yes, I have git checkouts of
>
>    * edk2-non-osi.git
>    * edk2-platforms.git
>    * edk2.git
>    * opensbi.git
>    * zsbl.git
>
> from github.com/sophgo and am using the sg2042-dev branch where
> applicable. The problem occurs with fip.bin from,
>
>    commit b379b0674328be40c9811032193014195944c664
>    Author: Chao Wei <[email protected]>
>    Date:   Mon Mar 30 21:27:39 2026 +0800
>
>      SG2042/Boot: Update fip.bin
>
>      SG2042: Disable PCIe write reorder on single chip
>
> which is one commit ahead of the one linked by Han Gao. All other
> firmware components are at their most recent commits.
>
> The SATA drives had been working for over a year without issue. The
> first occurrence of the problem in my kernel logs is immediately after
> a kernel/firmware update, so to confirm, I looked through the git logs
> and reverted each firmware component to an earlier commit:
>
>    * SRA1-20.fd (20251209)
>    * fip.bin (20251209, from the bootloader-riscv repo)
>    * fw_dynamic.bin (20251106)
>    * zsbl.bin (20251215)
>    * mango-milkv-pioneer.dtb (20251215)

Are these firmware components correspond to the https://github.com/sophgo/edk2-non-osi/commit/017a5aea26a066fd2bf501b7893937183165af36?

>
> and of course, I reverted the kernel patch that adds dma-coherent to
> the dts, and replaced sg2042-milkv-pioneer.dtb.
Just want to double-confirm if we use 
https://github.com/sophgo/edk2-non-osi/commit/017a5aea26a066fd2bf501b7893937183165af36 
plus the dts dma-coherenet patch, how the SATA works?
>
> This seems to fix the problem: I mounted and unmounted, copied to and
> from, both partions for a few minutes without error. (I get an
> unrelated kernel panic in amdgpu_irq.c with this firmware/kernel, but
> was able to test over SSH after removing the GPU).

Thanks,

Chen