From patchwork Fri Mar 31 13:22:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joao Pinto X-Patchwork-Id: 745640 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3vvhzV3GYTz9ryr for ; Sat, 1 Apr 2017 00:24:06 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933325AbdCaNXR (ORCPT ); Fri, 31 Mar 2017 09:23:17 -0400 Received: from us01smtprelay-2.synopsys.com ([198.182.60.111]:49021 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933297AbdCaNWI (ORCPT ); Fri, 31 Mar 2017 09:22:08 -0400 Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 8CF6F10C14A6; Fri, 31 Mar 2017 06:22:06 -0700 (PDT) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 4BB47328; Fri, 31 Mar 2017 06:22:06 -0700 (PDT) Received: from jpinto-box.internal.synopsys.com (jpinto-box.internal.synopsys.com [10.107.19.150]) by mailhost.synopsys.com (Postfix) with ESMTP id EB30B313; Fri, 31 Mar 2017 06:22:04 -0700 (PDT) From: Joao Pinto To: davem@davemloft.net Cc: niklas.cassel@axis.com, netdev@vger.kernel.org, Joao Pinto Subject: [PATCH] net: stmmac: fix cbs configuration Date: Fri, 31 Mar 2017 14:22:02 +0100 Message-Id: X-Mailer: git-send-email 2.9.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Sending again, because forgot to include net-dev. The QoS IP does not accept AVB capabilities to default/queue 0, this way we guarantee 75% bandwidth for AVB. This patch assures that only queues >= 1 gets CBS confgured. Additional info was also added to stmmac.txt. Reported-by: Niklas Cassel Signed-off-by: Joao Pinto --- Documentation/devicetree/bindings/net/stmmac.txt | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt index 784d988..f652b0c 100644 --- a/Documentation/devicetree/bindings/net/stmmac.txt +++ b/Documentation/devicetree/bindings/net/stmmac.txt @@ -103,6 +103,8 @@ Optional properties: - Choose one of these modes: - snps,dcb-algorithm: TX queue will be working in DCB - snps,avb-algorithm: TX queue will be working in AVB + [Attention] Queue 0 is reserved for legacy traffic + and so no AVB is available in this queue. - Configure Credit Base Shaper (if AVB Mode selected): - snps,send_slope: enable Low Power Interface - snps,idle_slope: unlock on WoL diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 43361f3..c1c6319 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -1880,7 +1880,8 @@ static void stmmac_configure_cbs(struct stmmac_priv *priv) u32 mode_to_use; u32 queue; - for (queue = 0; queue < tx_queues_count; queue++) { + /* queue 0 is reserved for legacy traffic */ + for (queue = 1; queue < tx_queues_count; queue++) { mode_to_use = priv->plat->tx_queues_cfg[queue].mode_to_use; if (mode_to_use == MTL_QUEUE_DCB) continue;