@@ -938,50 +938,53 @@ static void e1000_print_hw_hang(struct work_struct *work)
* @adapter: board private structure
*
* the return value indicates if there is more work to do (later)
**/
static bool e1000_clean_tx_irq(struct e1000_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
struct e1000_hw *hw = &adapter->hw;
struct e1000_ring *tx_ring = adapter->tx_ring;
struct e1000_tx_desc *tx_desc, *eop_desc;
struct e1000_buffer *buffer_info;
unsigned int i, eop;
bool cleaned = 0, retval = 1;
unsigned int total_tx_bytes = 0, total_tx_packets = 0;
i = tx_ring->next_to_clean;
eop = tx_ring->buffer_info[i].next_to_watch;
eop_desc = E1000_TX_DESC(*tx_ring, eop);
while (eop_desc->upper.data & cpu_to_le32(E1000_TXD_STAT_DD)) {
for (cleaned = 0; !cleaned; ) {
tx_desc = E1000_TX_DESC(*tx_ring, i);
buffer_info = &tx_ring->buffer_info[i];
cleaned = (i == eop);
#ifdef __VMKLNX__
if (cleaned && (buffer_info->skb != NULL)) {
#else //!__VMKLNX__
if (cleaned) {
#endif //__VMKLNX__
struct sk_buff *skb = buffer_info->skb;
#ifdef NETIF_F_TSO
unsigned int segs, bytecount;
segs = skb_shinfo(skb)->gso_segs ?: 1;
/* multiply data chunks by size of headers */
bytecount = ((segs - 1) * skb_headlen(skb)) +
skb->len;
total_tx_packets += segs;
total_tx_bytes += bytecount;
#else
total_tx_packets++;
total_tx_bytes += skb->len;
#endif
}
e1000_put_txbuf(adapter, buffer_info);
tx_desc->upper.data = 0;
i++;
if (i == tx_ring->count)
i = 0;
#ifdef CONFIG_E1000E_NAPI
if (total_tx_packets >= tx_ring->count) {
retval = 0;