Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Sep 2017 22:29:43 +0000 (UTC)
From:      David C Somayajulu <davidcs@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r324035 - stable/9/sys/dev/qlxgbe
Message-ID:  <201709262229.v8QMThma084894@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: davidcs
Date: Tue Sep 26 22:29:43 2017
New Revision: 324035
URL: https://svnweb.freebsd.org/changeset/base/324035

Log:
  MFC r323782
  Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval

Modified:
  stable/9/sys/dev/qlxgbe/ql_def.h
  stable/9/sys/dev/qlxgbe/ql_os.c
Directory Properties:
  stable/9/   (props changed)
  stable/9/sys/   (props changed)

Modified: stable/9/sys/dev/qlxgbe/ql_def.h
==============================================================================
--- stable/9/sys/dev/qlxgbe/ql_def.h	Tue Sep 26 22:28:00 2017	(r324034)
+++ stable/9/sys/dev/qlxgbe/ql_def.h	Tue Sep 26 22:29:43 2017	(r324035)
@@ -239,6 +239,7 @@ struct qla_host {
 	volatile const char 	*qla_lock;
 	volatile const char	*qla_unlock;
 	uint32_t		dbg_level;
+	uint32_t		enable_minidump;
 
 	uint8_t			fw_ver_str[32];
 

Modified: stable/9/sys/dev/qlxgbe/ql_os.c
==============================================================================
--- stable/9/sys/dev/qlxgbe/ql_os.c	Tue Sep 26 22:28:00 2017	(r324034)
+++ stable/9/sys/dev/qlxgbe/ql_os.c	Tue Sep 26 22:29:43 2017	(r324035)
@@ -185,6 +185,13 @@ qla_add_sysctls(qla_host_t *ha)
                 OID_AUTO, "debug", CTLFLAG_RW,
                 &ha->dbg_level, ha->dbg_level, "Debug Level");
 
+	ha->enable_minidump = 1;
+	SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
+		SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
+		OID_AUTO, "enable_minidump", CTLFLAG_RW,
+		&ha->enable_minidump, ha->enable_minidump,
+		"Minidump retrival is enabled only when this is set");
+
 	ha->std_replenish = QL_STD_REPLENISH_THRES;
         SYSCTL_ADD_UINT(device_get_sysctl_ctx(dev),
                 SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
@@ -2046,7 +2053,8 @@ device_printf(ha->pci_dev, "%s: enter\n", __func__);
 
 		ha->msg_from_peer = 0;
 
-		ql_minidump(ha);
+		if (ha->enable_minidump)
+			ql_minidump(ha);
 
 		(void) ql_init_hw(ha);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709262229.v8QMThma084894>