[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100228222822.34889f1a@jbarnes-piketon>
Date: Sun, 28 Feb 2010 22:28:22 -0800
From: Jesse Barnes <jbarnes@...tuousgeek.org>
To: Yinghai Lu <yinghai@...nel.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [git pull] PCI changes for 2.6.34 - pci rom rom fail list
On Sun, 28 Feb 2010 15:49:39 -0800
Yinghai Lu <yinghai@...nel.org> wrote:
> please check
>
> [PATCH] pci: don't reassign to ROM res if it is not going to be
> enabled
>
> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>
> ---
> drivers/pci/setup-bus.c | 12 ++++++++++--
> 1 file changed, 10 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
> @@ -101,9 +101,17 @@ static void __assign_resources_sorted(st
> for (list = head->next; list;) {
> res = list->res;
> idx = res - &list->dev->resource[0];
> +
> if (pci_assign_resource(list->dev, idx)) {
> - if (fail_head
> && !pci_is_root_bus(list->dev->bus))
> - add_to_failed_list(fail_head,
> list->dev, res);
> + if (fail_head
> && !pci_is_root_bus(list->dev->bus)) {
> + /*
> + * if the failed res is for ROM BAR,
> and it will
> + * be enabled later, don't add it to
> the list
> + */
> + if (!((idx == PCI_ROM_RESOURCE) &&
> + (!(res->flags &
> IORESOURCE_ROM_ENABLE))))
> +
> add_to_failed_list(fail_head, list->dev, res);
> + }
> res->start = 0;
> res->end = 0;
> res->flags = 0;
>
>
I think this is on the right track; a failed ROM allocation shouldn't
cause us to try to reassign resources. Generally the ROM isn't needed
anyway, and even when it is we have to handle it specially anyway.
Linus, does this patch fix your problem?
--
Jesse Barnes, Intel Open Source Technology Center
--
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