Lines Matching refs:req

83 static int maciisi_send_request(struct adb_request* req, int sync);
84 static void maciisi_sync(struct adb_request *req);
85 static int maciisi_write(struct adb_request* req);
230 maciisi_send_request(struct adb_request* req, int sync) in maciisi_send_request() argument
239 req->complete = 1; in maciisi_send_request()
246 for (i = 0; i < req->nbytes; i++) { in maciisi_send_request()
247 printk(" %.2x", req->data[i]); in maciisi_send_request()
253 req->reply_expected = 1; in maciisi_send_request()
255 i = maciisi_write(req); in maciisi_send_request()
272 maciisi_sync(req); in maciisi_send_request()
278 static void maciisi_sync(struct adb_request *req) in maciisi_sync() argument
287 while (!req->complete && count++ < 50) { in maciisi_sync()
298 maciisi_write(struct adb_request* req) in maciisi_write() argument
305 if (req->nbytes < 2 || req->data[0] > CUDA_PACKET) { in maciisi_write()
307 req->complete = 1; in maciisi_write()
310 req->next = 0; in maciisi_write()
311 req->sent = 0; in maciisi_write()
312 req->complete = 0; in maciisi_write()
313 req->reply_len = 0; in maciisi_write()
319 last_req->next = req; in maciisi_write()
320 last_req = req; in maciisi_write()
322 current_req = req; in maciisi_write()
323 last_req = req; in maciisi_write()
351 struct adb_request* req; in maciisi_start() local
366 req = current_req; in maciisi_start()
367 if (req == NULL) in maciisi_start()
390 via[SR] = req->data[0]; in maciisi_start()
422 struct adb_request *req; in maciisi_interrupt() local
478 req = current_req; in maciisi_interrupt()
498 if (data_index >= req->nbytes) { in maciisi_interrupt()
505 req->sent = 1; in maciisi_interrupt()
507 if (req->reply_expected) { in maciisi_interrupt()
512 current_req = req->next; in maciisi_interrupt()
513 if (req->done) in maciisi_interrupt()
514 (*req->done)(req); in maciisi_interrupt()
529 via[SR] = req->data[data_index++]; in maciisi_interrupt()
570 req = current_req; in maciisi_interrupt()
571 req->reply_len = reply_ptr - req->reply; in maciisi_interrupt()
572 if (req->data[0] == ADB_PACKET) { in maciisi_interrupt()
574 if (req->reply_len <= 2 || (req->reply[1] & 2) != 0) { in maciisi_interrupt()
576 req->reply_len = 0; in maciisi_interrupt()
579 req->reply_len -= 2; in maciisi_interrupt()
580 memmove(req->reply, req->reply + 2, req->reply_len); in maciisi_interrupt()
587 for (i = 0; i < req->reply_len; ++i) in maciisi_interrupt()
588 printk(" %.2x", req->reply[i]); in maciisi_interrupt()
592 req->complete = 1; in maciisi_interrupt()
593 current_req = req->next; in maciisi_interrupt()
594 if (req->done) in maciisi_interrupt()
595 (*req->done)(req); in maciisi_interrupt()