git: 73e1138208a5 - stable/12 - igc: correctly update RCTL when changing multicast filters.

From: Peter Grehan <grehan_at_FreeBSD.org>
Date: Sat, 13 Nov 2021 00:53:59 UTC
The branch stable/12 has been updated by grehan:

URL: https://cgit.FreeBSD.org/src/commit/?id=73e1138208a5888aaabfc44d8e48aa04554c9146

commit 73e1138208a5888aaabfc44d8e48aa04554c9146
Author:     Peter Grehan <grehan@FreeBSD.org>
AuthorDate: 2021-10-11 17:49:01 +0000
Commit:     Peter Grehan <grehan@FreeBSD.org>
CommitDate: 2021-11-13 00:58:34 +0000

    igc: correctly update RCTL when changing multicast filters.
    
    Fix clearing of bits in RCTL for the non-bpf/non-allmulti case.
    Update RCTL after modifying the multicast filter registers as per
    the Linux driver.
    
    This fixes LACP on igc interfaces, where incoming LACP multicasti
    control packets were being dropped.
    
    Obtained from:  Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 5a3eb6207a353c3a18da8abcf00a2d75276dd29e)
---
 sys/dev/igc/if_igc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/igc/if_igc.c b/sys/dev/igc/if_igc.c
index b72f55166907..06b78394cd2f 100644
--- a/sys/dev/igc/if_igc.c
+++ b/sys/dev/igc/if_igc.c
@@ -1172,12 +1172,12 @@ igc_if_multi_set(if_ctx_t ctx)
                 reg_rctl |= IGC_RCTL_MPE;
 		reg_rctl &= ~IGC_RCTL_UPE;
         } else
-		reg_rctl = ~(IGC_RCTL_UPE | IGC_RCTL_MPE);
-
-	IGC_WRITE_REG(&adapter->hw, IGC_RCTL, reg_rctl);
+		reg_rctl &= ~(IGC_RCTL_UPE | IGC_RCTL_MPE);
 
 	if (mcnt < MAX_NUM_MULTICAST_ADDRESSES)
 		igc_update_mc_addr_list(&adapter->hw, mta, mcnt);
+
+	IGC_WRITE_REG(&adapter->hw, IGC_RCTL, reg_rctl);
 }
 
 /*********************************************************************