Olof Johansson wrote:
Ethernet bugfixes:
* Move the was_full/wake_queue logic from tx_intr to clean_tx
* Fix polarity in checks in pasemi_mac_close
Signed-off-by: Olof Johansson <[EMAIL PROTECTED]>
Index: linux-2.6/drivers/net/pasemi_mac.c
===================================================================
--- linux-2.6.orig/drivers/net/pasemi_mac.c
+++ linux-2.6/drivers/net/pasemi_mac.c
@@ -451,9 +451,12 @@ static int pasemi_mac_clean_tx(struct pa
struct pas_dma_xct_descr *dp;
int start, count;
int flags;
+ int was_full;
spin_lock_irqsave(&mac->tx->lock, flags);
+ was_full = mac->tx->next_to_clean - mac->tx->next_to_use == TX_RING_SIZE;
+
start = mac->tx->next_to_clean;
count = 0;
@@ -478,6 +481,9 @@ static int pasemi_mac_clean_tx(struct pa
mac->tx->next_to_clean += count;
spin_unlock_irqrestore(&mac->tx->lock, flags);
+ if (was_full)
+ netif_wake_queue(mac->netdev);
+
Isn't this was_full check redundant? Using standard test-and-clear
atomic logic, netif_wake_queue() will not issue spurious wakeups. Take
a look at its implementation in include/linux/netdevice.h.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html