From: "Bob Picco" <bob.picco@hp.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Bob Picco <robert.picco@hp.com>,
Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
linux-acpi@vger.kernel.org, Len Brown <len.brown@intel.com>,
Adam Belay <ambx1@neo.rr.com>, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] HPET: handle multiple ACPI EXTENDED_IRQ resources
Date: Sun, 12 Feb 2006 17:55:28 -0500 [thread overview]
Message-ID: <20060212225528.GC21804@localhost> (raw)
In-Reply-To: <200602071650.27379.bjorn.helgaas@hp.com>
Bjorn Helgaas wrote: [Tue Feb 07 2006, 06:50:27PM EST]
> When the _CRS for a single HPET contains multiple EXTENDED_IRQ
> resources, we overwrote hdp->hd_nirqs every time we found one.
>
> So the driver worked when all the IRQs were described in a
> single EXTENDED_IRQ resource, but failed when multiple resources
> were used. (Strictly speaking, I think the latter is actually
> more correct, but both styles have been used.)
>
> Someday we should remove all the ACPI stuff from hpet.c and use
> PNP driver registration instead. But currently PNP_MAX_IRQ is 2,
> and HPETs often have more IRQs. Hint, hint, Adam :-)
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
>
> Index: work-mm4/drivers/char/hpet.c
> ===================================================================
> --- work-mm4.orig/drivers/char/hpet.c 2006-02-07 16:18:46.000000000 -0700
> +++ work-mm4/drivers/char/hpet.c 2006-02-07 16:29:00.000000000 -0700
> @@ -953,22 +953,18 @@
> }
> } else if (res->type == ACPI_RESOURCE_TYPE_EXTENDED_IRQ) {
> struct acpi_resource_extended_irq *irqp;
> - int i;
> + int i, irq;
>
> irqp = &res->data.extended_irq;
>
> - if (irqp->interrupt_count > 0) {
> - hdp->hd_nirqs = irqp->interrupt_count;
> + for (i = 0; i < irqp->interrupt_count; i++) {
> + irq = acpi_register_gsi(irqp->interrupts[i],
> + irqp->triggering, irqp->polarity);
> + if (irq < 0)
> + return AE_ERROR;
>
> - for (i = 0; i < hdp->hd_nirqs; i++) {
> - int rc =
> - acpi_register_gsi(irqp->interrupts[i],
> - irqp->triggering,
> - irqp->polarity);
> - if (rc < 0)
> - return AE_ERROR;
> - hdp->hd_irq[i] = rc;
> - }
> + hdp->hd_irq[hdp->hd_nirqs] = irq;
> + hdp->hd_nirqs++;
> }
> }
>
Acked-by: Bob Picco <bob.picco@hp.com>
next prev parent reply other threads:[~2006-02-12 22:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-07 23:50 [PATCH] HPET: handle multiple ACPI EXTENDED_IRQ resources Bjorn Helgaas
2006-02-12 22:55 ` Bob Picco [this message]
2006-02-13 21:24 ` Bjorn Helgaas
2006-02-13 21:49 ` Andrew Morton
2006-02-13 21:55 ` 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=20060212225528.GC21804@localhost \
--to=bob.picco@hp.com \
--cc=akpm@osdl.org \
--cc=ambx1@neo.rr.com \
--cc=bjorn.helgaas@hp.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=robert.picco@hp.com \
--cc=venkatesh.pallipadi@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.