lkml.org 
[lkml]   [2009]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v4 06/12] PCI: Introduce pci_rescan_bus()
    * Andrew Morton <akpm@linux-foundation.org>:
    > On Wed, 18 Mar 2009 16:39:56 -0600 Alex Chiang <achiang@hp.com> wrote:
    >
    > > +/**
    > > + * pci_rescan_bus - scan a PCI bus for devices.
    > > + * @bus: PCI bus to scan
    > > + *
    > > + * Scan a PCI bus and child buses for new devices, adds them,
    > > + * and enables them.
    > > + *
    > > + * Returns the max number of subordinate bus discovered.
    > > + */
    > > +unsigned int __devinit pci_rescan_bus(struct pci_bus *bus)
    > > +{
    > > + unsigned int max;
    > > + struct pci_dev *dev;
    > > +
    > > + max = pci_scan_child_bus(bus);
    > > + list_for_each_entry(dev, &bus->devices, bus_list)
    > > + if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
    > > + dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
    > > + if (dev->subordinate)
    > > + pci_bus_size_bridges(dev->subordinate);
    > > +
    > > + pci_bus_assign_resources(bus);
    > > + pci_enable_bridges(bus);
    > > + pci_bus_add_devices(bus);
    > > +
    > > + return max;
    > > +}
    >
    > The conspicuous lack of locking for the list walk requires either
    >
    > a) documenting or
    > b) fixing

    Ok, will figure out (a) or (b).

    Thanks.

    /ac



    \
     
     \ /
      Last update: 2009-03-19 18:15    [W:0.023 / U:1.388 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site