Lines Matching refs:udev

366 static void giveback_first_trb(struct usb_device *udev, int ep_index,  in giveback_first_trb()  argument
370 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in giveback_first_trb()
384 xhci_writel(&ctrl->dba->doorbell[udev->slot_id], in giveback_first_trb()
492 static void abort_td(struct usb_device *udev, int ep_index) in abort_td() argument
494 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in abort_td()
495 struct xhci_ring *ring = ctrl->devs[udev->slot_id]->eps[ep_index].ring; in abort_td()
499 xhci_queue_command(ctrl, NULL, udev->slot_id, ep_index, TRB_STOP_RING); in abort_td()
503 BUG_ON(TRB_TO_SLOT_ID(field) != udev->slot_id); in abort_td()
511 != udev->slot_id || GET_COMP_CODE(le32_to_cpu( in abort_td()
516 ring->cycle_state), udev->slot_id, ep_index, TRB_SET_DEQ); in abort_td()
519 != udev->slot_id || GET_COMP_CODE(le32_to_cpu( in abort_td()
524 static void record_transfer_result(struct usb_device *udev, in record_transfer_result() argument
527 udev->act_len = min(length, length - in record_transfer_result()
532 BUG_ON(udev->act_len != length); in record_transfer_result()
535 udev->status = 0; in record_transfer_result()
538 udev->status = USB_ST_STALLED; in record_transfer_result()
542 udev->status = USB_ST_BUF_ERR; in record_transfer_result()
545 udev->status = USB_ST_BABBLE_DET; in record_transfer_result()
548 udev->status = 0x80; /* USB_ST_TOO_LAZY_TO_MAKE_A_NEW_MACRO */ in record_transfer_result()
562 int xhci_bulk_tx(struct usb_device *udev, unsigned long pipe, in xhci_bulk_tx() argument
571 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in xhci_bulk_tx()
572 int slot_id = udev->slot_id; in xhci_bulk_tx()
590 udev, pipe, buffer, length); in xhci_bulk_tx()
645 maxpacketsize = usb_maxpacket(udev, pipe); in xhci_bulk_tx()
717 giveback_first_trb(udev, ep_index, start_cycle, start_trb); in xhci_bulk_tx()
723 abort_td(udev, ep_index); in xhci_bulk_tx()
724 udev->status = USB_ST_NAK_REC; /* closest thing to a timeout */ in xhci_bulk_tx()
725 udev->act_len = 0; in xhci_bulk_tx()
741 record_transfer_result(udev, event, available_length); in xhci_bulk_tx()
745 return (udev->status != USB_ST_NOT_PROC) ? 0 : -1; in xhci_bulk_tx()
758 int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe, in xhci_ctrl_tx() argument
769 struct xhci_ctrl *ctrl = xhci_get_ctrl(udev); in xhci_ctrl_tx()
770 int slot_id = udev->slot_id; in xhci_ctrl_tx()
792 if (udev->speed == USB_SPEED_FULL) { in xhci_ctrl_tx()
793 ret = xhci_check_maxpacket(udev); in xhci_ctrl_tx()
879 usb_maxpacket(udev, pipe), true); in xhci_ctrl_tx()
922 giveback_first_trb(udev, ep_index, start_cycle, start_trb); in xhci_ctrl_tx()
932 record_transfer_result(udev, event, length); in xhci_ctrl_tx()
950 return (udev->status != USB_ST_NOT_PROC) ? 0 : -1; in xhci_ctrl_tx()
954 abort_td(udev, ep_index); in xhci_ctrl_tx()
955 udev->status = USB_ST_NAK_REC; in xhci_ctrl_tx()
956 udev->act_len = 0; in xhci_ctrl_tx()