diff options
author | David S. Miller <davem@davemloft.net> | 2009-07-23 22:03:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-23 22:03:51 -0400 |
commit | 74d154189d597b91da4322996dbf4f5c3d1544ab (patch) | |
tree | 6f09861b5e2f875d2d8ea2127b16add9103221c6 /drivers/net/ixgbe | |
parent | 5a6338db37885af06760d40cad589316e48431e9 (diff) | |
parent | ffafa60d496f80c250f2ae0340ae94434c0b0b4d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwmc3200wifi/netdev.c
net/wireless/scan.c
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 1 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb_nl.c | 24 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 35 |
3 files changed, 43 insertions, 17 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 2a93e116f5a7..dc3cc4348d1d 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
@@ -323,6 +323,7 @@ struct ixgbe_adapter { | |||
323 | #define IXGBE_FLAG_IN_SFP_MOD_TASK (u32)(1 << 25) | 323 | #define IXGBE_FLAG_IN_SFP_MOD_TASK (u32)(1 << 25) |
324 | #define IXGBE_FLAG_FDIR_HASH_CAPABLE (u32)(1 << 26) | 324 | #define IXGBE_FLAG_FDIR_HASH_CAPABLE (u32)(1 << 26) |
325 | #define IXGBE_FLAG_FDIR_PERFECT_CAPABLE (u32)(1 << 27) | 325 | #define IXGBE_FLAG_FDIR_PERFECT_CAPABLE (u32)(1 << 27) |
326 | #define IXGBE_FLAG_FCOE_CAPABLE (u32)(1 << 28) | ||
326 | #define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 29) | 327 | #define IXGBE_FLAG_FCOE_ENABLED (u32)(1 << 29) |
327 | 328 | ||
328 | u32 flags2; | 329 | u32 flags2; |
diff --git a/drivers/net/ixgbe/ixgbe_dcb_nl.c b/drivers/net/ixgbe/ixgbe_dcb_nl.c index da2c8514b8d0..1c7265732900 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_nl.c +++ b/drivers/net/ixgbe/ixgbe_dcb_nl.c | |||
@@ -139,6 +139,18 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
139 | adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE; | 139 | adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE; |
140 | } | 140 | } |
141 | adapter->flags |= IXGBE_FLAG_DCB_ENABLED; | 141 | adapter->flags |= IXGBE_FLAG_DCB_ENABLED; |
142 | #ifdef IXGBE_FCOE | ||
143 | /* Turn on FCoE offload */ | ||
144 | if ((adapter->flags & IXGBE_FLAG_FCOE_CAPABLE) && | ||
145 | (!(adapter->flags & IXGBE_FLAG_FCOE_ENABLED))) { | ||
146 | adapter->flags |= IXGBE_FLAG_FCOE_ENABLED; | ||
147 | adapter->ring_feature[RING_F_FCOE].indices = | ||
148 | IXGBE_FCRETA_SIZE; | ||
149 | netdev->features |= NETIF_F_FCOE_CRC; | ||
150 | netdev->features |= NETIF_F_FSO; | ||
151 | netdev->fcoe_ddp_xid = IXGBE_FCOE_DDP_MAX - 1; | ||
152 | } | ||
153 | #endif /* IXGBE_FCOE */ | ||
142 | ixgbe_init_interrupt_scheme(adapter); | 154 | ixgbe_init_interrupt_scheme(adapter); |
143 | if (netif_running(netdev)) | 155 | if (netif_running(netdev)) |
144 | netdev->netdev_ops->ndo_open(netdev); | 156 | netdev->netdev_ops->ndo_open(netdev); |
@@ -156,6 +168,18 @@ static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state) | |||
156 | adapter->flags |= IXGBE_FLAG_RSS_ENABLED; | 168 | adapter->flags |= IXGBE_FLAG_RSS_ENABLED; |
157 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) | 169 | if (adapter->hw.mac.type == ixgbe_mac_82599EB) |
158 | adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; | 170 | adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; |
171 | |||
172 | #ifdef IXGBE_FCOE | ||
173 | /* Turn off FCoE offload */ | ||
174 | if (adapter->flags & (IXGBE_FLAG_FCOE_CAPABLE | | ||
175 | IXGBE_FLAG_FCOE_ENABLED)) { | ||
176 | adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED; | ||
177 | adapter->ring_feature[RING_F_FCOE].indices = 0; | ||
178 | netdev->features &= ~NETIF_F_FCOE_CRC; | ||
179 | netdev->features &= ~NETIF_F_FSO; | ||
180 | netdev->fcoe_ddp_xid = 0; | ||
181 | } | ||
182 | #endif /* IXGBE_FCOE */ | ||
159 | ixgbe_init_interrupt_scheme(adapter); | 183 | ixgbe_init_interrupt_scheme(adapter); |
160 | if (netif_running(netdev)) | 184 | if (netif_running(netdev)) |
161 | netdev->netdev_ops->ndo_open(netdev); | 185 | netdev->netdev_ops->ndo_open(netdev); |
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 */ |