From: "Michael Chan" <mchan@broadcom.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@oss.sgi.com
Subject: Re: [TG3]: Add tagged status support
Date: Mon, 09 May 2005 14:44:42 -0700 [thread overview]
Message-ID: <1115675082.8570.10.camel@rh4> (raw)
In-Reply-To: <20050509124832.2a073e11.davem@davemloft.net>
On Mon, 2005-05-09 at 12:48 -0700, David S. Miller wrote:
> Here is my current patch, how does it look.
>
> @@ -6005,6 +6079,16 @@ static int tg3_open(struct net_device *d
>
> if (tp->tg3_flags2 & TG3_FLG2_USING_MSI) {
> err = tg3_test_msi(tp);
> +
> + /* All MSI supporting chips should support tagged
> + * status. Assert that this is the case.
> + */
> + if (!(tp->tg3_flags2 & TG3_FLAG_TAGGED_STATUS)) {
> + printk(KERN_WARNING PFX "%s: MSI without TAGGED? "
> + "Not using MSI.\n", tp->dev->name);
> + err = -EINVAL;
> + }
> +
> if (err) {
> spin_lock_irq(&tp->lock);
> spin_lock(&tp->tx_lock);
I found one typo during testing, flags2 should have been flags:
+ if (!(tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)) {
I think it will be better to move up this block of code because here we
are at the point of returning error from tg3_open().
Something like this:
diff -Nru h/drivers/net/tg3.c i/drivers/net/tg3.c
--- h/drivers/net/tg3.c 2005-05-09 14:12:37.000000000 -0700
+++ i/drivers/net/tg3.c 2005-05-09 14:24:19.000000000 -0700
@@ -6010,7 +6010,14 @@
if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) &&
(GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5750_AX) &&
(GET_CHIP_REV(tp->pci_chip_rev_id) != CHIPREV_5750_BX)) {
- if (pci_enable_msi(tp->pdev) == 0) {
+ /* All MSI supporting chips should support tagged
+ * status. Assert that this is the case.
+ */
+ if (!(tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)) {
+ printk(KERN_WARNING PFX "%s: MSI without TAGGED? "
+ "Not using MSI.\n", tp->dev->name);
+ }
+ else if (pci_enable_msi(tp->pdev) == 0) {
u32 msi_mode;
msi_mode = tr32(MSGINT_MODE);
@@ -6080,15 +6087,6 @@
if (tp->tg3_flags2 & TG3_FLG2_USING_MSI) {
err = tg3_test_msi(tp);
- /* All MSI supporting chips should support tagged
- * status. Assert that this is the case.
- */
- if (!(tp->tg3_flags2 & TG3_FLAG_TAGGED_STATUS)) {
- printk(KERN_WARNING PFX "%s: MSI without TAGGED? "
- "Not using MSI.\n", tp->dev->name);
- err = -EINVAL;
- }
-
if (err) {
spin_lock_irq(&tp->lock);
spin_lock(&tp->tx_lock);
next prev parent reply other threads:[~2005-05-09 21:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-06 4:17 [TG3]: Add tagged status support David S. Miller
2005-05-06 16:12 ` Arthur Kepner
2005-05-06 22:27 ` Michael Chan
2005-05-09 19:48 ` David S. Miller
2005-05-09 21:44 ` Michael Chan [this message]
2005-05-09 22:54 ` David S. 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=1115675082.8570.10.camel@rh4 \
--to=mchan@broadcom.com \
--cc=davem@davemloft.net \
--cc=netdev@oss.sgi.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 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).