diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 2ad754c864cf..951b73cf5ca2 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 10 Gigabit PCI Express Linux driver | 3 | Intel 10 Gigabit PCI Express Linux driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -52,7 +52,7 @@ static const char ixgbe_driver_string[] = | |||
52 | 52 | ||
53 | #define DRV_VERSION "2.0.44-k2" | 53 | #define DRV_VERSION "2.0.44-k2" |
54 | const char ixgbe_driver_version[] = DRV_VERSION; | 54 | const char ixgbe_driver_version[] = DRV_VERSION; |
55 | static char ixgbe_copyright[] = "Copyright (c) 1999-2009 Intel Corporation."; | 55 | static char ixgbe_copyright[] = "Copyright (c) 1999-2010 Intel Corporation."; |
56 | 56 | ||
57 | static const struct ixgbe_info *ixgbe_info_tbl[] = { | 57 | static const struct ixgbe_info *ixgbe_info_tbl[] = { |
58 | [board_82598] = &ixgbe_82598_info, | 58 | [board_82598] = &ixgbe_82598_info, |
@@ -4928,7 +4928,7 @@ static int ixgbe_tso(struct ixgbe_adapter *adapter, | |||
4928 | iph->daddr, 0, | 4928 | iph->daddr, 0, |
4929 | IPPROTO_TCP, | 4929 | IPPROTO_TCP, |
4930 | 0); | 4930 | 0); |
4931 | } else if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV6) { | 4931 | } else if (skb_is_gso_v6(skb)) { |
4932 | ipv6_hdr(skb)->payload_len = 0; | 4932 | ipv6_hdr(skb)->payload_len = 0; |
4933 | tcp_hdr(skb)->check = | 4933 | tcp_hdr(skb)->check = |
4934 | ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, | 4934 | ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr, |
@@ -5167,19 +5167,19 @@ dma_error: | |||
5167 | tx_buffer_info->dma = 0; | 5167 | tx_buffer_info->dma = 0; |
5168 | tx_buffer_info->time_stamp = 0; | 5168 | tx_buffer_info->time_stamp = 0; |
5169 | tx_buffer_info->next_to_watch = 0; | 5169 | tx_buffer_info->next_to_watch = 0; |
5170 | count--; | 5170 | if (count) |
5171 | count--; | ||
5171 | 5172 | ||
5172 | /* clear timestamp and dma mappings for remaining portion of packet */ | 5173 | /* clear timestamp and dma mappings for remaining portion of packet */ |
5173 | while (count >= 0) { | 5174 | while (count--) { |
5174 | count--; | 5175 | if (i==0) |
5175 | i--; | ||
5176 | if (i < 0) | ||
5177 | i += tx_ring->count; | 5176 | i += tx_ring->count; |
5177 | i--; | ||
5178 | tx_buffer_info = &tx_ring->tx_buffer_info[i]; | 5178 | tx_buffer_info = &tx_ring->tx_buffer_info[i]; |
5179 | ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info); | 5179 | ixgbe_unmap_and_free_tx_resource(adapter, tx_buffer_info); |
5180 | } | 5180 | } |
5181 | 5181 | ||
5182 | return count; | 5182 | return 0; |
5183 | } | 5183 | } |
5184 | 5184 | ||
5185 | static void ixgbe_tx_queue(struct ixgbe_adapter *adapter, | 5185 | static void ixgbe_tx_queue(struct ixgbe_adapter *adapter, |
@@ -5329,8 +5329,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb) | |||
5329 | struct ixgbe_adapter *adapter = netdev_priv(dev); | 5329 | struct ixgbe_adapter *adapter = netdev_priv(dev); |
5330 | int txq = smp_processor_id(); | 5330 | int txq = smp_processor_id(); |
5331 | 5331 | ||
5332 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) | 5332 | if (adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) { |
5333 | while (unlikely(txq >= dev->real_num_tx_queues)) | ||
5334 | txq -= dev->real_num_tx_queues; | ||
5333 | return txq; | 5335 | return txq; |
5336 | } | ||
5334 | 5337 | ||
5335 | #ifdef IXGBE_FCOE | 5338 | #ifdef IXGBE_FCOE |
5336 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && | 5339 | if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && |
@@ -5576,6 +5579,10 @@ static void ixgbe_netpoll(struct net_device *netdev) | |||
5576 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 5579 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
5577 | int i; | 5580 | int i; |
5578 | 5581 | ||
5582 | /* if interface is down do nothing */ | ||
5583 | if (test_bit(__IXGBE_DOWN, &adapter->state)) | ||
5584 | return; | ||
5585 | |||
5579 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; | 5586 | adapter->flags |= IXGBE_FLAG_IN_NETPOLL; |
5580 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { | 5587 | if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) { |
5581 | int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; | 5588 | int num_q_vectors = adapter->num_msix_vectors - NON_Q_VECTORS; |
@@ -5756,6 +5763,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
5756 | if (err) | 5763 | if (err) |
5757 | goto err_sw_init; | 5764 | goto err_sw_init; |
5758 | 5765 | ||
5766 | /* Make it possible the adapter to be woken up via WOL */ | ||
5767 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) | ||
5768 | IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0); | ||
5769 | |||
5759 | /* | 5770 | /* |
5760 | * If there is a fan on this device and it has failed log the | 5771 | * If there is a fan on this device and it has failed log the |
5761 | * failure. | 5772 | * failure. |