netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jeffrey.t.kirsher@intel.com
Cc: netdev@vger.kernel.org, gospo@redhat.com, john.r.fastabend@intel.com
Subject: Re: [net-next-2.6 PATCH] ixgbe: only process one ixgbe_watchdog_task at a time.
Date: Sat, 23 Jan 2010 02:19:41 -0800 (PST)	[thread overview]
Message-ID: <20100123.021941.134608202.davem@davemloft.net> (raw)
In-Reply-To: <20100123101644.12479.40925.stgit@localhost.localdomain>

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sat, 23 Jan 2010 02:17:31 -0800

> diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
> index 8d206f7..cbc62db 100644
> --- a/drivers/net/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ixgbe/ixgbe_main.c
> @@ -5013,7 +5013,8 @@ static void ixgbe_watchdog_task(struct work_struct *work)
>  	struct ixgbe_ring *tx_ring;
>  	int some_tx_pending = 0;
>  
> -	adapter->flags |= IXGBE_FLAG_IN_WATCHDOG_TASK;
> +	while (test_and_set_bit(__IXGBE_IN_WATCHDOG_TASK, &adapter->state))
> +		msleep(1);
>  

I think using a mutex() would better serve you here.

  reply	other threads:[~2010-01-23 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-23 10:17 [net-next-2.6 PATCH] ixgbe: only process one ixgbe_watchdog_task at a time Jeff Kirsher
2010-01-23 10:19 ` David Miller [this message]
2010-01-25  6:24   ` John Fastabend

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=20100123.021941.134608202.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=gospo@redhat.com \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=john.r.fastabend@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).