diff options
author | Francois Romieu <romieu@fr.zoreil.com> | 2012-07-23 16:55:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-23 21:27:00 -0400 |
commit | 17bcb684f08649a2ab6a7dcd8288332e72d208f1 (patch) | |
tree | e697dd0ed390e23c2c5e66c0db689b9cf2ba76c8 /drivers/net/ethernet | |
parent | 13378cad02afc2adc6c0e07fca03903c7ada0b37 (diff) |
r8169: revert "add byte queue limit support".
This reverts commit 036dafa28da1e2565a8529de2ae663c37b7a0060.
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: Alex VillacĂs Lasso <a_villacis@palosanto.com>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Josh Boyer <jwboyer@redhat.com>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index be4e00f3f485..b47d5b35024e 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -5656,7 +5656,6 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp) | |||
5656 | { | 5656 | { |
5657 | rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC); | 5657 | rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC); |
5658 | tp->cur_tx = tp->dirty_tx = 0; | 5658 | tp->cur_tx = tp->dirty_tx = 0; |
5659 | netdev_reset_queue(tp->dev); | ||
5660 | } | 5659 | } |
5661 | 5660 | ||
5662 | static void rtl_reset_work(struct rtl8169_private *tp) | 5661 | 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 | 5810 | ||
5812 | txd->opts2 = cpu_to_le32(opts[1]); | 5811 | txd->opts2 = cpu_to_le32(opts[1]); |
5813 | 5812 | ||
5814 | netdev_sent_queue(dev, skb->len); | ||
5815 | |||
5816 | skb_tx_timestamp(skb); | 5813 | skb_tx_timestamp(skb); |
5817 | 5814 | ||
5818 | wmb(); | 5815 | wmb(); |
@@ -5909,16 +5906,9 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev) | |||
5909 | rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING); | 5906 | rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING); |
5910 | } | 5907 | } |
5911 | 5908 | ||
5912 | struct rtl_txc { | ||
5913 | int packets; | ||
5914 | int bytes; | ||
5915 | }; | ||
5916 | |||
5917 | static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp) | 5909 | static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp) |
5918 | { | 5910 | { |
5919 | struct rtl8169_stats *tx_stats = &tp->tx_stats; | ||
5920 | unsigned int dirty_tx, tx_left; | 5911 | unsigned int dirty_tx, tx_left; |
5921 | struct rtl_txc txc = { 0, 0 }; | ||
5922 | 5912 | ||
5923 | dirty_tx = tp->dirty_tx; | 5913 | dirty_tx = tp->dirty_tx; |
5924 | smp_rmb(); | 5914 | smp_rmb(); |
@@ -5937,24 +5927,17 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp) | |||
5937 | rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb, | 5927 | rtl8169_unmap_tx_skb(&tp->pci_dev->dev, tx_skb, |
5938 | tp->TxDescArray + entry); | 5928 | tp->TxDescArray + entry); |
5939 | if (status & LastFrag) { | 5929 | if (status & LastFrag) { |
5940 | struct sk_buff *skb = tx_skb->skb; | 5930 | u64_stats_update_begin(&tp->tx_stats.syncp); |
5941 | 5931 | tp->tx_stats.packets++; | |
5942 | txc.packets++; | 5932 | tp->tx_stats.bytes += tx_skb->skb->len; |
5943 | txc.bytes += skb->len; | 5933 | u64_stats_update_end(&tp->tx_stats.syncp); |
5944 | dev_kfree_skb(skb); | 5934 | dev_kfree_skb(tx_skb->skb); |
5945 | tx_skb->skb = NULL; | 5935 | tx_skb->skb = NULL; |
5946 | } | 5936 | } |
5947 | dirty_tx++; | 5937 | dirty_tx++; |
5948 | tx_left--; | 5938 | tx_left--; |
5949 | } | 5939 | } |
5950 | 5940 | ||
5951 | u64_stats_update_begin(&tx_stats->syncp); | ||
5952 | tx_stats->packets += txc.packets; | ||
5953 | tx_stats->bytes += txc.bytes; | ||
5954 | u64_stats_update_end(&tx_stats->syncp); | ||
5955 | |||
5956 | netdev_completed_queue(dev, txc.packets, txc.bytes); | ||
5957 | |||
5958 | if (tp->dirty_tx != dirty_tx) { | 5941 | if (tp->dirty_tx != dirty_tx) { |
5959 | tp->dirty_tx = dirty_tx; | 5942 | tp->dirty_tx = dirty_tx; |
5960 | /* Sync with rtl8169_start_xmit: | 5943 | /* Sync with rtl8169_start_xmit: |