]> git.ipfire.org Git - thirdparty/linux.git/commit
net: enetc: replace PCVLANR1/2 with SICVLANR1/2 and remove dead branch
authorWei Fang <wei.fang@nxp.com>
Fri, 13 Jun 2025 09:36:05 +0000 (17:36 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 17 Jun 2025 10:24:18 +0000 (12:24 +0200)
commitdd4a5780f7d95989eaef3486162c1acb4d03d868
tree6928b1fd2c06cf5807db922d831f80e0fccfcc9a
parent3b5b1c428260152e47c9584bc176f358b87ca82d
net: enetc: replace PCVLANR1/2 with SICVLANR1/2 and remove dead branch

Both PF and VF have rx-vlan-offload enabled, however, the PCVLANR1/2
registers are resources controlled by PF, so VF cannot access these
two registers. Fortunately, the hardware provides SICVLANR1/2 registers
for each SI to reflect the value of PCVLANR1/2 registers. Therefore,
use SICVLANR1/2 instead of PCVLANR1/2. Note that this is not an issue
in actual use, because the current driver does not support custom TPID,
the driver will not access these two registers in actual use, so this
modification is just an optimization.

In addition, since ENETC_RXBD_FLAG_TPID is defined as GENMASK(1, 0),
the possible values are only 0, 1, 2, 3, so the default branch will
never be true, so remove the default branch.

Signed-off-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20250613093605.39277-1-wei.fang@nxp.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc_hw.h