From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Adam Belay <ambx1@neo.rr.com>, Adam M Belay <abelay@mit.edu>,
Li Shaohua <shaohua.li@intel.com>,
Matthieu Castet <castet.matthieu@free.fr>,
Thomas Renninger <trenn@suse.de>,
Rene Herman <rene.herman@keyaccess.nl>,
Jaroslav Kysela <perex@perex.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Takashi Iwai <tiwai@suse.de>, Jiri Slaby <jirislaby@gmail.com>,
Jeff Garzik <jgarzik@pobox.com>
Subject: Re: [patch 27/28] PNP: avoid legacy IDE IRQs
Date: Wed, 18 Jun 2008 23:34:06 +0200 [thread overview]
Message-ID: <200806182334.07049.bzolnier@gmail.com> (raw)
In-Reply-To: <20080617225913.281681169@ldl.fc.hp.com>
Hi,
On Wednesday 18 June 2008, Bjorn Helgaas wrote:
> If an IDE controller is in compatibility mode, it expects to use
> IRQs 14 and 15, so PNP should avoid them.
>
> This patch should resolve this problem report:
> parallel driver grabs IRQ14 preventing legacy SFF ATA controller from working
> https://bugzilla.novell.com/show_bug.cgi?id=375836
>
> Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
>
> Index: work14/drivers/pnp/resource.c
> ===================================================================
> --- work14.orig/drivers/pnp/resource.c 2008-06-17 15:52:36.000000000 -0600
> +++ work14/drivers/pnp/resource.c 2008-06-17 16:14:18.000000000 -0600
> @@ -17,6 +17,7 @@
> #include <linux/pci.h>
> #include <linux/ioport.h>
> #include <linux/init.h>
> +#include <linux/libata.h>
this include is for libata only AFAIK
[ I added Jeff to cc: ]
> #include <linux/pnp.h>
> #include "base.h"
> @@ -286,6 +287,61 @@ static irqreturn_t pnp_test_handler(int
> return IRQ_HANDLED;
> }
>
> +#ifdef CONFIG_PCI
> +static int pci_dev_uses_irq(struct pnp_dev *pnp, struct pci_dev *pci,
> + unsigned int irq)
> +{
> + u32 class;
> + u8 progif;
> +
> + if (pci->irq == irq) {
> + dev_dbg(&pnp->dev, "device %s using irq %d\n",
> + pci_name(pci), irq);
> + return 1;
> + }
> +
> + /*
> + * See pci_setup_device() and ata_pci_sff_activate_host() for
> + * similar IDE legacy detection.
> + */
> + pci_read_config_dword(pci, PCI_CLASS_REVISION, &class);
> + class >>= 8; /* discard revision ID */
> + progif = class & 0xff;
> + class >>= 8;
> +
> + if (class == PCI_CLASS_STORAGE_IDE) {
> + /*
> + * Unless both channels are native-PCI mode only,
> + * treat the compatibility IRQs as busy.
> + */
> + if ((progif & 0x5) != 0x5)
> + if (ATA_PRIMARY_IRQ(pci) == irq ||
> + ATA_SECONDARY_IRQ(pci) == irq) {
ATA_*_IRQ are libata specific (+ it looks like they should be removed),
please use pci_get_legacy_ide_irq(dev, channel) instead.
Thanks,
Bart
next prev parent reply other threads:[~2008-06-18 21:34 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-17 22:58 [patch 00/28] PNP: convert fixed tables to lists, v3 Bjorn Helgaas
2008-06-17 22:58 ` [patch 01/28] PNP: add detail to debug resource dump Bjorn Helgaas
2008-06-17 22:58 ` [patch 02/28] PNP: remove pnp_resource.index Bjorn Helgaas
2008-06-17 22:58 ` [patch 03/28] PNP: add pnp_resource_type() internal interface Bjorn Helgaas
2008-06-17 22:58 ` [patch 04/28] PNP: add pnp_resource_type_name() helper function Bjorn Helgaas
2008-06-17 22:58 ` [patch 05/28] PNP: make pnp_{port,mem,etc}_start(), et al work for invalid resources Bjorn Helgaas
2008-06-17 22:58 ` [patch 06/28] PNP: replace pnp_resource_table with dynamically allocated resources Bjorn Helgaas
2008-06-17 22:58 ` [patch 07/28] PNPACPI: keep disabled resources when parsing current config Bjorn Helgaas
2008-06-17 22:58 ` [patch 08/28] PNP: remove ratelimit on add resource failures Bjorn Helgaas
2008-06-17 22:58 ` [patch 09/28] PNP: dont sort by type in /sys/.../resources Bjorn Helgaas
2008-06-17 22:58 ` [patch 10/28] PNP: add pnp_possible_config() -- can a device could be configured this way? Bjorn Helgaas
2008-06-17 22:58 ` [patch 11/28] PNP: whitespace/coding style fixes Bjorn Helgaas
2008-06-17 22:58 ` [patch 12/28] PNP: define PNP-specific IORESOURCE_IO_* flags alongside IRQ, DMA, MEM Bjorn Helgaas
2008-06-17 22:58 ` [patch 13/28] PNP: make resource option structures private to PNP subsystem Bjorn Helgaas
2008-06-17 22:58 ` [patch 14/28] PNP: introduce pnp_irq_mask_t typedef Bjorn Helgaas
2008-06-17 22:58 ` [patch 15/28] PNP: increase I/O port & memory option address sizes Bjorn Helgaas
2008-06-17 22:58 ` [patch 16/28] PNP: improve resource assignment debug Bjorn Helgaas
2008-06-17 22:58 ` [patch 17/28] PNP: in debug resource dump, make empty list obvious Bjorn Helgaas
2008-06-17 22:58 ` [patch 18/28] PNP: make resource assignment functions return 0 (success) or -EBUSY (failure) Bjorn Helgaas
2008-06-17 22:58 ` [patch 19/28] PNP: remove redundant pnp_can_configure() check Bjorn Helgaas
2008-06-17 22:58 ` [patch 20/28] PNP: centralize resource option allocations Bjorn Helgaas
2008-06-17 22:58 ` [patch 21/28] PNPACPI: ignore _PRS interrupt numbers larger than PNP_IRQ_NR Bjorn Helgaas
2008-06-17 22:58 ` [patch 22/28] PNP: rename pnp_register_*_resource() local variables Bjorn Helgaas
2008-06-17 22:58 ` [patch 23/28] PNP: support optional IRQ resources Bjorn Helgaas
2008-06-17 22:58 ` [patch 24/28] PNP: remove extra 0x100 bit from option priority Bjorn Helgaas
2008-06-17 22:58 ` [patch 25/28] ISAPNP: handle independent options following dependent ones Bjorn Helgaas
2008-06-17 22:58 ` [patch 26/28] PNP: convert resource options to single linked list Bjorn Helgaas
2008-06-17 22:58 ` [patch 27/28] PNP: avoid legacy IDE IRQs Bjorn Helgaas
2008-06-18 21:34 ` Bartlomiej Zolnierkiewicz [this message]
2008-06-17 22:58 ` [patch 28/28] PNPACPI: add support for HP vendor-specific CCSR descriptors Bjorn Helgaas
2008-06-18 0:00 ` [patch 00/28] PNP: convert fixed tables to lists, v3 Len Brown
-- strict thread matches above, loose matches on Subject: below --
2008-06-27 22:56 [patch 00/28] PNP: convert fixed tables to lists, v4 Bjorn Helgaas
2008-06-27 22:57 ` [patch 27/28] PNP: avoid legacy IDE IRQs 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=200806182334.07049.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=abelay@mit.edu \
--cc=akpm@linux-foundation.org \
--cc=ambx1@neo.rr.com \
--cc=bjorn.helgaas@hp.com \
--cc=castet.matthieu@free.fr \
--cc=jgarzik@pobox.com \
--cc=jirislaby@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=rene.herman@keyaccess.nl \
--cc=shaohua.li@intel.com \
--cc=tiwai@suse.de \
--cc=trenn@suse.de \
/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