]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
octeontx2-af: RPM: Fix mismatch in lmac type
authorHariprasad Kelam <hkelam@marvell.com>
Fri, 22 Nov 2024 16:20:31 +0000 (21:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Dec 2024 18:51:09 +0000 (19:51 +0100)
[ Upstream commit 7ebbbb23ea5b6d051509cb11399afac5042c9266 ]

Due to a bug in the previous patch, there is a mismatch
between the lmac type reported by the driver and the actual
hardware configuration.

Fixes: 3ad3f8f93c81 ("octeontx2-af: cn10k: MAC internal loopback support")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rpm.c

index 3ac26ba31e2f3baf985dfa69a5822274ffabb407..35ece52977bcfb9e941ce316d123f9d2f4f317a5 100644 (file)
@@ -256,7 +256,7 @@ u8 rpm_get_lmac_type(void *rpmd, int lmac_id)
        int err;
 
        req = FIELD_SET(CMDREG_ID, CGX_CMD_GET_LINK_STS, req);
-       err = cgx_fwi_cmd_generic(req, &resp, rpm, 0);
+       err = cgx_fwi_cmd_generic(req, &resp, rpm, lmac_id);
        if (!err)
                return FIELD_GET(RESP_LINKSTAT_LMAC_TYPE, resp);
        return err;