summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVennila Megavannan <vennila.megavannan@intel.com>2015-11-07 01:06:58 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-11-16 04:02:47 (GMT)
commitbf70a77577361c334367a2a2add9d92b716a2481 (patch)
tree6958bc0307e6d3ea7c02c10c0e9fbb8e6ba23877 /drivers
parent72a67ba2fa69737757c637ac541a4f0271efb41d (diff)
downloadlinux-bf70a77577361c334367a2a2add9d92b716a2481.tar.xz
staging/rdma/hfi1: Enable WFR PCIe extended tags from the driver
Some BIOS implementations turn off extended tags in DevCtl (a RW field) even though it was originally set and is advertised in DevCap Fix is to set it in the driver Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Vennila Megavannan <vennila.megavannan@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/rdma/hfi1/pcie.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/pcie.c b/drivers/staging/rdma/hfi1/pcie.c
index f531d0f..7fcf089 100644
--- a/drivers/staging/rdma/hfi1/pcie.c
+++ b/drivers/staging/rdma/hfi1/pcie.c
@@ -467,8 +467,18 @@ static void tune_pcie_caps(struct hfi1_devdata *dd)
{
struct pci_dev *parent;
u16 rc_mpss, rc_mps, ep_mpss, ep_mps;
- u16 rc_mrrs, ep_mrrs, max_mrrs;
+ u16 rc_mrrs, ep_mrrs, max_mrrs, ectl;
+ /*
+ * Turn on extended tags in DevCtl in case the BIOS has turned it off
+ * to improve WFR SDMA bandwidth
+ */
+ pcie_capability_read_word(dd->pcidev, PCI_EXP_DEVCTL, &ectl);
+ if (!(ectl & PCI_EXP_DEVCTL_EXT_TAG)) {
+ dd_dev_info(dd, "Enabling PCIe extended tags\n");
+ ectl |= PCI_EXP_DEVCTL_EXT_TAG;
+ pcie_capability_write_word(dd->pcidev, PCI_EXP_DEVCTL, ectl);
+ }
/* Find out supported and configured values for parent (root) */
parent = dd->pcidev->bus->self;
if (!pci_is_root_bus(parent->bus)) {