aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-01-07 04:49:49 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-08 22:50:52 -0500
commit0bec3b700d106a8b0a34227b2976d1a582f1aab7 (patch)
treec6e6a28720a3640143d87e9f0fb6ebe340da00c2
parent4a71d0548c9d51384977e986dff2c6f8395d8283 (diff)
r8169: add support for xmit_more
Delay update of hw tail descriptor if we know that another skb is going to be sent. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/realtek/r8169.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 14a1c5cec3a5..3a280598a15a 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -7049,6 +7049,7 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
7049 u32 status, len; 7049 u32 status, len;
7050 u32 opts[2]; 7050 u32 opts[2];
7051 int frags; 7051 int frags;
7052 bool stop_queue;
7052 7053
7053 if (unlikely(!TX_FRAGS_READY_FOR(tp, skb_shinfo(skb)->nr_frags))) { 7054 if (unlikely(!TX_FRAGS_READY_FOR(tp, skb_shinfo(skb)->nr_frags))) {
7054 netif_err(tp, drv, dev, "BUG! Tx Ring full when queue awake!\n"); 7055 netif_err(tp, drv, dev, "BUG! Tx Ring full when queue awake!\n");
@@ -7105,11 +7106,16 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
7105 7106
7106 tp->cur_tx += frags + 1; 7107 tp->cur_tx += frags + 1;
7107 7108
7108 RTL_W8(TxPoll, NPQ); 7109 stop_queue = !TX_FRAGS_READY_FOR(tp, MAX_SKB_FRAGS);
7109 7110
7110 mmiowb(); 7111 if (!skb->xmit_more || stop_queue ||
7112 netif_xmit_stopped(netdev_get_tx_queue(dev, 0))) {
7113 RTL_W8(TxPoll, NPQ);
7114
7115 mmiowb();
7116 }
7111 7117
7112 if (!TX_FRAGS_READY_FOR(tp, MAX_SKB_FRAGS)) { 7118 if (stop_queue) {
7113 /* Avoid wrongly optimistic queue wake-up: rtl_tx thread must 7119 /* Avoid wrongly optimistic queue wake-up: rtl_tx thread must
7114 * not miss a ring update when it notices a stopped queue. 7120 * not miss a ring update when it notices a stopped queue.
7115 */ 7121 */