]> git.baikalelectronics.ru Git - kernel.git/commit
net: enetc: manage ENETC_F_QBV in priv->active_offloads only when enabled
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 10 May 2022 16:36:14 +0000 (19:36 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 11 May 2022 23:37:10 +0000 (16:37 -0700)
commit2e789799886c10d92da45eae072a5fa28b5c8ec1
tree6ec6f0f96d9701d6884af0d8ea630da21a4a417f
parenta7af5f813b25745438532a9511a8a5c84cc6e0d9
net: enetc: manage ENETC_F_QBV in priv->active_offloads only when enabled

Future work in this driver would like to look at priv->active_offloads &
ENETC_F_QBV to determine whether a tc-taprio qdisc offload was
installed, but this does not produce the intended effect.

All the other flags in priv->active_offloads are managed dynamically,
except ENETC_F_QBV which is set statically based on the probed SI capability.

This change makes priv->active_offloads & ENETC_F_QBV really track the
presence of a tc-taprio schedule on the port.

Some existing users, like the enetc_sched_speed_set() call from
phylink_mac_link_up(), are best kept using the old logic: the tc-taprio
offload does not re-trigger another link mode resolve, so the scheduler
needs to be functional from the get go, as long as Qbv is supported at
all on the port. So to preserve functionality there, look at the static
station interface capability from pf->si->hw_features instead.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/freescale/enetc/enetc_pf.c
drivers/net/ethernet/freescale/enetc/enetc_qos.c