Root/
1 | /* |
2 | * PCI IRQ failure handing code |
3 | * |
4 | * Copyright (c) 2008 James Bottomley <James.Bottomley@HansenPartnership.com> |
5 | */ |
6 | |
7 | #include <linux/acpi.h> |
8 | #include <linux/device.h> |
9 | #include <linux/kernel.h> |
10 | #include <linux/export.h> |
11 | #include <linux/pci.h> |
12 | |
13 | static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason) |
14 | { |
15 | struct pci_dev *parent = to_pci_dev(pdev->dev.parent); |
16 | |
17 | dev_printk(KERN_ERR, &pdev->dev, |
18 | "Potentially misrouted IRQ (Bridge %s %04x:%04x)\n", |
19 | dev_name(&parent->dev), parent->vendor, parent->device); |
20 | dev_printk(KERN_ERR, &pdev->dev, "%s\n", reason); |
21 | dev_printk(KERN_ERR, &pdev->dev, "Please report to linux-kernel@vger.kernel.org\n"); |
22 | WARN_ON(1); |
23 | } |
24 | |
25 | /** |
26 | * pci_lost_interrupt - reports a lost PCI interrupt |
27 | * @pdev: device whose interrupt is lost |
28 | * |
29 | * The primary function of this routine is to report a lost interrupt |
30 | * in a standard way which users can recognise (instead of blaming the |
31 | * driver). |
32 | * |
33 | * Returns: |
34 | * a suggestion for fixing it (although the driver is not required to |
35 | * act on this). |
36 | */ |
37 | enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *pdev) |
38 | { |
39 | if (pdev->msi_enabled || pdev->msix_enabled) { |
40 | enum pci_lost_interrupt_reason ret; |
41 | |
42 | if (pdev->msix_enabled) { |
43 | pci_note_irq_problem(pdev, "MSIX routing failure"); |
44 | ret = PCI_LOST_IRQ_DISABLE_MSIX; |
45 | } else { |
46 | pci_note_irq_problem(pdev, "MSI routing failure"); |
47 | ret = PCI_LOST_IRQ_DISABLE_MSI; |
48 | } |
49 | return ret; |
50 | } |
51 | #ifdef CONFIG_ACPI |
52 | if (!(acpi_disabled || acpi_noirq)) { |
53 | pci_note_irq_problem(pdev, "Potential ACPI misrouting please reboot with acpi=noirq"); |
54 | /* currently no way to fix acpi on the fly */ |
55 | return PCI_LOST_IRQ_DISABLE_ACPI; |
56 | } |
57 | #endif |
58 | pci_note_irq_problem(pdev, "unknown cause (not MSI or ACPI)"); |
59 | return PCI_LOST_IRQ_NO_INFORMATION; |
60 | } |
61 | EXPORT_SYMBOL(pci_lost_interrupt); |
62 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9