[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <565F4AB0.5020100@cogentembedded.com>
Date: Wed, 2 Dec 2015 22:46:56 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Salil Mehta <salil.mehta@...wei.com>, davem@...emloft.net,
robh+dt@...nel.org, pawel.moll@....com, mark.rutland@....com,
paul.gortmaker@...driver.com, ijc+devicetree@...lion.org.uk,
galak@...eaurora.org, catalin.marinas@....com, will.deacon@....com,
arnd@...db.de, liguozhu@...ilicon.com, yisen.zhuang@...wei.com,
dingtianhong@...wei.com, zhangfei.gao@...aro.org,
huangdaode@...ilicon.com, kenneth-lee-2012@...mail.com,
mehta.salil.lnk@...il.com, xuwei5@...ilicon.com,
lisheng011@...wei.com, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
netdev@...r.kernel.org, linuxarm@...wei.com
Subject: Re: [PATCH V6 net-next 5/5] net:hns: Add the init code to disable
Hip06 "Hardware VLAN assist"
Hello.
On 12/02/2015 07:52 PM, Salil Mehta wrote:
> 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@...wei.com>
> ---
>
> PATCH V6:
> - No change over the earlier patch
>
> PATCH V5:
> - Minor merge/reject change resolved to application of previous patch
>
> PATCH V4/V3/V2:
> - No change over the initial floated patch
>
> PATCH V1:
> - Initial code to disable the hardware VLAN assist for now
> ---
> 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 b5e4c44..f302ef9 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c
> @@ -176,6 +176,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);
Why not call it directly?
> +}
> +
> /**
> * hns_ppe_checksum_hw - set ppe checksum caculate
> * @ppe_device: ppe device
> @@ -336,6 +341,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);
> +
> /* set default RSS key in h/w */
> hns_ppe_set_rss_key(ppe_cb, ppe_cb->rss_key);
>
> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
> index 98c163e..6c18ca9 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h
> @@ -318,6 +318,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
Please indent with tabs, like all the surrounding #define's are indented
(except PPEV2_CFG_TSO_EN_REG).
> #define PPE_INTEN_REG 0x100
> #define PPE_RINT_REG 0x104
> #define PPE_INTSTS_REG 0x108
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists