Skip to content

Commit 21ca54e

Browse files
Santosh Nayakdavem330
authored andcommitted
enic: Fix endianness bug.
Sparse complaints the endian bug. Signed-off-by: Santosh Nayak <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e807e56 commit 21ca54e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/ethernet/cisco/enic/cq_enet_desc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ static inline void cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc,
157157
CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0;
158158
*fcoe_enc_error = (desc->flags &
159159
CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0;
160-
*fcoe_eof = (u8)((desc->checksum_fcoe >>
160+
*fcoe_eof = (u8)((le16_to_cpu(desc->checksum_fcoe) >>
161161
CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) &
162162
CQ_ENET_RQ_DESC_FCOE_EOF_MASK);
163163
*checksum = 0;

drivers/net/ethernet/cisco/enic/enic_pp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ static int enic_set_port_profile(struct enic *enic, int vf)
7272
struct enic_port_profile *pp;
7373
struct vic_provinfo *vp;
7474
const u8 oui[3] = VIC_PROVINFO_CISCO_OUI;
75-
const u16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
75+
const __be16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
7676
char uuid_str[38];
7777
char client_mac_str[18];
7878
u8 *client_mac;

0 commit comments

Comments
 (0)