Skip to content

Commit df86661

Browse files
Ralph CampbellRoland Dreier
authored andcommitted
IB/ipath: Use IEEE OUI for vendor_id reported by ibv_query_device()
The IB spe. for SubnGet(NodeInfo) and query HCA says that the vendor ID field should be the IEEE OUI assigned to the vendor. The ipath driver was returning the PCI vendor ID instead. This will affect applications which call ibv_query_device(). The old value was 0x001fc1 or 0x001077, the new value is 0x001175. The vendor ID doesn't appear to be exported via /sys so that should reduce possible compatibility issues. I'm only aware of Open MPI as a major application which depends on this change, and they have made necessary adjustments. Signed-off-by: Ralph Campbell <[email protected]> Signed-off-by: Roland Dreier <[email protected]>
1 parent bd36067 commit df86661

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

drivers/infiniband/hw/ipath/ipath_mad.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ static int recv_subn_get_nodeinfo(struct ib_smp *smp,
111111
nip->revision = cpu_to_be32((majrev << 16) | minrev);
112112
nip->local_port_num = port;
113113
vendor = dd->ipath_vendorid;
114-
nip->vendor_id[0] = 0;
115-
nip->vendor_id[1] = vendor >> 8;
116-
nip->vendor_id[2] = vendor;
114+
nip->vendor_id[0] = IPATH_SRC_OUI_1;
115+
nip->vendor_id[1] = IPATH_SRC_OUI_2;
116+
nip->vendor_id[2] = IPATH_SRC_OUI_3;
117117

118118
return reply(smp);
119119
}

drivers/infiniband/hw/ipath/ipath_verbs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1497,7 +1497,8 @@ static int ipath_query_device(struct ib_device *ibdev,
14971497
IB_DEVICE_SYS_IMAGE_GUID | IB_DEVICE_RC_RNR_NAK_GEN |
14981498
IB_DEVICE_PORT_ACTIVE_EVENT | IB_DEVICE_SRQ_RESIZE;
14991499
props->page_size_cap = PAGE_SIZE;
1500-
props->vendor_id = dev->dd->ipath_vendorid;
1500+
props->vendor_id =
1501+
IPATH_SRC_OUI_1 << 16 | IPATH_SRC_OUI_2 << 8 | IPATH_SRC_OUI_3;
15011502
props->vendor_part_id = dev->dd->ipath_deviceid;
15021503
props->hw_ver = dev->dd->ipath_pcirev;
15031504

0 commit comments

Comments
 (0)