bus/pci: clear undefined bits in Windows segment parsing
When reading bus and segment values using SPDRP_BUSNUMBER
bits 24-31 are undefined.
They are cleared to verify we read the segment number correctly.
Fixes: c3adf8144a
("bus/pci: support segment as address domain on Windows")
Cc: stable@dpdk.org
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Ranjit Menon <ranjit.menon@intel.com>
Acked-by: Narcisa Vasile <navasile@linux.microsoft.com>
This commit is contained in:
parent
4ffc2276e2
commit
c12b14889e
@ -195,7 +195,7 @@ get_device_pci_address(HDEVINFO dev_info,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
addr->domain = bus_num >> 8;
|
addr->domain = (bus_num >> 8) & 0xffff;
|
||||||
addr->bus = bus_num & 0xff;
|
addr->bus = bus_num & 0xff;
|
||||||
addr->devid = dev_and_func >> 16;
|
addr->devid = dev_and_func >> 16;
|
||||||
addr->function = dev_and_func & 0xffff;
|
addr->function = dev_and_func & 0xffff;
|
||||||
|
Loading…
Reference in New Issue
Block a user