Commit de68f5de authored by Michael Chan's avatar Michael Chan Committed by David S. Miller

bnxt_en: Fix bitmap declaration to work on 32-bit arches.

The declaration of the bitmap vf_req_snif_bmap using fixed array of
unsigned long will only work on 64-bit archs.  Use DECLARE_BITMAP instead
which will work on all archs.
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d110986c
...@@ -2693,17 +2693,16 @@ static int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp) ...@@ -2693,17 +2693,16 @@ static int bnxt_hwrm_func_drv_rgtr(struct bnxt *bp)
req.ver_upd = DRV_VER_UPD; req.ver_upd = DRV_VER_UPD;
if (BNXT_PF(bp)) { if (BNXT_PF(bp)) {
unsigned long vf_req_snif_bmap[4]; DECLARE_BITMAP(vf_req_snif_bmap, 256);
u32 *data = (u32 *)vf_req_snif_bmap; u32 *data = (u32 *)vf_req_snif_bmap;
memset(vf_req_snif_bmap, 0, 32); memset(vf_req_snif_bmap, 0, sizeof(vf_req_snif_bmap));
for (i = 0; i < ARRAY_SIZE(bnxt_vf_req_snif); i++) for (i = 0; i < ARRAY_SIZE(bnxt_vf_req_snif); i++)
__set_bit(bnxt_vf_req_snif[i], vf_req_snif_bmap); __set_bit(bnxt_vf_req_snif[i], vf_req_snif_bmap);
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++)
req.vf_req_fwd[i] = cpu_to_le32(*data); req.vf_req_fwd[i] = cpu_to_le32(data[i]);
data++;
}
req.enables |= req.enables |=
cpu_to_le32(FUNC_DRV_RGTR_REQ_ENABLES_VF_REQ_FWD); cpu_to_le32(FUNC_DRV_RGTR_REQ_ENABLES_VF_REQ_FWD);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment