From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932321AbdJZKyh convert rfc822-to-8bit (ORCPT ); Thu, 26 Oct 2017 06:54:37 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:1818 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932141AbdJZKyg (ORCPT ); Thu, 26 Oct 2017 06:54:36 -0400 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Thu, 26 Oct 2017 03:54:25 -0700 From: Bhadram Varka To: Jose Abreu , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Joao Pinto , "David S. Miller" , Giuseppe Cavallaro , Alexandre Torgue Subject: RE: [PATCH net] net: stmmac: First Queue must always be in DCB mode Thread-Topic: [PATCH net] net: stmmac: First Queue must always be in DCB mode Thread-Index: AQHTTjoUYI33+B58gEaSIyIqPX3CMqL18YOQ Date: Thu, 26 Oct 2017 10:51:27 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.24.193.32] MIME-Version: 1.0 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jose, > -----Original Message----- > From: netdev-owner@vger.kernel.org [mailto:netdev- > owner@vger.kernel.org] On Behalf Of Jose Abreu > Sent: Thursday, October 26, 2017 2:37 PM > To: netdev@vger.kernel.org; linux-kernel@vger.kernel.org > Cc: Jose Abreu ; Joao Pinto > ; David S. Miller ; > Giuseppe Cavallaro ; Alexandre Torgue > > Subject: [PATCH net] net: stmmac: First Queue must always be in DCB mode > > According to DWMAC databook the first queue operating mode must always > be in DCB. > > As MTL_QUEUE_DCB = 1, we need to always set the first queue operating > mode to DCB otherwise driver will think that queue is in AVB mode (because > MTL_QUEUE_AVB = 0). > > Signed-off-by: Jose Abreu > Cc: Joao Pinto > Cc: David S. Miller > Cc: Giuseppe Cavallaro > Cc: Alexandre Torgue > --- > drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > index 21f59fe..603225b 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c > @@ -150,6 +150,13 @@ static void stmmac_mtl_setup(struct > platform_device *pdev, > plat->rx_queues_to_use = 1; > plat->tx_queues_to_use = 1; > > + /* First Queue must always be in DCB mode. As MTL_QUEUE_DCB = > 1 we need > + * to always set this, otherwise Queue will be classified as AVB > + * (because MTL_QUEUE_AVB = 0). > + */ Its better if we can check whether IP HW features (register - 0x120) supports the DCB or not. If yes, then set the DCB mode. There is possibility that DCB feature not enable for few of the Synopsys IP's. Thanks, Bhadram.