]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
fm10k: don't try to stop queues if we've lost hw_addr
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 23 Jun 2016 20:54:01 +0000 (13:54 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 26 Feb 2017 06:04:35 +0000 (22:04 -0800)
In the event of a surprise remove, we expect the driver to go down,
which includes calling .stop_hw(). However, this function will return an
error because the queues won't appear to cleanly disable. Prevent this
and avoid the unnecessary checks by just returning when
FM10K_REMOVED(hw->hw_addr) is true.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Orabug: 25394529
(cherry picked from commit 5f45c83024c49f71e50cf8156b165f11d2ab35a9)
Signed-off-by: Jack Vogel <jack.vogel@oracle.com>
drivers/net/ethernet/intel/fm10k/fm10k_common.c

index d6baaea8bc7c1039a1fdf77c250049cfaed2cd34..dd95ac4f4c64ad951ee9998aef337242f38453be 100644 (file)
@@ -207,6 +207,9 @@ s32 fm10k_disable_queues_generic(struct fm10k_hw *hw, u16 q_cnt)
        /* clear tx_ready to prevent any false hits for reset */
        hw->mac.tx_ready = false;
 
+       if (FM10K_REMOVED(hw->hw_addr))
+               return 0;
+
        /* clear the enable bit for all rings */
        for (i = 0; i < q_cnt; i++) {
                reg = fm10k_read_reg(hw, FM10K_TXDCTL(i));