Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
[pandora-kernel.git] / net / core / netpoll.c
index 64f51ee..9675f31 100644 (file)
@@ -24,6 +24,7 @@
 #include <net/tcp.h>
 #include <net/udp.h>
 #include <asm/unaligned.h>
+#include <trace/events/napi.h>
 
 /*
  * We maintain a small pool of fully-sized skbs, to make sure the
@@ -137,6 +138,7 @@ static int poll_one_napi(struct netpoll_info *npinfo,
        set_bit(NAPI_STATE_NPSVC, &napi->state);
 
        work = napi->poll(napi, budget);
+       trace_napi_poll(napi);
 
        clear_bit(NAPI_STATE_NPSVC, &napi->state);
        atomic_dec(&trapped);
@@ -300,8 +302,11 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
                for (tries = jiffies_to_usecs(1)/USEC_PER_POLL;
                     tries > 0; --tries) {
                        if (__netif_tx_trylock(txq)) {
-                               if (!netif_tx_queue_stopped(txq))
+                               if (!netif_tx_queue_stopped(txq)) {
                                        status = ops->ndo_start_xmit(skb, dev);
+                                       if (status == NETDEV_TX_OK)
+                                               txq_trans_update(txq);
+                               }
                                __netif_tx_unlock(txq);
 
                                if (status == NETDEV_TX_OK)