aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-04-07 02:53:30 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-07 02:53:30 -0400
commit4a35ecf8bf1c4b039503fa554100fe85c761de76 (patch)
tree9b75f5d5636004d9a9aa496924377379be09aa1f /drivers/net/ixgbe/ixgbe_main.c
parentb4d562e3c3553ac58c7120555c4e4aefbb090a2a (diff)
parentfb9e2d887243499b8d28efcf80821c4f6a092395 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/bonding/bond_main.c drivers/net/via-velocity.c drivers/net/wireless/iwlwifi/iwl-agn.c
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c43
1 files changed, 30 insertions, 13 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 6effa2ca157d..7216db218442 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3036,6 +3036,14 @@ void ixgbe_reinit_locked(struct ixgbe_adapter *adapter)
3036 while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state)) 3036 while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state))
3037 msleep(1); 3037 msleep(1);
3038 ixgbe_down(adapter); 3038 ixgbe_down(adapter);
3039 /*
3040 * If SR-IOV enabled then wait a bit before bringing the adapter
3041 * back up to give the VFs time to respond to the reset. The
3042 * two second wait is based upon the watchdog timer cycle in
3043 * the VF driver.
3044 */
3045 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
3046 msleep(2000);
3039 ixgbe_up(adapter); 3047 ixgbe_up(adapter);
3040 clear_bit(__IXGBE_RESETTING, &adapter->state); 3048 clear_bit(__IXGBE_RESETTING, &adapter->state);
3041} 3049}
@@ -3216,13 +3224,15 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
3216 3224
3217 /* disable receive for all VFs and wait one second */ 3225 /* disable receive for all VFs and wait one second */
3218 if (adapter->num_vfs) { 3226 if (adapter->num_vfs) {
3219 for (i = 0 ; i < adapter->num_vfs; i++)
3220 adapter->vfinfo[i].clear_to_send = 0;
3221
3222 /* ping all the active vfs to let them know we are going down */ 3227 /* ping all the active vfs to let them know we are going down */
3223 ixgbe_ping_all_vfs(adapter); 3228 ixgbe_ping_all_vfs(adapter);
3229
3224 /* Disable all VFTE/VFRE TX/RX */ 3230 /* Disable all VFTE/VFRE TX/RX */
3225 ixgbe_disable_tx_rx(adapter); 3231 ixgbe_disable_tx_rx(adapter);
3232
3233 /* Mark all the VFs as inactive */
3234 for (i = 0 ; i < adapter->num_vfs; i++)
3235 adapter->vfinfo[i].clear_to_send = 0;
3226 } 3236 }
3227 3237
3228 /* disable receives */ 3238 /* disable receives */
@@ -5618,7 +5628,8 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)
5618 5628
5619#ifdef IXGBE_FCOE 5629#ifdef IXGBE_FCOE
5620 if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && 5630 if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
5621 (skb->protocol == htons(ETH_P_FCOE))) { 5631 ((skb->protocol == htons(ETH_P_FCOE)) ||
5632 (skb->protocol == htons(ETH_P_FIP)))) {
5622 txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1); 5633 txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1);
5623 txq += adapter->ring_feature[RING_F_FCOE].mask; 5634 txq += adapter->ring_feature[RING_F_FCOE].mask;
5624 return txq; 5635 return txq;
@@ -5665,18 +5676,25 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,
5665 5676
5666 tx_ring = adapter->tx_ring[skb->queue_mapping]; 5677 tx_ring = adapter->tx_ring[skb->queue_mapping];
5667 5678
5668 if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) &&
5669 (skb->protocol == htons(ETH_P_FCOE))) {
5670 tx_flags |= IXGBE_TX_FLAGS_FCOE;
5671#ifdef IXGBE_FCOE 5679#ifdef IXGBE_FCOE
5680 if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) {
5672#ifdef CONFIG_IXGBE_DCB 5681#ifdef CONFIG_IXGBE_DCB
5673 tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK 5682 /* for FCoE with DCB, we force the priority to what
5674 << IXGBE_TX_FLAGS_VLAN_SHIFT); 5683 * was specified by the switch */
5675 tx_flags |= ((adapter->fcoe.up << 13) 5684 if ((skb->protocol == htons(ETH_P_FCOE)) ||
5676 << IXGBE_TX_FLAGS_VLAN_SHIFT); 5685 (skb->protocol == htons(ETH_P_FIP))) {
5677#endif 5686 tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK
5687 << IXGBE_TX_FLAGS_VLAN_SHIFT);
5688 tx_flags |= ((adapter->fcoe.up << 13)
5689 << IXGBE_TX_FLAGS_VLAN_SHIFT);
5690 }
5678#endif 5691#endif
5692 /* flag for FCoE offloads */
5693 if (skb->protocol == htons(ETH_P_FCOE))
5694 tx_flags |= IXGBE_TX_FLAGS_FCOE;
5679 } 5695 }
5696#endif
5697
5680 /* four things can cause us to need a context descriptor */ 5698 /* four things can cause us to need a context descriptor */
5681 if (skb_is_gso(skb) || 5699 if (skb_is_gso(skb) ||
5682 (skb->ip_summed == CHECKSUM_PARTIAL) || 5700 (skb->ip_summed == CHECKSUM_PARTIAL) ||
@@ -6031,7 +6049,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
6031 indices += min_t(unsigned int, num_possible_cpus(), 6049 indices += min_t(unsigned int, num_possible_cpus(),
6032 IXGBE_MAX_FCOE_INDICES); 6050 IXGBE_MAX_FCOE_INDICES);
6033#endif 6051#endif
6034 indices = min_t(unsigned int, indices, MAX_TX_QUEUES);
6035 netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), indices); 6052 netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), indices);
6036 if (!netdev) { 6053 if (!netdev) {
6037 err = -ENOMEM; 6054 err = -ENOMEM;