aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSteve Hodgson <shodgson@solarflare.com>2009-01-29 12:48:43 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-30 17:06:27 -0500
commit2d18835d65b7433e7e6583f65395f8c01e7874af (patch)
tree2bc1e1ade74236a763c8894c0e048039af6bbf31 /drivers/net
parent869b5b3888fbd2024af632e3648c00860ba3cca6 (diff)
sfc: SFX7101: Remove workaround for bad link training
Early versions of the SFX7101 firmware could complete link training in a state where it would not adequately cancel noise (Solarflare bug 10750). We previously worked around this by resetting the PHY after seeing many Ethernet CRC errors. This workaround is unsafe since it takes no account of the interval between errors; it also appears to be unnecessary with production firmware. Therefore remove it. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/sfc/falcon.c4
-rw-r--r--drivers/net/sfc/phy.h1
-rw-r--r--drivers/net/sfc/tenxpress.c20
-rw-r--r--drivers/net/sfc/workarounds.h3
4 files changed, 0 insertions, 28 deletions
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c
index 5b9f2d9cc4ed..ae7b0b48bfd1 100644
--- a/drivers/net/sfc/falcon.c
+++ b/drivers/net/sfc/falcon.c
@@ -824,10 +824,6 @@ static void falcon_handle_rx_not_ok(struct efx_rx_queue *rx_queue,
824 rx_ev_pause_frm ? " [PAUSE]" : ""); 824 rx_ev_pause_frm ? " [PAUSE]" : "");
825 } 825 }
826#endif 826#endif
827
828 if (unlikely(rx_ev_eth_crc_err && EFX_WORKAROUND_10750(efx) &&
829 efx->phy_type == PHY_TYPE_SFX7101))
830 tenxpress_crc_err(efx);
831} 827}
832 828
833/* Handle receive events that are not in-order. */ 829/* Handle receive events that are not in-order. */
diff --git a/drivers/net/sfc/phy.h b/drivers/net/sfc/phy.h
index 58c493ef81bb..07e855c148bc 100644
--- a/drivers/net/sfc/phy.h
+++ b/drivers/net/sfc/phy.h
@@ -17,7 +17,6 @@ extern struct efx_phy_operations falcon_sfx7101_phy_ops;
17extern struct efx_phy_operations falcon_sft9001_phy_ops; 17extern struct efx_phy_operations falcon_sft9001_phy_ops;
18 18
19extern void tenxpress_phy_blink(struct efx_nic *efx, bool blink); 19extern void tenxpress_phy_blink(struct efx_nic *efx, bool blink);
20extern void tenxpress_crc_err(struct efx_nic *efx);
21 20
22/**************************************************************************** 21/****************************************************************************
23 * Exported functions from the driver for XFP optical PHYs 22 * Exported functions from the driver for XFP optical PHYs
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c
index 19cfc318954c..80c8d6e3131e 100644
--- a/drivers/net/sfc/tenxpress.c
+++ b/drivers/net/sfc/tenxpress.c
@@ -189,25 +189,12 @@
189 * rails */ 189 * rails */
190#define LNPGA_PDOWN_WAIT (HZ / 5) 190#define LNPGA_PDOWN_WAIT (HZ / 5)
191 191
192static int crc_error_reset_threshold = 100;
193module_param(crc_error_reset_threshold, int, 0644);
194MODULE_PARM_DESC(crc_error_reset_threshold,
195 "Max number of CRC errors before XAUI reset");
196
197struct tenxpress_phy_data { 192struct tenxpress_phy_data {
198 enum efx_loopback_mode loopback_mode; 193 enum efx_loopback_mode loopback_mode;
199 atomic_t bad_crc_count;
200 enum efx_phy_mode phy_mode; 194 enum efx_phy_mode phy_mode;
201 int bad_lp_tries; 195 int bad_lp_tries;
202}; 196};
203 197
204void tenxpress_crc_err(struct efx_nic *efx)
205{
206 struct tenxpress_phy_data *phy_data = efx->phy_data;
207 if (phy_data != NULL)
208 atomic_inc(&phy_data->bad_crc_count);
209}
210
211static ssize_t show_phy_short_reach(struct device *dev, 198static ssize_t show_phy_short_reach(struct device *dev,
212 struct device_attribute *attr, char *buf) 199 struct device_attribute *attr, char *buf)
213{ 200{
@@ -627,13 +614,6 @@ static void tenxpress_phy_poll(struct efx_nic *efx)
627 614
628 if (phy_data->phy_mode != PHY_MODE_NORMAL) 615 if (phy_data->phy_mode != PHY_MODE_NORMAL)
629 return; 616 return;
630
631 if (EFX_WORKAROUND_10750(efx) &&
632 atomic_read(&phy_data->bad_crc_count) > crc_error_reset_threshold) {
633 EFX_ERR(efx, "Resetting XAUI due to too many CRC errors\n");
634 falcon_reset_xaui(efx);
635 atomic_set(&phy_data->bad_crc_count, 0);
636 }
637} 617}
638 618
639static void tenxpress_phy_fini(struct efx_nic *efx) 619static void tenxpress_phy_fini(struct efx_nic *efx)
diff --git a/drivers/net/sfc/workarounds.h b/drivers/net/sfc/workarounds.h
index 82e03e1d7371..797a0cf7cd6b 100644
--- a/drivers/net/sfc/workarounds.h
+++ b/drivers/net/sfc/workarounds.h
@@ -18,7 +18,6 @@
18#define EFX_WORKAROUND_ALWAYS(efx) 1 18#define EFX_WORKAROUND_ALWAYS(efx) 1
19#define EFX_WORKAROUND_FALCON_A(efx) (falcon_rev(efx) <= FALCON_REV_A1) 19#define EFX_WORKAROUND_FALCON_A(efx) (falcon_rev(efx) <= FALCON_REV_A1)
20#define EFX_WORKAROUND_10G(efx) EFX_IS10G(efx) 20#define EFX_WORKAROUND_10G(efx) EFX_IS10G(efx)
21#define EFX_WORKAROUND_SFX7101(efx) ((efx)->phy_type == PHY_TYPE_SFX7101)
22#define EFX_WORKAROUND_SFT9001A(efx) ((efx)->phy_type == PHY_TYPE_SFT9001A) 21#define EFX_WORKAROUND_SFT9001A(efx) ((efx)->phy_type == PHY_TYPE_SFT9001A)
23 22
24/* XAUI resets if link not detected */ 23/* XAUI resets if link not detected */
@@ -29,8 +28,6 @@
29#define EFX_WORKAROUND_7884 EFX_WORKAROUND_10G 28#define EFX_WORKAROUND_7884 EFX_WORKAROUND_10G
30/* TX pkt parser problem with <= 16 byte TXes */ 29/* TX pkt parser problem with <= 16 byte TXes */
31#define EFX_WORKAROUND_9141 EFX_WORKAROUND_ALWAYS 30#define EFX_WORKAROUND_9141 EFX_WORKAROUND_ALWAYS
32/* Low rate CRC errors require XAUI reset */
33#define EFX_WORKAROUND_10750 EFX_WORKAROUND_SFX7101
34/* TX_EV_PKT_ERR can be caused by a dangling TX descriptor 31/* TX_EV_PKT_ERR can be caused by a dangling TX descriptor
35 * or a PCIe error (bug 11028) */ 32 * or a PCIe error (bug 11028) */
36#define EFX_WORKAROUND_10727 EFX_WORKAROUND_ALWAYS 33#define EFX_WORKAROUND_10727 EFX_WORKAROUND_ALWAYS