bus/pci: clear undefined bits in Windows segment parsing
PATCH 1/1 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.
--- drivers/bus/pci/windows/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/pci/windows/pci.c +1 -1
@@ -195,7 +195,7 @@ get_device_pci_address(HDEVINFO dev_info,return -1 ; } - addr->domain = bus_num >>8 ; + addr->domain = (bus_num >>8 ) &0xffff ; addr->bus = bus_num &0xff ; addr->devid = dev_and_func >>16 ; addr->function = dev_and_func &0xffff ;
Signature · 1 line
2.16.1.windows.4
Quoted 18 lines · Tal Shnaiderman
When reading bus and segment values using
SPDRP_BUSNUMBERbits 24-31 are undefined.They are cleared to verify we read the segment number correctly.
Fixes c3adf8144a1 ("bus/pci: support segment value as address domain on Window")Signed-off-by Tal Shnaiderman <[email protected]>--- drivers/bus/pci/windows/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/bus/pci/windows/pci.c +0
-0
drivers/bus/pci/windows/pci.c get_device_pci_address(HDEVINFO dev_info, · line 201
Quoted 8 lines
drivers/bus/pci/windows/pci.c +1
-1@@ -195,7 +195,7 @@ get_device_pci_address(HDEVINFO dev_info,return -1 ; } - addr->domain = bus_num >>8 ; + addr->domain = (bus_num >>8 ) &0xffff ; addr->bus = bus_num &0xff ; addr->devid = dev_and_func >>16 ; addr->function = dev_and_func &0xffff ;
Quoted 5 lines · Tal Shnaiderman
When reading bus and segment values using
SPDRP_BUSNUMBERbits 24-31 are undefined.They are cleared to verify we read the segment number correctly.
Quoted 8 lines
Fixes c3adf8144a1 ("bus/pci: support segment value as address domain on Window")Signed-off-by Tal Shnaiderman <[email protected]>--- drivers/bus/pci/windows/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Thomas Monjalon
Applied15/10/2020 20:45, Narcisa Ana Maria Vasile:
Quoted 12 lines · Tal Shnaiderman
Quoted 9 lines
When reading bus and segment values using
SPDRP_BUSNUMBERbits 24-31 are undefined.They are cleared to verify we read the segment number correctly.
Fixes c3adf8144a1 ("bus/pci: support segment value as address domain on Window")Signed-off-by Tal Shnaiderman <[email protected]>Acked-by Narcisa Vasile <[email protected]>
Applied, thanks