Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp77868ybt; Mon, 6 Jul 2020 04:32:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiv9xSBOAIJQBjOLBXDa2fZ4F1jzMNLZVD/zQJ+ndaC/W9I5zgGLWqHBNo1tXdbzW1HdLZ X-Received: by 2002:a17:906:f183:: with SMTP id gs3mr40675138ejb.361.1594035121940; Mon, 06 Jul 2020 04:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594035121; cv=none; d=google.com; s=arc-20160816; b=FJaMHg5DjWtweT+TlABThBJfW/I+EKD883/xPGc0n6zElU97WrtVOnrUQ5Z3bhKs8+ W3nzO9NmAlpgd9Oz0DqgAkwgM9qUZvkytBAPdmRUz/PlC/umkcI0S2Umdlxov29YN7xl yUZBl/Uk64T95nlKfmdNXvN1qEEYMBXsDxEXsi3oaKn7XURyg6g/2ZNHSiRv6PDieGDL VqaPuGlP5jzwNnSDegLXA1aCDV1ADr5gkt/4RnOFr86tJ/C2YISVB+6yvD0VaC7BdK/N FMZq+pRdd6NxCzkSrp1zYvkGMIpa6Zk1UfRBD/zEJdK83wcBKZ40+QbbBnlCaYwkmY2M 2OLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=2jWyYp4lg3O//fmhc+7QLTT/B914d87qILXzeIOrEkg=; b=ft65JG/eU7ib0o7e2VokoAE27jMPY+ZhRKKH3gDrdp36XPlIxRL1+u7HcTuGw47zsz amWV3kdjZgow+snD4FUNGOLW+Xldhl73Ch9G9nb1AoHg89EP2HGjmxIuXKJ0r3FOLqt0 i+Th9Lag59tS2mddPhlEkuMn062Yr8mVDVYtxS5m9yEDs4DR3QCf98nuZ2Gh+GyBEKSa vGtPHQIoLML7cP6mKW/equwSGjKdjQZpx/d3zTcaD73SSVmEyCtKQtKD9+7wa5AS1BXc Rd6GMGRN0MPsMxa9cNd0YiHHbVOf11nD5Gh4Zv3i1JkInt4OYq30jfU/NGguCS7oZh7n 72bA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be28si12616691edb.373.2020.07.06.04.31.38; Mon, 06 Jul 2020 04:32:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728957AbgGFL16 (ORCPT + 99 others); Mon, 6 Jul 2020 07:27:58 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:59686 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728943AbgGFL15 (ORCPT ); Mon, 6 Jul 2020 07:27:57 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9B33FECF6DC5A044E1B; Mon, 6 Jul 2020 19:27:55 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Mon, 6 Jul 2020 19:27:46 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan Subject: [PATCH net 1/4] net: hns3: check reset pending after FLR prepare Date: Mon, 6 Jul 2020 19:25:59 +0800 Message-ID: <1594034762-6445-2-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1594034762-6445-1-git-send-email-tanhuazhong@huawei.com> References: <1594034762-6445-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If there is a PF reset pending before FLR prepare, FLR's preparatory work will not fail, but the FLR rebuild procedure will fail for this pending. So this PF reset pending should be handled in the FLR preparatory. Fixes: 8627bdedc435 ("net: hns3: refactor the precedure of PF FLR") Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 96bfad5..d6bfdc6 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -9859,7 +9859,7 @@ static void hclge_flr_prepare(struct hnae3_ae_dev *ae_dev) set_bit(HCLGE_STATE_RST_HANDLING, &hdev->state); hdev->reset_type = HNAE3_FLR_RESET; ret = hclge_reset_prepare(hdev); - if (ret) { + if (ret || hdev->reset_pending) { dev_err(&hdev->pdev->dev, "fail to prepare FLR, ret=%d\n", ret); if (hdev->reset_pending || -- 2.7.4