From: Bartosz Pawlowski <bartosz.pawlowski@intel.com>
To: linux-pci@vger.kernel.org, bhelgaas@google.com
Cc: sheenamo@google.com, justai@google.com,
andriy.shevchenko@intel.com, joel.a.gibson@intel.com,
emil.s.tantilov@intel.com, gaurav.s.emmanuel@intel.com,
mike.conover@intel.com, shaopeng.he@intel.com,
anthony.l.nguyen@intel.com, pavan.kumar.linga@intel.com,
Bartosz Pawlowski <bartosz.pawlowski@intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 1/2] PCI: Extract ATS disabling to a helper function
Date: Fri, 8 Sep 2023 14:36:05 +0000 [thread overview]
Message-ID: <20230908143606.685930-2-bartosz.pawlowski@intel.com> (raw)
In-Reply-To: <20230908143606.685930-1-bartosz.pawlowski@intel.com>
Introduce quirk_no_ats() helper function to provide a standard way to
disable ATS capability in PCI quirks.
Signed-off-by: Bartosz Pawlowski <bartosz.pawlowski@intel.com>
Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pci/quirks.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 321156ca273d..a900546d8d45 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -5505,6 +5505,12 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0420, quirk_no_ext_tags);
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);
#ifdef CONFIG_PCI_ATS
+static void quirk_no_ats(struct pci_dev *pdev)
+{
+ pci_info(pdev, "disabling ATS\n");
+ pdev->ats_cap = 0;
+}
+
/*
* Some devices require additional driver setup to enable ATS. Don't use
* ATS for those devices as ATS will be enabled before the driver has had a
@@ -5518,14 +5524,10 @@ static void quirk_amd_harvest_no_ats(struct pci_dev *pdev)
(pdev->subsystem_device == 0xce19 ||
pdev->subsystem_device == 0xcc10 ||
pdev->subsystem_device == 0xcc08))
- goto no_ats;
- else
- return;
+ quirk_no_ats(pdev);
+ } else {
+ quirk_no_ats(pdev);
}
-
-no_ats:
- pci_info(pdev, "disabling ATS\n");
- pdev->ats_cap = 0;
}
/* AMD Stoney platform GPU */
--
2.41.0
next prev parent reply other threads:[~2023-09-08 14:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 14:36 [PATCH v2 0/2] PCI: Disable ATS for specific Intel IPU E2000 devices Bartosz Pawlowski
2023-09-08 14:36 ` Bartosz Pawlowski [this message]
2023-09-08 14:36 ` [PATCH v2 2/2] " Bartosz Pawlowski
2023-10-18 21:15 ` [PATCH v2 0/2] " Bjorn Helgaas
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=20230908143606.685930-2-bartosz.pawlowski@intel.com \
--to=bartosz.pawlowski@intel.com \
--cc=andriy.shevchenko@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=bhelgaas@google.com \
--cc=emil.s.tantilov@intel.com \
--cc=gaurav.s.emmanuel@intel.com \
--cc=joel.a.gibson@intel.com \
--cc=justai@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=mike.conover@intel.com \
--cc=pavan.kumar.linga@intel.com \
--cc=shaopeng.he@intel.com \
--cc=sheenamo@google.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 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).