]> git.karo-electronics.de Git - linux-beck.git/commitdiff
enic: Fix endianness bug.
authorSantosh Nayak <santoshprasadnayak@gmail.com>
Fri, 24 Feb 2012 06:56:39 +0000 (06:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Feb 2012 22:53:03 +0000 (17:53 -0500)
Sparse complaints the endian bug.

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cisco/enic/cq_enet_desc.h
drivers/net/ethernet/cisco/enic/enic_pp.c

index c2c0680a1146793c2bf4393dbd746835f6395aa9..ac37cacc6136723e132eb872adf88c46801de17f 100644 (file)
@@ -157,7 +157,7 @@ static inline void cq_enet_rq_desc_dec(struct cq_enet_rq_desc *desc,
                        CQ_ENET_RQ_DESC_FCOE_FC_CRC_OK) ? 1 : 0;
                *fcoe_enc_error = (desc->flags &
                        CQ_ENET_RQ_DESC_FCOE_ENC_ERROR) ? 1 : 0;
-               *fcoe_eof = (u8)((desc->checksum_fcoe >>
+               *fcoe_eof = (u8)((le16_to_cpu(desc->checksum_fcoe) >>
                        CQ_ENET_RQ_DESC_FCOE_EOF_SHIFT) &
                        CQ_ENET_RQ_DESC_FCOE_EOF_MASK);
                *checksum = 0;
index 22bf03a1829e190e66928da74d52f5392c11772f..c347b6236f8fb90f0169e70e293fb2b8ce0ccc39 100644 (file)
@@ -72,7 +72,7 @@ static int enic_set_port_profile(struct enic *enic, int vf)
        struct enic_port_profile *pp;
        struct vic_provinfo *vp;
        const u8 oui[3] = VIC_PROVINFO_CISCO_OUI;
-       const u16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
+       const __be16 os_type = htons(VIC_GENERIC_PROV_OS_TYPE_LINUX);
        char uuid_str[38];
        char client_mac_str[18];
        u8 *client_mac;