From: Andrei Leonvikov <andreil499@gmail.com>
To: bhelgaas@google.com
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Andrei Leonchikov <andreil499@gmail.com>
Subject: [PATCH 1/1] Fix ARI enabling for a NVME devices
Date: Tue, 3 Sep 2019 12:53:15 +0000 [thread overview]
Message-ID: <20190903125315.10349-1-andreil499@gmail.com> (raw)
From: Andrei Leonchikov <andreil499@gmail.com>
Signed-off-by: Andrei Leonchikov <andreil499@gmail.com>
---
drivers/pci/pci.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 1b27b5af3..ed5f0888c 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -3149,9 +3149,12 @@ void pci_configure_ari(struct pci_dev *dev)
if (!bridge)
return;
- pcie_capability_read_dword(bridge, PCI_EXP_DEVCAP2, &cap);
- if (!(cap & PCI_EXP_DEVCAP2_ARI))
- return;
+ if ((dev->driver != NULL) && (strncmp(dev->driver->name, "nvme", 4) == 0)) {
+ // for NVME device this field always zero, but ARI can be enabled
+ pcie_capability_read_dword(bridge, PCI_EXP_DEVCAP2, &cap);
+ if (!(cap & PCI_EXP_DEVCAP2_ARI))
+ return;
+ }
if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ARI)) {
pcie_capability_set_word(bridge, PCI_EXP_DEVCTL2,
--
2.21.0
next reply other threads:[~2019-09-03 12:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-03 12:53 Andrei Leonvikov [this message]
2019-09-03 13:14 ` Christoph Hellwig
[not found] ` <CA+kE0xQ+z4f8xQ=8oRVcTMC-VsU5dyqVUWxuDamTy59_HTYOeg@mail.gmail.com>
2019-09-03 16:33 ` Christoph Hellwig
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=20190903125315.10349-1-andreil499@gmail.com \
--to=andreil499@gmail.com \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/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
Powered by JetHome