From owner-svn-src-stable-10@freebsd.org Thu Jan 14 15:41:04 2016 Return-Path: Delivered-To: svn-src-stable-10@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B064BA8296D; Thu, 14 Jan 2016 15:41:04 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C05E17E0; Thu, 14 Jan 2016 15:41:04 +0000 (UTC) (envelope-from arybchik@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0EFf34o046740; Thu, 14 Jan 2016 15:41:03 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0EFf33F046739; Thu, 14 Jan 2016 15:41:03 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201601141541.u0EFf33F046739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Thu, 14 Jan 2016 15:41:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r293970 - stable/10/sys/dev/sfxge X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jan 2016 15:41:04 -0000 Author: arybchik Date: Thu Jan 14 15:41:03 2016 New Revision: 293970 URL: https://svnweb.freebsd.org/changeset/base/293970 Log: MFC r292086 sfxge: add tunable for maximum start attetmps after reset Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. Modified: stable/10/sys/dev/sfxge/sfxge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/sfxge/sfxge.c ============================================================================== --- stable/10/sys/dev/sfxge/sfxge.c Thu Jan 14 15:33:50 2016 (r293969) +++ stable/10/sys/dev/sfxge/sfxge.c Thu Jan 14 15:41:03 2016 (r293970) @@ -102,6 +102,13 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, stats_up &sfxge_stats_update_period, 0, "netstat interface statistics update period in ticks"); +#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; @@ -1018,7 +1025,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;