Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1318686 > unrolled thread
| Started by | Chen Fan <chen.fan.fnst@cn.fujitsu.com> |
|---|---|
| First post | 2016-01-27 07:20 +0100 |
| Last post | 2016-01-27 07:20 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH v3 1/2] pci: add an irq_invalid flag to specify the IRQ is not connected Chen Fan <chen.fan.fnst@cn.fujitsu.com> - 2016-01-27 07:20 +0100
| From | Chen Fan <chen.fan.fnst@cn.fujitsu.com> |
|---|---|
| Date | 2016-01-27 07:20 +0100 |
| Subject | [PATCH v3 1/2] pci: add an irq_invalid flag to specify the IRQ is not connected |
| Message-ID | <qVrCp-7KH-1@gated-at.bofh.it> |
Quoting the PCI3.0 SPEC on page 223:
"For x86 based PCs, the values in this register correspond
to IRQ numbers (0-15) of the standard dual 8259 configuration.
The value 255 is defined as meaning "unknown" or "no connection"
to the interrupt controller. Values between 15 and 254 are reserved."
So we add an irq_invalid flag to tell driver that the device wire
is not connected. then the driver could know whether it should call
request_irq().
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
---
drivers/acpi/pci_irq.c | 10 ++++++++++
include/linux/pci.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index d30184c..bb78376 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -436,6 +436,16 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
* driver reported one, then use it. Exit in any case.
*/
if (gsi < 0) {
+#ifdef CONFIG_X86
+ /*
+ * For X86 architecture, The Interrupt Line value of 0xff is
+ * defined to mean "unknown" or "no connection" (PCI 3.0,
+ * Section 6.2.4, footnote on page 223). we flag the IRQ
+ * as INVALID.
+ */
+ if (dev->irq == 0xff)
+ dev->irq_invalid = 1;
+#endif
if (acpi_isa_register_gsi(dev))
dev_warn(&dev->dev, "PCI INT %c: no GSI\n",
pin_name(pin));
diff --git a/include/linux/pci.h b/include/linux/pci.h
index d86378c..06f137e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -359,6 +359,7 @@ struct pci_dev {
unsigned int io_window_1k:1; /* Intel P2P bridge 1K I/O windows */
unsigned int irq_managed:1;
unsigned int has_secondary_link:1;
+ unsigned int irq_invalid:1;
pci_dev_flags_t dev_flags;
atomic_t enable_cnt; /* pci_enable_device has been called */
--
1.9.3
Back to top | Article view | linux.kernel
csiph-web