drivers/scsi/csiostor/csio_defs.h
Source file repositories/reference/linux-study-clean/drivers/scsi/csiostor/csio_defs.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/scsi/csiostor/csio_defs.h- Extension
.h- Size
- 3644 bytes
- Lines
- 136
- Domain
- Driver Families
- Bucket
- drivers/scsi
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/kernel.hlinux/stddef.hlinux/timer.hlinux/list.hlinux/bug.hlinux/pci.hlinux/jiffies.h
Detected Declarations
struct csio_lnodestruct csio_smenum csio_ln_evfunction Copyrightfunction writeqfunction csio_list_deletedfunction csio_set_statefunction csio_init_statefunction csio_post_eventfunction csio_get_statefunction csio_match_state
Annotated Snippet
struct csio_sm {
struct list_head sm_list;
csio_sm_state_t sm_state;
};
static inline void
csio_set_state(void *smp, void *state)
{
((struct csio_sm *)smp)->sm_state = state;
}
static inline void
csio_init_state(struct csio_sm *smp, void *state)
{
csio_set_state(smp, state);
}
static inline void
csio_post_event(void *smp, uint32_t evt)
{
((struct csio_sm *)smp)->sm_state(smp, evt);
}
static inline csio_sm_state_t
csio_get_state(void *smp)
{
return ((struct csio_sm *)smp)->sm_state;
}
static inline bool
csio_match_state(void *smp, void *state)
{
return (csio_get_state(smp) == (csio_sm_state_t)state);
}
#define CSIO_ASSERT(cond) BUG_ON(!(cond))
#ifdef __CSIO_DEBUG__
#define CSIO_DB_ASSERT(__c) CSIO_ASSERT((__c))
#else
#define CSIO_DB_ASSERT(__c)
#endif
#endif /* ifndef __CSIO_DEFS_H__ */
Annotation
- Immediate include surface: `linux/kernel.h`, `linux/stddef.h`, `linux/timer.h`, `linux/list.h`, `linux/bug.h`, `linux/pci.h`, `linux/jiffies.h`.
- Detected declarations: `struct csio_lnode`, `struct csio_sm`, `enum csio_ln_ev`, `function Copyright`, `function writeq`, `function csio_list_deleted`, `function csio_set_state`, `function csio_init_state`, `function csio_post_event`, `function csio_get_state`.
- Atlas domain: Driver Families / drivers/scsi.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.