lkml.org 
[lkml]   [2000]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch] PCI resource allocation
    The pci_assign_bus_resource() stuff which went into
    test6-pre7 broke PCI configuration. This is the
    cause of all the "PCI: Error while updating region"
    reports.

    Patch against -test6 is attached.--- ../linux-2.4.0-test6/drivers/pci/setup-res.c Fri Aug 11 19:06:12 2000
    +++ drivers/pci/setup-res.c Sat Aug 12 02:12:57 2000
    @@ -60,7 +60,8 @@
    struct resource *res,
    unsigned long size,
    unsigned long min,
    - unsigned int type_mask)
    + unsigned int type_mask,
    + int resno)
    {
    int i;

    @@ -83,7 +84,7 @@
    continue;

    /* Update PCI config space. */
    - pcibios_update_resource(dev, r, res, i);
    + pcibios_update_resource(dev, r, res, resno);
    return 0;
    }
    return -EBUSY;
    @@ -100,14 +101,15 @@
    min = (res->flags & IORESOURCE_IO) ? PCIBIOS_MIN_IO : PCIBIOS_MIN_MEM;

    /* First, try exact prefetching match.. */
    - if (pci_assign_bus_resource(bus, dev, res, size, min, IORESOURCE_PREFETCH) < 0) {
    + if (pci_assign_bus_resource(bus, dev, res, size, min, IORESOURCE_PREFETCH, i) < 0) {
    /*
    * That failed.
    *
    * But a prefetching area can handle a non-prefetching
    * window (it will just not perform as well).
    */
    - if (!(res->flags & IORESOURCE_PREFETCH) || pci_assign_bus_resource(bus, dev, res, size, min, 0) < 0) {
    + if (!(res->flags & IORESOURCE_PREFETCH) ||
    + pci_assign_bus_resource(bus, dev, res, size, min, 0, i) < 0) {
    printk(KERN_ERR "PCI: Failed to allocate resource %d for %s\n", i, dev->name);
    return -EBUSY;
    }
    \
     
     \ /
      Last update: 2005-03-22 13:58    [W:0.021 / U:32.432 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site