Commit 17bcb684 authored by Francois Romieu's avatar Francois Romieu Committed by David S. Miller

r8169: revert "add byte queue limit support".

This reverts commit 036dafa2.

First it appears in bisection, then reverting it solves the usual
netdev watchdog problem for different people. I don't have a proper
fix yet so get rid of it.
Bisected-and-reported-by: default avatarAlex Villacís Lasso <a_villacis@palosanto.com>
Signed-off-by: default avatarFrancois Romieu <romieu@fr.zoreil.com>
Cc: Josh Boyer <jwboyer@redhat.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 13378cad
...@@ -5656,7 +5656,6 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp) ...@@ -5656,7 +5656,6 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp)
{ {
rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC); rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC);
tp->cur_tx = tp->dirty_tx = 0; tp->cur_tx = tp->dirty_tx = 0;
netdev_reset_queue(tp->dev);
} }
static void rtl_reset_work(struct rtl8169_private *tp) static void rtl_reset_work(struct rtl8169_private *tp)
...@@ -5811,8 +5810,6 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb, ...@@ -5811,8 +5810,6 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
txd->opts2 = cpu_to_le32(opts[1]); txd->opts2 = cpu_to_le32(opts[1]);
netdev_sent_queue(dev, skb->len);
skb_tx_timestamp(skb); skb_tx_timestamp(skb);
wmb(); wmb();
...@@ -5909,16 +5906,9 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev) ...@@ -5909,16 +5906,9 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)
rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING); rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
} }
struct rtl_txc {
int packets;
int bytes;
};
static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp) static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
{ {
struct rtl8169_stats *tx_stats = &tp->tx_stats;
unsigned int dirty_tx, tx_left; unsigned int dirty_tx, tx_left;
struct rtl_txc txc = { 0, 0 };
dirty_tx = tp->dirty_tx; dirty_tx = tp->dirty_tx;
smp_rmb(); smp_rmb();
...@@ -5937,24 +5927,17 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp) ...@@ -5937,24 +5927,17 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp)
rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb, rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb,
tp->TxDescArray + entry); tp->TxDescArray + entry);
if (status & LastFrag) { if (status & LastFrag) {
struct sk_buff *skb = tx_skb->skb; u64_stats_update_begin(&tp->tx_stats.syncp);
tp->tx_stats.packets++;
txc.packets++; tp->tx_stats.bytes += tx_skb->skb->len;
txc.bytes += skb->len; u64_stats_update_end(&tp->tx_stats.syncp);
dev_kfree_skb(skb); dev_kfree_skb(tx_skb->skb);
tx_skb->skb = NULL; tx_skb->skb = NULL;
} }
dirty_tx++; dirty_tx++;
tx_left--; tx_left--;
} }
u64_stats_update_begin(&tx_stats->syncp);
tx_stats->packets += txc.packets;
tx_stats->bytes += txc.bytes;
u64_stats_update_end(&tx_stats->syncp);
netdev_completed_queue(dev, txc.packets, txc.bytes);
if (tp->dirty_tx != dirty_tx) { if (tp->dirty_tx != dirty_tx) {
tp->dirty_tx = dirty_tx; tp->dirty_tx = dirty_tx;
/* Sync with rtl8169_start_xmit: /* Sync with rtl8169_start_xmit:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment