ixgbe: Fix case of Tx Hang in PF with 32 VFs
authorGreg Rose <gregory.v.rose@intel.com>
Wed, 25 Jan 2012 07:59:37 +0000 (07:59 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 9 Feb 2012 09:25:49 +0000 (01:25 -0800)
A check for the number of VFs allocated should have used a greater than
equal operator instead of just greater than.  This caused allocation of
exactly 32 VFs to not enable the PF transmit and receive enables.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Robert E Garrett <robertX.e.garrett@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

index 92192c6c4f50c7d5abce7d56dfb7e814843b870e..819b5c0def51f26115e637638a13179fe451abd0 100644 (file)
@@ -2830,7 +2830,7 @@ static void ixgbe_configure_virtualization(struct ixgbe_adapter *adapter)
        IXGBE_WRITE_REG(hw, IXGBE_VT_CTL, vmdctl | vt_reg_bits);
 
        vf_shift = adapter->num_vfs % 32;
-       reg_offset = (adapter->num_vfs > 32) ? 1 : 0;
+       reg_offset = (adapter->num_vfs >= 32) ? 1 : 0;
 
        /* Enable only the PF's pool for Tx/Rx */
        IXGBE_WRITE_REG(hw, IXGBE_VFRE(reg_offset), (1 << vf_shift));