Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1147456imm; Wed, 1 Aug 2018 10:59:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfVO/86OT32P3XpIo0sTwOeKqA7q7UD1fzsOLdYAb+yn2QOaHUI2iReB1aj1RNa8JzilAEx X-Received: by 2002:a63:d5b:: with SMTP id 27-v6mr25141245pgn.107.1533146355445; Wed, 01 Aug 2018 10:59:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533146355; cv=none; d=google.com; s=arc-20160816; b=ulsPd+ZjeTlvUchVeGxdJqWy54fl3HrJr/BJt0p3c03P9LlrAVlnKUvkXbBn0LcsJI DYWw4RE+YeUu1klQSdH1opiWuVlJaW9uYFHSKog0f8X3RSOogwOsKendmMOuL7vP4qwy wY3O/gSnI7htwG82TMdhJ/BFXkgk/pqYdIeUJ6ENY6P3Ai4uZ1ORETXD7XDzW/lHf1Ww tIamBFs4h3BxzX90N+O+vu/3VTYpPdwvTd3QtJeNxPsKKTjYfLwa6FjuJNcO6h6aEr+v HUBPwqorZDYPAA9uDpLyfhLna3Z0L+9lSRW5VuISxo8NGvyqfvc1+fBrYLSfLnGysI07 RENw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=YP1hFtQfZ4I24mwAEtnc1sQL5AqH+LJW8VbuWCNJ0+w=; b=eVlw28O8+sE4kPwFOYRaFExjM1tW6GH1Q4hPuOh6WldrejLFYssajOQuZVK4Cv5zt6 b1HI6aLKQzTRZTiQ7FQCR4w0e25GsC65ualIG1kOux7q1qkvf23J//iJhq6NpFr7c+/G CXJsjWJgOpJaPLl8TaqaRQkongi9yHLwp6ZjhRC1GY5QXe2L7CweoLG/7xge3Kwtfoez dT/X94xTXc1gmKYssBca7ndVW+mUeA+gCHRApxFn9AsMe6BJsiWz0H0BXxE1S6/gDUP7 1MECIs/xmx6fPEyRA+KI4yRB7O7Q6Gu1eHKdA8Pvpd1pYneE4cdtM8j1ERzY2gBg+vp/ HXmw== 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 l18-v6si17923469pfk.78.2018.08.01.10.59.01; Wed, 01 Aug 2018 10:59:15 -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 S1727002AbeHAToa (ORCPT + 99 others); Wed, 1 Aug 2018 15:44:30 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:50082 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405946AbeHATIk (ORCPT ); Wed, 1 Aug 2018 15:08:40 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 8A77F13C3; Wed, 1 Aug 2018 17:15:44 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Fuyun Liang , Peng Li , Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 079/246] net: hns3: Fixes the init of the VALID BD info in the descriptor Date: Wed, 1 Aug 2018 18:49:49 +0200 Message-Id: <20180801165015.496886651@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Fuyun Liang [ Upstream commit 7d0b130cbbfa4651cc1ab9268a2956c1b9d82ff9 ] RX Buffer Descriptor contains a VALID bit which indicates if the BD is valid and has some data. This field is set by HNS3 hardware to intimate the driver of some valid data present in the BD. nd should be reset by the driver when BD is being used again. In the existing code this bit was not being (re-)initialized properly and hence was causing problems. Fixes: 76ad4f0ee747 ("net: hns3: Add support of HNS3 Ethernet Driver for hip08 SoC") Signed-off-by: Fuyun Liang 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/hns3_enet.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hns3_enet.c @@ -1598,6 +1598,7 @@ static void hns3_replace_buffer(struct h hns3_unmap_buffer(ring, &ring->desc_cb[i]); ring->desc_cb[i] = *res_cb; ring->desc[i].addr = cpu_to_le64(ring->desc_cb[i].dma); + ring->desc[i].rx.bd_base_info = 0; } static void hns3_reuse_buffer(struct hns3_enet_ring *ring, int i) @@ -1605,6 +1606,7 @@ static void hns3_reuse_buffer(struct hns ring->desc_cb[i].reuse_flag = 0; ring->desc[i].addr = cpu_to_le64(ring->desc_cb[i].dma + ring->desc_cb[i].page_offset); + ring->desc[i].rx.bd_base_info = 0; } static void hns3_nic_reclaim_one_desc(struct hns3_enet_ring *ring, int *bytes,