linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] PCI: Call MPS fixup quirks early
@ 2021-06-24 17:14 Marek Behún
  2021-06-24 17:14 ` [PATCH 2/2] PCI: Add Max Payload Size quirk for ASMedia ASM1062 SATA controller Marek Behún
  2021-07-01 15:25 ` [PATCH 1/2] PCI: Call MPS fixup quirks early Bjorn Helgaas
  0 siblings, 2 replies; 9+ messages in thread
From: Marek Behún @ 2021-06-24 17:14 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas
  Cc: Pali Rohár, Rötti, Zachary Zhang, Marek Behún, stable

The pci_device_add() function calls header fixups only after
pci_configure_device(), which configures MPS.

So in order to have MPS fixups working, they need to be called early.

Signed-off-by: Marek Behún <kabel@kernel.org>
Fixes: 27d868b5e6cfa ("PCI: Set MPS to match upstream bridge")
Cc: stable@vger.kernel.org
---
 drivers/pci/quirks.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 22b2bb1109c9..4d9b9d8fbc43 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3233,12 +3233,12 @@ static void fixup_mpss_256(struct pci_dev *dev)
 {
 	dev->pcie_mpss = 1; /* 256 bytes */
 }
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOLARFLARE,
-			 PCI_DEVICE_ID_SOLARFLARE_SFC4000A_0, fixup_mpss_256);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOLARFLARE,
-			 PCI_DEVICE_ID_SOLARFLARE_SFC4000A_1, fixup_mpss_256);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_SOLARFLARE,
-			 PCI_DEVICE_ID_SOLARFLARE_SFC4000B, fixup_mpss_256);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SOLARFLARE,
+			PCI_DEVICE_ID_SOLARFLARE_SFC4000A_0, fixup_mpss_256);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SOLARFLARE,
+			PCI_DEVICE_ID_SOLARFLARE_SFC4000A_1, fixup_mpss_256);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SOLARFLARE,
+			PCI_DEVICE_ID_SOLARFLARE_SFC4000B, fixup_mpss_256);
 
 /*
  * Intel 5000 and 5100 Memory controllers have an erratum with read completion
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-07-26 21:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 17:14 [PATCH 1/2] PCI: Call MPS fixup quirks early Marek Behún
2021-06-24 17:14 ` [PATCH 2/2] PCI: Add Max Payload Size quirk for ASMedia ASM1062 SATA controller Marek Behún
2021-07-24 11:14   ` Pali Rohár
2021-07-26 17:24   ` Bjorn Helgaas
2021-07-26 21:13     ` Pali Rohár
2021-07-01 15:25 ` [PATCH 1/2] PCI: Call MPS fixup quirks early Bjorn Helgaas
2021-07-02 15:39   ` Ben Hutchings
2021-07-02 16:24     ` Bjorn Helgaas
2021-07-02 21:53       ` Ben Hutchings

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).