From: Andre Detsch <adetsch@br.ibm.com>
To: netdev@vger.kernel.org, mcarlson@broadcom.com,
"Michael Chan" <mchan@broadcom.com>
Subject: [PATCH v2] tg3: Fix INTx fallback when MSI fails
Date: Mon, 26 Apr 2010 14:27:07 -0300 [thread overview]
Message-ID: <201004261427.07099.adetsch@br.ibm.com> (raw)
In-Reply-To: <20100421.161751.94080129.davem@davemloft.net>
tg3: Fix INTx fallback when MSI fails
MSI setup changes the value of irq_vec in struct tg3 *tp.
This attribute must be taken into account and restored before
we try to do a new request_irq for INTx fallback.
In powerpc, the original code was leading to an EINVAL return within
request_irq, because the driver was trying to use the disabled MSI
virtual irq number instead of tp->pdev->irq.
Signed-off-by: Andre Detsch <adetsch@br.ibm.com>
---
Tested on powerpc, but should be safe for other architectures as well.
v2: removed unnecessary changes
Index: linux-2.6.34-rc5/drivers/net/tg3.c
===================================================================
--- linux-2.6.34-rc5.orig/drivers/net/tg3.c 2010-04-19 20:29:56.000000000 -0300
+++ linux-2.6.34-rc5/drivers/net/tg3.c 2010-04-26 14:10:42.000000000 -0300
@@ -8633,6 +8633,7 @@ static int tg3_test_msi(struct tg3 *tp)
pci_disable_msi(tp->pdev);
tp->tg3_flags2 &= ~TG3_FLG2_USING_MSI;
+ tp->napi[0].irq_vec = tp->pdev->irq;
err = tg3_request_irq(tp, 0);
if (err)
next prev parent reply other threads:[~2010-04-26 17:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 13:15 [PATCH] tg3: Fix INTx fallback when MSI fails Andre Detsch
2010-04-21 23:17 ` David Miller
2010-04-26 17:27 ` Andre Detsch [this message]
2010-04-26 18:10 ` [PATCH v2] " David Miller
2010-04-26 18:01 ` Michael Chan
2010-04-26 18:15 ` David Miller
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=201004261427.07099.adetsch@br.ibm.com \
--to=adetsch@br.ibm.com \
--cc=mcarlson@broadcom.com \
--cc=mchan@broadcom.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 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.