diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2014-01-23 14:35:48 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-23 13:40:51 -0800 |
commit | d9317aea16ecec7694271ef11fb7791a0f0d9cc5 (patch) | |
tree | 9c1905eeb0c2a503acefcacf9743192da030dc6a /drivers/net/ethernet/sfc/efx.h | |
parent | 8533ccf3e78bc9ca17543c0109ff832351f88d51 (diff) |
sfc: Use the correct maximum TX DMA ring size for SFC9100
As part of a workaround for a hardware erratum in the SFC9100 family
(SF bug 35388), the TX_DESC_UPD_DWORD register address is also used
for communicating with the event block, and only descriptor pointer
values < 2048 are valid.
If the TX DMA ring size is increased to 4096 descriptors (which the
firmware still allows) then we may write a descriptor pointer
value >= 2048, which has entirely different and undesirable effects!
Limit the TX DMA ring size correctly when this workaround is in
effect.
Fixes: 8127d661e77f ('sfc: Add support for Solarflare SFC9100 family')
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Shradha Shah <sshah@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc/efx.h')
-rw-r--r-- | drivers/net/ethernet/sfc/efx.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/efx.h b/drivers/net/ethernet/sfc/efx.h index 601224736b9b..dbd7b78fe01c 100644 --- a/drivers/net/ethernet/sfc/efx.h +++ b/drivers/net/ethernet/sfc/efx.h @@ -66,6 +66,9 @@ void efx_schedule_slow_fill(struct efx_rx_queue *rx_queue); #define EFX_RXQ_MIN_ENT 128U #define EFX_TXQ_MIN_ENT(efx) (2 * efx_tx_max_skb_descs(efx)) +#define EFX_TXQ_MAX_ENT(efx) (EFX_WORKAROUND_35388(efx) ? \ + EFX_MAX_DMAQ_SIZE / 2 : EFX_MAX_DMAQ_SIZE) + /* Filters */ /** |