Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4693294ooa; Tue, 14 Aug 2018 09:16:02 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwYp34E4Yg/RWOy+wgnrvbs4XHT5WevV5/fg8IYhMWfm+X4g0AJlXmpJBoAqCqSR+I09Dow X-Received: by 2002:a63:5350:: with SMTP id t16-v6mr21439860pgl.196.1534263362108; Tue, 14 Aug 2018 09:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534263362; cv=none; d=google.com; s=arc-20160816; b=XfTz30VFi24Uh3HHW07C+daaVanrGFFGDZyGdvwmf35UyVYi+27wqaZftFHqDiUGIv hb/usKsmbXz/7skHhliht0qsjInfIBWx85PiNz8GinuFQDpH3Jl7/0ybu50wMtXgj+4q gr8tZHg0ipdPmTolOz7T9Dqule+YylijLgn+foQ5ZteEUN9iOey/8q1sgTvZCxpqeT6i v3cpzf3XKJg/8X33Jd0h1iQR2mLifl8lJlLSIsixwwOY4c5ywFv7DKpen9k9NjoVI77L WQfKtsHx0bjFHPpHrpSZHx/s6M+GL45Kem9F1lxwyPUgcFrJIVQIJv5JNBCsD0AfGMxt +Qdw== 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=BCN2FHbfMuwYAfPukV+tUnWLaoLT2sRycOfykelZ/Zo=; b=wbjmxQO/WezaJ7lAFnzwGiOSkmGzknuzqnkNyLnonXK28ia3uayPVrvUX28qONUuUU VayCGoUBKm6Oi0mZOPAiBhfXZT7HAei3XdX6dgIgMNN5KKet3Vq/wuAgA0bSdIWPI/LD pZuOKYbvgUdjtJPZnYSgBTaqk1ytxloMcWAtBWtbRKB2H6lT/BXxZc9UWm7bYi4yANOB J4gPbL+h3hypPP8UD6ipcjexSo8bgEH4ygDTy+FCgsyJlCVxV5qzmRrgahbUXx5NpMR4 Pp+NEmBE/QlG401VlQsTmCI+U/n8qCqkGH5xTW7Vx/WEOv1Kc69TuMbY6DT9QAjMBone jlbA== 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 r16-v6si20502848pgg.254.2018.08.14.09.15.47; Tue, 14 Aug 2018 09:16:02 -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 S1732997AbeHNTCD (ORCPT + 99 others); Tue, 14 Aug 2018 15:02:03 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:10722 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732817AbeHNTCC (ORCPT ); Tue, 14 Aug 2018 15:02:02 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 7065F6634A7DA; Wed, 15 Aug 2018 00:14:11 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.399.0; Wed, 15 Aug 2018 00:14:02 +0800 From: Salil Mehta To: CC: , , , , , , , Xi Wang Subject: [PATCH V2 net-next 2/8] net: hns3: Fix for command format parsing error in hclge_is_all_function_id_zero Date: Tue, 14 Aug 2018 17:13:13 +0100 Message-ID: <20180814161319.16392-3-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20180814161319.16392-1-salil.mehta@huawei.com> References: <20180814161319.16392-1-salil.mehta@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.202.226.54] 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 hardware, 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. Fixes: 46a3df9f9718 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support") 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(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c index 9209122..5f30ea4 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; -- 2.7.4