From: Rene Herman <rene.herman@keyaccess.nl>
To: Andrew Morton <akpm@osdl.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] PNP: have quirk_system_pci_resources() include io resources.
Date: Wed, 25 Jun 2008 19:58:20 +0200 [thread overview]
Message-ID: <4862873C.3070507@keyaccess.nl> (raw)
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
Hi Andrew.
quirk_system_pci_resources() disables a PnP mem resource that overlaps a
PCI BAR so as to not keep the PCI driver from claiming the resource.
Have it do the same for io resources.
Here, ACPI claims ports that overlap with my soundcard causing the
soundcard driver to fail to load. It's unknown why my ACPI BIOS claims
those ports; it did not use to but this is not a (kernel) regression.
Some odd BIOS reconfig triggered by temporarily removing the card seems
to have brought this on.
This is not urgent -- I now all of a sudden need this on any kernel
anyway. It applies on top of Bjorn's PNP patches you have in the tree.
Strictly, Bjorn's ACK was on another version of this that rolled its own
private pnp_resource_type_name(), an interface introduced by those new
PNP patches. I took the liberty to consider that trivial enough of a
change to keep it though.
Rene.
[-- Attachment #2: 0001-PNP-have-quirk_system_pci_resources-include-io-re.patch --]
[-- Type: text/plain, Size: 2282 bytes --]
>From 4c6191498771b0e2b087db988f74e4b902b99d32 Mon Sep 17 00:00:00 2001
From: Rene Herman <rene.herman@gmail.com>
Date: Wed, 25 Jun 2008 19:45:41 +0200
Subject: [PATCH] PNP: have quirk_system_pci_resources() include io resources.
quirk_system_pci_resources() disables a PnP mem resource that overlaps
a PCI BAR so as to not keep the PCI driver from claiming the resource.
Have it do the same for io resources.
Here, ACPI claims ports that overlap with my soundcard causing the
soundcard driver to fail to load. It's unknown why my ACPI BIOS
claims those ports; it did not use to but this is not a (kernel)
regression. Some odd BIOS reconfig triggered by temporarily removing
the card seems to have brought this on.
Signed-off-by: Rene Herman <rene.herman@gmail.com>
Acked-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
---
drivers/pnp/quirks.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index 55f55ed..0bdf9b8 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -245,15 +245,17 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
*/
for_each_pci_dev(pdev) {
for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
- if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM) ||
- pci_resource_len(pdev, i) == 0)
+ unsigned int type;
+
+ type = pci_resource_flags(pdev, i) &
+ (IORESOURCE_IO | IORESOURCE_MEM);
+ if (!type || pci_resource_len(pdev, i) == 0)
continue;
pci_start = pci_resource_start(pdev, i);
pci_end = pci_resource_end(pdev, i);
for (j = 0;
- (res = pnp_get_resource(dev, IORESOURCE_MEM, j));
- j++) {
+ (res = pnp_get_resource(dev, type, j)); j++) {
if (res->start == 0 && res->end == 0)
continue;
@@ -283,9 +285,10 @@ static void quirk_system_pci_resources(struct pnp_dev *dev)
* the PCI region, and that might prevent a PCI
* driver from requesting its resources.
*/
- dev_warn(&dev->dev, "mem resource "
+ dev_warn(&dev->dev, "%s resource "
"(0x%llx-0x%llx) overlaps %s BAR %d "
"(0x%llx-0x%llx), disabling\n",
+ pnp_resource_type_name(res),
(unsigned long long) pnp_start,
(unsigned long long) pnp_end,
pci_name(pdev), i,
--
1.5.5
next reply other threads:[~2008-06-25 17:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-25 17:58 Rene Herman [this message]
2008-06-25 21:16 ` [PATCH] PNP: have quirk_system_pci_resources() include io resources Andrew Morton
2008-06-25 21:46 ` Rene Herman
2008-06-25 22:16 ` Rene Herman
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=4862873C.3070507@keyaccess.nl \
--to=rene.herman@keyaccess.nl \
--cc=akpm@osdl.org \
--cc=bjorn.helgaas@hp.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