From: Greg Rose Date: Wed, 25 Jan 2012 07:59:37 +0000 (+0000) Subject: ixgbe: Fix case of Tx Hang in PF with 32 VFs X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~122 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3a749f244be25967da4ccbe61c0e72729386bc3e;p=users%2Fjedix%2Flinux-maple.git ixgbe: Fix case of Tx Hang in PF with 32 VFs 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 Tested-by: Robert E Garrett Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index b9941f4e28fe5..d7eae788b2db3 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -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));