diff options
| author | Andrew Rybchenko <arybchik@FreeBSD.org> | 2015-12-11 06:20:31 +0000 |
|---|---|---|
| committer | Andrew Rybchenko <arybchik@FreeBSD.org> | 2015-12-11 06:20:31 +0000 |
| commit | 3b5966d10fcdd4dd136dc90c6b5094b9fc706966 (patch) | |
| tree | e763e78da4f6696497fea56311362765adf77473 /sys/dev/sfxge/sfxge.c | |
| parent | fd48e7a5af8314c3755ddbb209ea14eaed91aa7b (diff) | |
Notes
Diffstat (limited to 'sys/dev/sfxge/sfxge.c')
| -rw-r--r-- | sys/dev/sfxge/sfxge.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/sfxge/sfxge.c b/sys/dev/sfxge/sfxge.c index 97588c74bc8b..db6225dc600c 100644 --- a/sys/dev/sfxge/sfxge.c +++ b/sys/dev/sfxge/sfxge.c @@ -95,6 +95,13 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, CTLFLAG_RDTUN, &sfxge_tx_ring_entries, 0, "Maximum number of descriptors in a transmit ring"); +#define SFXGE_PARAM_RESTART_ATTEMPTS SFXGE_PARAM(restart_attempts) +static int sfxge_restart_attempts = 3; +TUNABLE_INT(SFXGE_PARAM_RESTART_ATTEMPTS, &sfxge_restart_attempts); +SYSCTL_INT(_hw_sfxge, OID_AUTO, restart_attempts, CTLFLAG_RDTUN, + &sfxge_restart_attempts, 0, + "Maximum number of attempts to bring interface up after reset"); + #if EFSYS_OPT_MCDI_LOGGING #define SFXGE_PARAM_MCDI_LOGGING SFXGE_PARAM(mcdi_logging) static int sfxge_mcdi_logging = 0; @@ -994,7 +1001,7 @@ sfxge_reset(void *arg, int npending) sfxge_stop(sc); efx_nic_reset(sc->enp); - for (attempt = 0; attempt < 3; ++attempt) { + for (attempt = 0; attempt < sfxge_restart_attempts; ++attempt) { if ((rc = sfxge_start(sc)) == 0) goto done; |
