[v5,net-next,5/6] net: ethernet: ti: cpsw_ethtool: allow res split while down
diff mbox series

Message ID 20190630172348.5692-6-ivan.khoronzhuk@linaro.org
State New
Headers show
  • net: ethernet: ti: cpsw: Add XDP support
Related show

Commit Message

Ivan Khoronzhuk June 30, 2019, 5:23 p.m. UTC
That's possible to set channel num while interfaces are down. When
interface gets up it should resplit budget. This resplit can happen
after phy is up but only if speed is changed, so should be set before
this, for this allow it to happen while changing number of channels,
when interfaces are down.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
 drivers/net/ethernet/ti/cpsw_ethtool.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff mbox series

diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c
index 6ab0cec8560a..99935c1d265d 100644
--- a/drivers/net/ethernet/ti/cpsw_ethtool.c
+++ b/drivers/net/ethernet/ti/cpsw_ethtool.c
@@ -620,8 +620,7 @@  int cpsw_set_channels_common(struct net_device *ndev,
-	if (cpsw->usage_count)
-		cpsw_split_res(cpsw);
+	cpsw_split_res(cpsw);
 	ret = cpsw_resume_data_pass(ndev);
 	if (!ret)