netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Iyappan Subramanian <isubramanian@apm.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, patches@apm.com,
	kchudgar@apm.com, qnguyen@apm.com,
	Iyappan Subramanian <isubramanian@apm.com>
Subject: [PATCH net-next 2/7] drivers: net: xgene: Fix hardware checksum setting
Date: Wed, 15 Mar 2017 13:27:16 -0700	[thread overview]
Message-ID: <1489609641-31557-3-git-send-email-isubramanian@apm.com> (raw)
In-Reply-To: <1489609641-31557-1-git-send-email-isubramanian@apm.com>

From: Quan Nguyen <qnguyen@apm.com>

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 <qnguyen@apm.com>
Signed-off-by: Iyappan Subramanian <isubramanian@apm.com>
---
 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(+)

diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
index 06e6816..c72a17e 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
@@ -623,6 +623,7 @@ static void xgene_enet_cle_bypass(struct xgene_enet_pdata *pdata,
 	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);
diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h
index 5f83037..b6cd625 100644
--- a/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h
+++ b/drivers/net/ethernet/apm/xgene/xgene_enet_hw.h
@@ -163,6 +163,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_CLE_NXTFPSEL0_SET(dst, val)		xgene_set_bits(dst, val, 20, 4)
-- 
1.9.1

  parent reply	other threads:[~2017-03-15 20:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-15 20:27 [PATCH net-next 0/7] drivers: net: xgene: Bug fixes and errata workarounds Iyappan Subramanian
2017-03-15 20:27 ` [PATCH net-next 1/7] drivers: net: phy: xgene: Fix mdio write Iyappan Subramanian
2017-03-15 20:27 ` Iyappan Subramanian [this message]
2017-03-15 20:27 ` [PATCH net-next 3/7] drivers: net: xgene: Fix wrong logical operation Iyappan Subramanian
2017-03-15 20:27 ` [PATCH net-next 4/7] drivers: net: xgene: Fix Rx checksum validation logic Iyappan Subramanian
2017-03-15 20:27 ` [PATCH net-next 5/7] drivers: net: xgene: Add workaround for errata 10GE_1 Iyappan Subramanian
2017-03-15 20:27 ` [PATCH net-next 6/7] drivers: net: xgene: Add workaround for errata 10GE_8/ENET_11 Iyappan Subramanian
2017-03-15 20:27 ` [PATCH net-next 7/7] MAINTAINERS: Update X-Gene SoC ethernet maintainer Iyappan Subramanian
2017-03-16  4:53 ` [PATCH net-next 0/7] drivers: net: xgene: Bug fixes and errata workarounds David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1489609641-31557-3-git-send-email-isubramanian@apm.com \
    --to=isubramanian@apm.com \
    --cc=davem@davemloft.net \
    --cc=kchudgar@apm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=netdev@vger.kernel.org \
    --cc=patches@apm.com \
    --cc=qnguyen@apm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).