Re: [PATCH RFC] PCI: Add warning about possible danger for pcie_bus_perf mode
From: Niklas Cassel
Date: Fri Nov 27 2026 - 08:29:19 EST
On Fri, Nov 27, 2026 at 09:24:30PM +0800, Feng Tang wrote:
> @@ -6423,3 +6423,24 @@ static void pci_mask_replay_timer_timeout(struct pci_dev *pdev)
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_GLI, 0x9750, pci_mask_replay_timer_timeout);
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_GLI, 0x9755, pci_mask_replay_timer_timeout);
> #endif
> +
> +/*
> + * Some commercial NVMe controllers do not honor their Max_Read_Request_Size:
> + * they issue Memory Read Requests larger than the MRRS the kernel programmed
> + * (under pci=pcie_bus_perf the kernel sets MRRS == MPS). In PERFORMANCE mode
> + * the upstream Root Port may be left with a larger MPS than the device, so it
> + * may reply CplD packets with length larger than the device's MPS. The device
> + * then reports them as Malformed TLPs, raising PCIe RAS error or Machine Check
> + * Error(for x86).
> + *
> + * Flag such devices so that later on pcie_write_mps() can force the corresponding
> + * root port's MPS down to match the device, keeping CplD packet length within
> + * the device's MPS.
> + *
> + * This only affects PCIE_BUS_PERFORMANCE mode.
> + */
> +static void quirk_broken_mrrs(struct pci_dev *dev)
> +{
> + dev->broken_mrrs = 1;
> +}
> +DECLARE_PCI_FIXUP_HEADER(0x144d, 0xa80a, quirk_broken_mrrs);
Please use PCI_VENDOR_ID_SAMSUNG instead of magic value 0x144d.
Kind regards,
Niklas