devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Salil <salil.mehta@huawei.com>
To: davem@davemloft.net, robh+dt@kernel.org, pawel.moll@arm.com,
	mark.rutland@arm.com, paul.gortmaker@windriver.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	catalin.marinas@arm.com, will.deacon@arm.com, arnd@arndb.de,
	liguozhu@hisilicon.com, yisen.zhuang@huawei.com,
	dingtianhong@huawei.com, zhangfei.gao@linaro.org,
	huangdaode@hisilicon.com, kenneth-lee-2012@foxmail.com,
	salil.mehta@huawei.com, mehta.salil.lnk@gmail.com,
	xuwei5@hisilicon.com, lisheng011@huawei.com,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
	linuxarm@huawei.com
Subject: [PATCH net-next 4/4] net:hns: Add the init code to disable Hip06 "Hardware VLAN assist"
Date: Tue, 20 Oct 2015 23:01:18 +0800	[thread overview]
Message-ID: <1445353278-130498-5-git-send-email-salil.mehta@huawei.com> (raw)
In-Reply-To: <1445353278-130498-1-git-send-email-salil.mehta@huawei.com>

From: Salil Mehta <salil.mehta@huawei.com>

This patch adds the initializzation code to disable the hardware
vlan support for VLAN Tag stripping by default for now.

Proper support of "hardware VLAN assitance" feature would
soon come in the next coming patches.

Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c |    7 +++++++
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h |    1 +
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
index 6eb4816..85526f1 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
@@ -188,6 +188,11 @@ static void hns_ppe_cnt_clr_ce(struct hns_ppe_cb *ppe_cb)
 			 PPE_CNT_CLR_CE_B, 1);
 }
 
+static void hns_ppe_set_vlan_strip(struct hns_ppe_cb *ppe_cb, int en)
+{
+	dsaf_write_dev(ppe_cb, PPEV2_VLAN_STRIP_EN_REG, en);
+}
+
 /**
  * hns_ppe_checksum_hw - set ppe checksum caculate
  * @ppe_device: ppe device
@@ -357,6 +362,8 @@ static void hns_ppe_init_hw(struct hns_ppe_cb *ppe_cb)
 	hns_ppe_cnt_clr_ce(ppe_cb);
 
 	if (!AE_IS_VER1(dsaf_dev->dsaf_ver)) {
+		hns_ppe_set_vlan_strip(ppe_cb, 0);
+
 		hns_ppe_set_rss_key(ppe_cb, rss_key);
 
 		for (i = 0; i < HNS_PPEV2_RSS_IND_TBL_SIZE; i++)
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
index cbfba30..d3c61b6 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
@@ -317,6 +317,7 @@
 #define PPE_CFG_PARSE_TAG_REG			0x94
 #define PPE_CFG_PRO_CHECK_EN_REG		0x98
 #define PPEV2_CFG_TSO_EN_REG                    0xA0
+#define PPEV2_VLAN_STRIP_EN_REG                 0xAC
 #define PPE_INTEN_REG				0x100
 #define PPE_RINT_REG				0x104
 #define PPE_INTSTS_REG				0x108
-- 
1.7.9.5

      parent reply	other threads:[~2015-10-20 15:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20 15:01 [PATCH net-next 0/4] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem Salil
2015-10-20 15:01 ` [PATCH net-next 1/4] " Salil
2015-10-20 15:54   ` [RFC PATCH] net:hns: hns_aev2_toggle_ring_irq() can be static kbuild test robot
2015-10-20 15:54   ` [PATCH net-next 1/4] net:hns: Add support of Hip06 SoC to the Hislicon Network Subsystem kbuild test robot
     [not found] ` <1445353278-130498-1-git-send-email-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-10-20 15:01   ` [PATCH net-next 2/4] net:hns: Add Hip06 "RSS(Receive Side Scaling)" support to HNS Driver Salil
     [not found]     ` <1445353278-130498-3-git-send-email-salil.mehta-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2015-10-22  2:01       ` Yisen.Zhuang(Zhuangyuzeng)
2015-10-20 15:01 ` [PATCH net-next 3/4] net:hns: Add Hip06 "TSO(TCP Segment Offload)" support " Salil
2015-10-20 15:01 ` Salil [this message]

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=1445353278-130498-5-git-send-email-salil.mehta@huawei.com \
    --to=salil.mehta@huawei.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dingtianhong@huawei.com \
    --cc=galak@codeaurora.org \
    --cc=huangdaode@hisilicon.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=kenneth-lee-2012@foxmail.com \
    --cc=liguozhu@hisilicon.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lisheng011@huawei.com \
    --cc=mark.rutland@arm.com \
    --cc=mehta.salil.lnk@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=paul.gortmaker@windriver.com \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=will.deacon@arm.com \
    --cc=xuwei5@hisilicon.com \
    --cc=yisen.zhuang@huawei.com \
    --cc=zhangfei.gao@linaro.org \
    /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).