Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a77ff709 authored by Nick Nunley's avatar Nick Nunley Committed by David S. Miller
Browse files

igb: update tx DMA mapping error handling



This updates the tx DMA mapping error handling code to
resemble e1000e/ixgbe.

Signed-off-by: default avatarNicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 58fd62f5
Loading
Loading
Loading
Loading
+3 −5
Original line number Original line Diff line number Diff line
@@ -3647,14 +3647,12 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb,
	buffer_info->length = 0;
	buffer_info->length = 0;
	buffer_info->next_to_watch = 0;
	buffer_info->next_to_watch = 0;
	buffer_info->mapped_as_page = false;
	buffer_info->mapped_as_page = false;
	count--;


	/* clear timestamp and dma mappings for remaining portion of packet */
	/* clear timestamp and dma mappings for remaining portion of packet */
	while (count >= 0) {
	while (count--) {
		count--;
		if (i == 0)
			i = tx_ring->count;
		i--;
		i--;
		if (i < 0)
			i += tx_ring->count;
		buffer_info = &tx_ring->buffer_info[i];
		buffer_info = &tx_ring->buffer_info[i];
		igb_unmap_and_free_tx_resource(tx_ring, buffer_info);
		igb_unmap_and_free_tx_resource(tx_ring, buffer_info);
	}
	}