From: Jiri Pirko <redacted>
By a mistake, there is tree index 0 passed to RALTB. Should be
MLXSW_SP_LPM_TREE_MIN.
Fixes: b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls")
Reported-by: Yotam Gigi <redacted>
Signed-off-by: Jiri Pirko <redacted>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From: Jiri Pirko <redacted>
The function return value is not checked anywhere. Also, the warning
causes huge slowdown when removing large number of FIB entries which
were not offloaded, because of ordering issue. Ido's preparing
a patchset to fix the ordering issue, but that is definitelly not
net tree material.
Fixes: b45f64d16d45 ("mlxsw: spectrum_router: Use FIB notifications instead of switchdev calls")
Signed-off-by: Jiri Pirko <redacted>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
@@ -1820,19 +1820,17 @@ static int mlxsw_sp_router_fib4_add(struct mlxsw_sp *mlxsw_sp,returnerr;}-staticintmlxsw_sp_router_fib4_del(structmlxsw_sp*mlxsw_sp,-structfib_entry_notifier_info*fen_info)+staticvoidmlxsw_sp_router_fib4_del(structmlxsw_sp*mlxsw_sp,+structfib_entry_notifier_info*fen_info){structmlxsw_sp_fib_entry*fib_entry;if(mlxsw_sp->router.aborted)-return0;+return;fib_entry=mlxsw_sp_fib_entry_find(mlxsw_sp,fen_info);-if(!fib_entry){-dev_warn(mlxsw_sp->bus_info->dev,"Failed to find FIB4 entry being removed.\n");-return-ENOENT;-}+if(!fib_entry)+return;if(fib_entry->ref_count==1){mlxsw_sp_fib_entry_del(mlxsw_sp,fib_entry);
@@ -1840,7 +1838,6 @@ static int mlxsw_sp_router_fib4_del(struct mlxsw_sp *mlxsw_sp,}mlxsw_sp_fib_entry_put(mlxsw_sp,fib_entry);-return0;}staticintmlxsw_sp_router_set_abort_trap(structmlxsw_sp*mlxsw_sp)
From: Elad Raz <redacted>
When creating an ethernet port fails, we must move the port to disable,
otherwise putting the port in switch partition 0 (ETH) or 1 (IB) will
always fails.
Fixes: 31557f0f9755 ("mlxsw: Introduce Mellanox SwitchX-2 ASIC support")
Signed-off-by: Elad Raz <redacted>
Reviewed-by: Jiri Pirko <redacted>
Reviewed-by: Ido Schimmel <redacted>
Signed-off-by: Jiri Pirko <redacted>
---
drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 1 +
1 file changed, 1 insertion(+)
From: Jiri Pirko <redacted>
SwitchX2 firmware does not implement reset done yet. Moreover, when
busy-polled for ready magic, that slows down firmware and reset takes
longer than the defined timeout, causing initialization to fail.
So restore the previous behaviour and just sleep in this case.
Fixes: 233fa44bd67a ("mlxsw: pci: Implement reset done check")
Signed-off-by: Jiri Pirko <redacted>
Reviewed-by: Ido Schimmel <redacted>
---
drivers/net/ethernet/mellanox/mlxsw/pci.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
@@ -1838,11 +1838,17 @@ static const struct mlxsw_bus mlxsw_pci_bus = {.cmd_exec=mlxsw_pci_cmd_exec,};-staticintmlxsw_pci_sw_reset(structmlxsw_pci*mlxsw_pci)+staticintmlxsw_pci_sw_reset(structmlxsw_pci*mlxsw_pci,+conststructpci_device_id*id){unsignedlongend;mlxsw_pci_write32(mlxsw_pci,SW_RESET,MLXSW_PCI_SW_RESET_RST_BIT);+if(id->device==PCI_DEVICE_ID_MELLANOX_SWITCHX2){+msleep(MLXSW_PCI_SW_RESET_TIMEOUT_MSECS);+return0;+}+wmb();/* reset needs to be written before we read control register */end=jiffies+msecs_to_jiffies(MLXSW_PCI_SW_RESET_TIMEOUT_MSECS);do{