diff options
Diffstat (limited to 'drivers/scsi/isci/isci.h')
-rw-r--r-- | drivers/scsi/isci/isci.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/scsi/isci/isci.h b/drivers/scsi/isci/isci.h index 2fe5557d859..80cfb45f8da 100644 --- a/drivers/scsi/isci/isci.h +++ b/drivers/scsi/isci/isci.h | |||
@@ -57,6 +57,7 @@ | |||
57 | #define __ISCI_H__ | 57 | #define __ISCI_H__ |
58 | 58 | ||
59 | #include <linux/interrupt.h> | 59 | #include <linux/interrupt.h> |
60 | #include <linux/types.h> | ||
60 | 61 | ||
61 | #define DRV_NAME "isci" | 62 | #define DRV_NAME "isci" |
62 | #define SCI_PCI_BAR_COUNT 2 | 63 | #define SCI_PCI_BAR_COUNT 2 |
@@ -584,4 +585,22 @@ static inline void sci_del_timer(struct sci_timer *tmr) | |||
584 | del_timer(&tmr->timer); | 585 | del_timer(&tmr->timer); |
585 | } | 586 | } |
586 | 587 | ||
588 | struct sci_base_state_machine { | ||
589 | const struct sci_base_state *state_table; | ||
590 | u32 initial_state_id; | ||
591 | u32 current_state_id; | ||
592 | u32 previous_state_id; | ||
593 | }; | ||
594 | |||
595 | typedef void (*sci_state_transition_t)(struct sci_base_state_machine *sm); | ||
596 | |||
597 | struct sci_base_state { | ||
598 | sci_state_transition_t enter_state; /* Called on state entry */ | ||
599 | sci_state_transition_t exit_state; /* Called on state exit */ | ||
600 | }; | ||
601 | |||
602 | extern void sci_init_sm(struct sci_base_state_machine *sm, | ||
603 | const struct sci_base_state *state_table, | ||
604 | u32 initial_state); | ||
605 | extern void sci_change_state(struct sci_base_state_machine *sm, u32 next_state); | ||
587 | #endif /* __ISCI_H__ */ | 606 | #endif /* __ISCI_H__ */ |