Lines Matching refs:urb
161 static void free_urb_priv(struct fhci_hcd *fhci, struct urb *urb)
164 struct urb_priv *urb_priv = urb->hcpriv;
180 urb->hcpriv = NULL;
189 void fhci_urb_complete_free(struct fhci_hcd *fhci, struct urb *urb)
191 free_urb_priv(fhci, urb);
193 if (urb->status == -EINPROGRESS) {
194 if (urb->actual_length != urb->transfer_buffer_length &&
195 urb->transfer_flags & URB_SHORT_NOT_OK)
196 urb->status = -EREMOTEIO;
198 urb->status = 0;
201 usb_hcd_unlink_urb_from_ep(fhci_to_hcd(fhci), urb);
205 usb_hcd_giveback_urb(fhci_to_hcd(fhci), urb, urb->status);
211 * caculate transfer length/stats and update the urb
212 * Precondition: irqsafe(only for urb-?status locking)
214 void fhci_done_td(struct urb *urb, struct td *td)
222 if (!(urb->transfer_flags & URB_SHORT_NOT_OK &&
226 if (usb_pipeout(urb->pipe))
227 len = urb->iso_frame_desc[td->iso_index].length;
231 urb->actual_length += len;
232 urb->iso_frame_desc[td->iso_index].actual_length = len;
233 urb->iso_frame_desc[td->iso_index].status =
243 urb->error_count = 3;
248 if (!(urb->transfer_flags & URB_SHORT_NOT_OK) &&
254 if (urb->status == -EINPROGRESS)
255 urb->status = status_to_error(cc);
260 urb->actual_length += td->actual_len;
268 struct urb *urb = td->urb;
269 struct urb_priv *urb_priv = urb->hcpriv;
275 fhci_done_td(urb, td);
279 fhci_urb_complete_free(fhci, urb);