Re: SG2042 SATA (DMA?) issues

Michael Orlitzky <[email protected]> Sun, 31 May 2026 22:22:40 -0400
Newsgroups dev.linux.lists.sophgo
Message-ID <ahzs8MSmNU7_vsIT@mertle>
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)

and of course, I reverted the kernel patch that adds dma-coherent to
the dts, and replaced sg2042-milkv-pioneer.dtb.

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).