0e056eb553
./lib/string.c:134: WARNING: Inline emphasis start-string without end-string. ./mm/filemap.c:522: WARNING: Inline interpreted text or phrase reference start-string without end-string. ./mm/filemap.c:1283: ERROR: Unexpected indentation. ./mm/filemap.c:3003: WARNING: Inline interpreted text or phrase reference start-string without end-string. ./mm/vmalloc.c:1544: WARNING: Inline emphasis start-string without end-string. ./mm/page_alloc.c:4245: ERROR: Unexpected indentation. ./ipc/util.c:676: ERROR: Unexpected indentation. ./drivers/pci/irq.c:35: WARNING: Block quote ends without a blank line; unexpected unindent. ./security/security.c:109: ERROR: Unexpected indentation. ./security/security.c:110: WARNING: Definition list ends without a blank line; unexpected unindent. ./block/genhd.c:275: WARNING: Inline strong start-string without end-string. ./block/genhd.c:283: WARNING: Inline strong start-string without end-string. ./include/linux/clk.h:134: WARNING: Inline emphasis start-string without end-string. ./include/linux/clk.h:134: WARNING: Inline emphasis start-string without end-string. ./ipc/util.c:477: ERROR: Unknown target name: "s". Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
62 lines
1.7 KiB
C
62 lines
1.7 KiB
C
/*
|
|
* PCI IRQ failure handing code
|
|
*
|
|
* Copyright (c) 2008 James Bottomley <James.Bottomley@HansenPartnership.com>
|
|
*/
|
|
|
|
#include <linux/acpi.h>
|
|
#include <linux/device.h>
|
|
#include <linux/kernel.h>
|
|
#include <linux/export.h>
|
|
#include <linux/pci.h>
|
|
|
|
static void pci_note_irq_problem(struct pci_dev *pdev, const char *reason)
|
|
{
|
|
struct pci_dev *parent = to_pci_dev(pdev->dev.parent);
|
|
|
|
dev_err(&pdev->dev,
|
|
"Potentially misrouted IRQ (Bridge %s %04x:%04x)\n",
|
|
dev_name(&parent->dev), parent->vendor, parent->device);
|
|
dev_err(&pdev->dev, "%s\n", reason);
|
|
dev_err(&pdev->dev, "Please report to linux-kernel@vger.kernel.org\n");
|
|
WARN_ON(1);
|
|
}
|
|
|
|
/**
|
|
* pci_lost_interrupt - reports a lost PCI interrupt
|
|
* @pdev: device whose interrupt is lost
|
|
*
|
|
* The primary function of this routine is to report a lost interrupt
|
|
* in a standard way which users can recognise (instead of blaming the
|
|
* driver).
|
|
*
|
|
* Returns:
|
|
* a suggestion for fixing it (although the driver is not required to
|
|
* act on this).
|
|
*/
|
|
enum pci_lost_interrupt_reason pci_lost_interrupt(struct pci_dev *pdev)
|
|
{
|
|
if (pdev->msi_enabled || pdev->msix_enabled) {
|
|
enum pci_lost_interrupt_reason ret;
|
|
|
|
if (pdev->msix_enabled) {
|
|
pci_note_irq_problem(pdev, "MSIX routing failure");
|
|
ret = PCI_LOST_IRQ_DISABLE_MSIX;
|
|
} else {
|
|
pci_note_irq_problem(pdev, "MSI routing failure");
|
|
ret = PCI_LOST_IRQ_DISABLE_MSI;
|
|
}
|
|
return ret;
|
|
}
|
|
#ifdef CONFIG_ACPI
|
|
if (!(acpi_disabled || acpi_noirq)) {
|
|
pci_note_irq_problem(pdev, "Potential ACPI misrouting please reboot with acpi=noirq");
|
|
/* currently no way to fix acpi on the fly */
|
|
return PCI_LOST_IRQ_DISABLE_ACPI;
|
|
}
|
|
#endif
|
|
pci_note_irq_problem(pdev, "unknown cause (not MSI or ACPI)");
|
|
return PCI_LOST_IRQ_NO_INFORMATION;
|
|
}
|
|
EXPORT_SYMBOL(pci_lost_interrupt);
|