Discussion:
A question about PCI device rescan
Wei, Aaron
2014-10-09 10:50:47 UTC
Permalink
Hi,

Could someone help explain why writing to "rescan" under "/sys/bus/pci/devices/.../rescan" will force a rescan of the device's parent bus instead of just re-discover all the devices behind this device (if the device is type-0, then nothing happens).

Is there any user space interface that could let user just rescan devices behind one specified type-1 device?

Thanks,
Aaron
Yijing Wang
2014-10-10 01:38:37 UTC
Permalink
Post by Wei, Aaron
Hi,
Could someone help explain why writing to "rescan" under "/sys/bus/pci/devices/.../rescan" will force a rescan of the device's parent bus instead of just re-discover all the devices behind this device (if the device is type-0, then nothing happens).
Is there any user space interface that could let user just rescan devices behind one specified type-1 device?
You can use pci_bus rescan which is placed under the pci_bus, i.e.

\-[0000:00]-+-00.0 Intel Corporation 5520/5500/X58 I/O Hub to ESI Port
+-01.0-[0000:01-02]--+-00.0 Intel Corporation 82576 Gigabit Network Connection
| \-00.1 Intel Corporation 82576 Gigabit Network Connection

If you want to rescan devices behind 00:01.0(root port),
echo 1 > /sys/bus/pci/devices/0000:00:01.0/pci_bus/0000:01/rescan

Then it will only rescan the subordinate pci bus.
Post by Wei, Aaron
Thanks,
Aaron
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Thanks!
Yijing
Wei, Aaron
2014-10-10 02:38:25 UTC
Permalink
Hi Yijing,

Thanks for your information, that's what I'm looking for!

-Aaron

-----Original Message-----
From: Yijing Wang [mailto:***@huawei.com]
Sent: 2014年10月10日 9:39
To: Wei, Aaron; linux-***@vger.kernel.org
Subject: Re: A question about PCI device rescan
Post by Wei, Aaron
Hi,
Could someone help explain why writing to "rescan" under "/sys/bus/pci/devices/.../rescan" will force a rescan of the device's parent bus instead of just re-discover all the devices behind this device (if the device is type-0, then nothing happens).
Is there any user space interface that could let user just rescan devices behind one specified type-1 device?
You can use pci_bus rescan which is placed under the pci_bus, i.e.

\-[0000:00]-+-00.0 Intel Corporation 5520/5500/X58 I/O Hub to ESI Port
+-01.0-[0000:01-02]--+-00.0 Intel Corporation 82576 Gigabit Network Connection
| \-00.1 Intel Corporation 82576 Gigabit Network Connection

If you want to rescan devices behind 00:01.0(root port), echo 1 > /sys/bus/pci/devices/0000:00:01.0/pci_bus/0000:01/rescan

Then it will only rescan the subordinate pci bus.
Post by Wei, Aaron
Thanks,
Aaron
--
To unsubscribe from this list: send the line "unsubscribe linux-pci"
info at http://vger.kernel.org/majordomo-info.html
--
Thanks!
Loading...