mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
cxgb4: Fix endianness issue in t4_fwcache()
[ Upstream commit 0dc235afc5 ]
Do not put host-endian 0 or 1 into big endian feild.
Reported-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
@@ -3541,7 +3541,7 @@ int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op)
|
||||
c.param[0].mnem =
|
||||
cpu_to_be32(FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DEV) |
|
||||
FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_DEV_FWCACHE));
|
||||
c.param[0].val = (__force __be32)op;
|
||||
c.param[0].val = cpu_to_be32(op);
|
||||
|
||||
return t4_wr_mbox(adap, adap->mbox, &c, sizeof(c), NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user