From: Matthew Wilcox <willy@linux.intel.com>
To: torvalds@linux-foundation.org, jbarnes@virtuousgeek.org
Cc: andrew.patterson@hp.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org,
Matthew Wilcox <willy@linux.intel.com>
Subject: [PATCH 1/4] Fix pci_claim_resource
Date: Wed, 17 Jun 2009 16:33:33 -0400 [thread overview]
Message-ID: <1245270816-11755-2-git-send-email-willy@linux.intel.com> (raw)
In-Reply-To: <1245270816-11755-1-git-send-email-willy@linux.intel.com>
Instead of starting from the iomem or ioport roots, start from the
parent bus' resources. This fixes a bug where child resources would
appear above their parents resources if they had the same size.
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Tested-by: Andrew Patterson <andrew.patterson@hp.com>
---
drivers/pci/setup-res.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
index 3039fcb..1240351 100644
--- a/drivers/pci/setup-res.c
+++ b/drivers/pci/setup-res.c
@@ -99,11 +99,11 @@ void pci_update_resource(struct pci_dev *dev, int resno)
int pci_claim_resource(struct pci_dev *dev, int resource)
{
struct resource *res = &dev->resource[resource];
- struct resource *root = NULL;
+ struct resource *root;
char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge";
int err;
- root = pcibios_select_root(dev, res);
+ root = pci_find_parent_resource(dev, res);
err = -EINVAL;
if (root != NULL)
--
1.6.3.1
next prev parent reply other threads:[~2009-06-17 20:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 20:33 Matthew Wilcox
2009-06-17 20:33 ` Matthew Wilcox [this message]
2009-06-17 20:33 ` [PATCH 2/4] Delete pcibios_select_root Matthew Wilcox
2009-06-17 20:33 ` [PATCH 3/4] x86: Use pci_claim_resource Matthew Wilcox
2009-06-17 20:33 ` [PATCH 4/4] ia64: Fix resource assignment for root busses Matthew Wilcox
2009-06-17 20:56 ` Linus Torvalds
2009-06-17 20:59 ` Matthew Wilcox
2009-06-17 21:02 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1245270816-11755-2-git-send-email-willy@linux.intel.com \
--to=willy@linux.intel.com \
--cc=andrew.patterson@hp.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox