• Home
  • Raw
  • Download

Lines Matching refs:udev

124 get_bw_info(struct xhci_hcd_mtk *mtk, struct usb_device *udev,  in get_bw_info()  argument
131 virt_dev = xhci->devs[udev->slot_id]; in get_bw_info()
133 WARN_ONCE(1, "%s invalid real_port\n", dev_name(&udev->dev)); in get_bw_info()
137 if (udev->speed >= USB_SPEED_SUPER) { in get_bw_info()
161 static struct mu3h_sch_tt *find_tt(struct usb_device *udev) in find_tt() argument
163 struct usb_tt *utt = udev->tt; in find_tt()
186 ptt = &tt_index[udev->ttport - 1]; in find_tt()
209 static void drop_tt(struct usb_device *udev) in drop_tt() argument
211 struct usb_tt *utt = udev->tt; in drop_tt()
221 ptt = &tt_index[udev->ttport - 1]; in drop_tt()
244 create_sch_ep(struct xhci_hcd_mtk *mtk, struct usb_device *udev, in create_sch_ep() argument
253 bw_info = get_bw_info(mtk, udev, ep); in create_sch_ep()
257 if (is_fs_or_ls(udev->speed)) in create_sch_ep()
259 else if ((udev->speed >= USB_SPEED_SUPER) in create_sch_ep()
271 if (is_fs_or_ls(udev->speed)) { in create_sch_ep()
272 tt = find_tt(udev); in create_sch_ep()
282 sch_ep->speed = udev->speed; in create_sch_ep()
611 static void destroy_sch_ep(struct xhci_hcd_mtk *mtk, struct usb_device *udev, in destroy_sch_ep() argument
619 drop_tt(udev); in destroy_sch_ep()
626 static bool need_bw_sch(struct usb_device *udev, in need_bw_sch() argument
629 bool has_tt = udev->tt && udev->tt->hub->parent; in need_bw_sch()
641 if (is_fs_or_ls(udev->speed) && !has_tt) in need_bw_sch()
677 static int add_ep_quirk(struct usb_hcd *hcd, struct usb_device *udev, in add_ep_quirk() argument
687 virt_dev = xhci->devs[udev->slot_id]; in add_ep_quirk()
691 if (!need_bw_sch(udev, ep)) { in add_ep_quirk()
703 xhci_dbg(xhci, "%s %s\n", __func__, decode_ep(ep, udev->speed)); in add_ep_quirk()
705 sch_ep = create_sch_ep(mtk, udev, ep, ep_ctx); in add_ep_quirk()
717 static void drop_ep_quirk(struct usb_hcd *hcd, struct usb_device *udev, in drop_ep_quirk() argument
725 if (!need_bw_sch(udev, ep)) in drop_ep_quirk()
728 xhci_err(xhci, "%s %s\n", __func__, decode_ep(ep, udev->speed)); in drop_ep_quirk()
733 destroy_sch_ep(mtk, udev, sch_ep); in drop_ep_quirk()
739 int xhci_mtk_check_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) in xhci_mtk_check_bandwidth() argument
743 struct xhci_virt_device *virt_dev = xhci->devs[udev->slot_id]; in xhci_mtk_check_bandwidth()
747 xhci_dbg(xhci, "%s() udev %s\n", __func__, dev_name(&udev->dev)); in xhci_mtk_check_bandwidth()
773 ret = xhci_check_bandwidth(hcd, udev); in xhci_mtk_check_bandwidth()
780 void xhci_mtk_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev) in xhci_mtk_reset_bandwidth() argument
786 xhci_dbg(xhci, "%s() udev %s\n", __func__, dev_name(&udev->dev)); in xhci_mtk_reset_bandwidth()
789 destroy_sch_ep(mtk, udev, sch_ep); in xhci_mtk_reset_bandwidth()
791 xhci_reset_bandwidth(hcd, udev); in xhci_mtk_reset_bandwidth()
794 int xhci_mtk_add_ep(struct usb_hcd *hcd, struct usb_device *udev, in xhci_mtk_add_ep() argument
799 ret = xhci_add_endpoint(hcd, udev, ep); in xhci_mtk_add_ep()
804 ret = add_ep_quirk(hcd, udev, ep); in xhci_mtk_add_ep()
809 int xhci_mtk_drop_ep(struct usb_hcd *hcd, struct usb_device *udev, in xhci_mtk_drop_ep() argument
814 ret = xhci_drop_endpoint(hcd, udev, ep); in xhci_mtk_drop_ep()
819 drop_ep_quirk(hcd, udev, ep); in xhci_mtk_drop_ep()