mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
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 commit79631c89ed
("trivial: net/irda/irlmp.c: Fix closing brace followed by if") -Anish v2: cleanup submission as per davem's feedback Fixes:76bcb31efc
("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>
This commit is contained in:
parent
79631c89ed
commit
5433ba365f
1 changed files with 4 additions and 4 deletions
|
@ -488,12 +488,12 @@ static void cxgb4_setpfccfg(struct net_device *dev, int priority, u8 pfccfg)
|
||||||
pcmd.op_to_portid |= cpu_to_be32(FW_PORT_CMD_APPLY);
|
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.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)
|
if (pfccfg)
|
||||||
pcmd.u.dcb.pfc.pfcen |= cpu_to_be16(1 << priority);
|
pcmd.u.dcb.pfc.pfcen |= (1 << priority);
|
||||||
else
|
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);
|
err = t4_wr_mbox(adap, adap->mbox, &pcmd, sizeof(pcmd), &pcmd);
|
||||||
if (err != FW_PORT_DCB_CFG_SUCCESS) {
|
if (err != FW_PORT_DCB_CFG_SUCCESS) {
|
||||||
|
@ -501,7 +501,7 @@ static void cxgb4_setpfccfg(struct net_device *dev, int priority, u8 pfccfg)
|
||||||
return;
|
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)
|
static u8 cxgb4_setall(struct net_device *dev)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue