From owner-svn-src-head@freebsd.org Fri Dec 11 06:20:32 2015 Return-Path: Delivered-To: svn-src-head@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 A222D9D63E4; Fri, 11 Dec 2015 06:20:32 +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 71ECF1F66; Fri, 11 Dec 2015 06:20:32 +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 tBB6KVxq033646; Fri, 11 Dec 2015 06:20:31 GMT (envelope-from arybchik@FreeBSD.org) Received: (from arybchik@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tBB6KVnk033645; Fri, 11 Dec 2015 06:20:31 GMT (envelope-from arybchik@FreeBSD.org) Message-Id: <201512110620.tBB6KVnk033645@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arybchik set sender to arybchik@FreeBSD.org using -f From: Andrew Rybchenko Date: Fri, 11 Dec 2015 06:20:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r292086 - head/sys/dev/sfxge X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Dec 2015 06:20:32 -0000 Author: arybchik Date: Fri Dec 11 06:20:31 2015 New Revision: 292086 URL: https://svnweb.freebsd.org/changeset/base/292086 Log: sfxge: add tunable for maximum start attetmps after reset Reviewed by: gnn Sponsored by: Solarflare Communications, Inc. MFC after: 2 days Differential Revision: https://reviews.freebsd.org/D2610 Modified: head/sys/dev/sfxge/sfxge.c Modified: head/sys/dev/sfxge/sfxge.c ============================================================================== --- head/sys/dev/sfxge/sfxge.c Fri Dec 11 05:39:45 2015 (r292085) +++ head/sys/dev/sfxge/sfxge.c Fri Dec 11 06:20:31 2015 (r292086) @@ -95,6 +95,13 @@ SYSCTL_INT(_hw_sfxge, OID_AUTO, tx_ring, &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;