drivers/scsi/isci/isci.h

Source file repositories/reference/linux-study-clean/drivers/scsi/isci/isci.h

File Facts

System
Linux kernel
Corpus path
drivers/scsi/isci/isci.h
Extension
.h
Size
18504 bytes
Lines
531
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct sci_timer {
	struct timer_list	timer;
	bool			cancel;
};

static inline
void sci_init_timer(struct sci_timer *tmr, void (*fn)(struct timer_list *t))
{
	tmr->cancel = false;
	timer_setup(&tmr->timer, fn, 0);
}

static inline void sci_mod_timer(struct sci_timer *tmr, unsigned long msec)
{
	tmr->cancel = false;
	mod_timer(&tmr->timer, jiffies + msecs_to_jiffies(msec));
}

static inline void sci_del_timer(struct sci_timer *tmr)
{
	tmr->cancel = true;
	timer_delete(&tmr->timer);
}

struct sci_base_state_machine {
	const struct sci_base_state *state_table;
	u32 initial_state_id;
	u32 current_state_id;
	u32 previous_state_id;
};

typedef void (*sci_state_transition_t)(struct sci_base_state_machine *sm);

struct sci_base_state {
	sci_state_transition_t enter_state;	/* Called on state entry */
	sci_state_transition_t exit_state;	/* Called on state exit */
};

extern void sci_init_sm(struct sci_base_state_machine *sm,
			const struct sci_base_state *state_table,
			u32 initial_state);
extern void sci_change_state(struct sci_base_state_machine *sm, u32 next_state);
#endif  /* __ISCI_H__ */

Annotation

Implementation Notes