]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: hns3: ignore lower-level new coming reset
authorHuazhong Tan <tanhuazhong@huawei.com>
Sat, 6 Apr 2019 07:43:30 +0000 (15:43 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2019 22:30:49 +0000 (15:30 -0700)
It is unnecessary to deal with the new coming reset if
it is lower than the ongoing one.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c

index 2683399a07457bdd5cd4a53a51f81c9979341b0f..6e8fa2e0b5ea0a26bfdf7d596e165c5ea09723f9 100644 (file)
@@ -2795,6 +2795,10 @@ static enum hnae3_reset_type hclge_get_reset_level(struct hclge_dev *hdev,
                clear_bit(HNAE3_FLR_RESET, addr);
        }
 
+       if (hdev->reset_type != HNAE3_NONE_RESET &&
+           rst_level < hdev->reset_type)
+               return HNAE3_NONE_RESET;
+
        return rst_level;
 }