Lines Matching defs:read
390 D("about to read (fd=%d, len=%d)", h->bulk_out, len);
408 static int usb_ffs_do_aio(usb_handle* h, const void* data, int len, bool read) {
409 aio_block* aiob = read ? &h->read_aiob : &h->write_aiob;
423 io_prep(&aiob->iocb[i], aiob->fd, cur_data, buf_len, 0, read);
428 if (len == 0 && buf_len % packet_size == 0 && read) {
430 // but the host *does* send a zero packet for the device to read.
436 packet_size, 0, read);
442 PLOG(ERROR) << "aio: got error submitting " << (read ? "read" : "write");
447 PLOG(ERROR) << "aio: got error waiting " << (read ? "read" : "write");
456 PLOG(ERROR) << "aio: got error event on " << (read ? "read" : "write")
520 h->read = usb_ffs_read;
523 h->read = usb_ffs_aio_read;
545 return h->read(h, data, len);