From: Adam Belay <ambx1@neo.rr.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: matthieu castet <castet.matthieu@free.fr>,
Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: PNP parallel&serial ports: module reload fails (2.6.11)?
Date: Wed, 08 Jun 2005 05:52:13 -0400 [thread overview]
Message-ID: <1118224334.3245.89.camel@localhost.localdomain> (raw)
In-Reply-To: <42A4D1AB.3090508@tls.msk.ru>
On Tue, 2005-06-07 at 02:43 +0400, Michael Tokarev wrote:
> Adam Belay wrote:
>
> Hmm.. Strange I haven't received your email. Looking at our
> maillog, looks like your host is listed in SORBS DUHL --
> cpe-24-93-172-51.neo.res.rr.com[24.93.172.51]. Is it really
> dynamic IP? I'm sorry for the noise, but it's a real PITA
> to handle email and spam properly nowadays... ;)
Yeah, it was a dynamic IP :). I'm sending from a different server this
time.
>
> > On Mon, Jun 06, 2005 at 07:01:37PM +0400, Michael Tokarev wrote:
> >
> []
> >>[ it's in http://www.corpit.ru/mjt/hpml310.dsdt - apache ships it
> >> as Content-Type: text/plain, for some reason. I grabbed iasl
> >> and converted that stuff into .dsls, available at:
> >> http://www.corpit.ru/mjt/hpml310.dsl and
> >> http://www.corpit.ru/mjt/hpml150.dsl ]
> >>
> []
> > I've been looking into the parport issue.
> >
> > Your ACPI _PRS method does look a little unusual (and possibly broken), but
> > it might work if we assume that all of the other resources not mentioned are
> > to be disabled.
>
> Broken - is it a broken bios (so I will ask HP for an update),
> or is it just how things works? ;)
Hi,
I'm sorry for the delayed response, as this bug is very difficult to
track down. The information you provided was helpful and I appreciate
it. I have a theory as to what is going on, and the patch below might
solve your problem. If not, it will at least give us some more
information.
The following would be useful:
1.) a complete dmesg after initial boot with the patch
2.) kernel message output after "rmmod parport_pc" and "modprobe
parport_pc" with the patch
I designed this patch to fix both "hpml150.dsl" and "hpml310.dsl". If
you have time, could you test it on both platforms? This is a hack, so
if it works, I'll give a more complete explanation and an official fix.
Thanks,
Adam
--- a/drivers/pnp/pnpacpi/rsparser.c 2005-05-27 22:06:02.000000000 -0400
+++ b/drivers/pnp/pnpacpi/rsparser.c 2005-06-08 05:36:57.410599288 -0400
@@ -178,6 +178,8 @@
if (res->data.dma.number_of_channels > 0)
pnpacpi_parse_allocated_dmaresource(res_table,
res->data.dma.channels[0]);
+ else
+ printk(KERN_INFO "pnp: skipping dma from _CRS\n");
break;
case ACPI_RSTYPE_IO:
pnpacpi_parse_allocated_ioresource(res_table,
@@ -242,8 +244,10 @@
int i;
struct pnp_dma * dma;
- if (p->number_of_channels == 0)
+ if (p->number_of_channels == 0) {
+ printk(KERN_INFO "pnp: broken dma code, fix me\n");
return;
+ }
dma = pnpacpi_kmalloc(sizeof(struct pnp_dma), GFP_KERNEL);
if (!dma)
return;
@@ -298,8 +302,10 @@
int i;
struct pnp_irq * irq;
- if (p->number_of_interrupts == 0)
+ if (p->number_of_interrupts == 0) {
+ printk(KERN_INFO "pnp: broken irq code, fix me\n");
return;
+ }
irq = pnpacpi_kmalloc(sizeof(struct pnp_irq), GFP_KERNEL);
if (!irq)
return;
@@ -625,7 +631,12 @@
struct resource *p)
{
int edge_level, active_high_low;
-
+
+ if (p->flags & IORESOURCE_UNSET) {
+ printk(KERN_INFO "bug squashed - irq\n");
+ return;
+ }
+
decode_irq_flags(p->flags & IORESOURCE_BITS, &edge_level,
&active_high_low);
resource->id = ACPI_RSTYPE_IRQ;
@@ -636,6 +647,18 @@
resource->data.irq.shared_exclusive = ACPI_EXCLUSIVE;
else
resource->data.irq.shared_exclusive = ACPI_SHARED;
+
+ if (ACPI_EDGE_SENSITIVE == resource->data.irq.edge_level &&
+ ACPI_ACTIVE_HIGH == resource->data.irq.active_high_low &&
+ ACPI_EXCLUSIVE == resource->data.irq.shared_exclusive) {
+ printk(KERN_INFO "pnp: irq flags are correct\n");
+ } else {
+ printk(KERN_INFO "pnp: attempting to fix irq flags\n");
+ resource->data.irq.edge_level = ACPI_EDGE_SENSITIVE;
+ resource->data.irq.active_high_low = ACPI_ACTIVE_HIGH;
+ resource->data.irq.shared_exclusive = ACPI_EXCLUSIVE;
+ }
+
resource->data.irq.number_of_interrupts = 1;
resource->data.irq.interrupts[0] = p->start;
}
@@ -644,6 +667,11 @@
struct resource *p)
{
int edge_level, active_high_low;
+
+ if (p->flags & IORESOURCE_UNSET) {
+ printk(KERN_INFO "bug squashed - irq_ext\n");
+ return;
+ }
decode_irq_flags(p->flags & IORESOURCE_BITS, &edge_level,
&active_high_low);
@@ -663,6 +691,11 @@
static void pnpacpi_encode_dma(struct acpi_resource *resource,
struct resource *p)
{
+ if (p->flags & IORESOURCE_UNSET) {
+ printk(KERN_INFO "bug squashed - dma \n");
+ return;
+ }
+
resource->id = ACPI_RSTYPE_DMA;
resource->length = sizeof(struct acpi_resource);
/* Note: pnp_assign_dma will copy pnp_dma->flags into p->flags */
@@ -695,7 +728,6 @@
ACPI_DECODE_16 : ACPI_DECODE_10;
resource->data.io.min_base_address = p->start;
resource->data.io.max_base_address = p->end;
- resource->data.io.alignment = 0; /* Correct? */
resource->data.io.range_length = p->end - p->start + 1;
}
@@ -719,7 +751,6 @@
ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY;
resource->data.memory24.min_base_address = p->start;
resource->data.memory24.max_base_address = p->end;
- resource->data.memory24.alignment = 0;
resource->data.memory24.range_length = p->end - p->start + 1;
}
@@ -733,7 +764,6 @@
ACPI_READ_WRITE_MEMORY : ACPI_READ_ONLY_MEMORY;
resource->data.memory32.min_base_address = p->start;
resource->data.memory32.max_base_address = p->end;
- resource->data.memory32.alignment = 0;
resource->data.memory32.range_length = p->end - p->start + 1;
}
next prev parent reply other threads:[~2005-06-08 9:56 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-02 22:24 Re:PNP parallel&serial ports: module reload fails (2.6.11)? castet.matthieu
2005-06-03 0:18 ` PNP " Michael Tokarev
2005-06-03 5:58 ` matthieu castet
2005-06-05 10:14 ` matthieu castet
2005-06-05 10:27 ` matthieu castet
2005-06-06 15:01 ` Michael Tokarev
2005-06-06 15:43 ` castet.matthieu
2005-06-06 21:18 ` Adam Belay
2005-06-06 22:43 ` Michael Tokarev
2005-06-08 9:52 ` Adam Belay [this message]
2005-06-08 20:29 ` Michael Tokarev
2005-06-08 23:52 ` Adam Belay
2005-06-09 21:07 ` Michael Tokarev
2005-06-09 21:16 ` Russell King
2005-06-10 16:01 ` Bjorn Helgaas
2005-06-10 16:20 ` Dmitry Torokhov
2005-06-10 16:26 ` Bjorn Helgaas
2005-06-10 16:30 ` Russell King
2005-06-14 19:40 ` Adam Belay
-- strict thread matches above, loose matches on Subject: below --
2005-05-31 23:01 Michael Tokarev
2005-06-01 5:04 ` Andrew Morton
2005-06-01 15:20 ` Michael Tokarev
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=1118224334.3245.89.camel@localhost.localdomain \
--to=ambx1@neo.rr.com \
--cc=akpm@osdl.org \
--cc=castet.matthieu@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=mjt@tls.msk.ru \
/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