@@ -83,39 +83,39 @@ static inline int ap_test_bit(unsigned int *ptr, unsigned int nr)
83
83
#define AP_INTR_ENABLED 1 /* AP interrupt enabled */
84
84
85
85
/*
86
- * AP device states
86
+ * AP queue state machine states
87
87
*/
88
- enum ap_state {
89
- AP_STATE_RESET_START ,
90
- AP_STATE_RESET_WAIT ,
91
- AP_STATE_SETIRQ_WAIT ,
92
- AP_STATE_IDLE ,
93
- AP_STATE_WORKING ,
94
- AP_STATE_QUEUE_FULL ,
95
- AP_STATE_REMOVE , /* about to be removed from driver */
96
- AP_STATE_UNBOUND , /* momentary not bound to a driver */
97
- AP_STATE_BORKED , /* broken */
98
- NR_AP_STATES
88
+ enum ap_sm_state {
89
+ AP_SM_STATE_RESET_START ,
90
+ AP_SM_STATE_RESET_WAIT ,
91
+ AP_SM_STATE_SETIRQ_WAIT ,
92
+ AP_SM_STATE_IDLE ,
93
+ AP_SM_STATE_WORKING ,
94
+ AP_SM_STATE_QUEUE_FULL ,
95
+ AP_SM_STATE_REMOVE , /* about to be removed from driver */
96
+ AP_SM_STATE_UNBOUND , /* momentary not bound to a driver */
97
+ AP_SM_STATE_BORKED , /* broken */
98
+ NR_AP_SM_STATES
99
99
};
100
100
101
101
/*
102
- * AP device events
102
+ * AP queue state machine events
103
103
*/
104
- enum ap_event {
105
- AP_EVENT_POLL ,
106
- AP_EVENT_TIMEOUT ,
107
- NR_AP_EVENTS
104
+ enum ap_sm_event {
105
+ AP_SM_EVENT_POLL ,
106
+ AP_SM_EVENT_TIMEOUT ,
107
+ NR_AP_SM_EVENTS
108
108
};
109
109
110
110
/*
111
- * AP wait behaviour
111
+ * AP queue state wait behaviour
112
112
*/
113
- enum ap_wait {
114
- AP_WAIT_AGAIN , /* retry immediately */
115
- AP_WAIT_TIMEOUT , /* wait for timeout */
116
- AP_WAIT_INTERRUPT , /* wait for thin interrupt (if available) */
117
- AP_WAIT_NONE , /* no wait */
118
- NR_AP_WAIT
113
+ enum ap_sm_wait {
114
+ AP_SM_WAIT_AGAIN , /* retry immediately */
115
+ AP_SM_WAIT_TIMEOUT , /* wait for timeout */
116
+ AP_SM_WAIT_INTERRUPT , /* wait for thin interrupt (if available) */
117
+ AP_SM_WAIT_NONE , /* no wait */
118
+ NR_AP_SM_WAIT
119
119
};
120
120
121
121
struct ap_device ;
@@ -172,7 +172,7 @@ struct ap_queue {
172
172
ap_qid_t qid ; /* AP queue id. */
173
173
int interrupt ; /* indicate if interrupts are enabled */
174
174
int queue_count ; /* # messages currently on AP queue. */
175
- enum ap_state state ; /* State of the AP device. */
175
+ enum ap_sm_state sm_state ; /* ap queue state machine state */
176
176
int pendingq_count ; /* # requests on pendingq list. */
177
177
int requestq_count ; /* # requests on requestq list. */
178
178
u64 total_request_count ; /* # requests ever for this AP device.*/
@@ -185,7 +185,7 @@ struct ap_queue {
185
185
186
186
#define to_ap_queue (x ) container_of((x), struct ap_queue, ap_dev.device)
187
187
188
- typedef enum ap_wait (ap_func_t )(struct ap_queue * queue );
188
+ typedef enum ap_sm_wait (ap_func_t )(struct ap_queue * queue );
189
189
190
190
struct ap_message {
191
191
struct list_head list ; /* Request queueing. */
@@ -231,15 +231,15 @@ static inline void ap_release_message(struct ap_message *ap_msg)
231
231
int ap_send (ap_qid_t , unsigned long long , void * , size_t );
232
232
int ap_recv (ap_qid_t , unsigned long long * , void * , size_t );
233
233
234
- enum ap_wait ap_sm_event (struct ap_queue * aq , enum ap_event event );
235
- enum ap_wait ap_sm_event_loop (struct ap_queue * aq , enum ap_event event );
234
+ enum ap_sm_wait ap_sm_event (struct ap_queue * aq , enum ap_sm_event event );
235
+ enum ap_sm_wait ap_sm_event_loop (struct ap_queue * aq , enum ap_sm_event event );
236
236
237
237
void ap_queue_message (struct ap_queue * aq , struct ap_message * ap_msg );
238
238
void ap_cancel_message (struct ap_queue * aq , struct ap_message * ap_msg );
239
239
void ap_flush_queue (struct ap_queue * aq );
240
240
241
241
void * ap_airq_ptr (void );
242
- void ap_wait (enum ap_wait wait );
242
+ void ap_wait (enum ap_sm_wait wait );
243
243
void ap_request_timeout (struct timer_list * t );
244
244
void ap_bus_force_rescan (void );
245
245
0 commit comments