aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 79f60e869737..50709da922c7 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -34,6 +34,7 @@
34#include <linux/in.h> 34#include <linux/in.h>
35#include <linux/ip.h> 35#include <linux/ip.h>
36#include <linux/tcp.h> 36#include <linux/tcp.h>
37#include <linux/pkt_sched.h>
37#include <linux/ipv6.h> 38#include <linux/ipv6.h>
38#include <net/checksum.h> 39#include <net/checksum.h>
39#include <net/ip6_checksum.h> 40#include <net/ip6_checksum.h>
@@ -3808,8 +3809,9 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
3808 adapter->atr_sample_rate = 20; 3809 adapter->atr_sample_rate = 20;
3809 adapter->fdir_pballoc = 0; 3810 adapter->fdir_pballoc = 0;
3810#ifdef IXGBE_FCOE 3811#ifdef IXGBE_FCOE
3811 adapter->flags |= IXGBE_FLAG_FCOE_ENABLED; 3812 adapter->flags |= IXGBE_FLAG_FCOE_CAPABLE;
3812 adapter->ring_feature[RING_F_FCOE].indices = IXGBE_FCRETA_SIZE; 3813 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
3814 adapter->ring_feature[RING_F_FCOE].indices = 0;
3813#endif /* IXGBE_FCOE */ 3815#endif /* IXGBE_FCOE */
3814 } 3816 }
3815 3817
@@ -5127,9 +5129,6 @@ static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
5127 int count = 0; 5129 int count = 0;
5128 unsigned int f; 5130 unsigned int f;
5129 5131
5130 r_idx = skb->queue_mapping;
5131 tx_ring = &adapter->tx_ring[r_idx];
5132
5133 if (adapter->vlgrp && vlan_tx_tag_present(skb)) { 5132 if (adapter->vlgrp && vlan_tx_tag_present(skb)) {
5134 tx_flags |= vlan_tx_tag_get(skb); 5133 tx_flags |= vlan_tx_tag_get(skb);
5135 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { 5134 if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
@@ -5139,11 +5138,19 @@ static int ixgbe_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
5139 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; 5138 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
5140 tx_flags |= IXGBE_TX_FLAGS_VLAN; 5139 tx_flags |= IXGBE_TX_FLAGS_VLAN;
5141 } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { 5140 } else if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
5142 tx_flags |= (skb->queue_mapping << 13); 5141 if (skb->priority != TC_PRIO_CONTROL) {
5143 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; 5142 tx_flags |= (skb->queue_mapping << 13);
5144 tx_flags |= IXGBE_TX_FLAGS_VLAN; 5143 tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT;
5144 tx_flags |= IXGBE_TX_FLAGS_VLAN;
5145 } else {
5146 skb->queue_mapping =
5147 adapter->ring_feature[RING_F_DCB].indices-1;
5148 }
5145 } 5149 }
5146 5150
5151 r_idx = skb->queue_mapping;
5152 tx_ring = &adapter->tx_ring[r_idx];
5153
5147 if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && 5154 if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
5148 (skb->protocol == htons(ETH_P_FCOE))) 5155 (skb->protocol == htons(ETH_P_FCOE)))
5149 tx_flags |= IXGBE_TX_FLAGS_FCOE; 5156 tx_flags |= IXGBE_TX_FLAGS_FCOE;
@@ -5582,16 +5589,11 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
5582#endif 5589#endif
5583 5590
5584#ifdef IXGBE_FCOE 5591#ifdef IXGBE_FCOE
5585 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) { 5592 if (adapter->flags & IXGBE_FLAG_FCOE_CAPABLE) {
5586 if (hw->mac.ops.get_device_caps) { 5593 if (hw->mac.ops.get_device_caps) {
5587 hw->mac.ops.get_device_caps(hw, &device_caps); 5594 hw->mac.ops.get_device_caps(hw, &device_caps);
5588 if (!(device_caps & IXGBE_DEVICE_CAPS_FCOE_OFFLOADS)) { 5595 if (device_caps & IXGBE_DEVICE_CAPS_FCOE_OFFLOADS)
5589 netdev->features |= NETIF_F_FCOE_CRC; 5596 adapter->flags &= ~IXGBE_FLAG_FCOE_CAPABLE;
5590 netdev->features |= NETIF_F_FSO;
5591 netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1;
5592 } else {
5593 adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
5594 }
5595 } 5597 }
5596 } 5598 }
5597#endif /* IXGBE_FCOE */ 5599#endif /* IXGBE_FCOE */
@@ -5640,7 +5642,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
5640 adapter->wol = 0; 5642 adapter->wol = 0;
5641 break; 5643 break;
5642 } 5644 }
5643 device_init_wakeup(&adapter->pdev->dev, true);
5644 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); 5645 device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
5645 5646
5646 /* pick up the PCI bus settings for reporting later */ 5647 /* pick up the PCI bus settings for reporting later */