aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
diff options
context:
space:
mode:
authorAnish Bhatt <anish@chelsio.com>2015-07-17 13:12:30 -0700
committerDavid S. Miller <davem@davemloft.net>2015-07-21 00:23:23 -0700
commita44e7b73118b21176bdf6376c620d778a0ff0ee2 (patch)
tree67303a876267dda31c7b2d452c3765cfa1a71f86 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
parentsctp: fix cut and paste issue in comment (diff)
downloadlinux-dev-a44e7b73118b21176bdf6376c620d778a0ff0ee2.tar.xz
linux-dev-a44e7b73118b21176bdf6376c620d778a0ff0ee2.zip
cxgb4 : Only pass app selector of 0 or 3 to firmware
This keeps app format passed to firmware the same irrespective of DCBx version in use. Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c6
1 files 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 =