From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98E38C25B7E for ; Thu, 30 May 2024 19:08:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3uXLjyESPbIjToBBQC0t7QXHAqTeBlyTsKDr2v+nHr4=; b=ijbKr+jjKjeXM2 us+bEqiQ2M0Ray+wqp4AvK+lk9vqJDHYmwTd2k7bOcazNsHeAJaB6FxUYRCqs7GI8xjLFLpvfA0Qu WybM3OQzG/95k6N4iseF/Xuw8AVuRLYyqU4+F7eONODw5r5ip10dnK9LBH7KmNpY439q8X61O1LUZ OyPWr1cNpHetKxnypEw7PktFpDLwFs8G9cvbRgIkort9bhH20B1MDZ9+jH/2rj2Nvkcx1FVZocKQp uJ79D14WgnjHSufznbkjzkoUHCJ73dVr+JGDwtnvnD9zvBg4yVX84JtLDkEMVcXkVGNBPCoFyNptJ nTpu3plHBG6AVh4NdUYQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCl8f-00000008B2C-3xvv; Thu, 30 May 2024 19:08:37 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sCl8c-00000008B0H-0PeY for linux-arm-kernel@lists.infradead.org; Thu, 30 May 2024 19:08:35 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 81FB9CE1B2B; Thu, 30 May 2024 19:08:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C3D9CC32781; Thu, 30 May 2024 19:08:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717096110; bh=Qpg5Q2EhMyKmWZjKSiIdY491rX47ZL7A3DH8EIJ+Vgg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ALaMbQNlXrEJh4FlyXErAkh9Gxl0i9dwynxLvpXs2XejNxgjEH7cdj0oDTbunCGW4 pWKk0Rt+wuazccMq6I1v5pCoib0jpYv4WuPbe0kTxlBcKnsY8QWQl74cfalyNqaH1v lygm5r7ectDDa20bewUtcjdlOzUPBRCrS+roU6XN7YMvn3q8G5/NQ/oCvw1rL3wQQ4 sXAzsIVz+T9QvDdGntcDwXObimFnIh0fyr7341XKEXhiETR2hECJfnpiMxi1a/JANO wxSG9iRQ8xeTr6WNaOEYug+ZtffCrtl5n7oEjCEWJSBZCTdFDrAr8oIklt8IlaLzYJ JxfJeH9S8Y4Pw== Date: Thu, 30 May 2024 20:08:25 +0100 From: Simon Horman To: MD Danish Anwar Cc: Dan Carpenter , Diogo Ivo , Jan Kiszka , Andrew Lunn , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, srk@ti.com, Vignesh Raghavendra , r-gunasekaran@ti.com, Roger Quadros Subject: Re: [RFC PATCH net-next 2/2] net: ti: icssg-prueth: Add multicast filtering support Message-ID: <20240530190825.GC123401@kernel.org> References: <20240516091752.2969092-1-danishanwar@ti.com> <20240516091752.2969092-3-danishanwar@ti.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240516091752.2969092-3-danishanwar@ti.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240530_120834_337500_DC50D50D X-CRM114-Status: GOOD ( 20.82 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 16, 2024 at 02:47:52PM +0530, MD Danish Anwar wrote: > Add multicast filtering support for ICSSG Driver. > > Signed-off-by: MD Danish Anwar > --- > drivers/net/ethernet/ti/icssg/icssg_config.c | 16 +++++-- > drivers/net/ethernet/ti/icssg/icssg_prueth.c | 50 ++++++++++++++++++-- > drivers/net/ethernet/ti/icssg/icssg_prueth.h | 3 ++ > 3 files changed, 62 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/ethernet/ti/icssg/icssg_config.c b/drivers/net/ethernet/ti/icssg/icssg_config.c > index 2213374d4d45..4e30bb995078 100644 > --- a/drivers/net/ethernet/ti/icssg/icssg_config.c > +++ b/drivers/net/ethernet/ti/icssg/icssg_config.c > @@ -318,17 +318,27 @@ static int prueth_emac_buffer_setup(struct prueth_emac *emac) > > static void icssg_init_emac_mode(struct prueth *prueth) > { > + u32 addr = prueth->shram.pa + VLAN_STATIC_REG_TABLE_OFFSET; > /* When the device is configured as a bridge and it is being brought > * back to the emac mode, the host mac address has to be set as 0. > */ > u8 mac[ETH_ALEN] = { 0 }; > + int i; > > if (prueth->emacs_initialized) > return; > > - regmap_update_bits(prueth->miig_rt, FDB_GEN_CFG1, > - SMEM_VLAN_OFFSET_MASK, 0); > - regmap_write(prueth->miig_rt, FDB_GEN_CFG2, 0); > + /* Set VLAN TABLE address base */ > + regmap_update_bits(prueth->miig_rt, FDB_GEN_CFG1, SMEM_VLAN_OFFSET_MASK, > + addr << SMEM_VLAN_OFFSET); > + /* Configure CFG2 register */ > + regmap_write(prueth->miig_rt, FDB_GEN_CFG2, (FDB_PRU0_EN | FDB_PRU1_EN | FDB_HOST_EN)); > + > + prueth->vlan_tbl = prueth->shram.va + VLAN_STATIC_REG_TABLE_OFFSET; > + for (i = 0; i < SZ_4K - 1; i++) { > + prueth->vlan_tbl[i].fid = i; > + prueth->vlan_tbl[i].fid_c1 = 0; > + } Hi MD, This isnot a full review, but I did notice one thing. According to Sparse, prueth->shram.va is __iomem. I don't think it is portable to directly access __iomem like this. Rather, I suspect that either ioremap(), or writel() or similar should be used. > /* Clear host MAC address */ > icssg_class_set_host_mac_addr(prueth->miig_rt, mac); > } ... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel