From patchwork Fri Jul 17 20:12:30 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anish Bhatt X-Patchwork-Id: 497257 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 B342114029E for ; Sat, 18 Jul 2015 06:13:00 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753755AbbGQUMz (ORCPT ); Fri, 17 Jul 2015 16:12:55 -0400 Received: from stargate.chelsio.com ([67.207.112.58]:26603 "EHLO stargate3.asicdesigners.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753537AbbGQUMl (ORCPT ); Fri, 17 Jul 2015 16:12:41 -0400 Received: from cerveza.asicdesigners.com (cerveza.asicdesigners.com [10.192.164.225]) by stargate3.asicdesigners.com (8.13.8/8.13.8) with ESMTP id t6HKCWZ3011862; Fri, 17 Jul 2015 13:12:33 -0700 From: Anish Bhatt To: netdev@vger.kernel.org Cc: davem@davemloft.net, hariprasad@chelsio.com, Anish Bhatt Subject: [PATCH net-next 1/4] cxgb4 : Only pass app selector of 0 or 3 to firmware Date: Fri, 17 Jul 2015 13:12:30 -0700 Message-Id: <1437163953-15447-2-git-send-email-anish@chelsio.com> X-Mailer: git-send-email 2.4.6 In-Reply-To: <1437163953-15447-1-git-send-email-anish@chelsio.com> References: <1437163953-15447-1-git-send-email-anish@chelsio.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This keeps app format passed to firmware the same irrespective of DCBx version in use. Signed-off-by: Anish Bhatt --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c index 6074680bc985..7f7c4ba0d4f4 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c @@ -794,7 +794,9 @@ static int __cxgb4_getapp(struct net_device *dev, u8 app_idtype, u16 app_id, */ static int cxgb4_getapp(struct net_device *dev, u8 app_idtype, u16 app_id) { - return __cxgb4_getapp(dev, app_idtype, app_id, 0); + /* Convert app_idtype to firmware format before querying */ + return __cxgb4_getapp(dev, app_idtype == DCB_APP_IDTYPE_ETHTYPE ? + app_idtype : 3, app_id, 0); } /* Write a new Application User Priority Map for the specified Application ID @@ -1133,7 +1135,7 @@ static int cxgb4_getpeerapp_tbl(struct net_device *dev, struct dcb_app *table) if (!pcmd.u.dcb.app_priority.protocolid) break; - table[i].selector = pcmd.u.dcb.app_priority.sel_field; + table[i].selector = (pcmd.u.dcb.app_priority.sel_field + 1); table[i].protocol = be16_to_cpu(pcmd.u.dcb.app_priority.protocolid); table[i].priority =