From patchwork Sun Jun 30 17:23:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 168187 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1959901ilk; Sun, 30 Jun 2019 10:24:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqzCbIQxSOvVH6NEqJ7SO0P8m4ciShMU1/xrZ8Yyr0gQ37dlDsSDeub9rvd0S8y6K/tEOjxx X-Received: by 2002:a65:55ca:: with SMTP id k10mr20330857pgs.14.1561915478396; Sun, 30 Jun 2019 10:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561915478; cv=none; d=google.com; s=arc-20160816; b=qFnWRi6uxdhKEhttaXQhpqsNzsDZP8XWHQ527ELUeVlfV0/jWd9QYOJHgDkHcsBvN9 GgzczOhTvEAPT82SGA0wadV/sNjh6iG3YSf47laz/qeFVVoMliyj4JXN0BlkWZG2WVkR EUfiEmF4bIAaUySupjr5y1NHdcmiyHdN4jgR0NGd3AQkprSYH8kRE+6GyegOn0Wt5ubw zeUgeLRvWAkgX0qg+Q9mlOlU0XSci0H3Zb4CziXjDDvpi2B4GfHUjTryCYCg3/yXBsIf gIUFqT9q31ilYCrxWg0sjPFwUf1qE4/qdomEnIS0CF4KomT0lFh0xJn4YgEc+LhuzyHI pReQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=GFCzf2qYFkFg+4VKLMFV4Jixzxe0BQO8ulzJAgHRDlU=; b=rA2CCLWT6Cr7DhXU0KNOWjS9JyORnZHk/6hfKFZPQ5tH3BnS1jAnOk8BXlvx4mbB+Z VdURCYJ42gLe5i9SQsjXTebqHHWf7W1qMmBZFFn4QmL0dHEKlUnVkYiCenBrDk/pLt5b Xtm2fa6PCUdFsiJVt86fByXJ1k4lfQaD/Fs5ep1s7mJB9O0kTEFAVns/wIe1j429Tp9k kHQg8leb5vPBjEgCVye0f2gax8KFGkuEiKaf4BKTEEy1jGmZxwHxJRN5XzjZwRBDfHwY Nppaio7W1n6u/piDz+kEedAoWqXD3xNP3nvKguhSP7qfHbruZr5YoaZu/ElQ3zaAh7ax Kj5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lMX0Cm6L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r24si7343977pgv.323.2019.06.30.10.24.38; Sun, 30 Jun 2019 10:24:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lMX0Cm6L; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727000AbfF3RY1 (ORCPT + 30 others); Sun, 30 Jun 2019 13:24:27 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35960 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726879AbfF3RYZ (ORCPT ); Sun, 30 Jun 2019 13:24:25 -0400 Received: by mail-lj1-f194.google.com with SMTP id i21so10656790ljj.3 for ; Sun, 30 Jun 2019 10:24:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GFCzf2qYFkFg+4VKLMFV4Jixzxe0BQO8ulzJAgHRDlU=; b=lMX0Cm6LTzBuz+GHYDw0DNMsSrZKxRSBoVT4X7KPkCYaRNDNuqp58zcRnME8wwOcjL RTt9eCCiXyF3G1LNlJaXYWNpZrTmMep2KnZ+C6G/9mUT71kvIaW9TmW1evExUi3ndh0u ymN77nvvdUXy8MprSwEjZAwSsPAZpbuXv/Gzu7pZsFWin0Fd21ujRNcha+iY7eZeRn9e 9I3fRo5LQk9SI4Ob3706WeVB/gFYYUM8h3086qitcZrpEvB+DNhzEdYBnQh9fH+CDCi5 SgjSWD2j4sX0knHWGtdB5YSXRsyiDo9XAy/8Srqb2XlwX4MWfTkqzDCbRXcI/ACyZifP Cutg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GFCzf2qYFkFg+4VKLMFV4Jixzxe0BQO8ulzJAgHRDlU=; b=M1h+TGXFw5cxTqzi2HGxOZebeIqjR523lO/A+2ydTzf5VoLWptpeEQc5fL/taD1VYm 8btkQNeokeBNdKgXMBs6cLXWAs7rlQRz71K1h554ttzfQ4sSW4CCXPgJU7jcdfTKS1UE EGcLyMPn8lPPVxAnht1wUEX0eqVUHfOStUagcPGNZN4WpdOz8daLV1nlkEW7nue105HE lYHBwllN4H/vQq2p5Sf5Z+nVocjD8DmXbwZU9e68hnr96eMXJ4kzrbZcps1oU9c9D/P9 sjKUPyr1eU1VR9ZHEcC7aT12mNuLzyNOaX+NPd7pGNGtaogqUOaDwGkc/bT77lVOd9v0 vj4A== X-Gm-Message-State: APjAAAVSdQ47xeEt1C48pSGOUzMXvkSWKvyNUcSnvAwBKbz39HhlLdEk 0t9Yw3MSoap/HCZqYBz+emH8iA== X-Received: by 2002:a2e:8849:: with SMTP id z9mr11396486ljj.203.1561915463532; Sun, 30 Jun 2019 10:24:23 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id c1sm2273795lfh.13.2019.06.30.10.24.22 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 30 Jun 2019 10:24:23 -0700 (PDT) From: Ivan Khoronzhuk To: grygorii.strashko@ti.com, hawk@kernel.org, davem@davemloft.net Cc: ast@kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, xdp-newbies@vger.kernel.org, ilias.apalodimas@linaro.org, netdev@vger.kernel.org, daniel@iogearbox.net, jakub.kicinski@netronome.com, john.fastabend@gmail.com, Ivan Khoronzhuk Subject: [PATCH v5 net-next 5/6] net: ethernet: ti: cpsw_ethtool: allow res split while down Date: Sun, 30 Jun 2019 20:23:47 +0300 Message-Id: <20190630172348.5692-6-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190630172348.5692-1-ivan.khoronzhuk@linaro.org> References: <20190630172348.5692-1-ivan.khoronzhuk@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/net/ethernet/ti/cpsw_ethtool.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.17.1 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)