Skip to content

Commit

Permalink
sfc: Limit some hardware workarounds to Falcon
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Nov 29, 2009
1 parent b895d73 commit fb45f2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/sfc/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ static int efx_ethtool_set_pauseparam(struct net_device *net_dev,
* and fix it be cycling transmit flow control on this end. */
reset = (wanted_fc & EFX_FC_TX) && !(efx->wanted_fc & EFX_FC_TX);
if (EFX_WORKAROUND_11482(efx) && reset) {
if (falcon_rev(efx) >= FALCON_REV_B0) {
if (falcon_rev(efx) == FALCON_REV_B0) {
/* Recover by resetting the EM block */
if (efx->link_state.up)
falcon_drain_tx_fifo(efx);
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/sfc/workarounds.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

#define EFX_WORKAROUND_ALWAYS(efx) 1
#define EFX_WORKAROUND_FALCON_A(efx) (falcon_rev(efx) <= FALCON_REV_A1)
#define EFX_WORKAROUND_FALCON_AB(efx) (falcon_rev(efx) <= FALCON_REV_B0)
#define EFX_WORKAROUND_10G(efx) EFX_IS10G(efx)
#define EFX_WORKAROUND_SFT9001(efx) ((efx)->phy_type == PHY_TYPE_SFT9001A || \
(efx)->phy_type == PHY_TYPE_SFT9001B)
Expand All @@ -33,11 +34,11 @@
* or a PCIe error (bug 11028) */
#define EFX_WORKAROUND_10727 EFX_WORKAROUND_ALWAYS
/* Transmit flow control may get disabled */
#define EFX_WORKAROUND_11482 EFX_WORKAROUND_ALWAYS
#define EFX_WORKAROUND_11482 EFX_WORKAROUND_FALCON_AB
/* Flush events can take a very long time to appear */
#define EFX_WORKAROUND_11557 EFX_WORKAROUND_ALWAYS
/* Truncated IPv4 packets can confuse the TX packet parser */
#define EFX_WORKAROUND_15592 EFX_WORKAROUND_ALWAYS
#define EFX_WORKAROUND_15592 EFX_WORKAROUND_FALCON_AB

/* Spurious parity errors in TSORT buffers */
#define EFX_WORKAROUND_5129 EFX_WORKAROUND_FALCON_A
Expand Down

0 comments on commit fb45f2c

Please sign in to comment.