Author: davidcs
Date: Tue Sep 19 23:26:27 2017
New Revision: 323782
URL: https://svnweb.freebsd.org/changeset/base/323782

Log:
  Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval
  
  MFC after:5 days

Modified:
  head/sys/dev/qlxgbe/ql_def.h
  head/sys/dev/qlxgbe/ql_os.c

Modified: head/sys/dev/qlxgbe/ql_def.h
==============================================================================
--- head/sys/dev/qlxgbe/ql_def.h        Tue Sep 19 22:17:30 2017        
(r323781)
+++ head/sys/dev/qlxgbe/ql_def.h        Tue Sep 19 23:26:27 2017        
(r323782)
@@ -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: head/sys/dev/qlxgbe/ql_os.c
==============================================================================
--- head/sys/dev/qlxgbe/ql_os.c Tue Sep 19 22:17:30 2017        (r323781)
+++ head/sys/dev/qlxgbe/ql_os.c Tue Sep 19 23:26:27 2017        (r323782)
@@ -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)),
@@ -2025,7 +2032,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);
 
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to