From patchwork Wed Jul 3 10:19:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 168404 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp687583ilk; Wed, 3 Jul 2019 03:19:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyhLBkycJevpgrKfMiyQdsY4sQ8hI3TCwZg6bmf+dZ308rQqYMcK6AcGYxCXiV1LG2HKGJB X-Received: by 2002:a63:e251:: with SMTP id y17mr5285820pgj.8.1562149158285; Wed, 03 Jul 2019 03:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562149158; cv=none; d=google.com; s=arc-20160816; b=l6+ihi8cGtbgN4oj2HFhQvS+ApdWKiujd7wnIV5E3EGVtLFvEYzqL2uJS/KHb2JJVa 7vZdlzQrQiA8b9L+ctYTLeM3RKM9TeE66pyIBGrQnl5eGnWLy81jYCpMVz9vZ1tsFzuj r3IsgJXQGPqB/0hvR3nofmAw0ruvk6ye3NJcldQllHbsQcTRif74pY94oz/5w6BzumCZ SwXOtfLfYhC4cMOA80UPnNgn4zbgI0tbjqvWRbM5baN6WtGPs2OSz7GWxHkykWdDB5Kc /n7kCXAW/knhmleHIzdBDDGrMksbjbN9EV/Sq7qe3gX/NKeGSz6bnhJxj4vYMN8sFwn8 BFfg== 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=lLtsucvsZ+6X8j0YIBVtyEFlEwonh01weVxKZ0zmUeo=; b=SxdUYauUCLx6k5a+N6qyJJBuwTGY826QFP9kEktJ5649363sLt/1OkJhL83h8B2tZ0 BcRI6nZLJX1PCFuLfjhM+PPErM3zNz4KtcYQdIz3ICWyNHzvow24+V2dF1v5+Of4Jqmy l5wwBlXR1F85kjHuCQcA3XhrHqTZzBvm8Is7KUUNNipVyQnOX3ooMIHYgMkzyUOZTaAW BlZH7b4jnFICoQ9wLgDYX/HsTDlwHIYaiPwKY46pbhUbBaqI9NRslJaJmr1PI3hRcszf xeersTWSE6ghe7YLqIIMLv+pqsxPrsY2aQ6YQIuoEw560M3DjwTgbqHhLWm+VIogq3Qb MLPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N7ahiyVG; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-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 h38si1847795plb.149.2019.07.03.03.19.18; Wed, 03 Jul 2019 03:19:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-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=N7ahiyVG; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-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 S1727210AbfGCKTP (ORCPT + 5 others); Wed, 3 Jul 2019 06:19:15 -0400 Received: from mail-lf1-f47.google.com ([209.85.167.47]:42206 "EHLO mail-lf1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727152AbfGCKTO (ORCPT ); Wed, 3 Jul 2019 06:19:14 -0400 Received: by mail-lf1-f47.google.com with SMTP id s19so642280lfb.9 for ; Wed, 03 Jul 2019 03:19:12 -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=lLtsucvsZ+6X8j0YIBVtyEFlEwonh01weVxKZ0zmUeo=; b=N7ahiyVGoCj6eyemjVWc1fXvSVIP0KHaciHhTwSFTsbnUHHmrTZhhuTHqvv7iR9bDE vd3mUe7tU/W3eQ6o/wiHvs0R0HzLxmxNSpnHerJNNYG814T2ZRQ7GlkOpIWGTV/IzuRK nL9YkAbW+wayvAuV2n2jtKfE4VF+JD920R1oIYrfdHvirX+Fbeos3qMyL1+iFAyIkqYt GjkPd8UTGNJVbd4L7zyC3LYt4XIPN1Z3DcW6F0kJYRzX9v2nHAq44d/v0M41JFP5Do3G H4nSozx35eosQr2qUMntLb+qqwcsDt5S5cgwJ2kpkfUcUiX0pqgI7WAmMkgK5iNzqAht uOFA== 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=lLtsucvsZ+6X8j0YIBVtyEFlEwonh01weVxKZ0zmUeo=; b=ZTQIKThH278KcTm9mQOIVlEWAKu13aNx0cCGpycOzo2AA1lGVtliiuUMBZIF004NNW JOg1uNCUVVBfbtBqiEydwXaxfOGQlcnGjZ1U6nmjdroCOZ7JrnATbrfeywQ7PjL+sJ0r iMYYZJ6XCyyQ9gdfulTgPIIoJHuUlcSpYKs3uhDmROwsrVoKjelN8OLck+awm8Ymg9Lj jC1pskt2L4895RoSZp0LMeJQ5f4L/jNArKH0tDztpEv7bJK4N37l7ZaajBZT0uhhhXGa AQG4RoUOs+F7F6KE1q9HkuIYOeMY1nEAyBYSuaopZW+IeaBH0Ei9P2tki7+/GNM89B4v vd0w== X-Gm-Message-State: APjAAAUtRj3b2MAPHQu2n5pUWqalNAJo2QPmjwHktuCp/M7KI0ZU3Tuw +b0bZz/dDIjyaC9XSIYw82QTxw== X-Received: by 2002:ac2:5225:: with SMTP id i5mr17389550lfl.157.1562149152126; Wed, 03 Jul 2019 03:19:12 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id i9sm67267lfl.10.2019.07.03.03.19.11 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 03 Jul 2019 03:19:11 -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 v6 net-next 4/5] net: ethernet: ti: cpsw_ethtool: allow res split while down Date: Wed, 3 Jul 2019 13:19:02 +0300 Message-Id: <20190703101903.8411-5-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190703101903.8411-1-ivan.khoronzhuk@linaro.org> References: <20190703101903.8411-1-ivan.khoronzhuk@linaro.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@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 08d7aaee8299..fa4d75f5548e 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)