mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
net: dsa: felix: make vsc9959_tas_guard_bands_update() visible to ocelot->ops
[ Upstream commitc60819149b
] In a future change we will need to make ocelot_port_update_active_preemptible_tcs() call vsc9959_tas_guard_bands_update(), but that is currently not possible, since the ocelot switch lib does not have access to functions private to the DSA wrapper. Move the pointer to vsc9959_tas_guard_bands_update() from felix->info (which is private to the DSA driver) to ocelot->ops (which is also visible to the ocelot switch lib). Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Message-ID: <20230705104422.49025-3-vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of:c6efb4ae38
("net: mscc: ocelot: fix oversize frame dropping for preemptible TCs") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fa27885c48
commit
c1b9b13ed2
4 changed files with 4 additions and 5 deletions
|
@ -1786,14 +1786,13 @@ static int felix_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
|
|||
{
|
||||
struct ocelot *ocelot = ds->priv;
|
||||
struct ocelot_port *ocelot_port = ocelot->ports[port];
|
||||
struct felix *felix = ocelot_to_felix(ocelot);
|
||||
|
||||
ocelot_port_set_maxlen(ocelot, port, new_mtu);
|
||||
|
||||
mutex_lock(&ocelot->tas_lock);
|
||||
|
||||
if (ocelot_port->taprio && felix->info->tas_guard_bands_update)
|
||||
felix->info->tas_guard_bands_update(ocelot, port);
|
||||
if (ocelot_port->taprio && ocelot->ops->tas_guard_bands_update)
|
||||
ocelot->ops->tas_guard_bands_update(ocelot, port);
|
||||
|
||||
mutex_unlock(&ocelot->tas_lock);
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ struct felix_info {
|
|||
void (*mdio_bus_free)(struct ocelot *ocelot);
|
||||
int (*port_setup_tc)(struct dsa_switch *ds, int port,
|
||||
enum tc_setup_type type, void *type_data);
|
||||
void (*tas_guard_bands_update)(struct ocelot *ocelot, int port);
|
||||
void (*port_sched_speed_set)(struct ocelot *ocelot, int port,
|
||||
u32 speed);
|
||||
void (*phylink_mac_config)(struct ocelot *ocelot, int port,
|
||||
|
|
|
@ -2600,6 +2600,7 @@ static const struct ocelot_ops vsc9959_ops = {
|
|||
.cut_through_fwd = vsc9959_cut_through_fwd,
|
||||
.tas_clock_adjust = vsc9959_tas_clock_adjust,
|
||||
.update_stats = vsc9959_update_stats,
|
||||
.tas_guard_bands_update = vsc9959_tas_guard_bands_update,
|
||||
};
|
||||
|
||||
static const struct felix_info felix_info_vsc9959 = {
|
||||
|
@ -2625,7 +2626,6 @@ static const struct felix_info felix_info_vsc9959 = {
|
|||
.port_modes = vsc9959_port_modes,
|
||||
.port_setup_tc = vsc9959_port_setup_tc,
|
||||
.port_sched_speed_set = vsc9959_sched_speed_set,
|
||||
.tas_guard_bands_update = vsc9959_tas_guard_bands_update,
|
||||
};
|
||||
|
||||
/* The INTB interrupt is shared between for PTP TX timestamp availability
|
||||
|
|
|
@ -663,6 +663,7 @@ struct ocelot_ops {
|
|||
struct flow_stats *stats);
|
||||
void (*cut_through_fwd)(struct ocelot *ocelot);
|
||||
void (*tas_clock_adjust)(struct ocelot *ocelot);
|
||||
void (*tas_guard_bands_update)(struct ocelot *ocelot, int port);
|
||||
void (*update_stats)(struct ocelot *ocelot);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue