aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qedr/main.c
diff options
context:
space:
mode:
authorDoug Ledford <dledford@redhat.com>2019-07-29 13:38:42 -0400
committerDoug Ledford <dledford@redhat.com>2019-07-29 13:38:42 -0400
commit525a2c651cdd08b19a4c04f63b87e460765220ac (patch)
treead65ead1b0a281be08e5c47e2a7eb911dd0d2a9b /drivers/infiniband/hw/qedr/main.c
parentIB/mlx5: Support per device q counters in switchdev mode (diff)
parentDo not dereference 'siw_crypto_shash' before checking (diff)
downloadlinux-dev-525a2c651cdd08b19a4c04f63b87e460765220ac.tar.xz
linux-dev-525a2c651cdd08b19a4c04f63b87e460765220ac.zip
Merge branch 'wip/dl-for-rc' into wip/dl-for-next
The fix for IB port statistics initialization ("IB/core: Fix querying total rdma stats") is needed before we take a follow-on patch to for-next. Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/qedr/main.c')
-rw-r--r--drivers/infiniband/hw/qedr/main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qedr/main.c b/drivers/infiniband/hw/qedr/main.c
index ca5f6f65c929..5136b835e1ba 100644
--- a/drivers/infiniband/hw/qedr/main.c
+++ b/drivers/infiniband/hw/qedr/main.c
@@ -125,14 +125,20 @@ static ssize_t hw_rev_show(struct device *device, struct device_attribute *attr,
struct qedr_dev *dev =
rdma_device_to_drv_device(device, struct qedr_dev, ibdev);
- return scnprintf(buf, PAGE_SIZE, "0x%x\n", dev->pdev->vendor);
+ return scnprintf(buf, PAGE_SIZE, "0x%x\n", dev->attr.hw_ver);
}
static DEVICE_ATTR_RO(hw_rev);
static ssize_t hca_type_show(struct device *device,
struct device_attribute *attr, char *buf)
{
- return scnprintf(buf, PAGE_SIZE, "%s\n", "HCA_TYPE_TO_SET");
+ struct qedr_dev *dev =
+ rdma_device_to_drv_device(device, struct qedr_dev, ibdev);
+
+ return scnprintf(buf, PAGE_SIZE, "FastLinQ QL%x %s\n",
+ dev->pdev->device,
+ rdma_protocol_iwarp(&dev->ibdev, 1) ?
+ "iWARP" : "RoCE");
}
static DEVICE_ATTR_RO(hca_type);