mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-11 17:56:49 +07:00
fd371e32fe
Under certain conditions a PHY may backpressure Falcon B0 in such a way that flushes timeout. In normal circumstances the phy poller would fix the PHY, and the flush could complete. But efx_nic_flush_queues() is always called after efx_stop_all(), so the poller has been stopped. Even if this weren't the case, how long would we have to wait for the poller to fix this? And several callers of efx_nic_flush_queues() are about to reset the device anyway - so we don't need to do anything. Work around this bug by scheduling a reset. Ensure that the MAC is never rewired back into the datapath before the reset runs (we already ignore all rx events anyway). Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
67 lines
2.7 KiB
C
67 lines
2.7 KiB
C
/****************************************************************************
|
|
* Driver for Solarflare Solarstorm network controllers and boards
|
|
* Copyright 2006-2009 Solarflare Communications Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms of the GNU General Public License version 2 as published
|
|
* by the Free Software Foundation, incorporated herein by reference.
|
|
*/
|
|
|
|
#ifndef EFX_WORKAROUNDS_H
|
|
#define EFX_WORKAROUNDS_H
|
|
|
|
/*
|
|
* Hardware workarounds.
|
|
* Bug numbers are from Solarflare's Bugzilla.
|
|
*/
|
|
|
|
#define EFX_WORKAROUND_ALWAYS(efx) 1
|
|
#define EFX_WORKAROUND_FALCON_A(efx) (efx_nic_rev(efx) <= EFX_REV_FALCON_A1)
|
|
#define EFX_WORKAROUND_FALCON_AB(efx) (efx_nic_rev(efx) <= EFX_REV_FALCON_B0)
|
|
#define EFX_WORKAROUND_SIENA(efx) (efx_nic_rev(efx) == EFX_REV_SIENA_A0)
|
|
#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)
|
|
|
|
/* XAUI resets if link not detected */
|
|
#define EFX_WORKAROUND_5147 EFX_WORKAROUND_ALWAYS
|
|
/* RX PCIe double split performance issue */
|
|
#define EFX_WORKAROUND_7575 EFX_WORKAROUND_ALWAYS
|
|
/* Bit-bashed I2C reads cause performance drop */
|
|
#define EFX_WORKAROUND_7884 EFX_WORKAROUND_10G
|
|
/* TX_EV_PKT_ERR can be caused by a dangling TX descriptor
|
|
* 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_FALCON_AB
|
|
/* Truncated IPv4 packets can confuse the TX packet parser */
|
|
#define EFX_WORKAROUND_15592 EFX_WORKAROUND_FALCON_AB
|
|
/* Legacy ISR read can return zero once */
|
|
#define EFX_WORKAROUND_15783 EFX_WORKAROUND_ALWAYS
|
|
/* Legacy interrupt storm when interrupt fifo fills */
|
|
#define EFX_WORKAROUND_17213 EFX_WORKAROUND_SIENA
|
|
|
|
/* Spurious parity errors in TSORT buffers */
|
|
#define EFX_WORKAROUND_5129 EFX_WORKAROUND_FALCON_A
|
|
/* Unaligned read request >512 bytes after aligning may break TSORT */
|
|
#define EFX_WORKAROUND_5391 EFX_WORKAROUND_FALCON_A
|
|
/* iSCSI parsing errors */
|
|
#define EFX_WORKAROUND_5583 EFX_WORKAROUND_FALCON_A
|
|
/* RX events go missing */
|
|
#define EFX_WORKAROUND_5676 EFX_WORKAROUND_FALCON_A
|
|
/* RX_RESET on A1 */
|
|
#define EFX_WORKAROUND_6555 EFX_WORKAROUND_FALCON_A
|
|
/* Increase filter depth to avoid RX_RESET */
|
|
#define EFX_WORKAROUND_7244 EFX_WORKAROUND_FALCON_A
|
|
/* Flushes may never complete */
|
|
#define EFX_WORKAROUND_7803 EFX_WORKAROUND_FALCON_AB
|
|
/* Leak overlength packets rather than free */
|
|
#define EFX_WORKAROUND_8071 EFX_WORKAROUND_FALCON_A
|
|
|
|
/* Need to send XNP pages for 100BaseT */
|
|
#define EFX_WORKAROUND_13204 EFX_WORKAROUND_SFT9001
|
|
/* Don't restart AN in near-side loopback */
|
|
#define EFX_WORKAROUND_15195 EFX_WORKAROUND_SFT9001
|
|
|
|
#endif /* EFX_WORKAROUNDS_H */
|