aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2008-11-04 15:35:36 -0500
committerJeff Garzik <jgarzik@redhat.com>2008-11-06 00:50:15 -0500
commit739bb23d722313e37322f485eb65f700b060d817 (patch)
treeacc5e4f896104098ad415289682ab0cbf532af3b
parent3e133c44d24a094118caee182200462d46c55b56 (diff)
sfc: Do not reset when hardware monitor detects a fault
The TX watchdog should trigger a reset, but a temperature/power alarm should not as this is unlikely to solve the problem. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/net/sfc/efx.c25
-rw-r--r--drivers/net/sfc/enum.h4
2 files changed, 6 insertions, 23 deletions
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c
index f9139377989f..ac7bdbf3fd4a 100644
--- a/drivers/net/sfc/efx.c
+++ b/drivers/net/sfc/efx.c
@@ -77,11 +77,6 @@ static int napi_weight = 64;
77 */ 77 */
78unsigned int efx_monitor_interval = 1 * HZ; 78unsigned int efx_monitor_interval = 1 * HZ;
79 79
80/* This controls whether or not the hardware monitor will trigger a
81 * reset when it detects an error condition.
82 */
83static unsigned int monitor_reset = true;
84
85/* This controls whether or not the driver will initialise devices 80/* This controls whether or not the driver will initialise devices
86 * with invalid MAC addresses stored in the EEPROM or flash. If true, 81 * with invalid MAC addresses stored in the EEPROM or flash. If true,
87 * such devices will be initialised with a random locally-generated 82 * such devices will be initialised with a random locally-generated
@@ -1176,17 +1171,6 @@ static void efx_monitor(struct work_struct *data)
1176 rc = falcon_check_xmac(efx); 1171 rc = falcon_check_xmac(efx);
1177 mutex_unlock(&efx->mac_lock); 1172 mutex_unlock(&efx->mac_lock);
1178 1173
1179 if (rc) {
1180 if (monitor_reset) {
1181 EFX_ERR(efx, "hardware monitor detected a fault: "
1182 "triggering reset\n");
1183 efx_schedule_reset(efx, RESET_TYPE_MONITOR);
1184 } else {
1185 EFX_ERR(efx, "hardware monitor detected a fault, "
1186 "skipping reset\n");
1187 }
1188 }
1189
1190 queue_delayed_work(efx->workqueue, &efx->monitor_work, 1174 queue_delayed_work(efx->workqueue, &efx->monitor_work,
1191 efx_monitor_interval); 1175 efx_monitor_interval);
1192} 1176}
@@ -1358,12 +1342,11 @@ static void efx_watchdog(struct net_device *net_dev)
1358{ 1342{
1359 struct efx_nic *efx = netdev_priv(net_dev); 1343 struct efx_nic *efx = netdev_priv(net_dev);
1360 1344
1361 EFX_ERR(efx, "TX stuck with stop_count=%d port_enabled=%d: %s\n", 1345 EFX_ERR(efx, "TX stuck with stop_count=%d port_enabled=%d:"
1362 atomic_read(&efx->netif_stop_count), efx->port_enabled, 1346 " resetting channels\n",
1363 monitor_reset ? "resetting channels" : "skipping reset"); 1347 atomic_read(&efx->netif_stop_count), efx->port_enabled);
1364 1348
1365 if (monitor_reset) 1349 efx_schedule_reset(efx, RESET_TYPE_TX_WATCHDOG);
1366 efx_schedule_reset(efx, RESET_TYPE_MONITOR);
1367} 1350}
1368 1351
1369 1352
diff --git a/drivers/net/sfc/enum.h b/drivers/net/sfc/enum.h
index cec15dbb88e4..41e758e8fdb1 100644
--- a/drivers/net/sfc/enum.h
+++ b/drivers/net/sfc/enum.h
@@ -72,7 +72,7 @@ extern const char *efx_loopback_mode_names[];
72 * @RESET_TYPE_ALL: reset everything but PCI core blocks 72 * @RESET_TYPE_ALL: reset everything but PCI core blocks
73 * @RESET_TYPE_WORLD: reset everything, save & restore PCI config 73 * @RESET_TYPE_WORLD: reset everything, save & restore PCI config
74 * @RESET_TYPE_DISABLE: disable NIC 74 * @RESET_TYPE_DISABLE: disable NIC
75 * @RESET_TYPE_MONITOR: reset due to hardware monitor 75 * @RESET_TYPE_TX_WATCHDOG: reset due to TX watchdog
76 * @RESET_TYPE_INT_ERROR: reset due to internal error 76 * @RESET_TYPE_INT_ERROR: reset due to internal error
77 * @RESET_TYPE_RX_RECOVERY: reset to recover from RX datapath errors 77 * @RESET_TYPE_RX_RECOVERY: reset to recover from RX datapath errors
78 * @RESET_TYPE_RX_DESC_FETCH: pcie error during rx descriptor fetch 78 * @RESET_TYPE_RX_DESC_FETCH: pcie error during rx descriptor fetch
@@ -86,7 +86,7 @@ enum reset_type {
86 RESET_TYPE_WORLD = 2, 86 RESET_TYPE_WORLD = 2,
87 RESET_TYPE_DISABLE = 3, 87 RESET_TYPE_DISABLE = 3,
88 RESET_TYPE_MAX_METHOD, 88 RESET_TYPE_MAX_METHOD,
89 RESET_TYPE_MONITOR, 89 RESET_TYPE_TX_WATCHDOG,
90 RESET_TYPE_INT_ERROR, 90 RESET_TYPE_INT_ERROR,
91 RESET_TYPE_RX_RECOVERY, 91 RESET_TYPE_RX_RECOVERY,
92 RESET_TYPE_RX_DESC_FETCH, 92 RESET_TYPE_RX_DESC_FETCH,