18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/****************************************************************************
38c2ecf20Sopenharmony_ci * Driver for Solarflare network controllers and boards
48c2ecf20Sopenharmony_ci * Copyright 2006-2013 Solarflare Communications Inc.
58c2ecf20Sopenharmony_ci */
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ci#ifndef EF4_WORKAROUNDS_H
88c2ecf20Sopenharmony_ci#define EF4_WORKAROUNDS_H
98c2ecf20Sopenharmony_ci
108c2ecf20Sopenharmony_ci/*
118c2ecf20Sopenharmony_ci * Hardware workarounds.
128c2ecf20Sopenharmony_ci * Bug numbers are from Solarflare's Bugzilla.
138c2ecf20Sopenharmony_ci */
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_FALCON_A(efx) (ef4_nic_rev(efx) <= EF4_REV_FALCON_A1)
168c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_FALCON_AB(efx) (ef4_nic_rev(efx) <= EF4_REV_FALCON_B0)
178c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_10G(efx) 1
188c2ecf20Sopenharmony_ci
198c2ecf20Sopenharmony_ci/* Bit-bashed I2C reads cause performance drop */
208c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_7884 EF4_WORKAROUND_10G
218c2ecf20Sopenharmony_ci/* Truncated IPv4 packets can confuse the TX packet parser */
228c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_15592 EF4_WORKAROUND_FALCON_AB
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci/* Spurious parity errors in TSORT buffers */
258c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_5129 EF4_WORKAROUND_FALCON_A
268c2ecf20Sopenharmony_ci/* Unaligned read request >512 bytes after aligning may break TSORT */
278c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_5391 EF4_WORKAROUND_FALCON_A
288c2ecf20Sopenharmony_ci/* iSCSI parsing errors */
298c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_5583 EF4_WORKAROUND_FALCON_A
308c2ecf20Sopenharmony_ci/* RX events go missing */
318c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_5676 EF4_WORKAROUND_FALCON_A
328c2ecf20Sopenharmony_ci/* RX_RESET on A1 */
338c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_6555 EF4_WORKAROUND_FALCON_A
348c2ecf20Sopenharmony_ci/* Increase filter depth to avoid RX_RESET */
358c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_7244 EF4_WORKAROUND_FALCON_A
368c2ecf20Sopenharmony_ci/* Flushes may never complete */
378c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_7803 EF4_WORKAROUND_FALCON_AB
388c2ecf20Sopenharmony_ci/* Leak overlength packets rather than free */
398c2ecf20Sopenharmony_ci#define EF4_WORKAROUND_8071 EF4_WORKAROUND_FALCON_A
408c2ecf20Sopenharmony_ci
418c2ecf20Sopenharmony_ci#endif /* EF4_WORKAROUNDS_H */
42