Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1922717imm; Sun, 12 Aug 2018 02:50:20 -0700 (PDT) X-Google-Smtp-Source: AA+uWPw2BvSg/DRc23Xi2zTjfWG+nfhrgVJdzfw5WI+/XcQI5n8co1NjDzevyr4b1JkIX+668oMQ X-Received: by 2002:a17:902:7845:: with SMTP id e5-v6mr12257984pln.197.1534067420575; Sun, 12 Aug 2018 02:50:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534067420; cv=none; d=google.com; s=arc-20160816; b=ivpxE0zrJv+4hIPJ4gG2x2PXPAVwxrk3ITcl8RI34cROCMhIeePvOSdBw52rE3WX1K 4i0B5FSTM1KLgBgoO1J7kW6ZB+XkJYitLlQJd2lCfGEak2fBS+hSI9n8BtcMQwmo5uAX LXm3br43I/AYJ5GAz9I/yDNoX89xb1+8/3AIohhMvAwGBfHWEyzIcLSPnM9Vhg9ITQPs w+rly3dOkag8yZj1LexrYdJZHDc4hMMsKLV2Jgj5wSOZsPptX14y2uZLJhpC0sBHVTIx PuO7oaibA9fbSdCx7cidWUJyjNAoAI8FDuHVags1Jm5DpQw5PWtpVEPR5u7z6oDfaRtX BjzQ== 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 q23-v6si16252465pgq.483.2018.08.12.02.50.03; Sun, 12 Aug 2018 02:50:20 -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 S1728043AbeHLM0F (ORCPT + 99 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 Content-Type: text/plain 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(-) 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; -- 2.11.0