Skip to content

Commit 06ec928

Browse files
tianyumetan-ucw
authored andcommitted
device-drivers/pci: Fix pci_scan_slot()
The test code scans the devices on a bus one by one. Then it calls pci_scan_slot(). But pci_scan_slot cannot be called with non-zero devfn (i.e. devfn % 8 shall be zero). Signed-off-by: Tianyu <[email protected]> Acked-by: Jiri Slaby <[email protected]> Acked-by: Cyril Hrubis <[email protected]>
1 parent 5fea063 commit 06ec928

File tree

1 file changed

+3
-0
lines changed
  • testcases/kernel/device-drivers/pci/tpci_kernel

1 file changed

+3
-0
lines changed

testcases/kernel/device-drivers/pci/tpci_kernel/ltp_tpci.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,9 @@ static int test_slot_scan(void)
321321

322322
prk_info("scan pci slot");
323323

324+
if ((num % 8) != 0)
325+
return TPASS;
326+
324327
ret = pci_scan_slot(bus, num);
325328
if (ret >= 0) {
326329
prk_info("found '%d' devices from scan slot", ret);

0 commit comments

Comments
 (0)