Skip to contentSkip to conversation

IB/hfi1: Expand reported serial number

PATCH Applied ira.weiny 2 participants 2 messages Jul 28, 2016 – Aug 3, 2016 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

ira.weiny

author
#0 lore raw

PATCH 1/1 IB/hfi1: Expand reported serial number

Expand the serial number space by using more bits
from the GUID.

---
 drivers/infiniband/hw/hfi1/chip.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/infiniband/hw/hfi1/chip.c +7 -1
index becc7b11e31e..c93683496614 100644
@@ -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;
Signature · 6 lines
1.8.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 20160728010940.GD3158-W4f6Xiosr+yv7QzWx2u06xL4W9x8LtSr@public.gmane.org