linux/drivers/ata
Arthur Husband 105c42566a ata: ahci: force 32-bit DMA for JMicron JMB582/JMB585
The JMicron JMB585 (and JMB582) SATA controllers advertise 64-bit DMA
support via the S64A bit in the AHCI CAP register, but their 64-bit DMA
implementation is defective. Under sustained I/O, DMA transfers targeting
addresses above 4GB silently corrupt data -- writes land at incorrect
memory addresses with no errors logged.

The failure pattern is similar to the ASMedia ASM1061
(commit 20730e9b27 ("ahci: add 43-bit DMA address quirk for ASMedia
ASM1061 controllers")), which also falsely advertised full 64-bit DMA
support. However, the JMB585 requires a stricter 32-bit DMA mask rather
than 43-bit, as corruption occurs with any address above 4GB.

On the Minisforum N5 Pro specifically, the combination of the JMB585's
broken 64-bit DMA with the AMD Family 1Ah (Strix Point) IOMMU causes
silent data corruption that is only detectable via checksumming
filesystems (BTRFS/ZFS scrub). The corruption occurs when 32-bit IOVA
space is exhausted and the kernel transparently switches to 64-bit DMA
addresses.

Add device-specific PCI ID entries for the JMB582 (0x0582) and JMB585
(0x0585) before the generic JMicron class match, using a new board type
that combines AHCI_HFLAG_IGN_IRQ_IF_ERR (preserving existing behavior)
with AHCI_HFLAG_32BIT_ONLY to force 32-bit DMA masks.

Signed-off-by: Arthur Husband <artmoty@gmail.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
2026-04-07 09:36:46 +02:00
..
pata_parport Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Kconfig ata: pata_legacy: remove VLB support 2026-02-02 13:47:37 +09:00
Makefile
acard-ahci.c
ahci.c ata: ahci: force 32-bit DMA for JMicron JMB582/JMB585 2026-04-07 09:36:46 +02:00
ahci.h ata: ahci: Allow ignoring the external/hotplug capability of ports 2025-08-26 07:44:32 +09:00
ahci_brcm.c
ahci_ceva.c
ahci_da850.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
ahci_dm816.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
ahci_dwc.c ata: ahci-dwc: Simplify with scoped for each OF child loop 2026-01-08 17:42:56 +09:00
ahci_imx.c ata: ahci-imx: Fix Wvoid-pointer-to-enum-cast warning 2026-01-08 17:43:00 +09:00
ahci_mtk.c
ahci_mvebu.c
ahci_octeon.c
ahci_platform.c
ahci_qoriq.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
ahci_seattle.c
ahci_st.c
ahci_sunxi.c
ahci_tegra.c
ahci_xgene.c ata: ahci-xgene: Fix Wvoid-pointer-to-enum-cast warning 2026-01-08 17:43:04 +09:00
ata_generic.c
ata_piix.c ata: libata-sata: Add link_power_management_supported sysfs attribute 2025-07-31 12:56:21 +09:00
libahci.c ata: libata-sata: Add link_power_management_supported sysfs attribute 2025-07-31 12:56:21 +09:00
libahci_platform.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
libata-acpi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
libata-core.c ata: libata-core: disable LPM on ADATA SU680 SSD 2026-03-16 09:05:18 +01:00
libata-eh.c ata: libata-eh: Fix detection of deferred qc timeouts 2026-03-06 09:58:47 +01:00
libata-pata-timings.c
libata-pmp.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
libata-sata.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
libata-scsi.c ata: libata-scsi: report correct sense field pointer in ata_scsiop_maint_in() 2026-03-20 09:59:30 +01:00
libata-sff.c ata: libata-sff: add WQ_PERCPU to alloc_workqueue users 2025-11-07 09:42:36 +01:00
libata-trace.c
libata-transport.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
libata-transport.h
libata-zpodd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
libata.h ATA changes for 6.20 2026-02-12 17:12:43 -08:00
pata_acpi.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_ali.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_amd.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_arasan_cf.c
pata_artop.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_atiixp.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_atp867x.c
pata_buddha.c
pata_cmd64x.c
pata_cmd640.c
pata_cs5520.c
pata_cs5530.c
pata_cs5535.c
pata_cs5536.c ata: pata_cs5536: fix build on 32-bit UML 2025-06-10 14:26:27 +02:00
pata_cypress.c ata: pata_cypress: fix typo in error message 2026-02-02 13:47:40 +09:00
pata_efar.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_ep93xx.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_falcon.c
pata_ftide010.c ata: pata_ftide010: Fix some DMA timings 2026-02-04 12:23:23 +01:00
pata_gayle.c
pata_hpt3x2n.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_hpt3x3.c
pata_hpt37x.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_hpt366.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_icside.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_imx.c
pata_isapnp.c
pata_it821x.c ata: pata_it821x: Replace deprecated strcpy with strscpy in it821x_display_disk 2025-10-23 14:23:40 +02:00
pata_it8213.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_ixp4xx_cf.c
pata_jmicron.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_legacy.c ata: pata_legacy: remove VLB support 2026-02-02 13:47:37 +09:00
pata_macio.c ata: pata_macio: Remove space before newline 2025-08-01 08:43:08 +09:00
pata_marvell.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_mpc52xx.c
pata_mpiix.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_netcell.c
pata_ninja32.c
pata_ns87410.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_ns87415.c
pata_octeon_cf.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_of_platform.c
pata_oldpiix.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_opti.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_optidma.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_pcmcia.c ata: pata_pcmcia: Add Iomega Clik! PCMCIA ATA/ATAPI Adapter 2025-11-18 21:58:41 +01:00
pata_pdc202xx_old.c
pata_pdc2027x.c ata: pata_pdc2027x: Remove space before newline and abbreviations 2025-08-01 08:43:11 +09:00
pata_piccolo.c
pata_platform.c
pata_pxa.c ata: pata_pxa: Fix potential NULL pointer dereference in pxa_ata_probe() 2025-04-08 12:36:03 +09:00
pata_radisys.c
pata_rb532_cf.c
pata_rdc.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_rz1000.c
pata_sc1200.c
pata_sch.c
pata_serverworks.c
pata_sil680.c
pata_sis.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_sl82c105.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_triflex.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pata_via.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
pdc_adma.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_dwc_460ex.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sata_fsl.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
sata_gemini.c
sata_gemini.h
sata_highbank.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_inic162x.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_mv.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_nv.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_promise.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_promise.h
sata_qstor.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_rcar.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_sil.c ata: libata-core: Rename ata_do_set_mode() 2025-07-04 10:36:00 +02:00
sata_sil24.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_sis.c
sata_svw.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_sx4.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_uli.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_via.c ata: libata-eh: Simplify reset operation management 2025-07-16 09:31:43 +02:00
sata_vsc.c
sis.h