From: Andrew Morton <akpm@linux-foundation.org>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: torvalds@linux-foundation.org, avuton@gmail.com,
rene.herman@keyaccess.nl, rene.herman@gmail.com,
len.brown@intel.com, linux-kernel@vger.kernel.org, rjw@sisk.pl
Subject: Re: 53052feb6 (PNP: remove pnp_mem_flags() as an lvalue) breaks my ALSA intel8x0 sound card regression
Date: Mon, 2 Jun 2008 16:49:54 -0700 [thread overview]
Message-ID: <20080602164954.2aff2d77.akpm@linux-foundation.org> (raw)
In-Reply-To: <200806021642.50491.bjorn.helgaas@hp.com>
On Mon, 2 Jun 2008 16:42:49 -0600
Bjorn Helgaas <bjorn.helgaas@hp.com> wrote:
> PNP: mark resources that conflict with PCI devices "disabled"
>
> Both the PNP/PCI conflict detection quirk and the PNP system
> driver must use the same mechanism to mark resources as disabled.
>
> I think it's best to keep the resource and to keep the type bit
> (IORESOURCE_MEM, etc), so that we match the list from firmware
> as closely as possible.
>
> Fixes this regression from 2.6.25: http://lkml.org/lkml/2008/6/1/82
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
> Tested-by: Avuton Olrich <avuton@gmail.com>
>
> Index: work11/drivers/pnp/quirks.c
> ===================================================================
> --- work11.orig/drivers/pnp/quirks.c 2008-06-02 14:59:03.000000000 -0600
> +++ work11/drivers/pnp/quirks.c 2008-06-02 15:42:35.000000000 -0600
> @@ -286,7 +286,7 @@ static void quirk_system_pci_resources(s
> pci_name(pdev), i,
> (unsigned long long) pci_start,
> (unsigned long long) pci_end);
> - res->flags = 0;
> + res->flags |= IORESOURCE_DISABLED;
> }
> }
> }
> Index: work11/drivers/pnp/system.c
> ===================================================================
> --- work11.orig/drivers/pnp/system.c 2008-06-02 14:58:56.000000000 -0600
> +++ work11/drivers/pnp/system.c 2008-06-02 15:44:36.000000000 -0600
> @@ -81,7 +81,7 @@ static void reserve_resources_of_dev(str
> }
>
> for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) {
> - if (res->flags & IORESOURCE_UNSET)
> + if (res->flags & IORESOURCE_DISABLED)
> continue;
>
> reserve_range(dev, res->start, res->end, 0);
This broke
pnp-replace-pnp_resource_table-with-dynamically-allocated-resources.patch:
***************
*** 80,91 ****
reserve_range(dev, res->start, res->end, 1);
}
- for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++) {
- if (res->flags & IORESOURCE_UNSET)
- continue;
-
reserve_range(dev, res->start, res->end, 0);
- }
}
static int system_pnp_probe(struct pnp_dev *dev,
--- 78,85 ----
reserve_range(dev, res->start, res->end, 1);
}
+ for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++)
reserve_range(dev, res->start, res->end, 0);
}
static int system_pnp_probe(struct pnp_dev *dev,
Which I fixed thusly:
static void reserve_resources_of_dev(struct pnp_dev *dev)
{
struct resource *res;
int i;
for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_IO, i)); i++) {
if (res->start == 0)
continue; /* disabled */
if (res->start < 0x100)
/*
* Below 0x100 is only standard PC hardware
* (pics, kbd, timer, dma, ...)
* We should not get resource conflicts there,
* and the kernel reserves these anyway
* (see arch/i386/kernel/setup.c).
* So, do nothing
*/
continue;
if (res->end < res->start)
continue; /* invalid */
reserve_range(dev, res->start, res->end, 1);
}
for (i = 0; (res = pnp_get_resource(dev, IORESOURCE_MEM, i)); i++)
reserve_range(dev, res->start, res->end, 0);
}
Is it still correct?
Thanks.
next prev parent reply other threads:[~2008-06-02 23:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-01 14:42 53052feb6 (PNP: remove pnp_mem_flags() as an lvalue) breaks my ALSA intel8x0 sound card regression Avuton Olrich
2008-06-01 16:20 ` Rene Herman
2008-06-02 3:25 ` Avuton Olrich
2008-06-02 19:06 ` Rene Herman
2008-06-02 22:05 ` Bjorn Helgaas
2008-06-02 22:23 ` Avuton Olrich
2008-06-02 22:42 ` Bjorn Helgaas
2008-06-02 23:49 ` Andrew Morton [this message]
2008-06-02 23:58 ` Rene Herman
2008-06-03 0:03 ` Andrew Morton
2008-06-03 0:31 ` Rene Herman
2008-06-03 0:15 ` Rene Herman
2008-06-03 18:40 ` Bjorn Helgaas
2008-06-04 23:38 ` Tony Luck
2008-06-05 16:18 ` Bjorn Helgaas
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=20080602164954.2aff2d77.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=avuton@gmail.com \
--cc=bjorn.helgaas@hp.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rene.herman@gmail.com \
--cc=rene.herman@keyaccess.nl \
--cc=rjw@sisk.pl \
--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