diff options
author | Horatiu Vultur <horatiu.vultur@microchip.com> | 2023-01-06 23:15:07 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-01-09 11:11:44 +0300 |
commit | 76761babaa984fce8ecd87d87a68d920f24df438 (patch) | |
tree | 207d36ff93187b34a81264573ca661446c8f055a /drivers | |
parent | 7871f54e3deed68a27111dda162c4fe9b9c65f8f (diff) | |
download | linux-76761babaa984fce8ecd87d87a68d920f24df438.tar.xz |
net: lan966x: Allow to add rules in TCAM even if not enabled
The blamed commit implemented the vcap_operations to allow to add an
entry in the TCAM. One of the callbacks is to validate the supported
keysets. If the TCAM lookup was not enabled, then this will return
failure so no entries could be added.
This doesn't make much sense, as you can enable at a later point the
TCAM. Therefore change it such to allow entries in TCAM even it is not
enabled.
Fixes: 4426b78c626d ("net: lan966x: Add port keyset config and callback interface")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c b/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c index d8dc9fbb81e1..a54c0426a35f 100644 --- a/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_vcap_impl.c @@ -95,10 +95,7 @@ lan966x_vcap_is2_get_port_keysets(struct net_device *dev, int lookup, bool found = false; u32 val; - /* Check if the port keyset selection is enabled */ val = lan_rd(lan966x, ANA_VCAP_S2_CFG(port->chip_port)); - if (!ANA_VCAP_S2_CFG_ENA_GET(val)) - return -ENOENT; /* Collect all keysets for the port in a list */ if (l3_proto == ETH_P_ALL) |