From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Herat Ramani <herat@chelsio.com>,
Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.5 056/106] cxgb4: fix MPS index overwrite when setting MAC address
Date: Wed, 15 Apr 2020 07:41:36 -0400 [thread overview]
Message-ID: <20200415114226.13103-56-sashal@kernel.org> (raw)
In-Reply-To: <20200415114226.13103-1-sashal@kernel.org>
From: Herat Ramani <herat@chelsio.com>
[ Upstream commit 41aa8561ca3fc5748391f08cc5f3e561923da52c ]
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: 3f8cfd0d95e6 ("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: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
index b11ba4565c20b..9934c8b0f0b07 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
@@ -3110,7 +3110,6 @@ static int cxgb_set_mac_addr(struct net_device *dev, void *p)
return ret;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
- pi->xact_addr_filt = ret;
return 0;
}
--
2.20.1
next prev parent reply other threads:[~2020-04-15 11:43 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200415114226.13103-1-sashal@kernel.org>
2020-04-15 11:40 ` [PATCH AUTOSEL 5.5 006/106] net/mlx5e: Enforce setting of a single FEC mode Sasha Levin
2020-04-18 19:52 ` Or Gerlitz
2020-04-18 21:20 ` Sasha Levin
2020-04-19 9:05 ` Or Gerlitz
2020-04-15 11:40 ` [PATCH AUTOSEL 5.5 009/106] bpf: Reliably preserve btf_trace_xxx types Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 055/106] net: phy: at803x: fix clock sink configuration on ATH8030 and ATH8035 Sasha Levin
2020-04-15 11:41 ` Sasha Levin [this message]
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 057/106] slcan: Don't transmit uninitialized stack data in padding Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 058/106] net: qualcomm: rmnet: Allow configuration updates to existing devices Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 060/106] net: stmmac: dwmac1000: fix out-of-bounds mac address reg setting Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 061/106] net: dsa: mt7530: fix null pointer dereferencing in port5 setup Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 062/106] tun: Don't put_page() for all negative return values from XDP program Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 063/106] mlxsw: spectrum_flower: Do not stop at FLOW_ACTION_VLAN_MANGLE Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 064/106] net: dsa: bcm_sf2: Do not register slave MDIO bus with OF Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 074/106] net: dsa: bcm_sf2: Ensure correct sub-node is parsed Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 076/106] net: phy: micrel: kszphy_resume(): add delay after genphy_resume() before accessing PHY registers Sasha Levin
2020-04-15 11:41 ` [PATCH AUTOSEL 5.5 078/106] net: stmmac: xgmac: Fix VLAN register handling Sasha Levin
2020-04-15 11:42 ` [PATCH AUTOSEL 5.5 080/106] cxgb4: free MQPRIO resources in shutdown path Sasha Levin
2020-04-15 11:42 ` [PATCH AUTOSEL 5.5 090/106] SUNRPC: fix krb5p mount to provide large enough buffer in rq_rcvsize Sasha Levin
2020-04-15 11:42 ` [PATCH AUTOSEL 5.5 098/106] sunrpc: Fix gss_unwrap_resp_integ() again Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200415114226.13103-56-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=herat@chelsio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rahul.lakkireddy@chelsio.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).