Skip to contentSkip to conversation

PCI: Add function 1 DMA alias quirk for Toshiba AHCI SSD controller

PATCH New Michael Stolovitzsky 2 participants 2 messages Sep 29 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: Add function 1 DMA alias quirk for Toshiba AHCI SSD controller

The Toshiba AHCI SATA controller [1179:010b] (subsystem [1b4b:9183]) used in 11-inch MacBook Air models (MacBookAir6,1 and MacBookAir7,1) issues DMA with the requester ID of function 1, which does not exist. With the Intel IOMMU enabled (intel_iommu=on, or CONFIG_INTEL_IOMMU_DEFAULT_ON=y), these DMA writes are blocked, IDENTIFY fails and the internal disk never appears:

DMAR: [DMA Write NO_PASID] Request device [0000:04:00.1] fault addr 0xfffe0000 [fault reason 0x02] Present bit in context entry is clear ata1.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x80)

Add the controller to the quirk_dma_func1_alias() list. With it, the SSD is identified and the system boots with the IOMMU enabled.

---
Tested on a MacBookAir6,1 (7.2.5-based kernel, intel_iommu=on); build-tested on v7.3-rc5.

As far as I can tell, 1179:010b is specific to the Toshiba SSDs Apple shipped in the 11-inch MacBook Air: pci.ids has no entry for it, and every linux-hardware.org probe carrying it is a MacBookAir6,1 or 7,1.

 drivers/pci/quirks.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/pci/quirks.c +3 -0
index de9bbccda..9d2ca995b 100644
@@ -4366,6 +4366,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_JMICRON,
 DECLARE_PCI_FIXUP_HEADER(0x1c28, /* Lite-On */
 			 0x0122, /* Plextor M6E (Marvell 88SS9183)*/
 			 quirk_dma_func1_alias);
+/* Toshiba AHCI SSD controller in MacBookAir6,1 and MacBookAir7,1 */
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_TOSHIBA, 0x010b,
+			 quirk_dma_func1_alias);
 
 /*
  * Some devices DMA with the wrong devfn, not just the wrong function.

base-commit: 72d3fcf802c45d00b300f25b848a93c3a2bd7c7e

Signature · 1 line
2.55.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 10 lines

The Toshiba AHCI SATA controller [1179:010b] (subsystem [1b4b:9183]) used in 11-inch MacBook Air models (MacBookAir6,1 and MacBookAir7,1) issues DMA with the requester ID of function 1, which does not exist. With the Intel IOMMU enabled (intel_iommu=on, or CONFIG_INTEL_IOMMU_DEFAULT_ON=y), these DMA writes are blocked, IDENTIFY fails and the internal disk never appears:

DMAR: [DMA Write NO_PASID] Request device [0000:04:00.1] fault addr 0xfffe0000 [fault reason 0x02] Present bit in context entry is clear ata1.00: failed to IDENTIFY (INIT_DEV_PARAMS failed, err_mask=0x80)

Quoted 8 lines

Add the controller to the quirk_dma_func1_alias() list. With it, the SSD is identified and the system boots with the IOMMU enabled.

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1