]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
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)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 14:47:37 +0000 (22:47 +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.

(cherry picked from commit 4cd6923d3481773f3fbcae5ca940c8823aa33475)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/ixgbe/ixgbe_main.c

index b9941f4e28fe56b472763ffe57b40ce4ae3a7a51..d7eae788b2db330ceea16aa30388b4fa9aa7c1c6 100644 (file)
@@ -2831,7 +2831,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));