sfc: Use the correct maximum TX DMA ring size for SFC9100
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 23 Jan 2014 14:35:48 +0000 (14:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Mar 2014 17:05:14 +0000 (10:05 -0700)
commitc777c885da2ef7afee1e0e6d3da70bda74df3e97
tree948c16f4a5231a57486c166aed74549001558f94
parent7054a071ff7448ab1ca764a5b67f1d16fd981a50
sfc: Use the correct maximum TX DMA ring size for SFC9100

commit d9317aea16ecec7694271ef11fb7791a0f0d9cc5 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/sfc/efx.h
drivers/net/ethernet/sfc/ethtool.c