From patchwork Thu Jun 24 17:14:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 12342659 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB1DDC49EA6 for ; Thu, 24 Jun 2021 17:14:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D76C9613F0 for ; Thu, 24 Jun 2021 17:14:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232274AbhFXRQn (ORCPT ); Thu, 24 Jun 2021 13:16:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:37290 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230116AbhFXRQn (ORCPT ); Thu, 24 Jun 2021 13:16:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 01497613DC; Thu, 24 Jun 2021 17:14:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624554863; bh=zVx5VItzPLj7HM2YlVcVsl4Odcp6W+sfx757TCcPVvo=; h=From:To:Cc:Subject:Date:From; b=lLVOyh83aDlfzLS35Lp6FTJ9GjwU890OLYt3ugyyuhqJKZOXsZ31j6RbKA/3YzPPZ otQb+zN1LEBQXnNX4zfKiMWvQIYNHSA2KOZsJ3c3cwEZ0tl50Won0eWl/BSJO2xga3 rocixqHPfQU43C/00V3ia+q+lMXNUaqCR3eCvufViJFSJPSzPDlS5BUZNPBopBIODw G9M9o1hS26H5cHfgUbj5mTLGcqGDNa0VFGzLcDWqNd2hiBhqM1eUECmdB+Lh7vcvjF Nv5C/espaC6lGRAb/591DtiFwdoZhs9bKx7k12IcPayOrebldsQbdva8rtmawEEAw9 2eLXEa6BHYQRg== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: linux-pci@vger.kernel.org, Bjorn Helgaas Cc: =?utf-8?q?Pali_Roh=C3=A1r?= , =?utf-8?b?UsO2dHRp?= , Zachary Zhang , =?utf-8?q?Marek_Beh=C3=BAn?= , stable@vger.kernel.org Subject: [PATCH 1/2] PCI: Call MPS fixup quirks early Date: Thu, 24 Jun 2021 19:14:17 +0200 Message-Id: <20210624171418.27194-1-kabel@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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 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