From: Andy Gospodarek <andy@greyhouse.net>
To: netdev@vger.kernel.org, auke-jan.h.kok@intel.com
Subject: Re: [PATCH] e1000e: tweak irq allocation messages
Date: Thu, 31 Jan 2008 18:06:20 -0500 [thread overview]
Message-ID: <20080131230620.GC856@gospo.usersys.redhat.com> (raw)
In-Reply-To: <20080131225639.GB856@gospo.usersys.redhat.com>
On Thu, Jan 31, 2008 at 05:56:39PM -0500, Andy Gospodarek wrote:
>
> There's too much noise on systems that don't support MSI. Let's get rid
> of the unneeded message and make the real error message more specific.
>
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> ---
>
> netdev.c | 12 +++++-------
> 1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
> index 0a2cb79..0c8cd1c 100644
> --- a/drivers/net/e1000e/netdev.c
> +++ b/drivers/net/e1000e/netdev.c
> @@ -945,11 +945,7 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
> int irq_flags = IRQF_SHARED;
> int err;
>
> - err = pci_enable_msi(adapter->pdev);
> - if (err) {
> - ndev_warn(netdev,
> - "Unable to allocate MSI interrupt Error: %d\n", err);
> - } else {
> + if (!pci_enable_msi(adapter->pdev)) {
> adapter->flags |= FLAG_MSI_ENABLED;
> handler = e1000_intr_msi;
> irq_flags = 0;
> @@ -958,10 +954,12 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
> err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name,
> netdev);
> if (err) {
> + ndev_err(netdev,
> + "Unable to allocate %s interrupt (return: %d)\n",
> + adapter->flags & FLAG_MSI_ENABLED ? "MSI":"INTx"
> + err);
> if (adapter->flags & FLAG_MSI_ENABLED)
> pci_disable_msi(adapter->pdev);
> - ndev_err(netdev,
> - "Unable to allocate interrupt Error: %d\n", err);
> }
>
> return err;
(Reposted with the version I intended -- added ',' so it compiles!)
There's too much noise on systems that don't support MSI. Let's get rid
of a few and make the real error message more specific.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
---
netdev.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 0a2cb79..0c8cd1c 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -945,11 +945,7 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
int irq_flags = IRQF_SHARED;
int err;
- err = pci_enable_msi(adapter->pdev);
- if (err) {
- ndev_warn(netdev,
- "Unable to allocate MSI interrupt Error: %d\n", err);
- } else {
+ if (!pci_enable_msi(adapter->pdev)) {
adapter->flags |= FLAG_MSI_ENABLED;
handler = e1000_intr_msi;
irq_flags = 0;
@@ -958,10 +954,12 @@ static int e1000_request_irq(struct e1000_adapter *adapter)
err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name,
netdev);
if (err) {
+ ndev_err(netdev,
+ "Unable to allocate %s interrupt (return: %d)\n",
+ adapter->flags & FLAG_MSI_ENABLED ? "MSI":"INTx",
+ err);
if (adapter->flags & FLAG_MSI_ENABLED)
pci_disable_msi(adapter->pdev);
- ndev_err(netdev,
- "Unable to allocate interrupt Error: %d\n", err);
}
return err;
next prev parent reply other threads:[~2008-01-31 23:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-31 22:56 [PATCH] e1000e: tweak irq allocation messages Andy Gospodarek
2008-01-31 23:06 ` Andy Gospodarek [this message]
2008-01-31 23:54 ` Kok, Auke
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=20080131230620.GC856@gospo.usersys.redhat.com \
--to=andy@greyhouse.net \
--cc=auke-jan.h.kok@intel.com \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).