Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2219481/?format=api
{ "id": 2219481, "url": "http://patchwork.ozlabs.org/api/patches/2219481/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ide/patch/20260403050418.50398-1-artmoty@gmail.com/", "project": { "id": 13, "url": "http://patchwork.ozlabs.org/api/projects/13/?format=api", "name": "Linux IDE development", "link_name": "linux-ide", "list_id": "linux-ide.vger.kernel.org", "list_email": "linux-ide@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260403050418.50398-1-artmoty@gmail.com>", "list_archive_url": null, "date": "2026-04-03T05:04:18", "name": "ahci: force 32-bit DMA for JMicron JMB582/JMB585", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "9e929d63eafcbf530a527b590e0702157bf4e336", "submitter": { "id": 93046, "url": "http://patchwork.ozlabs.org/api/people/93046/?format=api", "name": "Arthur Husband", "email": "artmoty@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-ide/patch/20260403050418.50398-1-artmoty@gmail.com/mbox/", "series": [ { "id": 498588, "url": "http://patchwork.ozlabs.org/api/series/498588/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-ide/list/?series=498588", "date": "2026-04-03T05:04:18", "name": "ahci: force 32-bit DMA for JMicron JMB582/JMB585", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/498588/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2219481/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2219481/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-ide+bounces-5435-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-ide@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=bJtG3OfE;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-ide+bounces-5435-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=\"bJtG3OfE\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=209.85.214.171", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=gmail.com" ], "Received": [ "from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fn68W2rCvz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 16:04:27 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 9AFC13011C74\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 3 Apr 2026 05:04:24 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id C53121EE03D;\n\tFri, 3 Apr 2026 05:04:23 +0000 (UTC)", "from mail-pl1-f171.google.com (mail-pl1-f171.google.com\n [209.85.214.171])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 8230F1A23A6\n\tfor <linux-ide@vger.kernel.org>; Fri, 3 Apr 2026 05:04:22 +0000 (UTC)", "by mail-pl1-f171.google.com with SMTP id\n d9443c01a7336-2a8fba3f769so6320985ad.2\n for <linux-ide@vger.kernel.org>; Thu, 02 Apr 2026 22:04:22 -0700 (PDT)", "from fedora.mshome.net ([162.247.45.147])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b27473583dsm44498175ad.9.2026.04.02.22.04.21\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 02 Apr 2026 22:04:21 -0700 (PDT)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775192663; cv=none;\n b=Q3VqfwjGYLm5QQvV16ZsOscpMuo+KdIKwLdOizTnXBllH1qV7IPalM/0krI1u52r/4qTATchMZn+85SH0Yz/FEgPTzv+IKCvSsBehHQZmzy8WiVujqa+RsfbynuFqF/ZzE62mbNVTB1ihAYyrQTnIlmiGrW4Ctit9Jc3W9HTGf4=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775192663; c=relaxed/simple;\n\tbh=/J8Dk+15CoPVwvQ5zpJCvKyzltAy68rBMdxiNp3NfdY=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type;\n b=kl2/dPkmeu3Ail3UEgHI9W1lh6UE3/zyfucjZL4fdgIGvYzfszXh9X2b1rrdHzZpGUcfezmGkKWOdS/BcIMP8+Bivfdci4BHdQqiVmnhwq2pxCSuJEUjOOXP5N8IkbXUiwrOA/nnV7AGW2ASGA0GRFONuCKCio9e+dI507Jzq8w=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com;\n spf=pass smtp.mailfrom=gmail.com;\n dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com\n header.b=bJtG3OfE; arc=none smtp.client-ip=209.85.214.171", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1775192662; x=1775797462;\n darn=vger.kernel.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=cKILOFg9YAfsEbzFmLOhd2asEpRl6q3Ra+XKpwUTfXU=;\n b=bJtG3OfEoD3QY3Ztk8eBma0XclODpwShjxXi+vn6uHqdw2kEzxf+LK+QAroCre3v2A\n CXX7FB7gkANJitvJuY+eQujbSUe2Bv20lzNn9Q7yDITnvwGhx5xJk/TAESadOsE4MpcA\n oY6oijeZo8RTWIvXxrDdRFHrkaCdd2J5VEhX/791lzC1ypwNM/oWXqG1nWUWDpxiiNTZ\n 3bzgTmc7JLyz3ACpt6jRqNR42Fag7UdpJ+mDsnZneoGtl9K+Dz7aJj7KWdiOOQiUp4CH\n aDuyXnL5zBl5AthOA4Orn0/yBWoPv1mCs5coFfY95TBnh9ftPlvGdRh293LZnC/Vn+/o\n GZ2A==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775192662; x=1775797462;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=cKILOFg9YAfsEbzFmLOhd2asEpRl6q3Ra+XKpwUTfXU=;\n b=DowjQkEYvTxh74rXQzdgkEnH37SWVcSJ9WsDSi9dWkDv1r7dKp/BhEWZZ/bvC6EnF6\n g2tbe/FVDXI6/7uhlRmu9ECeZDCEEoy52+BO5qgu9m8ZSqdPacj8Z1rWquvkMrWlhLUt\n uyOzNFPIAqTPOe2Nopq9LnXXGmH+6XOC1CV3k/HM9mcau6HbwdiWXjZw5j97ymu77fDO\n S0EdahCRa1f6g+8wFcD2yeqszNc9/W2Kv3e/tFUTgBeSfTflRfFgjL2lhA1QrLa0cT4C\n 1jVXbsdx7oZyli1VaeOYnnCOoslBBPWr89EQq2dBaen2HJOSnPsfcAjD6cAhx8f+AEA+\n GHCA==", "X-Gm-Message-State": "AOJu0YxRyxqUq5V4hkpkyk5ieOFlHcN4iuCxNrj7HG2pouP9+IvZ5m4S\n\tIcHIxb4GK7k0BdGNnDwvz1T+hEwQVxl4lmnoArprG4PLR3ni0wmdcK+xHSFq0JeIWBE=", "X-Gm-Gg": "AeBDies1tEHQpNR7KENSljagDyYMQokOxCRXSGE7M/fZO2DdkgT0wBcj/9msDmAIvgZ\n\tptdAxfl1vpPpKfxSAJssLaN/7cRtYaCIoP2L9QqgsQ2mKbEKejkumELSSXXczyIXGSjw+s+J0sF\n\t1Mo2Uza2h4D/pGv0cs3dFs/IRChn3pn68SrB9LJ3Idtm/HTvLqLhN3P6PFHyHCbeZ8FD/BhBka5\n\t2iY/43qVKabu0diT5aZpzJu927eGqsPwoOEp5UD89yA6J7tQIzACAoSEOFhgOahKH1GbVCVpz7j\n\tap/c/xuPTdvFLxEXQ371AAZElZmOQY+cEbM8y7+p/PSDftOQrrF2hi6m01rtWXY3s7l9dxQneqg\n\tToIZVz8kg+HzjMeMwBXgtvRGfhMsjcpKNGHhKUA4Z6+eJCL1FCHy5IuD2kzwu2VSnIG3eLDU5xL\n\t7UQ+lnh5CSCmNZvDXSRpb75wicdjhD6oXfwNy4LA==", "X-Received": "by 2002:a17:902:f548:b0:2b2:6b58:930c with SMTP id\n d9443c01a7336-2b28171632bmr21104505ad.9.1775192661686;\n Thu, 02 Apr 2026 22:04:21 -0700 (PDT)", "From": "Arthur Husband <artmoty@gmail.com>", "To": "linux-ide@vger.kernel.org", "Cc": "dlemoal@kernel.org,\n\tcassel@kernel.org,\n\tartmoty@gmail.com", "Subject": "[PATCH] ahci: force 32-bit DMA for JMicron JMB582/JMB585", "Date": "Thu, 2 Apr 2026 22:04:18 -0700", "Message-ID": "<20260403050418.50398-1-artmoty@gmail.com>", "X-Mailer": "git-send-email 2.53.0", "Precedence": "bulk", "X-Mailing-List": "linux-ide@vger.kernel.org", "List-Id": "<linux-ide.vger.kernel.org>", "List-Subscribe": "<mailto:linux-ide+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-ide+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit" }, "content": "The JMicron JMB585 (and JMB582) SATA controllers advertise 64-bit DMA\nsupport via the S64A bit in the AHCI CAP register, but their 64-bit DMA\nimplementation is defective. Under sustained I/O, DMA transfers targeting\naddresses above 4GB silently corrupt data — writes land at incorrect\nmemory addresses with no errors logged.\n\nThis has been confirmed on multiple platforms (Minisforum N5 Pro,\nRaspberry Pi, Unraid, Proxmox, TrueNAS) and is consistent with the\ncontroller truncating or mishandling upper address bits during 64-bit\nDMA transactions.\n\nThe failure pattern is identical to the ASMedia ASM1062 (commit\nedb96a15dc18), which also falsely advertised 64-bit DMA and was fixed\nwith AHCI_HFLAG_32BIT_ONLY.\n\nOn the Minisforum N5 Pro specifically, the combination of the JMB585's\nbroken 64-bit DMA with the AMD Family 1Ah (Strix Point) IOMMU causes\nsilent data corruption that is only detectable via checksumming\nfilesystems (BTRFS/ZFS scrub). The corruption occurs when 32-bit IOVA\nspace is exhausted and the kernel transparently switches to 64-bit DMA\naddresses.\n\nAdd device-specific PCI ID entries for the JMB582 (0x0582) and JMB585\n(0x0585) before the generic JMicron class match, using a new board type\nthat combines AHCI_HFLAG_IGN_IRQ_IF_ERR (preserving existing behavior)\nwith AHCI_HFLAG_32BIT_ONLY to force 32-bit DMA masks.\n\nInvestigation and patch development assisted by Claude (Anthropic AI).\n\nSigned-off-by: Arthur Husband <artmoty@gmail.com>\n---\n drivers/ata/ahci.c | 16 +++++++++++++++-\n 1 file changed, 15 insertions(+), 1 deletion(-)\n\n@@ -XXX,7 +XXX,12 @@ static const struct pci_device_id ahci_pci_tbl[] = {\n \t...\n\n-\t/* JMicron 360/1/3/5/6, match class to avoid IDE function */\n+\t/* JMicron JMB582/585: force 32-bit DMA (broken 64-bit implementation) */\n+\t{ PCI_VDEVICE(JMICRON, 0x0582), board_ahci_jmb585 },\n+\t{ PCI_VDEVICE(JMICRON, 0x0585), board_ahci_jmb585 },\n+\n+\t/* JMicron 360/1/3/5/6, match class to avoid IDE function */\n \t{ PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,\n \t PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci_ign_iferr },\n\n--", "diff": "diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c\nindex XXXXXXX..XXXXXXX 100644\n--- a/drivers/ata/ahci.c\n+++ b/drivers/ata/ahci.c\n@@ -51,6 +51,7 @@ enum board_ids {\n \tboard_ahci,\n \tboard_ahci_43bit_dma,\n \tboard_ahci_ign_iferr,\n+\tboard_ahci_jmb585,\n \tboard_ahci_no_debounce_delay,\n \tboard_ahci_no_msi,\n \t/*\n@@ -115,6 +116,14 @@ static const struct ata_port_info ahci_port_info[] = {\n \t\t.udma_mask\t= ATA_UDMA6,\n \t\t.port_ops\t= &ahci_ops,\n \t},\n+\t/* JMicron JMB582/585: 64-bit DMA is broken, force 32-bit */\n+\t[board_ahci_jmb585] = {\n+\t\tAHCI_HFLAGS\t(AHCI_HFLAG_IGN_IRQ_IF_ERR |\n+\t\t\t\t AHCI_HFLAG_32BIT_ONLY),\n+\t\t.flags\t\t= AHCI_FLAG_COMMON,\n+\t\t.pio_mask\t= ATA_PIO4,\n+\t\t.udma_mask\t= ATA_UDMA6,\n+\t\t.port_ops\t= &ahci_ops,\n+\t},\n \t[board_ahci_no_debounce_delay] = {\n \t\t.flags\t\t= AHCI_FLAG_COMMON,\n \t\t.link_flags\t= ATA_LFLAG_NO_DEBOUNCE_DELAY,\n", "prefixes": [] }