[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100123.021941.134608202.davem@davemloft.net>
Date: Sat, 23 Jan 2010 02:19:41 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: jeffrey.t.kirsher@...el.com
Cc: netdev@...r.kernel.org, gospo@...hat.com,
john.r.fastabend@...el.com
Subject: Re: [net-next-2.6 PATCH] ixgbe: only process one
ixgbe_watchdog_task at a time.
From: Jeff Kirsher <jeffrey.t.kirsher@...el.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists