diff options
Diffstat (limited to 'drivers/net/igbvf/netdev.c')
-rw-r--r-- | drivers/net/igbvf/netdev.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/igbvf/netdev.c b/drivers/net/igbvf/netdev.c index 0dbd0320023a..297a5ddd77f0 100644 --- a/drivers/net/igbvf/netdev.c +++ b/drivers/net/igbvf/netdev.c | |||
@@ -1963,7 +1963,7 @@ static int igbvf_tso(struct igbvf_adapter *adapter, | |||
1963 | iph->daddr, 0, | 1963 | iph->daddr, 0, |
1964 | IPPROTO_TCP, | 1964 | IPPROTO_TCP, |
1965 | 0); | 1965 | 0); |
1966 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 1966 | } else if (skb_is_gso_v6(skb)) { |
1967 | ipv6_hdr(skb)->payload_len = 0; | 1967 | ipv6_hdr(skb)->payload_len = 0; |
1968 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 1968 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
1969 | &ipv6_hdr(skb)->daddr, | 1969 | &ipv6_hdr(skb)->daddr, |
@@ -2126,6 +2126,7 @@ static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter, | |||
2126 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { | 2126 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { |
2127 | struct skb_frag_struct *frag; | 2127 | struct skb_frag_struct *frag; |
2128 | 2128 | ||
2129 | count++; | ||
2129 | i++; | 2130 | i++; |
2130 | if (i == tx_ring->count) | 2131 | if (i == tx_ring->count) |
2131 | i = 0; | 2132 | i = 0; |
@@ -2146,7 +2147,6 @@ static inline int igbvf_tx_map_adv(struct igbvf_adapter *adapter, | |||
2146 | PCI_DMA_TODEVICE); | 2147 | PCI_DMA_TODEVICE); |
2147 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) | 2148 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) |
2148 | goto dma_error; | 2149 | goto dma_error; |
2149 | count++; | ||
2150 | } | 2150 | } |
2151 | 2151 | ||
2152 | tx_ring->buffer_info[i].skb = skb; | 2152 | tx_ring->buffer_info[i].skb = skb; |
@@ -2163,14 +2163,14 @@ dma_error: | |||
2163 | buffer_info->length = 0; | 2163 | buffer_info->length = 0; |
2164 | buffer_info->next_to_watch = 0; | 2164 | buffer_info->next_to_watch = 0; |
2165 | buffer_info->mapped_as_page = false; | 2165 | buffer_info->mapped_as_page = false; |
2166 | count--; | 2166 | if (count) |
2167 | count--; | ||
2167 | 2168 | ||
2168 | /* clear timestamp and dma mappings for remaining portion of packet */ | 2169 | /* clear timestamp and dma mappings for remaining portion of packet */ |
2169 | while (count >= 0) { | 2170 | while (count--) { |
2170 | count--; | 2171 | if (i==0) |
2171 | i--; | ||
2172 | if (i < 0) | ||
2173 | i += tx_ring->count; | 2172 | i += tx_ring->count; |
2173 | i--; | ||
2174 | buffer_info = &tx_ring->buffer_info[i]; | 2174 | buffer_info = &tx_ring->buffer_info[i]; |
2175 | igbvf_put_txbuf(adapter, buffer_info); | 2175 | igbvf_put_txbuf(adapter, buffer_info); |
2176 | } | 2176 | } |