diff mbox series

[net-next,v2,1/5] net: xilinx: axienet: Always disable promiscuous mode

Message ID 20240815193614.4120810-2-sean.anderson@linux.dev (mailing list archive)
State New, archived
Headers show
Series net: xilinx: axienet: Multicast fixes and improvements | expand

Commit Message

Sean Anderson Aug. 15, 2024, 7:36 p.m. UTC
If promiscuous mode is disabled when there are fewer than four multicast
addresses, then it will to be reflected in the hardware. Fix this by
always clearing the promiscuous mode flag even when we program multicast
addresses.

Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
Signed-off-by: Sean Anderson <sean.anderson@linux.dev>
Reviewed-by: Simon Horman <horms@kernel.org>
---

(no changes since v1)

 drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jakub Kicinski Aug. 20, 2024, 1:30 a.m. UTC | #1
On Thu, 15 Aug 2024 15:36:10 -0400 Sean Anderson wrote:
> If promiscuous mode is disabled when there are fewer than four multicast
> addresses, then it will to be reflected in the hardware. Fix this by

it will *not* be reflected?
Something is off with this commit messages, or at least I can't parse

> always clearing the promiscuous mode flag even when we program multicast
> addresses.
> 
> Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")

I think we should ship it as a fix to net?
Sean Anderson Aug. 20, 2024, 2:24 p.m. UTC | #2
On 8/19/24 21:30, Jakub Kicinski wrote:
> On Thu, 15 Aug 2024 15:36:10 -0400 Sean Anderson wrote:
>> If promiscuous mode is disabled when there are fewer than four multicast
>> addresses, then it will to be reflected in the hardware. Fix this by
> 
> it will *not* be reflected?
> Something is off with this commit messages, or at least I can't parse
> 
>> always clearing the promiscuous mode flag even when we program multicast
>> addresses.
>> 
>> Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
> 
> I think we should ship it as a fix to net?

Yes, probably. I put these patches first so they could be easily cherry-picked.

--Sean
Sean Anderson Aug. 22, 2024, 2:25 p.m. UTC | #3
On 8/20/24 10:24, Sean Anderson wrote:
> On 8/19/24 21:30, Jakub Kicinski wrote:
>> On Thu, 15 Aug 2024 15:36:10 -0400 Sean Anderson wrote:
>>> If promiscuous mode is disabled when there are fewer than four multicast
>>> addresses, then it will to be reflected in the hardware. Fix this by
>> 
>> it will *not* be reflected?
>> Something is off with this commit messages, or at least I can't parse
>> 
>>> always clearing the promiscuous mode flag even when we program multicast
>>> addresses.
>>> 
>>> Fixes: 8a3b7a252dca ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
>> 
>> I think we should ship it as a fix to net?
> 
> Yes, probably. I put these patches first so they could be easily cherry-picked.

OK, so to be clear: how should I send these patches?

--Sean
Jakub Kicinski Aug. 22, 2024, 3:24 p.m. UTC | #4
On Thu, 22 Aug 2024 10:25:06 -0400 Sean Anderson wrote:
> > Yes, probably. I put these patches first so they could be easily cherry-picked.  
> 
> OK, so to be clear: how should I send these patches?

You gotta rebase and repost the first two -- I would have taken them
directly to net from this posting but there is a conflict on patch 2
(as mentioned there).

Could you repost the first two rebased ASAP? (You can leave the rename
of i for the net-next series). I'm literally prepping  the PR
net->Linus right now, if you post soon they will be cross-merged into
net-next by EOD, making it easier to merge the rest.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index ca04c298daa2..e664611c29cf 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -451,6 +451,10 @@  static void axienet_set_multicast_list(struct net_device *ndev)
 	} else if (!netdev_mc_empty(ndev)) {
 		struct netdev_hw_addr *ha;
 
+		reg = axienet_ior(lp, XAE_FMI_OFFSET);
+		reg &= ~XAE_FMI_PM_MASK;
+		axienet_iow(lp, XAE_FMI_OFFSET, reg);
+
 		i = 0;
 		netdev_for_each_mc_addr(ha, ndev) {
 			if (i >= XAE_MULTICAST_CAM_TABLE_NUM)