Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3540801ybi; Fri, 5 Jul 2019 09:08:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxzf8lMkh8vJGYxMAMYr4TzFXHsXT3b/OPC6nmbuk+geP04Foc6DhI7Ffm5WSoaZbpfiLXl X-Received: by 2002:a17:902:934a:: with SMTP id g10mr6670156plp.18.1562342921097; Fri, 05 Jul 2019 09:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562342921; cv=none; d=google.com; s=arc-20160816; b=E/ByPPdqrCqeWnNa2VlsFPX2Rb5it/SJws/OD8Xd0YBLYIHweOcGcFPqeyujP91lyh SJWvDO9PqRzEpBzHd73RB3kpgrFo0rebJBNBD5dQOOUzJF1szeXLnDVUe5pUouxa3bdJ ITX1ZTs8A7JGXgf0Ip+hOg9AqOkmg8YR9t/sVf2bY/fALZyzmmTBIAvNCXI7+qo8iwNZ xdJdBu68yDzgl1YMUyFetlmtGSShctRjqLoRmvtKsQB0gzMNc2TKqzP+EL3Myzb4Ln7m tgIDfKa2uWzbf/K2Oh8OecMz5J8V349AA0iTPEDnVjYqx3cg8cUXicag8Wb/g8y3AGLr kCsg== 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=h0qJMdNciD39g3Q1jo3+1MbbNG9llP7wamgm8+ijc+0=; b=XcAp3z+vWUwo4NHpCJ6RB4UiQN5qiZn3VTNm8AO6+ny22I9nQgSMa7l61t9XJ3sJg6 JVpOoR3BpgqH+blaGp4JD/VcE7rXnsMa8I6kmmHBdJ4AeovvFhn9N9KQDxtNpTqq21cD utwyvgAzh/HUCFOYCRCwS1F0fPQtJzPaY4VZlWEHOX5ngV7hfxDiuRWWXCMSljssYv3w 5vy87oL1lJcxpEXNeYJsaI4dJnT9PdKEA+skJ03SY1HjTMXBsuj5zmu+JDU2ZA1E/dvj +rWBb8b8f7cP2PbGz5zWPL0zXKYBplnfdXs7texcnDEenaNM7U617m/uBUUkDF/Jw0C0 tahA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oDfE98kP; 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 s8si9167216pjb.40.2019.07.05.09.08.25; Fri, 05 Jul 2019 09:08:41 -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=oDfE98kP; 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 S1727742AbfGEPFP (ORCPT + 99 others); Fri, 5 Jul 2019 11:05:15 -0400 Received: from mail-lf1-f50.google.com ([209.85.167.50]:33544 "EHLO mail-lf1-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727677AbfGEPFM (ORCPT ); Fri, 5 Jul 2019 11:05:12 -0400 Received: by mail-lf1-f50.google.com with SMTP id x3so608969lfc.0 for ; Fri, 05 Jul 2019 08:05:11 -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=h0qJMdNciD39g3Q1jo3+1MbbNG9llP7wamgm8+ijc+0=; b=oDfE98kPmAv8olG5EU/cTLrPDhDZJWfBTXlVneiTLeFEQ9KVnwf7eKt2hlFFPocvxy uUe6nfw3ViFwp6yvmIysmpnO+k9Wu4fTfhs3b2tq6dQfOoYCsExy7L4KNXeqdLhAdPB+ 1TD/0Ae8V6EAMs6Bp058Iot84/ZdoxMc4KMgSAsQU52JUMJJXwvWaGJClgWF6teMbUBo uxIthothA0rkhAtBjhsvVdG0aikqWxw7xh3yzReaMfq/gpNokRVaTVAT2x/zMcsjRGHC 9G5We3AuyDNiOJXRYSYb0VMqaQpmIp1a2feZzkvQOtBADs5UthlrQM8CmV6gNxnsdfwn h3sA== 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=h0qJMdNciD39g3Q1jo3+1MbbNG9llP7wamgm8+ijc+0=; b=W8DbaX9488ixD+H1v1PH9d6NxROUTSBcc85jI58uWj0Sj02bGc5y7udExpGrfAbzd+ Rhp2bs/0B65nraw0OwtgGMd156qsauk7HXIO9unQb0U0EIMtCFtAlJg4vypPVnZ6NFM+ Jm5ehiMjqlgb6LmMIQ6De8VlTO72YVC2nGCmHtsx7DXNX0BRiWch3dA+MzvXUBgVgm0D BFfh1BEDdqbtMMtSUJUCtL8E1J4LWf9zMThS00gI0l/awE51uCX10s9aZ742JeOsUJ8i IVj++zZmZFEyVDKgMyxwHM/gjvqdOm2Jwxj3VUUAVont16/VVXS4q4HNwXMjAREGDERV zK/A== X-Gm-Message-State: APjAAAWcXmkmaKn4RlUYQgv5XUVimgBfGj4nzA+/hEmuVgL4M1zp+fge YjSnTpOUrPvOkblJvcqA8F5ePg== X-Received: by 2002:ac2:5c42:: with SMTP id s2mr2285518lfp.61.1562339110625; Fri, 05 Jul 2019 08:05:10 -0700 (PDT) Received: from localhost.localdomain (59-201-94-178.pool.ukrtel.net. [178.94.201.59]) by smtp.gmail.com with ESMTPSA id y4sm1433660lfc.56.2019.07.05.08.05.09 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 05 Jul 2019 08:05:10 -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 v8 net-next 4/5] net: ethernet: ti: cpsw_ethtool: allow res split while down Date: Fri, 5 Jul 2019 18:05:01 +0300 Message-Id: <20190705150502.6600-5-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190705150502.6600-1-ivan.khoronzhuk@linaro.org> References: <20190705150502.6600-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(-) diff --git a/drivers/net/ethernet/ti/cpsw_ethtool.c b/drivers/net/ethernet/ti/cpsw_ethtool.c index c477e6b620d6..e4d7185fde49 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) -- 2.17.1