linux-stable/drivers/scsi/ufs/ufs-fault-injection.h
Bart Van Assche c11a1ae9b8 scsi: ufs: Add fault injection support
Make it easier to test the UFS error handler and abort handler.

Link: https://lore.kernel.org/r/20210722033439.26550-19-bvanassche@acm.org
Acked-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-08-03 07:27:42 -04:00

24 lines
428 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _UFS_FAULT_INJECTION_H
#define _UFS_FAULT_INJECTION_H
#include <linux/kconfig.h>
#include <linux/types.h>
#ifdef CONFIG_SCSI_UFS_FAULT_INJECTION
bool ufs_trigger_eh(void);
bool ufs_fail_completion(void);
#else
static inline bool ufs_trigger_eh(void)
{
return false;
}
static inline bool ufs_fail_completion(void)
{
return false;
}
#endif
#endif /* _UFS_FAULT_INJECTION_H */