Skip to content

Commit

Permalink
cxgb4: Fix endian bug introduced in cxgb4 dcb patchset
Browse files Browse the repository at this point in the history
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 79631c8 ("trivial: net/irda/irlmp.c:
Fix closing brace followed by if")
-Anish

v2: cleanup submission as per davem's feedback

Fixes: 76bcb31 ("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>
  • Loading branch information
Anish Bhatt authored and David S. Miller committed Jun 24, 2014
1 parent 79631c8 commit 5433ba3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -488,20 +488,20 @@ static void cxgb4_setpfccfg(struct net_device *dev, int priority, u8 pfccfg)
pcmd.op_to_portid |= cpu_to_be32(FW_PORT_CMD_APPLY);

pcmd.u.dcb.pfc.type = FW_PORT_DCB_TYPE_PFC;
pcmd.u.dcb.pfc.pfcen = cpu_to_be16(pi->dcb.pfcen);
pcmd.u.dcb.pfc.pfcen = pi->dcb.pfcen;

if (pfccfg)
pcmd.u.dcb.pfc.pfcen |= cpu_to_be16(1 << priority);
pcmd.u.dcb.pfc.pfcen |= (1 << priority);
else
pcmd.u.dcb.pfc.pfcen &= cpu_to_be16(~(1 << priority));
pcmd.u.dcb.pfc.pfcen &= (~(1 << priority));

err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd);
if (err != FW_PORT_DCB_CFG_SUCCESS) {
dev_err(adap->pdev_dev, "DCB PFC write failed with %d\n", -err);
return;
}

pi->dcb.pfcen = be16_to_cpu(pcmd.u.dcb.pfc.pfcen);
pi->dcb.pfcen = pcmd.u.dcb.pfc.pfcen;
}

static u8 cxgb4_setall(struct net_device *dev)
Expand Down

0 comments on commit 5433ba3

Please sign in to comment.