Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp730108imm; Thu, 13 Sep 2018 06:57:41 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYWsaNxlmqn/HVk9zmRTp9fipnnwWbkHU/ttCYaHKHPjr/MjlWP9j0ydR4DDmZu0UepIMEn X-Received: by 2002:a63:6243:: with SMTP id w64-v6mr7465482pgb.145.1536847061172; Thu, 13 Sep 2018 06:57:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536847061; cv=none; d=google.com; s=arc-20160816; b=dKHPkfYn326LlsnBmRrQAobpe+CDn3zwGUR/2f4DAZg3sRJSMVkOk+YJ5bHWSH87oQ gj4cDVJCsz6SoBMYsQKhBGOuuBbKQtFyPTEoSAjDKvV5sRH+mJhM16GFTJulw/DS/Wc1 78queC6hiEwqyP/OqnQhu/bIDXUSrFRzltMtOhndpbrRaaI8jcTDwnvnKxZqlTP6BsJe vLNnE3RDH436OeYxGycmWJ/sPzlMEAjGuwgGjQEAbF4EgMbfG5Jci9iPlGNQdRHTfdRI NQIv9rN+gw7xDURMm+8KtO8HHo2LquHeCxE/xDEtrOpQkyh/Kg0kkzFDekKLHiEtkvmj /Eyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=KM9M1CDk2YUeiLwyRY/p/+l3Kly6DMjzUqEzJykEBbI=; b=ud1B+UKXJ3V1xJ+uyZjc/3P17thi6NIf/aSZQomcrp/FAS1KpWcMJtYbX0UZxPFjGP QmCGs2kpXOteDL7WPUZObbMlgeXFf7wE3N7pRwqM/gBjt2QHvU/h5O0bznlUqNlcc/53 plgLJhwGH0KtCU4XbauS7CjXIGmfCC+4QL0AX7cLjhh79M8eNpb8UuUuvFXov8JdGhQA +nPJ/9mPr0wB7HWfb0Ft2y5mE1xDY4dgAZ7zxHAbvW07cgH/W5xe7vtw4vYfzxfkx3zh AzN9IBmFGHXp0buvt8MJTJ9uJxQ6nB7m2uf0zZxM/KKFYICjZF5M+BNybta4YxOuphaP 9B8g== 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 n3-v6si4306816pgh.359.2018.09.13.06.57.25; Thu, 13 Sep 2018 06:57: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 S1731319AbeIMTFe (ORCPT + 99 others); Thu, 13 Sep 2018 15:05:34 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34080 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730731AbeIMTFe (ORCPT ); Thu, 13 Sep 2018 15:05:34 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id BEC99D10; Thu, 13 Sep 2018 13:55:57 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xi Wang , Peng Li , Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.18 081/197] net: hns3: Fix for command format parsing error in hclge_is_all_function_id_zero Date: Thu, 13 Sep 2018 15:30:30 +0200 Message-Id: <20180913131844.765806146@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180913131841.568116777@linuxfoundation.org> References: <20180913131841.568116777@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xi Wang [ Upstream commit 6c39d5278e62956238a681e4cfc69fae5507fc57 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c @@ -3911,7 +3911,7 @@ static bool hclge_is_all_function_id_zer #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;