[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1403569649-22649-2-git-send-email-anish@chelsio.com>
Date: Mon, 23 Jun 2014 17:27:29 -0700
From: Anish Bhatt <anish@...lsio.com>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, leedom@...lsio.com, hariprasad@...lsio.com,
Anish Bhatt <anish@...lsio.com>
Subject: [PATCH] cxgb4: Fix endian bug introduced in 76bcb31efc0685574fb123f7aaa92f8a50c14fd9
Signed-off-by: Anish Bhatt <anish@...lsio.com>
---
drivers/net/ethernet/chelsio/cxgb4/cxgb4_dcb.c | 8 ++++----
1 file 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 39b4a85..a8b1073 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)
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) {
@@ -501,7 +501,7 @@ static void cxgb4_setpfccfg(struct net_device *dev, int priority, u8 pfccfg)
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)
--
2.0.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists