]> git.hungrycats.org Git - linux/commitdiff
ixgbe: fix rx-usecs range checks for BQL
authorEmil Tantilov <emil.s.tantilov@intel.com>
Tue, 22 Oct 2013 08:21:04 +0000 (08:21 +0000)
committerJiri Slaby <jslaby@suse.cz>
Tue, 26 Aug 2014 12:12:11 +0000 (14:12 +0200)
commit 2e0103810c6fed6a736c4a3af87b0f5c6bd8cd5b upstream.

This patch resolves an issue where the logic used to detect changes in rx-usecs
was incorrect and was masked by the call to ixgbe_update_rsc().

Setting rx-usecs between 0,2-9 and 1,10 and up requires a reset to allow
ixgbe_configure_tx_ring() to set the correct value for TXDCTL.WTHRESH in
order to avoid Tx hangs with BQL enabled.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

index e8649abf97c0dd93152d7037bae870eaf3532954..2cd86d30508b2bf38653c344c0ceafb319bf9dcf 100644 (file)
@@ -2212,13 +2212,13 @@ static int ixgbe_set_coalesce(struct net_device *netdev,
 
 #if IS_ENABLED(CONFIG_BQL)
        /* detect ITR changes that require update of TXDCTL.WTHRESH */
-       if ((adapter->tx_itr_setting > 1) &&
+       if ((adapter->tx_itr_setting != 1) &&
            (adapter->tx_itr_setting < IXGBE_100K_ITR)) {
                if ((tx_itr_prev == 1) ||
-                   (tx_itr_prev > IXGBE_100K_ITR))
+                   (tx_itr_prev >= IXGBE_100K_ITR))
                        need_reset = true;
        } else {
-               if ((tx_itr_prev > 1) &&
+               if ((tx_itr_prev != 1) &&
                    (tx_itr_prev < IXGBE_100K_ITR))
                        need_reset = true;
        }