diff --git a/drivers/net/sfc/base/efx_ev.c b/drivers/net/sfc/base/efx_ev.c index 21f4c226c5..b986239951 100644 --- a/drivers/net/sfc/base/efx_ev.c +++ b/drivers/net/sfc/base/efx_ev.c @@ -188,7 +188,7 @@ efx_evq_nbufs( __in const efx_nic_t *enp, __in unsigned int ndescs) { - return (efx_evq_size(enp, ndescs) / EFX_BUF_SIZE); + return (EFX_DIV_ROUND_UP(efx_evq_size(enp, ndescs), EFX_BUF_SIZE)); } void diff --git a/drivers/net/sfc/base/efx_rx.c b/drivers/net/sfc/base/efx_rx.c index c0d7381287..8a12ef705a 100644 --- a/drivers/net/sfc/base/efx_rx.c +++ b/drivers/net/sfc/base/efx_rx.c @@ -781,7 +781,7 @@ efx_rxq_nbufs( __in const efx_nic_t *enp, __in unsigned int ndescs) { - return (efx_rxq_size(enp, ndescs) / EFX_BUF_SIZE); + return (EFX_DIV_ROUND_UP(efx_rxq_size(enp, ndescs), EFX_BUF_SIZE)); } void diff --git a/drivers/net/sfc/base/efx_tx.c b/drivers/net/sfc/base/efx_tx.c index bbe2bd1b7c..5cf3dcd3ac 100644 --- a/drivers/net/sfc/base/efx_tx.c +++ b/drivers/net/sfc/base/efx_tx.c @@ -312,7 +312,7 @@ efx_txq_nbufs( __in const efx_nic_t *enp, __in unsigned int ndescs) { - return (efx_txq_size(enp, ndescs) / EFX_BUF_SIZE); + return (EFX_DIV_ROUND_UP(efx_txq_size(enp, ndescs), EFX_BUF_SIZE)); } __checkReturn efx_rc_t