Lines Matching refs:req
66 static int macio_send_request(struct adb_request *req, int sync);
165 static int macio_send_request(struct adb_request *req, int sync) in macio_send_request() argument
170 if (req->data[0] != ADB_PACKET) in macio_send_request()
173 for (i = 0; i < req->nbytes - 1; ++i) in macio_send_request()
174 req->data[i] = req->data[i+1]; in macio_send_request()
175 --req->nbytes; in macio_send_request()
177 req->next = 0; in macio_send_request()
178 req->sent = 0; in macio_send_request()
179 req->complete = 0; in macio_send_request()
180 req->reply_len = 0; in macio_send_request()
184 last_req->next = req; in macio_send_request()
185 last_req = req; in macio_send_request()
187 current_req = last_req = req; in macio_send_request()
193 while (!req->complete) in macio_send_request()
203 struct adb_request *req; in macio_adb_interrupt() local
211 if ((req = current_req) != 0) { in macio_adb_interrupt()
213 for (i = 0; i < req->nbytes; ++i) in macio_adb_interrupt()
214 out_8(&adb->data[i].r, req->data[i]); in macio_adb_interrupt()
215 out_8(&adb->dcount.r, req->nbytes & HMB); in macio_adb_interrupt()
216 req->sent = 1; in macio_adb_interrupt()
217 if (req->reply_expected) { in macio_adb_interrupt()
221 current_req = req->next; in macio_adb_interrupt()
234 req = current_req; in macio_adb_interrupt()
236 req->reply_len = in_8(&adb->dcount.r) & HMB; in macio_adb_interrupt()
237 for (i = 0; i < req->reply_len; ++i) in macio_adb_interrupt()
238 req->reply[i] = in_8(&adb->data[i].r); in macio_adb_interrupt()
240 current_req = req->next; in macio_adb_interrupt()
256 if (complete && req) { in macio_adb_interrupt()
257 void (*done)(struct adb_request *) = req->done; in macio_adb_interrupt()
259 req->complete = 1; in macio_adb_interrupt()
264 (*done)(req); in macio_adb_interrupt()