From patchwork Tue Feb 3 18:49:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 435997 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 1E85F140145 for ; Wed, 4 Feb 2015 06:04:29 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966238AbbBCTEZ (ORCPT ); Tue, 3 Feb 2015 14:04:25 -0500 Received: from mail-bn1on0114.outbound.protection.outlook.com ([157.56.110.114]:45210 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756010AbbBCTEY (ORCPT ); Tue, 3 Feb 2015 14:04:24 -0500 Received: from BY1PR0201CA0029.namprd02.prod.outlook.com (25.160.191.167) by CO1PR02MB207.namprd02.prod.outlook.com (10.242.165.145) with Microsoft SMTP Server (TLS) id 15.1.75.20; Tue, 3 Feb 2015 18:50:00 +0000 Received: from BL2FFO11FD009.protection.gbl (2a01:111:f400:7c09::151) by BY1PR0201CA0029.outlook.office365.com (2a01:111:e400:4814::39) with Microsoft SMTP Server (TLS) id 15.1.75.20 via Frontend Transport; Tue, 3 Feb 2015 18:49:59 +0000 Received: from atltwp02.amd.com (165.204.84.222) by BL2FFO11FD009.mail.protection.outlook.com (10.173.161.15) with Microsoft SMTP Server id 15.1.87.10 via Frontend Transport; Tue, 3 Feb 2015 18:49:59 +0000 X-WSS-ID: 0NJ7LN8-08-10I-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp02.amd.com (Axway MailGate 5.3.1) with ESMTPS id 24055BD88ED; Tue, 3 Feb 2015 12:49:55 -0600 (CST) Received: from SATLEXDAG03.amd.com (10.181.40.7) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 3 Feb 2015 12:50:10 -0600 Received: from tlendack-t1.amdoffice.net (10.180.168.240) by satlexdag03.amd.com (10.181.40.7) with Microsoft SMTP Server id 14.3.195.1; Tue, 3 Feb 2015 13:49:55 -0500 Subject: [PATCH net] amd-xgbe: Adjust for zero-based traffic class count From: Tom Lendacky To: CC: David Miller Date: Tue, 3 Feb 2015 12:49:55 -0600 Message-ID: <20150203184955.14713.98160.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-EOPAttributedMessage: 0 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Authentication-Results: spf=none (sender IP is 165.204.84.222) smtp.mailfrom=Thomas.Lendacky@amd.com; davemloft.net; dkim=none (message not signed) header.d=none; X-Forefront-Antispam-Report: CIP:165.204.84.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(47776003)(106466001)(92566002)(53416004)(19580395003)(54356999)(50986999)(86362001)(50466002)(19580405001)(23676002)(2351001)(103116003)(229853001)(77096005)(105586002)(83506001)(62966003)(110136001)(33646002)(87936001)(101416001)(46102003)(77156002)(71626003); DIR:OUT; SFP:1102; SCL:1; SRVR:CO1PR02MB207; H:atltwp02.amd.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:CO1PR02MB207; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004); SRVR:CO1PR02MB207; X-Forefront-PRVS: 0476D4AB88 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:CO1PR02MB207; X-OriginatorOrg: amd4.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Feb 2015 18:49:59.0718 (UTC) X-MS-Exchange-CrossTenant-Id: fde4dada-be84-483f-92cc-e026cbee8e96 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fde4dada-be84-483f-92cc-e026cbee8e96; Ip=[165.204.84.222] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR02MB207 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The number of traffic classes reported by the hardware is zero-based so increment the value returned to get an actual count. Signed-off-by: Tom Lendacky --- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c index 7bb5f07..1246140 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c @@ -552,13 +552,14 @@ void xgbe_get_all_hw_features(struct xgbe_prv_data *pdata) break; } - /* The Queue and Channel counts are zero based so increment them + /* The Queue, Channel and TC counts are zero based so increment them * to get the actual number */ hw_feat->rx_q_cnt++; hw_feat->tx_q_cnt++; hw_feat->rx_ch_cnt++; hw_feat->tx_ch_cnt++; + hw_feat->tc_cnt++; DBGPR("<--xgbe_get_all_hw_features\n"); }