[PATCH dev-5.6 3/3] net/ncsi: Add NC-SI 1.2 Get MC MAC Address command
Patrick Williams
patrick at stwcx.xyz
Thu Dec 7 23:16:46 AEDT 2023
On Thu, Dec 07, 2023 at 10:44:05AM +0300, Ivan Mikhaylov wrote:
> On Wed, 2023-12-06 at 22:17 -0600, Patrick Williams wrote:
> > On Thu, Dec 07, 2023 at 12:23:38AM +0300, Ivan Mikhaylov wrote:
> > >
> > >
> > > Patrick, I've the fix about ndo_set_mac_address not so long in the
> > > past
> > > https://lore.kernel.org/all/20230828101151.684010399@linuxfoundation.org/
> > >
> > > ndo_set_mac_address do not notify network layer about mac change.
> >
> > Hello Ivan,
> >
> > I think you're suggesting there is a bug in the code that was applied
> > to
> > net-next here? If so, we'll need to get a fix into net-next. These
> > commits are just a backport request to the OpenBMC tree of the code
> > that
> > was already applied to net-next.
> >
>
> Patrick, yes, there is a bug, I'll write to the thread today/tomorrow
> with that commit about that problem. Need to think how to make a fix
> for this problem, reverting and make it right until it in net-next or
> fix above that commit.
Is this the fix?
diff --git a/net/ncsi/ncsi-rsp.c b/net/ncsi/ncsi-rsp.c
index bee290d0f48b..b02e663e56dc 100644
--- a/net/ncsi/ncsi-rsp.c
+++ b/net/ncsi/ncsi-rsp.c
@@ -1115,7 +1115,9 @@ static int ncsi_rsp_handler_gmcma(struct ncsi_request *nr)
for (i = 0; i < rsp->address_count; i++) {
memcpy(saddr.sa_data, &rsp->addresses[i], ETH_ALEN);
- ret = ndev->netdev_ops->ndo_set_mac_address(ndev, &saddr);
+ rtnl_lock();
+ ret = dev_set_mac_address(ndev, &saddr, NULL);
+ rtnl_unlock();
if (ret < 0) {
netdev_warn(ndev, "NCSI: Unable to assign %pM to device\n",
saddr.sa_data);
--
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20231207/f1ea207f/attachment.sig>
More information about the openbmc
mailing list