Skip to content

Commit

Permalink
mstconfig: Add support for PCI domain up to 32-bits
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Goldman <[email protected]>
  • Loading branch information
acgoldma committed Mar 29, 2024
1 parent ff014c1 commit fb0845f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/mtcr_ul/mtcr_com_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ typedef enum
typedef struct vf_info_t
{
char dev_name[512];
u_int16_t domain;
u_int32_t domain;
u_int8_t bus;
u_int8_t dev;
u_int8_t func;
Expand All @@ -353,7 +353,7 @@ typedef struct dev_info_t
{
struct
{
u_int16_t domain;
u_int32_t domain;
u_int8_t bus;
u_int8_t dev;
u_int8_t func;
Expand Down
6 changes: 3 additions & 3 deletions mlxconfig/mlxcfg_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ mlxCfgStatus MlxCfg::queryDevsCfg()
mdevices_info_destroy(dev, numOfDev);
return err(true, NO_DEV_ERR);
}
// printf("-D- num of dev: %d , 1st dev : %s\n", numOfDev, buf);
// printf("-D- num of dev: %d , 1st dev : %s\n", numOfDev, dev->dev_name);
dev_info* devPtr = dev;
char pcibuf[32] = {0};
char pcibuf[64] = {0};

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

0 comments on commit fb0845f

Please sign in to comment.