]> git.baikalelectronics.ru Git - kernel.git/commit
cxgb4: fix MPS index overwrite when setting MAC address
authorHerat Ramani <herat@chelsio.com>
Tue, 31 Mar 2020 19:46:09 +0000 (01:16 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2020 08:48:02 +0000 (10:48 +0200)
commitb4ab2f79e413ab0d0233d737e53c7c9360395d18
treee9e88a7e9ddced8cdbc71aebc14bab36492f510f
parentab673c2cd5b0908847614abcaa9eecac9425f5bb
cxgb4: fix MPS index overwrite when setting MAC address

[ Upstream commit 841ffbaa5a2041c5a75b8923d838e2e670634c35 ]

cxgb4_update_mac_filt() earlier requests firmware to add a new MAC
address into MPS TCAM. The MPS TCAM index returned by firmware is
stored in pi->xact_addr_filt. However, the saved MPS TCAM index gets
overwritten again with the return value of cxgb4_update_mac_filt(),
which is wrong.

When trying to update to another MAC address later, the wrong MPS TCAM
index is sent to firmware, which causes firmware to return error,
because it's not the same MPS TCAM index that firmware had sent
earlier to driver.

So, fix by removing the wrong overwrite being done after call to
cxgb4_update_mac_filt().

Fixes: 77df08e02130 ("cxgb4/cxgb4vf: Program hash region for {t4/t4vf}_change_mac()")
Signed-off-by: Herat Ramani <herat@chelsio.com>
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c