diff options
author | Anish Bhatt <anish@chelsio.com> | 2014-06-24 02:11:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-24 15:54:52 -0400 |
commit | 5433ba365f6dd9f30899188755eb4b093314732c (patch) | |
tree | f0677f931b67664cafccb487c6c99bdf97e2cb76 | |
parent | 79631c89ed70643fd0579a65834b227795b251ee (diff) |
cxgb4: Fix endian bug introduced in cxgb4 dcb patchset
Hi,
This patch fixes warnings generated by sparse as pointed out by kbuild test
robot, please apply to net-next. Applies on top of
commit 79631c89ed70643fd0579a65834b227795b251ee ("trivial: net/irda/irlmp.c:
Fix closing brace followed by if")
-Anish
v2: cleanup submission as per davem's feedback
Fixes: 76bcb31efc06 ("cxgb4 : Add DCBx support codebase and dcbnl_ops")
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c index 39b4a85fceae..a8b1073e6373 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | |||
@@ -488,12 +488,12 @@ static void cxgb4_setpfccfg(struct net_device *dev, int priority, u8 pfccfg) | |||
488 | pcmd.op_to_portid |= cpu_to_be32(FW_PORT_CMD_APPLY); | 488 | pcmd.op_to_portid |= cpu_to_be32(FW_PORT_CMD_APPLY); |
489 | 489 | ||
490 | pcmd.u.dcb.pfc.type = FW_PORT_DCB_TYPE_PFC; | 490 | pcmd.u.dcb.pfc.type = FW_PORT_DCB_TYPE_PFC; |
491 | pcmd.u.dcb.pfc.pfcen = cpu_to_be16(pi->dcb.pfcen); | 491 | pcmd.u.dcb.pfc.pfcen = pi->dcb.pfcen; |
492 | 492 | ||
493 | if (pfccfg) | 493 | if (pfccfg) |
494 | pcmd.u.dcb.pfc.pfcen |= cpu_to_be16(1 << priority); | 494 | pcmd.u.dcb.pfc.pfcen |= (1 << priority); |
495 | else | 495 | else |
496 | pcmd.u.dcb.pfc.pfcen &= cpu_to_be16(~(1 << priority)); | 496 | pcmd.u.dcb.pfc.pfcen &= (~(1 << priority)); |
497 | 497 | ||
498 | err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); | 498 | err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd); |
499 | if (err != FW_PORT_DCB_CFG_SUCCESS) { | 499 | if (err != FW_PORT_DCB_CFG_SUCCESS) { |
@@ -501,7 +501,7 @@ static void cxgb4_setpfccfg(struct net_device *dev, int priority, u8 pfccfg) | |||
501 | return; | 501 | return; |
502 | } | 502 | } |
503 | 503 | ||
504 | pi->dcb.pfcen = be16_to_cpu(pcmd.u.dcb.pfc.pfcen); | 504 | pi->dcb.pfcen = pcmd.u.dcb.pfc.pfcen; |
505 | } | 505 | } |
506 | 506 | ||
507 | static u8 cxgb4_setall(struct net_device *dev) | 507 | static u8 cxgb4_setall(struct net_device *dev) |