Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2654528ybi; Thu, 4 Jul 2019 16:15:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqzc/0oMUXvceKKfsTqI/yLWqp+YJWy06BW0RZsN9O7llLJa5e5IjZa3Sh4DVsP3vvmpUtnt X-Received: by 2002:a17:90a:32c7:: with SMTP id l65mr523233pjb.1.1562282150481; Thu, 04 Jul 2019 16:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562282150; cv=none; d=google.com; s=arc-20160816; b=QdGT7vfXS1lGdCEFzDK7Rx7dVvRr9fc7yGiB0XL0PsM82bWbXuhEnHkUB97wXolu9c UuCTw3fIstlfwYzzw5B6YrrAQsyzEHDHhQejzdeA4Yt9au0hAvitRGSEEHtLQoahZ0rX QSf2QxdFRuXmNle5ZLnit3nm37Sl76GEPg1Qb9mgv8/a0QoF/CHHDpJWrE5oAFPLofZh i+jSObmr7+7FxuKIAJIjPv4lHkoL1KFROs8cMr6hIuHBlLlLyte9worcbEkFDuXDDTqa mQHTUzp+1VfD+eoxVqqJtT2BEAO+RQeOZhO7cckUvO2Y+t/6yJBH9c5KjevmrdIzqs4j 111w== 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=Sx4J1w+1hEpmxVeafDxaij4/3Ou5ZNXE95VUt8+tGcbTtqFedPoGZq2dXgYVG4VxXy 3sxMYjRflcvUgyYD5igk92be5A9vYvMwa91z711CrpjYP473F+oUIWk0Nw1xcADM1Xjs PdFIr4KrYQYwlFVzEQi4L5qSrBzoNDBXTZ+pq8nM3FMmB82j4QAXVUqlMH0bDdRqApv7 YlXKstaOXiHMklsFvP/C8bgsVcBWbRyXMecP781+sxhMibXRg+q5tGEh6EswD7qGEqsh GgwkCeLrZ64YNyu9f2Z0aRe39yJz9/bngdF2Mk53tV5TpQj5x3sf8NiOJ01REiHXrnWb B6fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kQHpY4yA; 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 z13si7255141pfr.86.2019.07.04.16.15.35; Thu, 04 Jul 2019 16:15:50 -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=kQHpY4yA; 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 S1727708AbfGDXOk (ORCPT + 99 others); Thu, 4 Jul 2019 19:14:40 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:42623 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727623AbfGDXOi (ORCPT ); Thu, 4 Jul 2019 19:14:38 -0400 Received: by mail-lf1-f65.google.com with SMTP id s19so4370736lfb.9 for ; Thu, 04 Jul 2019 16:14:37 -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=kQHpY4yAX9tuFqi39cDVI528gNTKLvGMgp0fqlEEE4DscT2m11B0xfPLDzS1j+aNlZ UGMk4PmMzG9FjNTsoVkPBdsX5iAy54gTqfhQ/kkz1CJfRr6/yZPK6hdSNfh52Ye2n2Z/ 7K1NL3GmJfoDXyyJRppCGfHFJcBQmsQ46cOe6yjy7ZT9VnXN/dCd6d5C5H+OXYUSIcU/ HA/ERprLUpxQi6I5rKcKODbM6zC6zJ89Q9AXb1sKtMe4+xhPbdzfhVvc/TrPTPHtcCHR IOCXKtNAOOOZ5q4fu+AHhPqh1/fAlMu7ALbCkPIvW8scV45AIsE51nY0Q9hCsrzhCYk6 NKBA== 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=Nl0K9BREKvVZ+uh/YZXV5RzNRCjl4mBobp6RIUqPES2OmxT1bTYGZFwZi/ANOvIll2 aGNw2mESMUCvv1cpg6nRw1S/XDCHfJ51DO0a4trKS+nC4woNpylQCkjbD/MlMps5ymH3 0SqMYssNVPdXyQSRUiaOFqtjpfIl+KAWie6kOXPDZ1lX73ZDVKn8lxhuI7oYs3O+AfBB 1InRvFLNgSw5dg33SLDjLx8w/PjfLS7EjhXd9FEIt/vTG0mb1QJ3Y5I2qDf/XBVGaw8s RoYR2tlZkvah+a2ktRXK341o5M1bz0dcv9HGfudcVmQvdqBsDVQZwxYV7Rc4rAlR5SrB za5w== X-Gm-Message-State: APjAAAVtKd9YyuiNgrbIShNdiG72AJSfzq6QOPLCA6vUF6G9j04iBJTU rj14pFOnwqj96uHaFYzaBx1u5QrfDZs= X-Received: by 2002:a05:6512:70:: with SMTP id i16mr413464lfo.26.1562282076772; Thu, 04 Jul 2019 16:14:36 -0700 (PDT) Received: from localhost.localdomain ([46.211.39.135]) by smtp.gmail.com with ESMTPSA id q6sm1407269lji.70.2019.07.04.16.14.34 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 04 Jul 2019 16:14:36 -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 v7 net-next 4/5] net: ethernet: ti: cpsw_ethtool: allow res split while down Date: Fri, 5 Jul 2019 02:14:05 +0300 Message-Id: <20190704231406.27083-5-ivan.khoronzhuk@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190704231406.27083-1-ivan.khoronzhuk@linaro.org> References: <20190704231406.27083-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