Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315823
b: refs/heads/master
c: 17bcb68
h: refs/heads/master
i:
  315821: b57673c
  315819: 3603afd
  315815: 74ddae4
  315807: 313cc32
v: v3
  • Loading branch information
Francois Romieu authored and David S. Miller committed Jul 24, 2012
1 parent 02185fe commit 281f746
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13378cad02afc2adc6c0e07fca03903c7ada0b37
refs/heads/master: 17bcb684f08649a2ab6a7dcd8288332e72d208f1
27 changes: 5 additions & 22 deletions trunk/drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -5656,7 +5656,6 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp)
{
rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC);
tp->cur_tx = tp->dirty_tx = 0;
netdev_reset_queue(tp->dev);
}

static void rtl_reset_work(struct rtl8169_private *tp)
Expand Down Expand Up @@ -5811,8 +5810,6 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,

txd->opts2 = cpu_to_le32(opts[1]);

netdev_sent_queue(dev, skb->len);

skb_tx_timestamp(skb);

wmb();
Expand Down Expand Up @@ -5909,16 +5906,9 @@ static void rtl8169_pcierr_interrupt(struct net_device *dev)
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)
{
struct rtl8169_stats *tx_stats = &tp->tx_stats;
unsigned int dirty_tx, tx_left;
struct rtl_txc txc = { 0, 0 };

dirty_tx = tp->dirty_tx;
smp_rmb();
Expand All @@ -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,
tp->TxDescArray + entry);
if (status & LastFrag) {
struct sk_buff *skb = tx_skb->skb;

txc.packets++;
txc.bytes += skb->len;
dev_kfree_skb(skb);
u64_stats_update_begin(&tp->tx_stats.syncp);
tp->tx_stats.packets++;
tp->tx_stats.bytes += tx_skb->skb->len;
u64_stats_update_end(&tp->tx_stats.syncp);
dev_kfree_skb(tx_skb->skb);
tx_skb->skb = NULL;
}
dirty_tx++;
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) {
tp->dirty_tx = dirty_tx;
/* Sync with rtl8169_start_xmit:
Expand Down

0 comments on commit 281f746

Please sign in to comment.