All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: do not try to assign irq 255
@ 2013-02-18 10:09 Hannes Reinecke
  2013-02-19  1:13 ` David Härdeman
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Hannes Reinecke @ 2013-02-18 10:09 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hannes Reinecke, Frederik Himpe, Oliver Neukum, David Haerdeman,
	linux-usb, linux-pci

The PCI config space reseves a byte for the interrupt line,
so irq 255 actually refers to 'not set'.
However, the 'irq' field for struct pci_dev is an integer,
so the original meaning is lost, causing the system to
assign an interrupt '255', which fails.

So we should _not_ assign an interrupt value here, and
allow upper layers to fixup things.

This patch make PCI devices with MSI interrupts only
(like the xhci device on certain HP laptops) work properly.

Cc: Frederik Himpe <fhimpe@vub.ac.be>
Cc: Oliver Neukum <oneukum@suse.de>
Cc: David Haerdeman <david@hardeman.nu>
Cc: linux-usb@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Signed-off-by: Hannes Reinecke <hare@suse.de>

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 6186f03..a2db887f 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -923,7 +923,8 @@ static void pci_read_irq(struct pci_dev *dev)
 	dev->pin = irq;
 	if (irq)
 		pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq);
-	dev->irq = irq;
+	if (irq < 255)
+		dev->irq = irq;
 }
 
 void set_pcie_port_type(struct pci_dev *pdev)

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-09-10 21:53 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-18 10:09 [PATCH] pci: do not try to assign irq 255 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
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

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.