Lines Matching refs:itransfer
139 haiku_submit_transfer(struct usbi_transfer *itransfer) in haiku_submit_transfer() argument
141 struct libusb_transfer *fLibusbTransfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in haiku_submit_transfer()
143 return fDeviceHandle->SubmitTransfer(itransfer); in haiku_submit_transfer()
147 haiku_cancel_transfer(struct usbi_transfer *itransfer) in haiku_cancel_transfer() argument
149 struct libusb_transfer *fLibusbTransfer = USBI_TRANSFER_TO_LIBUSB_TRANSFER(itransfer); in haiku_cancel_transfer()
151 return fDeviceHandle->CancelTransfer(*((USBTransfer **)usbi_transfer_get_os_priv(itransfer))); in haiku_cancel_transfer()
155 haiku_clear_transfer_priv(struct usbi_transfer *itransfer) in haiku_clear_transfer_priv() argument
157 USBTransfer *transfer = *((USBTransfer **)usbi_transfer_get_os_priv(itransfer)); in haiku_clear_transfer_priv()
159 *((USBTransfer **)usbi_transfer_get_os_priv(itransfer)) = NULL; in haiku_clear_transfer_priv()
163 haiku_handle_transfer_completion(struct usbi_transfer *itransfer) in haiku_handle_transfer_completion() argument
165 USBTransfer *transfer = *((USBTransfer **)usbi_transfer_get_os_priv(itransfer)); in haiku_handle_transfer_completion()
167 usbi_mutex_lock(&itransfer->lock); in haiku_handle_transfer_completion()
170 *((USBTransfer **)usbi_transfer_get_os_priv(itransfer)) = NULL; in haiku_handle_transfer_completion()
171 usbi_mutex_unlock(&itransfer->lock); in haiku_handle_transfer_completion()
172 if (itransfer->transferred < 0) in haiku_handle_transfer_completion()
173 itransfer->transferred = 0; in haiku_handle_transfer_completion()
174 return usbi_handle_transfer_cancellation(itransfer); in haiku_handle_transfer_completion()
177 if (itransfer->transferred < 0) { in haiku_handle_transfer_completion()
178 usbi_err(ITRANSFER_CTX(itransfer), "error in transfer"); in haiku_handle_transfer_completion()
180 itransfer->transferred = 0; in haiku_handle_transfer_completion()
183 *((USBTransfer **)usbi_transfer_get_os_priv(itransfer)) = NULL; in haiku_handle_transfer_completion()
184 usbi_mutex_unlock(&itransfer->lock); in haiku_handle_transfer_completion()
185 return usbi_handle_transfer_completion(itransfer, status); in haiku_handle_transfer_completion()