drivers/ufs/core/ufs-fault-injection.h

Source file repositories/reference/linux-study-clean/drivers/ufs/core/ufs-fault-injection.h

File Facts

System
Linux kernel
Corpus path
drivers/ufs/core/ufs-fault-injection.h
Extension
.h
Size
629 bytes
Lines
32
Domain
Driver Families
Bucket
drivers/ufs
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

#ifndef _UFS_FAULT_INJECTION_H
#define _UFS_FAULT_INJECTION_H

#include <linux/kconfig.h>
#include <linux/types.h>

struct ufs_hba;

#ifdef CONFIG_SCSI_UFS_FAULT_INJECTION
void ufs_fault_inject_hba_init(struct ufs_hba *hba);
bool ufs_trigger_eh(struct ufs_hba *hba);
bool ufs_fail_completion(struct ufs_hba *hba);
#else
static inline void ufs_fault_inject_hba_init(struct ufs_hba *hba)
{
}

static inline bool ufs_trigger_eh(struct ufs_hba *hba)
{
	return false;
}

static inline bool ufs_fail_completion(struct ufs_hba *hba)
{
	return false;
}
#endif

#endif /* _UFS_FAULT_INJECTION_H */

Annotation

Implementation Notes