Add sysctl "enable_minidump" to turn on/off automatic minidump retrieval

MFC after:5 days
This commit is contained in:
David C Somayajulu 2017-09-19 23:26:27 +00:00
parent 9bc6b5ac37
commit 1faeac0fd5
2 changed files with 10 additions and 1 deletions

View File

@ -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];

View File

@ -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);