public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI and PCI Hotplug fixes for 2.6.5-rc1
Date: Fri, 19 Mar 2004 15:32:12 -0800	[thread overview]
Message-ID: <10797391322846@kroah.com> (raw)
In-Reply-To: <10797391322645@kroah.com>

ChangeSet 1.1608.97.6, 2004/03/19 14:08:16-08:00, willy@debian.org

[PATCH] PCI: Use insert_resource in pci_claim_resource

On ia64, the parent resources are not necessarily PCI resources and
so won't get found by pci_find_parent_resource.  Use the shiny new
insert_resource() function instead, which I think we would have used
here had it been available at the time.


 drivers/pci/setup-res.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)


diff -Nru a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c
--- a/drivers/pci/setup-res.c	Fri Mar 19 15:21:11 2004
+++ b/drivers/pci/setup-res.c	Fri Mar 19 15:21:11 2004
@@ -94,13 +94,18 @@
 pci_claim_resource(struct pci_dev *dev, int resource)
 {
 	struct resource *res = &dev->resource[resource];
-	struct resource *root = pci_find_parent_resource(dev, res);
+	struct resource *root = NULL;
 	char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge";
 	int err;
 
+	if (res->flags & IORESOURCE_IO)
+		root = &ioport_resource;
+	if (res->flags & IORESOURCE_MEM)
+		root = &iomem_resource;
+
 	err = -EINVAL;
 	if (root != NULL)
-		err = request_resource(root, res);
+		err = insert_resource(root, res);
 
 	if (err) {
 		printk(KERN_ERR "PCI: %s region %d of %s %s [%lx:%lx]\n",


  reply	other threads:[~2004-03-19 23:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19 23:25 [BK PATCH] PCI and PCI Hotplug fixes for 2.6.5-rc1 Greg KH
2004-03-19 23:32 ` [PATCH] " Greg KH
2004-03-19 23:32   ` Greg KH
2004-03-19 23:32     ` Greg KH
2004-03-19 23:32       ` Greg KH
2004-03-19 23:32         ` Greg KH
2004-03-19 23:32           ` Greg KH [this message]
2004-03-19 23:32             ` Greg KH

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=10797391322846@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.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