Skip to content

Commit fb0845f

Browse files
committed
mstconfig: Add support for PCI domain up to 32-bits
Signed-off-by: Adam Goldman <[email protected]>
1 parent ff014c1 commit fb0845f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/mtcr_ul/mtcr_com_defs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ typedef enum
335335
typedef struct vf_info_t
336336
{
337337
char dev_name[512];
338-
u_int16_t domain;
338+
u_int32_t domain;
339339
u_int8_t bus;
340340
u_int8_t dev;
341341
u_int8_t func;
@@ -353,7 +353,7 @@ typedef struct dev_info_t
353353
{
354354
struct
355355
{
356-
u_int16_t domain;
356+
u_int32_t domain;
357357
u_int8_t bus;
358358
u_int8_t dev;
359359
u_int8_t func;

mlxconfig/mlxcfg_ui.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ mlxCfgStatus MlxCfg::queryDevsCfg()
257257
mdevices_info_destroy(dev, numOfDev);
258258
return err(true, NO_DEV_ERR);
259259
}
260-
// printf("-D- num of dev: %d , 1st dev : %s\n", numOfDev, buf);
260+
// printf("-D- num of dev: %d , 1st dev : %s\n", numOfDev, dev->dev_name);
261261
dev_info* devPtr = dev;
262-
char pcibuf[32] = {0};
262+
char pcibuf[64] = {0};
263263

264264
for (int i = 0; i < numOfDev; i++)
265265
{
@@ -268,7 +268,7 @@ mlxCfgStatus MlxCfg::queryDevsCfg()
268268
#else
269269
const char* device_name_ptrn = "%04x:%02x:%02x.%x";
270270
#endif
271-
snprintf(pcibuf, 32, device_name_ptrn, devPtr->pci.domain, devPtr->pci.bus, devPtr->pci.dev,
271+
snprintf(pcibuf, 64, device_name_ptrn, devPtr->pci.domain, devPtr->pci.bus, devPtr->pci.dev,
272272
devPtr->pci.func);
273273
if (queryDevCfg(devPtr->pci.conf_dev, pcibuf, i + 1))
274274
{

0 commit comments

Comments
 (0)