| To: | Deng-Cheng Zhu <dengcheng.zhu@gmail.com> |
|---|---|
| Subject: | Re: [PATCH 1/2] PCI: make pci_claim_resource() work with conflict resources as appropriate |
| From: | Bjorn Helgaas <bhelgaas@google.com> |
| Date: | Fri, 29 Jul 2011 11:35:51 -0600 |
| Cc: | Ralf Baechle <ralf@linux-mips.org>, jbarnes@virtuousgeek.org, torvalds@linux-foundation.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, eyal@mips.com, zenon@mips.com |
| Dkim-signature: | v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1311962950; bh=vFfPpDqK2gSULim9tfV1cPUOY9c=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=oQOFU0zW6OIpu9vSI3ltxV8/n1YwOCLE7+H16In6KqYc7C57MnWPez6s/ex3gbNFE zapuRve/RXrW9KU4NmYvw== |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=7n8NNIcOuuUeX0p592tLwmLyR3+732GoefS8LEpqgnk=; b=D1FO1/6uJRmJXuWLUK0neYYlIQ3NLsxj3saoFYrMcTJo7R8/woHZLltLKxBZliag4L b26rchVms6OpVQaouknA== |
| Domainkey-signature: | a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=dkim-signature:mime-version:in-reply-to:references:from:date: message-id:subject:to:cc:content-type:x-system-of-record; b=MdjhUOxfol/n+uMUZ18zn4qzfx27K8vhgQxFmN7YdNdz78/sVrwVEvVOINJIicwtZ bR1zo0XboKJ0EhX+kxoaA== |
| In-reply-to: | <CAOfQC9-Z31SSv8agzxZ_hvPOOLY8p0F6yc1=o-QPbDwbNxavTg@mail.gmail.com> |
| References: | <1311852512-7340-1-git-send-email-dengcheng.zhu@gmail.com> <1311852512-7340-2-git-send-email-dengcheng.zhu@gmail.com> <20110728115330.GA29899@linux-mips.org> <CAOfQC9-Z31SSv8agzxZ_hvPOOLY8p0F6yc1=o-QPbDwbNxavTg@mail.gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
On Fri, Jul 29, 2011 at 12:32 AM, Deng-Cheng Zhu <dengcheng.zhu@gmail.com> wrote: > I noticed that at 79896cf42f Linus changed the function from insert_resource() > to request_resource() (and later evolved into request_resource_conflict()) and > he explained the reason. So, in the NIC's case, the problem is that in > pci_claim_resource() the function pci_find_parent_resource() returns the root > (0x0-0xffffff) rather than the MSC PCI I/O (0x1000-0xffffff). This seems like the real problem: PCI has the wrong idea of the resources available on bus 00. The pci_bus->resource[0] for bus 00 points to ioport_resource (the default put there by pci_create_bus()), when it should point to to msc_io_resource instead. Some architectures fill in the pci_bus->resource[] array directly for host bridges (for examples, try 'grep -r "resource\[0\] = " arch/'). On x86 and ia64, we use pci_bus_remove_resources() and pci_bus_add_resource(), and I'd prefer that style for new code because it hides some ugly implementation details. I'm a little puzzled that we don't see this problem on more architectures. The grep above only found a few arches that update the root bus resources. I would expect most of the ones it didn't find to be broken the same way Malta is. Bjorn |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [RFC PATCH 2/2] MIPS: Alchemy: make ICs chained handlers of MIPS ints., Manuel Lauss |
|---|---|
| Next by Date: | Re: [PATCH 06/11] bcma: add serial console support, Rafał Miłecki |
| Previous by Thread: | Re: [PATCH 1/2] PCI: make pci_claim_resource() work with conflict resources as appropriate, Deng-Cheng Zhu |
| Next by Thread: | Re: [PATCH 1/2] PCI: make pci_claim_resource() work with conflict resources as appropriate, Bjorn Helgaas |
| Indexes: | [Date] [Thread] [Top] [All Lists] |