All pastes #802596 Raw Edit

Anonymous

public text v1 · immutable
#802596 ·published 2007-11-30 13:14 UTC
rendered paste body
3384 /**
3385  * e1000_clean_tx_irq - Reclaim resources after transmit completes
3386  * @adapter: board private structure
3387  **/
3388
3389 static boolean_t
3390 e1000_clean_tx_irq(struct e1000_adapter *adapter,
3391                    struct e1000_tx_ring *tx_ring)
3392 {
3393         struct net_device *netdev = adapter->netdev;
3394         struct e1000_tx_desc *tx_desc, *eop_desc;
3395         struct e1000_buffer *buffer_info;
3396         unsigned int i, eop;
3397 #ifdef CONFIG_E1000_NAPI
3398         unsigned int count = 0;
3399 #endif
3400         boolean_t cleaned = FALSE;
3401
3402         i = tx_ring->next_to_clean;
3403         eop = tx_ring->buffer_info[i].next_to_watch;
3404         eop_desc = E1000_TX_DESC(*tx_ring, eop);
3405
3406         while (eop_desc->upper.data & cpu_to_le32(E1000_TXD_STAT_DD)) {
3407                 for (cleaned = FALSE; !cleaned; ) {
3408                         tx_desc = E1000_TX_DESC(*tx_ring, i);
3409                         buffer_info = &tx_ring->buffer_info[i];
3410                         cleaned = (i == eop);
3411
3412                         e1000_unmap_and_free_tx_resource(adapter, buffer_info);
3413                         memset(tx_desc, 0, sizeof(struct e1000_tx_desc));
3414
3415                         if (unlikely(++i == tx_ring->count)) i = 0;
3416                 }
3417
3418
3419                 eop = tx_ring->buffer_info[i].next_to_watch;