Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1873507yba; Thu, 25 Apr 2019 07:07:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqydXfLH46EvlCsuRW5ZWgjYQ8gn+qMikck4OgwlGw1ccg4cCZNj6yljngSoEbFwLG7OPNjY X-Received: by 2002:a62:aa06:: with SMTP id e6mr40770666pff.254.1556201241039; Thu, 25 Apr 2019 07:07:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556201241; cv=none; d=google.com; s=arc-20160816; b=MvHb5eVH8nL/Q+mTbWaW6sVR1IlWUUVobCRAilsxMd1mHbrfwTW60LPNzdxOaTiCCS I3ZAQ/ooH4ftlOrrsHGtx9DPP8bcYfb7kEzAuWY7XUE7OG3lISiR23poN1oxcoMEuGAL 0herndNZ/ktbWrO/xKR7OH1imTbkpEukgtaK8K1a3+u5q8NAHWv7FkrTcQV9vy9uX1es 7uN2hxFYwEfJBKGzrUdm1JjsCyQfkMZOazMZNQzVpV6BMkmehPB8QKN31Av4Xds+Fqcm OeT0CjkVu1awO40TiTzrrkX2DwlderD/8lmJmpRDEVFrirfYuph+XxtvrKwCQvfxDIet ZWmQ== 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=BHqmHGvlQPoQydnIkFaRyfk2v/uhN+O4nK02LCG47K0=; b=ce9/zCyb1MDVEkiJ7kGXbIvzNxgc/WhN2BLxuSDB7N9cp0deJR4QphbCufZqrJtKeL /N9fTXB8zS3IB5TBOVW82GtlQ44c2VlZjKh2IuT19G884zOE2IR+JO3GCCfrwIVYT7jN lqe3Ib+0fhKSYk3btTghcGtEI88jAoCoCLi5oyuocVNyOTtchFC323N5Dc572dwCoZSO pb5kCxODS4V3eKgv2FZ+R+lNk478tCxhLNMQDtHOcWAv/D92chaD/4aYD0jx30PVpE81 5ItiOqoy8ZUQbuxRCuCkG9DBYkM1SuBkp5RLF9ABY/wcHxFRomRRZwR/879vE0G2NqEL qcdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si20005959pgq.84.2019.04.25.07.07.04; Thu, 25 Apr 2019 07:07:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731485AbfDYMpG (ORCPT + 99 others); Thu, 25 Apr 2019 08:45:06 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6694 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1731393AbfDYMoQ (ORCPT ); Thu, 25 Apr 2019 08:44:16 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 3FBAA7A51F75200838D6; Thu, 25 Apr 2019 20:44:14 +0800 (CST) Received: from localhost.localdomain (10.67.212.132) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Thu, 25 Apr 2019 20:44:05 +0800 From: Huazhong Tan To: CC: , , , , , , Huazhong Tan , Peng Li Subject: [PATCH V3 net-next 08/11] net: hns3: fix pause configure fail problem Date: Thu, 25 Apr 2019 20:42:52 +0800 Message-ID: <1556196175-65389-9-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556196175-65389-1-git-send-email-tanhuazhong@huawei.com> References: <1556196175-65389-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.212.132] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When configure pause, current implementation returns directly after setup PFC without setup BP, which is not sufficient. So this patch fixes it, only return while setting PFC failed. Fixes: 44e59e375bf7 ("net: hns3: do not return GE PFC setting err when initializing") Signed-off-by: Huazhong Tan Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c index aafc69f..a7bbb6d 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_tm.c @@ -1331,8 +1331,11 @@ int hclge_pause_setup_hw(struct hclge_dev *hdev, bool init) ret = hclge_pfc_setup_hw(hdev); if (init && ret == -EOPNOTSUPP) dev_warn(&hdev->pdev->dev, "GE MAC does not support pfc\n"); - else + else if (ret) { + dev_err(&hdev->pdev->dev, "config pfc failed! ret = %d\n", + ret); return ret; + } return hclge_tm_bp_setup(hdev); } -- 2.7.4