Lines Matching +full:fault +full:- +full:inject
1 // SPDX-License-Identifier: GPL-2.0-or-later
5 #include <linux/fault-inject.h>
9 #include "ufs-fault-injection.h"
22 * For more details about fault injection, please refer to
23 * Documentation/fault-injection/fault-injection.rst.
28 "Fault injection. trigger_eh=<interval>,<probability>,<space>,<times>");
34 "Fault injection. timeout=<interval>,<probability>,<space>,<times>");
39 const char *fault_str = kp->arg; in ufs_fault_get()
48 if (kp->arg == g_trigger_eh_str) in ufs_fault_set()
50 else if (kp->arg == g_timeout_str) in ufs_fault_set()
54 return -EINVAL; in ufs_fault_set()
57 return -EINVAL; in ufs_fault_set()
59 strscpy(kp->arg, val, FAULT_INJ_STR_SIZE); in ufs_fault_set()
66 hba->trigger_eh_attr = ufs_trigger_eh_attr; in ufs_fault_inject_hba_init()
67 hba->timeout_attr = ufs_timeout_attr; in ufs_fault_inject_hba_init()
69 fault_create_debugfs_attr("trigger_eh_inject", hba->debugfs_root, &hba->trigger_eh_attr); in ufs_fault_inject_hba_init()
70 fault_create_debugfs_attr("timeout_inject", hba->debugfs_root, &hba->timeout_attr); in ufs_fault_inject_hba_init()
76 return should_fail(&hba->trigger_eh_attr, 1); in ufs_trigger_eh()
81 return should_fail(&hba->timeout_attr, 1); in ufs_fail_completion()