When we setup MSI, if device power state is not equal to PCI_D0, system will silently ignore writing MSI message, but pci_enable_msi() still return 0 which seems setup successfully. So we should warn here to help diagnose this issue. Signed-off-by: Yijing Wang <wangyijing@xxxxxxxxxx> --- drivers/pci/msi.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index aca7578..25ed59d 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -291,6 +291,8 @@ void __write_msi_msg(struct msi_desc *entry, struct msi_msg *msg) { if (entry->dev->current_state != PCI_D0) { /* Don't touch the hardware now */ + dev_warn(&entry->dev->dev, + "current_state != PCI_D0, ignore writing MSI message!\n"); } else if (entry->msi_attrib.is_msix) { void __iomem *base; base = entry->mask_base + -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html