…refuse a kernel without it (engine#3088)
third_party/patches/linux/0001 adds { PCI_DEVICE(0x1e49, 0x1081), .driver_data =
NVME_QUIRK_DMAPOOL_ALIGN_512 } next to the vendor's two ZHITAI rows, so the drive in the
reference box gets the engine#2478 fix without nvme.quirks= on the command line.
os/v3/puppy/kernel-quirks-check.sh reads a kernel stage's modules.builtin.modinfo /
modules.alias and refuses one whose nvme driver does not list 1e49:1081; mk-huge-kernel.sh
runs it. docs/kernel.md applies the series in the build recipe. tests/kernel_quirks_test.sh
checks the patch text and the check on fixture stages.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
engine#3088 item 1: the 1bit kernel's
nvme_id_tablegets the YMTC PC41Q row, so that drive gets the engine#2478 fix with nonvme.quirks=on the command line. The image also refuses a kernel that lacks the row.What changes
third_party/patches/linux/0001-nvme-pci-add-the-YMTC-PC41Q-dmapool_align_512-quirk.patch:{ PCI_DEVICE(0x1e49, 0x1081), .driver_data = NVME_QUIRK_DMAPOOL_ALIGN_512, }, placed next to the vendor's two ZHITAI rows. It is 2 lines indrivers/nvme/host/pci.c.git apply --checkpasses againstv7.4-rc1(6628e7d4c). README in the same directory.os/v3/puppy/kernel-quirks-check.sh: reads a kernel stage'smodules.builtin.modinfo(nvme built in) ormodules.alias(nvme as a module). It refuses the stage (exit 2) ifnvmedoes not listpci:v00001E49d00001081.mk-huge-kernel.shruns it after the module checks.docs/kernel.md§1: the build recipe now appliesthird_party/patches/linux/*.patch. §8 notes the refusal.tests/kernel_quirks_test.sh(ctestkernel_quirks) runs offline against fixture stages, in 12 rows. It checks the patch text (one file, +2/−0, the right ID and flag) and runs the check script on built-in, modular, missing, wrong-driver and no-tree stages. It goes red if the flag in the patch is changed (checked).Measured (ryzen build, not booted on hardware)
~/wt/k74-puppy/src. The box's/data/1bit/vmlinuz(sha256efc7f085…) with its signature removed bysbattach --removematches that tree's bzImage byte for byte (40d6dba2…).pci.orecompiled).vmlinux'snvme_id_tablenow has the entry0x1e49 0x1081 driver_data 0x400000, which is1<<22,NVME_QUIRK_DMAPOOL_ALIGN_512.modules.builtin.modinfodiffers from the shipped one by exactly one line,nvme.alias=pci:v00001E49d00001081….updates/amdxdna and ec_su_axb35) stays valid.sign-vmlinuz.sh, andsbverify --certpasses. No new key was created. Secure Boot state on the box was not touched.kernel-quirks-check.shrefuses the shipped c26 stage (exit 2) and accepts the new stage.Item 3 (other DRAM-less SSDs), measured on ryzen's Lexar NM990
1d97:1806, fw 641225, kernel 7.0.0-43, IOMMU DMA-FQmax_hw_sectors_kbis 128, so page-aligned I/O tops out at a 31-entry PRP list. A full 32-entry list only happens on a 128 KiBO_DIRECTwrite from a buffer at a sub-page offset. I forced that case: writes from buf+512 with 1, 32 and 256 threads, about 16 GB in total. During the writes abpftraceprobe (fexit:nvme:nvme_pci_setup_data_prp) classified every PRP list, andtracepoint:iommu:io_page_faultwas armed.io_page_faultevents and 0IO_PAGE_FAULTlines in dmesg. On strixhalo the YMTC faulted on 2 of 2 such commands.Refs #3088 (items 1 and 3; nothing is closed until the next image boots with this kernel)
🤖 Generated with Claude Code