lkml.org 
[lkml]   [2009]   [Sep]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] pci: overwite pci bridge res regs to get big range
On Sun, 13 Sep 2009 15:57:10 -0700
Yinghai Lu <yinghai@kernel.org> wrote:
> Signed-off-by: Yinghai Lu <yinghai@kernel.org>
>
> ---
> drivers/pci/setup-bus.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> Index: linux-2.6/drivers/pci/setup-bus.c
> ===================================================================
> --- linux-2.6.orig/drivers/pci/setup-bus.c
> +++ linux-2.6/drivers/pci/setup-bus.c
> @@ -299,8 +299,17 @@ static struct resource *find_free_bus_re
> r = bus->resource[i];
> if (r == &ioport_resource || r == &iomem_resource)
> continue;
> - if (r && (r->flags & type_mask) == type
> && !r->parent)
> - return r;
> + if (r && (r->flags & type_mask) == type) {
> + if (!r->parent)
> + return r;
> + /*
> + * if there is no child under that, we
> should release
> + * and use it. don't need to reset it,
> pbus_size_* will
> + * set it again
> + */
> + if (!r->child && !release_resource(r))
> + return r;
> + }
> }
> return NULL;
> }

This does seem like a good way of getting some extra bus space... We
should have all the child resources of a given bus by this point so it
seems like it would be safe.

You ok with this Linus?

Thanks,
--
Jesse Barnes, Intel Open Source Technology Center


\
 
 \ /
  Last update: 2009-09-17 18:39    [W:0.059 / U:4.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site