Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754620AbbLDS0R (ORCPT ); Fri, 4 Dec 2015 13:26:17 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:37845 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753977AbbLDS0N (ORCPT ); Fri, 4 Dec 2015 13:26:13 -0500 Message-ID: <5661D8FE.2010909@huawei.com> Date: Fri, 4 Dec 2015 18:18:38 +0000 From: Salil Mehta User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: Sergei Shtylyov , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH V6 net-next 5/5] net:hns: Add the init code to disable Hip06 "Hardware VLAN assist" References: <1449075171-4820-1-git-send-email-salil.mehta@huawei.com> <1449075171-4820-6-git-send-email-salil.mehta@huawei.com> <565F4AB0.5020100@cogentembedded.com> In-Reply-To: <565F4AB0.5020100@cogentembedded.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.77.104] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.5661D921.0076,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 1cdbafc32d2bc068941329ab07d38024 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3429 Lines: 104 On 12/2/2015 7:46 PM, Sergei Shtylyov wrote: > 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 >> --- >> >> 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? Hi Sergei, The wrapper API abstraction has been put intentionally. The reason is the same code is suppose to run across different SoCs so it is always clean approach to hide it so that even if there are differences in the way we access or configure hardware in other SoCs basic interface of the SET API remains same!! Therefore, we are in favour of keeping the above wrapper and therefore not changing now. Best regards Salil >> +} >> + >> /** >> * 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). Thanks for this. I have changed this in PATCH V7 already floated. Best Regards Salil >> #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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/