Lines Matching refs:towrite
951 unsigned long towrite = 0; in ptp_write_func() local
967 towrite = size - curwrite; in ptp_write_func()
968 if (towrite > CONTEXT_BLOCK_SIZE) { in ptp_write_func()
969 towrite = CONTEXT_BLOCK_SIZE; in ptp_write_func()
972 if (towrite > ptp_usb->outep_maxpacket && towrite % ptp_usb->outep_maxpacket != 0) { in ptp_write_func()
973 towrite -= towrite % ptp_usb->outep_maxpacket; in ptp_write_func()
976 int getfunc_ret = handler->getfunc(NULL, handler->priv, towrite, bytes, &towrite); in ptp_write_func()
979 while (usbwritten < towrite) { in ptp_write_func()
989 bulk.length = towrite - usbwritten; in ptp_write_func()
1025 if (xwritten < towrite) /* short writes happen */ in ptp_write_func()
1035 if ((towrite % ptp_usb->outep_maxpacket) == 0) { in ptp_write_func()
1165 unsigned long towrite; in ptp_usb_sendreq() local
1181 towrite = PTP_USB_BULK_REQ_LEN - (sizeof (uint32_t)*(5 - req->Nparam)); in ptp_usb_sendreq()
1182 ptp_init_send_memory_handler(&memhandler, (unsigned char*) &usbreq, towrite); in ptp_usb_sendreq()
1184 towrite, in ptp_usb_sendreq()
1193 if (written != towrite && ret != PTP_ERROR_CANCEL && ret != PTP_ERROR_IO) { in ptp_usb_sendreq()
1196 req->Code, written, towrite in ptp_usb_sendreq()