All of lore.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Feng Tang <feng.tang@linux.alibaba.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Anju Zheng <zaj01616726@alibaba-inc.com>
Subject: Re: [PATCH RFC] PCI: Add warning about possible danger for pcie_bus_perf mode
Date: Fri, 27 Nov 2026 14:29:07 +0100	[thread overview]
Message-ID: <awmFo6EvAqQB6tp_@ryzen> (raw)
In-Reply-To: <awmEjs8VnJO5XIXd@U-2FWC9VHC-2323.local>

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

  reply	other threads:[~2026-11-27 13:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 15:58 [PATCH RFC] PCI: Add warning about possible danger for pcie_bus_perf mode Feng Tang
2026-11-25 16:04 ` sashiko-bot
2026-11-26  8:37 ` Christoph Hellwig
2026-11-26  9:48   ` Feng Tang
2026-11-27 13:24   ` Feng Tang
2026-11-27 13:29     ` Niklas Cassel [this message]
2026-11-27 13:34     ` sashiko-bot
2026-11-26  8:39 ` Niklas Cassel
2026-11-26 11:03   ` Feng Tang
2026-11-26 11:56     ` Niklas Cassel
2026-12-01 14:17   ` Feng Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=awmFo6EvAqQB6tp_@ryzen \
    --to=cassel@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=feng.tang@linux.alibaba.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=zaj01616726@alibaba-inc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.