From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: roland@topspin.com
Subject: [PATCH] PCI: Clean up printks in msi.c
Date: Mon, 17 Jan 2005 14:01:52 -0800 [thread overview]
Message-ID: <11059993122763@kroah.com> (raw)
In-Reply-To: <11059993122424@kroah.com>
ChangeSet 1.2329.2.4, 2005/01/14 15:57:49-08:00, roland@topspin.com
[PATCH] PCI: Clean up printks in msi.c
Add "PCI:" prefixes and fix up the formatting and grammar of printks
in drivers/pci/msi.c. The main motivation was to fix the shouting
"MSI INIT SUCCESS" message printed when an MSI-using driver is first
started, but while we're at it we might as well tidy up all the messages.
Signed-off-by: Roland Dreier <roland@topspin.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/pci/msi.c | 37 ++++++++++++++++++++-----------------
1 files changed, 20 insertions(+), 17 deletions(-)
diff -Nru a/drivers/pci/msi.c b/drivers/pci/msi.c
--- a/drivers/pci/msi.c 2005-01-17 13:56:08 -08:00
+++ b/drivers/pci/msi.c 2005-01-17 13:56:08 -08:00
@@ -374,19 +374,18 @@
if ((status = msi_cache_init()) < 0) {
pci_msi_enable = 0;
- printk(KERN_INFO "WARNING: MSI INIT FAILURE\n");
+ printk(KERN_WARNING "PCI: MSI cache init failed\n");
return status;
}
last_alloc_vector = assign_irq_vector(AUTO_ASSIGN);
if (last_alloc_vector < 0) {
pci_msi_enable = 0;
- printk(KERN_INFO "WARNING: ALL VECTORS ARE BUSY\n");
+ printk(KERN_WARNING "PCI: No interrupt vectors available for MSI\n");
status = -EBUSY;
return status;
}
vector_irq[last_alloc_vector] = 0;
nr_released_vectors++;
- printk(KERN_INFO "MSI INIT SUCCESS\n");
return status;
}
@@ -736,7 +735,9 @@
/* Check whether driver already requested for MSI-X vectors */
if ((pos = pci_find_capability(dev, PCI_CAP_ID_MSIX)) > 0 &&
!msi_lookup_vector(dev, PCI_CAP_ID_MSIX)) {
- printk(KERN_INFO "Can't enable MSI. Device already had MSI-X vectors assigned\n");
+ printk(KERN_INFO "PCI: %s: Can't enable MSI. "
+ "Device already has MSI-X vectors assigned\n",
+ pci_name(dev));
dev->irq = temp;
return -EINVAL;
}
@@ -774,9 +775,9 @@
}
if (entry->msi_attrib.state) {
spin_unlock_irqrestore(&msi_lock, flags);
- printk(KERN_DEBUG "Driver[%d:%d:%d] unloaded wo doing free_irq on vector->%d\n",
- dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn),
- dev->irq);
+ printk(KERN_WARNING "PCI: %s: pci_disable_msi() called without "
+ "free_irq() on MSI vector %d\n",
+ pci_name(dev), dev->irq);
BUG_ON(entry->msi_attrib.state > 0);
} else {
vector_irq[dev->irq] = 0; /* free it */
@@ -982,7 +983,9 @@
/* Check whether driver already requested for MSI vector */
if (pci_find_capability(dev, PCI_CAP_ID_MSI) > 0 &&
!msi_lookup_vector(dev, PCI_CAP_ID_MSI)) {
- printk(KERN_INFO "Can't enable MSI-X. Device already had MSI vector assigned\n");
+ printk(KERN_INFO "PCI: %s: Can't enable MSI-X. "
+ "Device already has an MSI vector assigned\n",
+ pci_name(dev));
dev->irq = temp;
return -EINVAL;
}
@@ -1050,9 +1053,9 @@
spin_unlock_irqrestore(&msi_lock, flags);
if (warning) {
dev->irq = temp;
- printk(KERN_DEBUG "Driver[%d:%d:%d] unloaded wo doing free_irq on all vectors\n",
- dev->bus->number, PCI_SLOT(dev->devfn),
- PCI_FUNC(dev->devfn));
+ printk(KERN_WARNING "PCI: %s: pci_disable_msix() called without "
+ "free_irq() on all MSI-X vectors\n",
+ pci_name(dev));
BUG_ON(warning > 0);
} else {
dev->irq = temp;
@@ -1088,9 +1091,9 @@
state = msi_desc[dev->irq]->msi_attrib.state;
spin_unlock_irqrestore(&msi_lock, flags);
if (state) {
- printk(KERN_DEBUG "Driver[%d:%d:%d] unloaded wo doing free_irq on vector->%d\n",
- dev->bus->number, PCI_SLOT(dev->devfn),
- PCI_FUNC(dev->devfn), dev->irq);
+ printk(KERN_WARNING "PCI: %s: msi_remove_pci_irq_vectors() "
+ "called without free_irq() on MSI vector %d\n",
+ pci_name(dev), dev->irq);
BUG_ON(state > 0);
} else /* Release MSI vector assigned to this device */
msi_free_vector(dev, dev->irq, 0);
@@ -1132,9 +1135,9 @@
iounmap(base);
release_mem_region(phys_addr, PCI_MSIX_ENTRY_SIZE *
multi_msix_capable(control));
- printk(KERN_DEBUG "Driver[%d:%d:%d] unloaded wo doing free_irq on all vectors\n",
- dev->bus->number, PCI_SLOT(dev->devfn),
- PCI_FUNC(dev->devfn));
+ printk(KERN_WARNING "PCI: %s: msi_remove_pci_irq_vectors() "
+ "called without free_irq() on all MSI-X vectors\n",
+ pci_name(dev));
BUG_ON(warning > 0);
}
dev->irq = temp; /* Restore IOAPIC IRQ */
next prev parent reply other threads:[~2005-01-17 23:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-17 22:01 [BK PATCH] PCI fixes and PCI Express drivers for 2.6.11-rc1 Greg KH
2005-01-17 22:01 ` [PATCH] PCI: add PCI Express Port Bus Driver subsystem Greg KH
2005-01-17 22:01 ` [PATCH] PCI: use modern format for PCI addresses Greg KH
2005-01-17 22:01 ` [PATCH] PCI: pci_ids.h correction for Intel ICH7 - 2.6.10-bk13 Greg KH
2005-01-17 22:01 ` Greg KH [this message]
2005-01-17 22:01 ` [PATCH] PCI: rom.c cleanups Greg KH
2005-01-17 22:01 ` [PATCH] PCI: Downgrade printk that complains about unsupported PCI PM caps Greg KH
2005-01-17 22:01 ` [PATCH] PCI: Lock initializer cleanup - batch 4 Greg KH
2005-01-17 22:01 ` [PATCH] PCI: fix release_pcibus_dev() crash Greg KH
2005-01-17 22:01 ` PCI: move pcie build into the drivers/pci/ subdirectory Greg KH
2005-01-17 23:49 ` [PATCH] PCI: add PCI Express Port Bus Driver subsystem Greg KH
-- strict thread matches above, loose matches on Subject: below --
2005-01-10 18:33 [PATCH] PCI: Clean up printks in msi.c Nguyen, Tom L
2005-01-10 17:11 Roland Dreier
2005-01-10 17:23 ` Zwane Mwaikambo
2005-01-10 17:31 ` Greg KH
2005-01-10 17:39 ` Roland Dreier
2005-01-12 0:37 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11059993122763@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@topspin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.