]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Octeontx2-af: Introduce mode group index
authorHariprasad Kelam <hkelam@marvell.com>
Wed, 25 Jun 2025 09:21:06 +0000 (14:51 +0530)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Jun 2025 23:55:59 +0000 (16:55 -0700)
commitad97e72f1c30c0353aa06e7886182a4a209aba3a
treec94fa3bd185c146c3ec7913801e6a6f5827788ba
parent1df77da01b63a2f9a9c74630581448007a73f3c1
Octeontx2-af: Introduce mode group index

Kernel and firmware communicates via scratch register which is
64 bit in size.

[MODE_ID   PORT    AUTONEG  DUPLEX  SPEED   CMD_ID   OWNERSHIP ]
 63-22     21-14     13      12      11-8    7-2       1-0

The existing MODE_ID bitmap can only support up to 42 modes.
To resolve the issue, the unused port field is modified as below
            uint64_t reserved2:6;
            uint64_t mode_group_idx:2;

'mode_group_idx' categorize the mode ID range to accommodate more modes.

To specify mode ID range of 0 - 41, this field will be 0.

     To specify mode ID range of 42 - 83, this field will be 1.

mode ID will be still mentioned as 1 << (0 - 41).  But the mode_group_idx
decides the actual mode range

Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Link: https://patch.msgid.link/20250625092107.9746-3-hkelam@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/cgx.c
drivers/net/ethernet/marvell/octeontx2/af/cgx_fw_if.h
drivers/net/ethernet/marvell/octeontx2/af/mbox.h