[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190903125315.10349-1-andreil499@gmail.com>
Date: Tue, 3 Sep 2019 12:53:15 +0000
From: Andrei Leonvikov <andreil499@...il.com>
To: bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
Andrei Leonchikov <andreil499@...il.com>
Subject: [PATCH 1/1] Fix ARI enabling for a NVME devices
From: Andrei Leonchikov <andreil499@...il.com>
Signed-off-by: Andrei Leonchikov <andreil499@...il.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
Powered by blists - more mailing lists