|
@@ -3085,6 +3085,13 @@ static int mlxsw_sp_port_create(struct mlxsw_sp *mlxsw_sp, u8 local_port,
|
|
|
goto err_port_fids_init;
|
|
|
}
|
|
|
|
|
|
+ err = mlxsw_sp_tc_qdisc_init(mlxsw_sp_port);
|
|
|
+ if (err) {
|
|
|
+ dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to initialize TC qdiscs\n",
|
|
|
+ mlxsw_sp_port->local_port);
|
|
|
+ goto err_port_qdiscs_init;
|
|
|
+ }
|
|
|
+
|
|
|
mlxsw_sp_port_vlan = mlxsw_sp_port_vlan_get(mlxsw_sp_port, 1);
|
|
|
if (IS_ERR(mlxsw_sp_port_vlan)) {
|
|
|
dev_err(mlxsw_sp->bus_info->dev, "Port %d: Failed to create VID 1\n",
|
|
@@ -3113,6 +3120,8 @@ err_register_netdev:
|
|
|
mlxsw_sp_port_switchdev_fini(mlxsw_sp_port);
|
|
|
mlxsw_sp_port_vlan_put(mlxsw_sp_port_vlan);
|
|
|
err_port_vlan_get:
|
|
|
+ mlxsw_sp_tc_qdisc_fini(mlxsw_sp_port);
|
|
|
+err_port_qdiscs_init:
|
|
|
mlxsw_sp_port_fids_fini(mlxsw_sp_port);
|
|
|
err_port_fids_init:
|
|
|
mlxsw_sp_port_dcb_fini(mlxsw_sp_port);
|
|
@@ -3148,6 +3157,7 @@ static void mlxsw_sp_port_remove(struct mlxsw_sp *mlxsw_sp, u8 local_port)
|
|
|
mlxsw_sp->ports[local_port] = NULL;
|
|
|
mlxsw_sp_port_switchdev_fini(mlxsw_sp_port);
|
|
|
mlxsw_sp_port_vlan_flush(mlxsw_sp_port);
|
|
|
+ mlxsw_sp_tc_qdisc_fini(mlxsw_sp_port);
|
|
|
mlxsw_sp_port_fids_fini(mlxsw_sp_port);
|
|
|
mlxsw_sp_port_dcb_fini(mlxsw_sp_port);
|
|
|
mlxsw_sp_port_swid_set(mlxsw_sp_port, MLXSW_PORT_SWID_DISABLED_PORT);
|