Re: [PATCH 02/23] PCI, sysfs: create rescan_bridge under/sys/.../pci/devices/... for pci bridges
From: Yinghai Lu
Date: Fri Mar 09 2012 - 01:42:52 EST
On Thu, Mar 8, 2012 at 4:52 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
> On Tue, Mar 6, 2012 at 12:13 AM, Yinghai Lu <yinghai@xxxxxxxxxx> 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.
>>
>> We could have rescan for pci bridges. less confusing.
>
> Yes, but now we have *three* rescan attributes for a single bridge/bus:
>
> /sys/devices/pci0000:00/0000:00:01.0/pci_bus/0000:01/rescan
no, that one is not there, and should not be added.
But I do suggest to add
/sys/devices/pci0000:00/0000:00:01.0/pci_bus/0000:01/remove
> /sys/devices/pci0000:00/0000:00:01.0/rescan_bridge
> /sys/devices/pci0000:00/0000:00:01.0/rescan
>
> and this for an endpoint:
>
> /sys/devices/pci0000:00/0000:00:05.0/rescan
>
> I think endpoints should not have a "rescan" attribute at all, and
> bridges should have only a "rescan" attribute (not "rescan" and
> "rescan_bridge").
agreed, that rescan actually is doing rescan of it's parent bus.
I have suggested to remove it. but Alex said some HP internal
application will need
that, so it can not be removed.
at last I have to use rescan_bridge for bridge device.
>
> I'm not sure about "pci_bus/.../rescan". I know you didn't add that,
> but I'm not sure it makes sense to have both that and a "rescan" on
> the bridge device. If we have both, what's the difference between
> them?
rescan : for device parent bus, that is really weird.
rescan_bridge: will only show up that device is bridge, and rescan that bridge.
Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/