Index: ixl/ixl_pf_iov.c =================================================================== --- ixl/ixl_pf_iov.c (revision 329271) +++ ixl/ixl_pf_iov.c (working copy) @@ -165,7 +165,7 @@ vsi_ctx.info.tc_mapping[0] = htole16( (0 << I40E_AQ_VSI_TC_QUE_OFFSET_SHIFT) | - (bsrl(vf->qtag.num_allocated) << I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT)); + ((fls(vf->qtag.num_allocated) - 1) << I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT)); code = i40e_aq_add_vsi(hw, &vsi_ctx, NULL); if (code != I40E_SUCCESS) Index: ixl/ixl_pf_main.c =================================================================== --- ixl/ixl_pf_main.c (revision 329271) +++ ixl/ixl_pf_main.c (working copy) @@ -2108,7 +2108,7 @@ * queue allocation at queue 0, and assign it 2^tc_queues queues (though * the driver may not use all of them). */ - tc_queues = bsrl(pf->qtag.num_allocated); + tc_queues = fls(pf->qtag.num_allocated) - 1; ctxt.info.tc_mapping[0] = ((0 << I40E_AQ_VSI_TC_QUE_OFFSET_SHIFT) & I40E_AQ_VSI_TC_QUE_OFFSET_MASK) | ((tc_queues << I40E_AQ_VSI_TC_QUE_NUMBER_SHIFT)