Messages in this thread | | | Date | Mon, 12 Mar 2012 22:48:27 -0700 | Subject | Re: [PATCH v2 10/37] PCI, sysfs: create rescan_bridge under /sys/.../pci/devices/... for pci bridges | From | Yinghai Lu <> |
| |
On Mon, Mar 12, 2012 at 7:55 PM, Bjorn Helgaas <bhelgaas@google.com> wrote: > On Sat, Mar 10, 2012 at 12:00 AM, Yinghai Lu <yinghai@kernel.org> wrote: >> Current code will create rescan for every pci device under parent bus. >> that is not right. the device is already there, there is no reason to rescan it. > > "The device" (not "the device").
ok
> >> We could have rescan for pci bridges. less confusing. >> >> Need to move rescan attr to pci dev bridge attribute group. >> And We should rescan bridge's secondary bus instead of primary bus. > > "And we" (not "And We").
ok
> > I think the idea of this patch makes sense. > > You might want to consider having this actually read the bridge config > again. That way, if the user manually changed the secondary bus > number or the bridge windows using setpci or something, this rescan > could use that new config if possible.
yes, in the following patches, change that to pci_rescan_bus_bridge_resize()
and
will be unsigned int __ref pci_rescan_bus_bridge_resize(struct pci_dev *bridge) { unsigned int max = 0; int pass; struct pci_bus *bus = bridge->bus;
for (pass = 0; pass < 2; pass++) max = pci_scan_bridge(bus, bridge, max, pass);
pci_assign_unassigned_bridge_resources(bridge);
pci_bus_add_single_device(bridge);
at last pci_scan_bridge will check the bus register in the bridge.
> > I still hate the fact that we will have three different rescan files > (four if you count /sys/bus/pci/rescan), but I don't have a solution > to offer: > device/rescan > device/rescan_bridge > bus/rescan
looks like we only need /sys/devices/pci.../device/rescan_bridge /sys/bus/pci/bus/rescan
device rescan and bus rescan should be removed.
Yinghai -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |