diff options
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r-- | drivers/net/igb/igb_main.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index 78963a0e128d..997124d2992a 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -1306,13 +1306,8 @@ void igb_reset(struct igb_adapter *adapter) | |||
1306 | hwm = min(((pba << 10) * 9 / 10), | 1306 | hwm = min(((pba << 10) * 9 / 10), |
1307 | ((pba << 10) - 2 * adapter->max_frame_size)); | 1307 | ((pba << 10) - 2 * adapter->max_frame_size)); |
1308 | 1308 | ||
1309 | if (mac->type < e1000_82576) { | 1309 | fc->high_water = hwm & 0xFFF0; /* 16-byte granularity */ |
1310 | fc->high_water = hwm & 0xFFF8; /* 8-byte granularity */ | 1310 | fc->low_water = fc->high_water - 16; |
1311 | fc->low_water = fc->high_water - 8; | ||
1312 | } else { | ||
1313 | fc->high_water = hwm & 0xFFF0; /* 16-byte granularity */ | ||
1314 | fc->low_water = fc->high_water - 16; | ||
1315 | } | ||
1316 | fc->pause_time = 0xFFFF; | 1311 | fc->pause_time = 0xFFFF; |
1317 | fc->send_xon = 1; | 1312 | fc->send_xon = 1; |
1318 | fc->current_mode = fc->requested_mode; | 1313 | fc->current_mode = fc->requested_mode; |
@@ -3427,7 +3422,7 @@ static inline int igb_tso_adv(struct igb_ring *tx_ring, | |||
3427 | iph->daddr, 0, | 3422 | iph->daddr, 0, |
3428 | IPPROTO_TCP, | 3423 | IPPROTO_TCP, |
3429 | 0); | 3424 | 0); |
3430 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 3425 | } else if (skb_is_gso_v6(skb)) { |
3431 | ipv6_hdr(skb)->payload_len = 0; | 3426 | ipv6_hdr(skb)->payload_len = 0; |
3432 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 3427 | tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
3433 | &ipv6_hdr(skb)->daddr, | 3428 | &ipv6_hdr(skb)->daddr, |
@@ -3589,6 +3584,7 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb, | |||
3589 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { | 3584 | for (f = 0; f < skb_shinfo(skb)->nr_frags; f++) { |
3590 | struct skb_frag_struct *frag; | 3585 | struct skb_frag_struct *frag; |
3591 | 3586 | ||
3587 | count++; | ||
3592 | i++; | 3588 | i++; |
3593 | if (i == tx_ring->count) | 3589 | if (i == tx_ring->count) |
3594 | i = 0; | 3590 | i = 0; |
@@ -3610,7 +3606,6 @@ static inline int igb_tx_map_adv(struct igb_ring *tx_ring, struct sk_buff *skb, | |||
3610 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) | 3606 | if (pci_dma_mapping_error(pdev, buffer_info->dma)) |
3611 | goto dma_error; | 3607 | goto dma_error; |
3612 | 3608 | ||
3613 | count++; | ||
3614 | } | 3609 | } |
3615 | 3610 | ||
3616 | tx_ring->buffer_info[i].skb = skb; | 3611 | tx_ring->buffer_info[i].skb = skb; |