summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorIra Weiny2016-07-28 03:09:40 +0200
committerDoug Ledford2016-08-03 04:46:21 +0200
commitfc0b76c0168dc7577792c371c16bad200009a62d (patch)
treec53540219946e33bc6f429a9d7ecebfbadef960c /drivers/infiniband
parentIB/hfi1: Allow for non-double word multiple message sizes for user SDMA (diff)
downloadkernel-qcow2-linux-fc0b76c0168dc7577792c371c16bad200009a62d.tar.gz
kernel-qcow2-linux-fc0b76c0168dc7577792c371c16bad200009a62d.tar.xz
kernel-qcow2-linux-fc0b76c0168dc7577792c371c16bad200009a62d.zip
IB/hfi1: Expand reported serial number
Expand the serial number space by using more bits from the GUID. Reviewed-by: Jubin John <jubin.john@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/hfi1/chip.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hfi1/chip.c b/drivers/infiniband/hw/hfi1/chip.c
index becc7b11e31e..c93683496614 100644
--- a/drivers/infiniband/hw/hfi1/chip.c
+++ b/drivers/infiniband/hw/hfi1/chip.c
@@ -14601,8 +14601,14 @@ struct hfi1_devdata *hfi1_init_dd(struct pci_dev *pdev,
/* set up LCB access - must be after set_up_interrupts() */
init_lcb_access(dd);
+ /*
+ * Serial number is created from the base guid:
+ * [27:24] = base guid [38:35]
+ * [23: 0] = base guid [23: 0]
+ */
snprintf(dd->serial, SERIAL_MAX, "0x%08llx\n",
- dd->base_guid & 0xFFFFFF);
+ (dd->base_guid & 0xFFFFFF) |
+ ((dd->base_guid >> 11) & 0xF000000));
dd->oui1 = dd->base_guid >> 56 & 0xFF;
dd->oui2 = dd->base_guid >> 48 & 0xFF;