lkml.org 
[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2 10/37] PCI, sysfs: create rescan_bridge under /sys/.../pci/devices/... for pci bridges
From
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/

\
 
 \ /
  Last update: 2012-03-13 06:51    [W:0.078 / U:8.076 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site