Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-03-19 15:25:45 +0100
committerThomas Bogendoerfer <tbogendoerfer@suse.de>2019-03-19 15:25:48 +0100
commit7ae051baa3b841c00c79b735bd7d5366fbdbafcd (patch)
tree9f79ba6b6a1ed998c41e0459f092c571cead889c
parent811c6ce741196352da0eebb2951474e81feba265 (diff)
RDMA/vmw_pvrdma: Support upto 64-bit PFNs (bsc#1127285).
-rw-r--r--patches.drivers/RDMA-vmw_pvrdma-Support-upto-64-bit-PFNs.patch90
-rw-r--r--series.conf1
2 files changed, 91 insertions, 0 deletions
diff --git a/patches.drivers/RDMA-vmw_pvrdma-Support-upto-64-bit-PFNs.patch b/patches.drivers/RDMA-vmw_pvrdma-Support-upto-64-bit-PFNs.patch
new file mode 100644
index 0000000000..f18aedfd6b
--- /dev/null
+++ b/patches.drivers/RDMA-vmw_pvrdma-Support-upto-64-bit-PFNs.patch
@@ -0,0 +1,90 @@
+From: Adit Ranadive <aditr@vmware.com>
+Date: Sat, 26 Jan 2019 05:09:36 +0000
+Subject: RDMA/vmw_pvrdma: Support upto 64-bit PFNs
+Patch-mainline: v5.1-rc1
+Git-commit: 8aa04ad3b39396e315b23448c56d5465200fa777
+References: bsc#1127285
+
+Update the driver to use the new device capability to report 64-bit UAR
+PFNs.
+
+Reviewed-by: Jorgen Hansen <jhansen@vmware.com>
+Signed-off-by: Adit Ranadive <aditr@vmware.com>
+Reviewed-by: Vishnu Dasa <vdasa@vmware.com>
+Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 15 ++++++++++-----
+ drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 6 +++++-
+ drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c | 7 ++++++-
+ 3 files changed, 21 insertions(+), 7 deletions(-)
+
+--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h
++++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h
+@@ -57,7 +57,8 @@
+
+ #define PVRDMA_ROCEV1_VERSION 17
+ #define PVRDMA_ROCEV2_VERSION 18
+-#define PVRDMA_VERSION PVRDMA_ROCEV2_VERSION
++#define PVRDMA_PPN64_VERSION 19
++#define PVRDMA_VERSION PVRDMA_PPN64_VERSION
+
+ #define PVRDMA_BOARD_ID 1
+ #define PVRDMA_REV_ID 1
+@@ -279,8 +280,10 @@ struct pvrdma_device_shared_region {
+ /* W: Async ring page info. */
+ struct pvrdma_ring_page_info cq_ring_pages;
+ /* W: CQ ring page info. */
+- u32 uar_pfn; /* W: UAR pageframe. */
+- u32 pad2; /* Pad to 8-byte align. */
++ union {
++ u32 uar_pfn; /* W: UAR pageframe. */
++ u64 uar_pfn64; /* W: 64-bit UAR page frame. */
++ };
+ struct pvrdma_device_caps caps; /* R: Device capabilities. */
+ };
+
+@@ -411,8 +414,10 @@ struct pvrdma_cmd_query_pkey_resp {
+
+ struct pvrdma_cmd_create_uc {
+ struct pvrdma_cmd_hdr hdr;
+- u32 pfn; /* UAR page frame number */
+- u8 reserved[4];
++ union {
++ u32 pfn; /* UAR page frame number */
++ u64 pfn64; /* 64-bit UAR page frame number */
++ };
+ };
+
+ struct pvrdma_cmd_create_uc_resp {
+--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
++++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c
+@@ -898,7 +898,11 @@ static int pvrdma_pci_probe(struct pci_d
+ PVRDMA_GOS_BITS_64;
+ dev->dsr->gos_info.gos_type = PVRDMA_GOS_TYPE_LINUX;
+ dev->dsr->gos_info.gos_ver = 1;
+- dev->dsr->uar_pfn = dev->driver_uar.pfn;
++
++ if (dev->dsr_version < PVRDMA_PPN64_VERSION)
++ dev->dsr->uar_pfn = dev->driver_uar.pfn;
++ else
++ dev->dsr->uar_pfn64 = dev->driver_uar.pfn;
+
+ /* Command slot. */
+ dev->cmd_slot = dma_alloc_coherent(&pdev->dev, PAGE_SIZE,
+--- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
++++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_verbs.c
+@@ -338,7 +338,12 @@ struct ib_ucontext *pvrdma_alloc_ucontex
+
+ /* get ctx_handle from host */
+ memset(cmd, 0, sizeof(*cmd));
+- cmd->pfn = context->uar.pfn;
++
++ if (vdev->dsr_version < PVRDMA_PPN64_VERSION)
++ cmd->pfn = context->uar.pfn;
++ else
++ cmd->pfn64 = context->uar.pfn;
++
+ cmd->hdr.cmd = PVRDMA_CMD_CREATE_UC;
+ ret = pvrdma_cmd_post(vdev, &req, &rsp, PVRDMA_CMD_CREATE_UC_RESP);
+ if (ret < 0) {
diff --git a/series.conf b/series.conf
index c3bc572e78..cb8eca3c26 100644
--- a/series.conf
+++ b/series.conf
@@ -20858,6 +20858,7 @@
patches.drivers/pci-qcom-don-t-deassert-reset-gpio-during-probe
patches.drivers/PCI-endpoint-functions-Use-memcpy_fromio-memcpy_toio.patch
patches.drivers/IB-core-Destroy-QP-if-XRC-QP-fails.patch
+ patches.drivers/RDMA-vmw_pvrdma-Support-upto-64-bit-PFNs.patch
patches.drivers/IB-core-Unregister-notifier-before-freeing-MAD-secur.patch
patches.drivers/IB-core-Fix-potential-memory-leak-while-creating-MAD.patch
patches.drivers/IB-hfi1-Close-race-condition-on-user-context-disable.patch