[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 1 Jan 2010 19:31:55 +0100
From: Jarek Poplawski <jarkao2@...il.com>
To: Mike McCormack <mikem@...g3k.org>
Cc: Stephen Hemminger <shemminger@...tta.com>, netdev@...r.kernel.org,
flyboy@...il.com, dhazelton@...er.net, mbreuer@...jas.com
Subject: Re: [PATCH] sky2: Lock transmit queue while disabling device
On Fri, Jan 01, 2010 at 08:51:23AM +0900, Mike McCormack wrote:
> Another way to solve the problem would be to take the transmit lock in
> netif_device_detach() to make sure that any in progress transmits have
> completed before returning.
Yes, it seems this lock might be needed around this place, but I'd
like to check another idea: if it's not about awakening too early.
Berck, could you try this patch?
Thanks,
Jarek P.
---
drivers/net/sky2.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 1c01b96..31f1629 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1844,7 +1844,7 @@ static void sky2_tx_complete(struct sky2_port *sky2, u16 done)
sky2->tx_cons = idx;
smp_mb();
- if (tx_avail(sky2) > MAX_SKB_TX_LE + 4)
+ if (tx_avail(sky2) > MAX_SKB_TX_LE + 4 && netif_device_present(dev))
netif_wake_queue(dev);
}
--
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