Netdev Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH net 1/1] net: stmmac: Clear receive all(RA) bit when promiscuous mode is off
@ 2021-05-04 15:42 Ramesh Babu B
  2021-05-04 19:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Ramesh Babu B @ 2021-05-04 15:42 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Maxime Coquelin
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	Ong Boon Leong, Voon Wei Feng, Wong Vee Khee, Ramesh Babu B

From: Ramesh Babu B <ramesh.babu.b@intel.com>

In promiscuous mode Receive All bit is set in GMAC packet filter register,
but outside promiscuous mode Receive All bit is not cleared,
which resulted in all network packets are received when toggle (ON/OFF)
the promiscuous mode.

Fixes: e0f9956a3862 ("net: stmmac: Add option for VLAN filter fail queue enable")
Signed-off-by: Ramesh Babu B <ramesh.babu.b@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
index 95864f014ffa..f35c03c9f91e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
@@ -642,6 +642,7 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
 	value &= ~GMAC_PACKET_FILTER_PCF;
 	value &= ~GMAC_PACKET_FILTER_PM;
 	value &= ~GMAC_PACKET_FILTER_PR;
+	value &= ~GMAC_PACKET_FILTER_RA;
 	if (dev->flags & IFF_PROMISC) {
 		/* VLAN Tag Filter Fail Packets Queuing */
 		if (hw->vlan_fail_q_en) {
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net 1/1] net: stmmac: Clear receive all(RA) bit when promiscuous mode is off
  2021-05-04 15:42 [PATCH net 1/1] net: stmmac: Clear receive all(RA) bit when promiscuous mode is off Ramesh Babu B
@ 2021-05-04 19:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-04 19:10 UTC (permalink / raw)
  To: Ramesh Babu B
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, kuba,
	mcoquelin.stm32, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel, boon.leong.ong, weifeng.voon, vee.khee.wong,
	ramesh.Babu.B

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Tue,  4 May 2021 21:12:41 +0530 you wrote:
> From: Ramesh Babu B <ramesh.babu.b@intel.com>
> 
> In promiscuous mode Receive All bit is set in GMAC packet filter register,
> but outside promiscuous mode Receive All bit is not cleared,
> which resulted in all network packets are received when toggle (ON/OFF)
> the promiscuous mode.
> 
> [...]

Here is the summary with links:
  - [net,1/1] net: stmmac: Clear receive all(RA) bit when promiscuous mode is off
    https://git.kernel.org/netdev/net/c/4c7a94286ef7

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 15:42 [PATCH net 1/1] net: stmmac: Clear receive all(RA) bit when promiscuous mode is off Ramesh Babu B
2021-05-04 19:10 ` patchwork-bot+netdevbpf

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git