From patchwork Sun Aug 12 09:47:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 143982 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1892385ljj; Sun, 12 Aug 2018 02:48:41 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwXyUAfbvZBzY6S+6jOL96ewrzC7+aiWgQWSziA9PbdbIjzoE9GXfF9ItsXAc1vDnaTHZ60 X-Received: by 2002:a17:902:6ac7:: with SMTP id i7-v6mr12821140plt.288.1534067321490; Sun, 12 Aug 2018 02:48:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534067321; cv=none; d=google.com; s=arc-20160816; b=wavOqYM6S3dvpA8YJ/TxSel2Ghus9V47w5G42+55dDkkG7+P+Rt0WjHNUgSpozh6AR XmTv/S2Fy3Un40M0kTgxgN9ITTixDX5xyFvqKDsUQmzUk1BVYMn0G7AGpYpQWVKE+59P CXO2DdBLc4dM2qncgkZxRRBGr5LUFQ4jaZgPRLy6VC3leBBaMg4OD4081jgh5O1omXf2 gzoz4cPxinur9iKxut0Nqis/B+aiGpCM3aDn0PjHuII/I2S7l3LbbkZXNL1wL7qp/WoD jPixnFyVNmvNVA7V3rjyCFCGxifBM/Ps3SY5KdiD1loDIOyrqN4l7WhwQF4cu0XhPXWO YiBw== 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:arc-authentication-results; bh=n7AA9S1UIfAVlVWOhLC/c2yfg/yyQ0soRM+o2QFKNh8=; b=dgbOZm5p0XsyLJ9SnrYiQKRM3elgTR4tj3UBPdvI8w/9JV88fEMkMZ0SlnYN4pJQhg UNMyiN1+ZxKawzuUFBaQ3/CuG+w15eFWkV9CJBzQMw7YszkzV9ES3BQcdicQ/IK8TtQh BPM6OiDZcklwl5CqT/HJTysbLGhJHr6uG1vrHJTKdcICtnAOMC8LqS5kySbMWwDYZCCA RlT/8fJkYX5HLJIAjfuktSa6fNOXeOe3J3g5ZDPzoNENEAmsObyJPB5OoB0kKNNDhBSX c3+Ni8q2oTrWpW1l2qYyXPRInW2XdqdsP/Wn5EuWtDWOkFqomgYAR/+7DnGkTds6zEd+ FwyQ== 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 t1-v6si16342477pfb.208.2018.08.12.02.48.41; Sun, 12 Aug 2018 02:48:41 -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 S1728046AbeHLM0F (ORCPT + 31 others); Sun, 12 Aug 2018 08:26:05 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:10704 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727990AbeHLM0E (ORCPT ); Sun, 12 Aug 2018 08:26:04 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 784E0D2BD17F6; Sun, 12 Aug 2018 17:48:34 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.47.93.119) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.399.0; Sun, 12 Aug 2018 17:48:26 +0800 From: Salil Mehta To: CC: , , , , , , , Xi Wang Subject: [PATCH net-next 2/9] net: hns3: Fix for command format parsing error in hclge_is_all_function_id_zero Date: Sun, 12 Aug 2018 10:47:31 +0100 Message-ID: <20180812094738.14852-3-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180812094738.14852-1-salil.mehta@huawei.com> References: <20180812094738.14852-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.47.93.119] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Xi Wang According to the functional specification of hardward, the first descriptor of response from command 'lookup vlan talbe' is not valid. Currently, the first descriptor is parsed as normal value, which will cause an expected error. This patch fixes this problem by skipping the first descriptor. Signed-off-by: Xi Wang Signed-off-by: Peng Li Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.11.0 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 99dda5051f5f..18ae11d8de73 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3930,7 +3930,7 @@ static bool hclge_is_all_function_id_zero(struct hclge_desc *desc) #define HCLGE_FUNC_NUMBER_PER_DESC 6 int i, j; - for (i = 0; i < HCLGE_DESC_NUMBER; i++) + for (i = 1; i < HCLGE_DESC_NUMBER; i++) for (j = 0; j < HCLGE_FUNC_NUMBER_PER_DESC; j++) if (desc[i].data[j]) return false;