Lines Matching defs:udev

1333 xhci_set_address(struct usb_device *udev, struct mtx *mtx, uint16_t address)
1337 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
1347 if (udev->parent_hub == NULL)
1350 index = udev->controller_slot_id;
1366 (void)xhci_configure_mask(udev, 3, 0);
1369 err = xhci_configure_device(udev);
1377 switch (udev->speed) {
1390 pepext = xhci_get_endpoint_ext(udev,
1391 &udev->ctrl_ep_desc);
1394 USB_BUS_LOCK(udev->bus);
1397 USB_BUS_UNLOCK(udev->bus);
1399 err = xhci_configure_endpoint(udev,
1400 &udev->ctrl_ep_desc, pepext,
1436 udev->address = XHCI_SCTX_3_DEV_ADDR_GET(temp);
2022 switch (usbd_get_speed(xfer->xroot->udev)) {
2237 xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop)
2239 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
2246 index = udev->controller_slot_id;
2293 xhci_configure_endpoint(struct usb_device *udev,
2300 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
2308 index = udev->controller_slot_id;
2354 switch (udev->speed) {
2373 switch (udev->speed) {
2458 pepext = xhci_get_endpoint_ext(xfer->xroot->udev,
2486 return (xhci_configure_endpoint(xfer->xroot->udev,
2495 xhci_configure_device(struct usb_device *udev)
2497 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
2509 index = udev->controller_slot_id;
2524 for (hubdev = udev; hubdev != NULL; hubdev = hubdev->parent_hub) {
2553 switch (udev->speed) {
2556 if ((udev->parent_hs_hub != NULL) &&
2557 (udev->parent_hs_hub->ddesc.bDeviceProtocol ==
2566 (udev->ddesc.bDeviceProtocol == UDPROTO_HSHUBMTT)) {
2573 if ((udev->parent_hs_hub != NULL) &&
2574 (udev->parent_hs_hub->ddesc.bDeviceProtocol ==
2586 (udev->speed == USB_SPEED_SUPER ||
2587 udev->speed == USB_SPEED_HIGH);
2601 switch (udev->speed) {
2627 hubdev = udev->parent_hs_hub;
2630 switch (udev->speed) {
2637 udev->hs_port_no);
2664 xhci_alloc_device_ext(struct usb_device *udev)
2666 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
2676 index = udev->controller_slot_id;
2741 xhci_free_device_ext(udev);
2747 xhci_free_device_ext(struct usb_device *udev)
2749 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
2753 index = udev->controller_slot_id;
2763 xhci_get_endpoint_ext(struct usb_device *udev, struct usb_endpoint_descriptor *edesc)
2765 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
2778 index = udev->controller_slot_id;
2804 index = xfer->xroot->udev->controller_slot_id;
2806 if (xfer->xroot->udev->flags.self_suspended == 0) {
2820 pepext = xhci_get_endpoint_ext(xfer->xroot->udev,
2857 pepext = xhci_get_endpoint_ext(xfer->xroot->udev,
3027 switch (xfer->xroot->udev->speed) {
3044 switch (xfer->xroot->udev->speed) {
3230 xhci_roothub_exec(struct usb_device *udev,
3233 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
3762 struct usb_device *udev;
3771 pepext = xhci_get_endpoint_ext(xfer->xroot->udev,
3774 udev = xfer->xroot->udev;
3775 index = udev->controller_slot_id;
3833 (void)xhci_configure_mask(udev, (1U << epno) | 1U, 0);
3877 pepext = xhci_get_endpoint_ext(xfer->xroot->udev,
3947 xhci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc,
3953 ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode);
3955 if (udev->parent_hub == NULL) {
3962 pepext = xhci_get_endpoint_ext(udev, edesc);
3964 USB_BUS_LOCK(udev->bus);
3967 USB_BUS_UNLOCK(udev->bus);
3971 xhci_ep_uninit(struct usb_device *udev, struct usb_endpoint *ep)
3977 xhci_ep_clear_stall(struct usb_device *udev, struct usb_endpoint *ep)
3983 if (udev->flags.usb_mode != USB_MODE_HOST) {
3987 if (udev->parent_hub == NULL) {
3992 pepext = xhci_get_endpoint_ext(udev, ep->edesc);
3994 USB_BUS_LOCK(udev->bus);
3997 USB_BUS_UNLOCK(udev->bus);
4001 xhci_device_init(struct usb_device *udev)
4003 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
4008 if (udev->parent_hub == NULL)
4015 udev->controller_slot_id = sc->sc_noslot + 1;
4039 udev->controller_slot_id = temp;
4049 err = xhci_alloc_device_ext(udev);
4056 err = xhci_set_address(udev, NULL, 0);
4062 xhci_device_uninit(struct usb_device *udev)
4064 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
4068 if (udev->parent_hub == NULL)
4073 index = udev->controller_slot_id;
4080 xhci_free_device_ext(udev);
4087 xhci_get_dma_delay(struct usb_device *udev, uint32_t *pus)
4097 xhci_device_resume(struct usb_device *udev)
4099 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
4107 if (udev->parent_hub == NULL)
4110 index = udev->controller_slot_id;
4116 USB_BUS_LOCK(udev->bus);
4125 USB_BUS_UNLOCK(udev->bus);
4131 xhci_device_suspend(struct usb_device *udev)
4133 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
4141 if (udev->parent_hub == NULL)
4144 index = udev->controller_slot_id;
4168 xhci_device_state_change(struct usb_device *udev)
4170 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus);
4176 if (udev->parent_hub == NULL)
4179 index = udev->controller_slot_id;
4183 if (usb_get_device_state(udev) == USB_STATE_CONFIGURED) {
4184 err = uhub_query_info(udev, &sc->sc_hw.devs[index].nports,
4192 switch (usb_get_device_state(udev)) {
4218 (void)xhci_configure_mask(udev, 1, 0);
4240 (void)xhci_configure_mask(udev, 3, 0);
4242 err = xhci_configure_device(udev);
4262 xhci_set_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep,
4271 (udev->speed != USB_SPEED_SUPER))