lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQXaDgBRrZ5dCxz9mjrzCAwH_rHrUSQGYQnHc5k7aXnU8Q@mail.gmail.com>
Date:	Mon, 12 Mar 2012 22:48:27 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Bjorn Helgaas <bhelgaas@...gle.com>
Cc:	Jesse Barnes <jbarnes@...tuousgeek.org>, x86 <x86@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
	Randy Dunlap <rdunlap@...otime.net>
Subject: Re: [PATCH v2 10/37] PCI, sysfs: create rescan_bridge under
 /sys/.../pci/devices/... for pci bridges

On Mon, Mar 12, 2012 at 7:55 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
> On Sat, Mar 10, 2012 at 12:00 AM, Yinghai Lu <yinghai@...nel.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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ