Received: by 10.213.65.68 with SMTP id h4csp1800809imn; Mon, 19 Mar 2018 13:38:21 -0700 (PDT) X-Google-Smtp-Source: AG47ELuTT9tJV+hSDoNdXMRKuZMoqdNU/7DiH/O6s4jOSY4uDZ2kh+hxSvh5TKeKhgPUia88r+2B X-Received: by 2002:a17:902:a24:: with SMTP id 33-v6mr13311453plo.72.1521491901380; Mon, 19 Mar 2018 13:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521491901; cv=none; d=google.com; s=arc-20160816; b=mF5igfbYpC2mXtNu5xulphaZU7NYj/mt2PDRNA/att8pOm75TpL/ftKuuG8TrIFDXY FUdVc64YJTlJZVk/vQ3GpI7xE6N8P7oTX2TyGQsf23NZuR5nVeWZCGl8ZDwC/3Pl9FjL XAbXeeoubdEO6tE7Bg3YiCZ3ov0QEs1Vfco7Igg3Ks+gazAOk/HFbhQ7nGCvT1m3n+ur eq+ia+bkV16SQYArSlklbD2npEoXO+n59uRo2Gf5xxyrOY14OKuABEwzIoWYyOkbdJmt grEcJdiF3wWdpOYQz2nh72lpJtDsYECVpGT0KAkUD8xxI8KTvhfdZI9GxF61lHKiR7VL LR2w== 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=rrp9R6uMfhXXL43yk0Yjaed2ttNAdKAZh5cZU8yx6WQ=; b=eRkXWleTpCk7ErWS9GZ5faBeO35TeSLVBj76uE5QpHWd6wMpqrPJjhnJkMDSYdbZCE Ox9vtprbCD7W/B754gMduHEQodUGfQJJN3A0PLk+3yVk/y3/6/nIoiWCyXz+eyfKNKQ5 tgD4Mui950lgKYH6k8FALnTjycKiEUjZt2rqZzhh13SvgsNUkav+RpaoCUH1g5/shdoH 3Gwj4y06+mNcnPxTcYsawRhzdwqBssYOTtoBM4xKWKCeOFP7c2JHYGsPSEGabpuJBQj1 9Od2Byi1UkSvamwFKDZP92AdBp3exzFhV7875+wHW/QsZZi9TPPi1GTgpofpud5nzdMb pxTQ== 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 f61-v6si45663plb.285.2018.03.19.13.37.37; Mon, 19 Mar 2018 13:38:21 -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 S1031690AbeCSUdN (ORCPT + 99 others); Mon, 19 Mar 2018 16:33:13 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42710 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751317AbeCSSMW (ORCPT ); Mon, 19 Mar 2018 14:12:22 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id DD8F311B4; Mon, 19 Mar 2018 18:12:21 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Quan Nguyen , Iyappan Subramanian , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 015/134] drivers: net: xgene: Fix hardware checksum setting Date: Mon, 19 Mar 2018 19:04:58 +0100 Message-Id: <20180319171851.297389761@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319171849.024066323@linuxfoundation.org> References: <20180319171849.024066323@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.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Quan Nguyen [ Upstream commit e026e700d940a1ea3d3bc84d92ac668b1f015462 ] This patch fixes the hardware checksum settings by properly program the classifier. Otherwise, packet may be received with checksum error on X-Gene1 SoC. Signed-off-by: Quan Nguyen Signed-off-by: Iyappan Subramanian Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 1 + drivers/net/ethernet/apm/xgene/xgene_enet_hw.h | 1 + 2 files changed, 2 insertions(+) --- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c @@ -604,6 +604,7 @@ static void xgene_enet_cle_bypass(struct xgene_enet_rd_csr(pdata, CLE_BYPASS_REG0_0_ADDR, &cb); cb |= CFG_CLE_BYPASS_EN0; CFG_CLE_IP_PROTOCOL0_SET(&cb, 3); + CFG_CLE_IP_HDR_LEN_SET(&cb, 0); xgene_enet_wr_csr(pdata, CLE_BYPASS_REG0_0_ADDR, cb); xgene_enet_rd_csr(pdata, CLE_BYPASS_REG1_0_ADDR, &cb); --- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h @@ -147,6 +147,7 @@ enum xgene_enet_rm { #define CFG_RXCLK_MUXSEL0_SET(dst, val) xgene_set_bits(dst, val, 26, 3) #define CFG_CLE_IP_PROTOCOL0_SET(dst, val) xgene_set_bits(dst, val, 16, 2) +#define CFG_CLE_IP_HDR_LEN_SET(dst, val) xgene_set_bits(dst, val, 8, 5) #define CFG_CLE_DSTQID0_SET(dst, val) xgene_set_bits(dst, val, 0, 12) #define CFG_CLE_FPSEL0_SET(dst, val) xgene_set_bits(dst, val, 16, 4) #define CFG_MACMODE_SET(dst, val) xgene_set_bits(dst, val, 18, 2)