equal
deleted
inserted
replaced
39 |
39 |
40 #include <linux/module.h> |
40 #include <linux/module.h> |
41 #include <linux/jiffies.h> |
41 #include <linux/jiffies.h> |
42 |
42 |
43 #include "foe_request.h" |
43 #include "foe_request.h" |
|
44 #include "foe.h" |
44 |
45 |
45 /*****************************************************************************/ |
46 /*****************************************************************************/ |
46 |
47 |
47 /** Default timeout in ms to wait for FoE transfer responses. |
48 /** Default timeout in ms to wait for FoE transfer responses. |
48 */ |
49 */ |
66 req->data_size = 0; |
67 req->data_size = 0; |
67 req->dir = EC_DIR_INVALID; |
68 req->dir = EC_DIR_INVALID; |
68 req->issue_timeout = 0; // no timeout |
69 req->issue_timeout = 0; // no timeout |
69 req->response_timeout = EC_FOE_REQUEST_RESPONSE_TIMEOUT; |
70 req->response_timeout = EC_FOE_REQUEST_RESPONSE_TIMEOUT; |
70 req->state = EC_INT_REQUEST_INIT; |
71 req->state = EC_INT_REQUEST_INIT; |
71 req->abort_code = 0x00000000; |
72 req->result = FOE_BUSY; |
|
73 req->error_code = 0x00000000; |
72 } |
74 } |
73 |
75 |
74 /*****************************************************************************/ |
76 /*****************************************************************************/ |
75 |
77 |
76 /** FoE request destructor. |
78 /** FoE request destructor. |
182 |
184 |
183 void ec_foe_request_read(ec_foe_request_t *req) |
185 void ec_foe_request_read(ec_foe_request_t *req) |
184 { |
186 { |
185 req->dir = EC_DIR_INPUT; |
187 req->dir = EC_DIR_INPUT; |
186 req->state = EC_INT_REQUEST_QUEUED; |
188 req->state = EC_INT_REQUEST_QUEUED; |
187 req->abort_code = 0x00000000; |
189 req->result = FOE_BUSY; |
188 req->jiffies_start = jiffies; |
190 req->jiffies_start = jiffies; |
189 } |
191 } |
190 |
192 |
191 /*****************************************************************************/ |
193 /*****************************************************************************/ |
192 |
194 |
193 void ec_foe_request_write(ec_foe_request_t *req) |
195 void ec_foe_request_write(ec_foe_request_t *req) |
194 { |
196 { |
195 req->dir = EC_DIR_OUTPUT; |
197 req->dir = EC_DIR_OUTPUT; |
196 req->state = EC_INT_REQUEST_QUEUED; |
198 req->state = EC_INT_REQUEST_QUEUED; |
197 req->abort_code = 0x00000000; |
199 req->result = FOE_BUSY; |
198 req->jiffies_start = jiffies; |
200 req->jiffies_start = jiffies; |
199 } |
201 } |
200 |
202 |
201 /*****************************************************************************/ |
203 /*****************************************************************************/ |