]> www.infradead.org Git - users/dwmw2/linux.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)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 26 Nov 2024 11:09:40 +0000 (12:09 +0100)
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>
drivers/net/ethernet/marvell/octeontx2/af/rpm.c

index 1b34cf9c97035a6b90f8c61e056750b97c713018..9e8c5e4389f8bae371d80f9db51589418ee33a89 100644 (file)
@@ -467,7 +467,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;