Lines Matching refs:towrite
968 unsigned long towrite = 0; in ptp_write_func() local
980 towrite = size-curwrite; in ptp_write_func()
981 if (towrite > CONTEXT_BLOCK_SIZE) { in ptp_write_func()
982 towrite = CONTEXT_BLOCK_SIZE; in ptp_write_func()
985 if (towrite > ptp_usb->outep_maxpacket && towrite % ptp_usb->outep_maxpacket != 0) { in ptp_write_func()
986 towrite -= towrite % ptp_usb->outep_maxpacket; in ptp_write_func()
989 int getfunc_ret = handler->getfunc(NULL, handler->priv,towrite,bytes,&towrite); in ptp_write_func()
992 while (usbwritten < towrite) { in ptp_write_func()
996 towrite-usbwritten, in ptp_write_func()
1028 if (result < towrite) /* short writes happen */ in ptp_write_func()
1038 if ((towrite % ptp_usb->outep_maxpacket) == 0) { in ptp_write_func()
1157 unsigned long towrite; in ptp_usb_sendreq() local
1173 towrite = PTP_USB_BULK_REQ_LEN-(sizeof(uint32_t)*(5-req->Nparam)); in ptp_usb_sendreq()
1174 ptp_init_send_memory_handler (&memhandler, (unsigned char*)&usbreq, towrite); in ptp_usb_sendreq()
1176 towrite, in ptp_usb_sendreq()
1185 if (written != towrite && ret != PTP_ERROR_CANCEL && ret != PTP_ERROR_IO) { in ptp_usb_sendreq()
1188 req->Code, written, towrite in ptp_usb_sendreq()