diff options
| author | David S. Miller <davem@davemloft.net> | 2010-04-06 23:53:30 -0700 | 
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2010-04-06 23:53:30 -0700 | 
| commit | 4a35ecf8bf1c4b039503fa554100fe85c761de76 (patch) | |
| tree | 9b75f5d5636004d9a9aa496924377379be09aa1f /drivers/net/ixgbe/ixgbe_main.c | |
| parent | b4d562e3c3553ac58c7120555c4e4aefbb090a2a (diff) | |
| parent | fb9e2d887243499b8d28efcf80821c4f6a092395 (diff) | |
| download | olio-linux-3.10-4a35ecf8bf1c4b039503fa554100fe85c761de76.tar.xz olio-linux-3.10-4a35ecf8bf1c4b039503fa554100fe85c761de76.zip  | |
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.c | 43 | 
1 files changed, 30 insertions, 13 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 6effa2ca157..7216db21844 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)  	while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state))  		msleep(1);  	ixgbe_down(adapter); +	/* +	 * If SR-IOV enabled then wait a bit before bringing the adapter +	 * back up to give the VFs time to respond to the reset.  The +	 * two second wait is based upon the watchdog timer cycle in +	 * the VF driver. +	 */ +	if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) +		msleep(2000);  	ixgbe_up(adapter);  	clear_bit(__IXGBE_RESETTING, &adapter->state);  } @@ -3216,13 +3224,15 @@ void ixgbe_down(struct ixgbe_adapter *adapter)  	/* disable receive for all VFs and wait one second */  	if (adapter->num_vfs) { -		for (i = 0 ; i < adapter->num_vfs; i++) -			adapter->vfinfo[i].clear_to_send = 0; -  		/* ping all the active vfs to let them know we are going down */  		ixgbe_ping_all_vfs(adapter); +  		/* Disable all VFTE/VFRE TX/RX */  		ixgbe_disable_tx_rx(adapter); + +		/* Mark all the VFs as inactive */ +		for (i = 0 ; i < adapter->num_vfs; i++) +			adapter->vfinfo[i].clear_to_send = 0;  	}  	/* disable receives */ @@ -5618,7 +5628,8 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb)  #ifdef IXGBE_FCOE  	if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && -	    (skb->protocol == htons(ETH_P_FCOE))) { +	    ((skb->protocol == htons(ETH_P_FCOE)) || +	     (skb->protocol == htons(ETH_P_FIP)))) {  		txq &= (adapter->ring_feature[RING_F_FCOE].indices - 1);  		txq += adapter->ring_feature[RING_F_FCOE].mask;  		return txq; @@ -5665,18 +5676,25 @@ static netdev_tx_t ixgbe_xmit_frame(struct sk_buff *skb,  	tx_ring = adapter->tx_ring[skb->queue_mapping]; -	if ((adapter->flags & IXGBE_FLAG_FCOE_ENABLED) && -	    (skb->protocol == htons(ETH_P_FCOE))) { -		tx_flags |= IXGBE_TX_FLAGS_FCOE;  #ifdef IXGBE_FCOE +	if (adapter->flags & IXGBE_FLAG_FCOE_ENABLED) {  #ifdef CONFIG_IXGBE_DCB -		tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK -			      << IXGBE_TX_FLAGS_VLAN_SHIFT); -		tx_flags |= ((adapter->fcoe.up << 13) -			      << IXGBE_TX_FLAGS_VLAN_SHIFT); -#endif +		/* for FCoE with DCB, we force the priority to what +		 * was specified by the switch */ +		if ((skb->protocol == htons(ETH_P_FCOE)) || +		    (skb->protocol == htons(ETH_P_FIP))) { +			tx_flags &= ~(IXGBE_TX_FLAGS_VLAN_PRIO_MASK +				      << IXGBE_TX_FLAGS_VLAN_SHIFT); +			tx_flags |= ((adapter->fcoe.up << 13) +				     << IXGBE_TX_FLAGS_VLAN_SHIFT); +		}  #endif +		/* flag for FCoE offloads */ +		if (skb->protocol == htons(ETH_P_FCOE)) +			tx_flags |= IXGBE_TX_FLAGS_FCOE;  	} +#endif +  	/* four things can cause us to need a context descriptor */  	if (skb_is_gso(skb) ||  	    (skb->ip_summed == CHECKSUM_PARTIAL) || @@ -6031,7 +6049,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,  	indices += min_t(unsigned int, num_possible_cpus(),  			 IXGBE_MAX_FCOE_INDICES);  #endif -	indices = min_t(unsigned int, indices, MAX_TX_QUEUES);  	netdev = alloc_etherdev_mq(sizeof(struct ixgbe_adapter), indices);  	if (!netdev) {  		err = -ENOMEM;  |