lkml.org 
[lkml]   [2010]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH -v3 3/3] pci: don't allocate from a BUSY bus resource


    Drivers typically use pci_request_regions() to reserve the resources
    they use, but that fails if the resource is already busy. Therefore,
    we should ignore busy resources when we're assigning resources to a
    device.

    [commit log is from Bjorn]

    Tested-by: Andy Isaacson <adi@hexapodia.org>
    Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
    Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
    Signed-off-by: Yinghai Lu <yinghai@kernel.org>

    ---
    drivers/pci/bus.c | 4 ++++
    1 file changed, 4 insertions(+)

    Index: linux-2.6/drivers/pci/bus.c
    ===================================================================
    --- linux-2.6.orig/drivers/pci/bus.c
    +++ linux-2.6/drivers/pci/bus.c
    @@ -103,6 +103,10 @@ pci_bus_alloc_resource(struct pci_bus *b
    if (!r)
    continue;

    + /* Driver can not reserve it later, so don't use it */
    + if (r->flags & IORESOURCE_BUSY)
    + continue;
    +
    /* type_mask must match */
    if ((res->flags ^ r->flags) & type_mask)
    continue;

    \
     
     \ /
      Last update: 2010-04-13 23:29    [W:0.021 / U:1.992 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site