1/*- 2 * Copyright (c) 2010-2015 Solarflare Communications Inc. 3 * All rights reserved. 4 * 5 * This software was developed in part by Philip Paeps under contract for 6 * Solarflare Communications, Inc. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * 29 * The views and conclusions contained in the software and documentation are 30 * those of the authors and should not be interpreted as representing official 31 * policies, either expressed or implied, of the FreeBSD Project. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: stable/10/sys/dev/sfxge/sfxge.c 293970 2016-01-14 15:41:03Z arybchik $"); |
36 37#include <sys/param.h> 38#include <sys/kernel.h> 39#include <sys/bus.h> 40#include <sys/rman.h> 41#include <sys/lock.h> 42#include <sys/module.h> 43#include <sys/mutex.h> --- 53 unchanged lines hidden (view full) --- 97#define SFXGE_PARAM_STATS_UPDATE_PERIOD SFXGE_PARAM(stats_update_period) 98static int sfxge_stats_update_period = SFXGE_CALLOUT_TICKS; 99TUNABLE_INT(SFXGE_PARAM_STATS_UPDATE_PERIOD, 100 &sfxge_stats_update_period); 101SYSCTL_INT(_hw_sfxge, OID_AUTO, stats_update_period, CTLFLAG_RDTUN, 102 &sfxge_stats_update_period, 0, 103 "netstat interface statistics update period in ticks"); 104 |
105#define SFXGE_PARAM_RESTART_ATTEMPTS SFXGE_PARAM(restart_attempts) 106static int sfxge_restart_attempts = 3; 107TUNABLE_INT(SFXGE_PARAM_RESTART_ATTEMPTS, &sfxge_restart_attempts); 108SYSCTL_INT(_hw_sfxge, OID_AUTO, restart_attempts, CTLFLAG_RDTUN, 109 &sfxge_restart_attempts, 0, 110 "Maximum number of attempts to bring interface up after reset"); 111 |
112#if EFSYS_OPT_MCDI_LOGGING 113#define SFXGE_PARAM_MCDI_LOGGING SFXGE_PARAM(mcdi_logging) 114static int sfxge_mcdi_logging = 0; 115TUNABLE_INT(SFXGE_PARAM_MCDI_LOGGING, &sfxge_mcdi_logging); 116#endif 117 118static void 119sfxge_reset(void *arg, int npending); --- 900 unchanged lines hidden (view full) --- 1020 1021 SFXGE_ADAPTER_LOCK(sc); 1022 1023 if (sc->init_state != SFXGE_STARTED) 1024 goto done; 1025 1026 sfxge_stop(sc); 1027 efx_nic_reset(sc->enp); |
1028 for (attempt = 0; attempt < sfxge_restart_attempts; ++attempt) { |
1029 if ((rc = sfxge_start(sc)) == 0) 1030 goto done; 1031 1032 device_printf(sc->dev, "start on reset failed (%d)\n", rc); 1033 DELAY(100000); 1034 } 1035 1036 device_printf(sc->dev, "reset failed; interface is now stopped\n"); --- 137 unchanged lines hidden --- |