mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "David Härdeman" <david@hardeman.nu>
To: Hannes Reinecke <hare@suse.de>
Cc: Yinghai Lu <yinghai@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>,
	linux-kernel@vger.kernel.org, Frederik Himpe <fhimpe@vub.ac.be>,
	Oliver Neukum <oneukum@suse.de>,
	linux-usb@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH] pci: do not try to assign irq 255
Date: Tue, 26 Feb 2013 14:29:05 +0100	[thread overview]
Message-ID: <20130226132905.GB24959@hardeman.nu> (raw)
In-Reply-To: <5125C45A.5020208@suse.de>

On Thu, Feb 21, 2013 at 07:53:14AM +0100, Hannes Reinecke wrote:
>On 02/20/2013 05:57 PM, Yinghai Lu wrote:
>>it seems you mess pin with interrupt line.
>>
>>current code:
>>         unsigned char irq;
>>
>>         pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &irq);
>>         dev->pin = irq;
>>         if (irq)
>>                 pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
>>         dev->irq = irq;
>>
>>so if the device does not have interrupt pin implemented, pin should be zero.
>>and  pin and irq in dev should
>>be all 0.
>>
>But the device _has_ an interrupt pin implemented.
>The whole point here is that the interrupt line is _NOT_ zero.
>
...
>
>So at one point we have to decide that ->irq is not valid, despite it
>being not set to zero.
>An alternative fix would be this:
>
>diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
>index 68a921d..4a480cb 100644
>--- a/drivers/acpi/pci_irq.c
>+++ b/drivers/acpi/pci_irq.c
>@@ -469,6 +469,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
>                } else {
>                        dev_warn(&dev->dev, "PCI INT %c: no GSI\n",
>                                 pin_name(pin));
>+                       dev->irq = 0;
>                }
>                return 0;
>        }
>
>Which probably is a better solution, as here ->irq is _definitely_
>not valid, so we should reset it to '0' to avoid confusion on upper
>layers.
>

Is there any agreement on how to proceed?

-- 
David Härdeman

  reply	other threads:[~2013-02-26 13:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18 10:09 Hannes Reinecke
2013-02-19  1:13 ` David Härdeman
2013-02-19 19:40 ` Yinghai Lu
2013-02-20  7:58   ` Hannes Reinecke
2013-02-20 16:57     ` Yinghai Lu
2013-02-21  6:53       ` Hannes Reinecke
2013-02-26 13:29         ` David Härdeman [this message]
2013-02-26 13:50           ` Hannes Reinecke
2013-02-27 21:13         ` Bjorn Helgaas
2013-02-28 16:13           ` Hannes Reinecke
2013-03-01  7:41           ` Hannes Reinecke
2013-03-05 22:41             ` Sarah Sharp
2013-03-26 21:54               ` Bjorn Helgaas
2013-03-26 23:34                 ` Yinghai Lu
2013-09-10 21:53                   ` Bjorn Helgaas
2013-02-19 19:47 ` Bjorn Helgaas
2013-02-19 22:36   ` Frederik Himpe

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=20130226132905.GB24959@hardeman.nu \
    --to=david@hardeman.nu \
    --cc=bhelgaas@google.com \
    --cc=fhimpe@vub.ac.be \
    --cc=hare@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=oneukum@suse.de \
    --cc=yinghai@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

all inboxes | Powered by JetHome®