Lines Matching refs:udev

1398 xhci_set_address(struct usb_device *udev, struct mtx *mtx, uint16_t address)  in xhci_set_address()  argument
1402 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_set_address()
1412 if (udev->parent_hub == NULL) in xhci_set_address()
1415 index = udev->controller_slot_id; in xhci_set_address()
1431 xhci_configure_mask(udev, 3, 0); in xhci_set_address()
1434 err = xhci_configure_device(udev); in xhci_set_address()
1442 switch (udev->speed) { in xhci_set_address()
1455 pepext = xhci_get_endpoint_ext(udev, in xhci_set_address()
1456 &udev->ctrl_ep_desc); in xhci_set_address()
1459 USB_BUS_LOCK(udev->bus); in xhci_set_address()
1462 USB_BUS_UNLOCK(udev->bus); in xhci_set_address()
1464 err = xhci_configure_endpoint(udev, in xhci_set_address()
1465 &udev->ctrl_ep_desc, pepext, in xhci_set_address()
1501 udev->address = XHCI_SCTX_3_DEV_ADDR_GET(temp); in xhci_set_address()
2090 switch (usbd_get_speed(xfer->xroot->udev)) { in xhci_setup_generic_chain()
2304 xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop) in xhci_configure_mask() argument
2306 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_mask()
2313 index = udev->controller_slot_id; in xhci_configure_mask()
2360 xhci_configure_endpoint(struct usb_device *udev, in xhci_configure_endpoint() argument
2367 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_endpoint()
2375 index = udev->controller_slot_id; in xhci_configure_endpoint()
2421 switch (udev->speed) { in xhci_configure_endpoint()
2440 switch (udev->speed) { in xhci_configure_endpoint()
2525 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_endpoint_by_xfer()
2553 return (xhci_configure_endpoint(xfer->xroot->udev, in xhci_configure_endpoint_by_xfer()
2562 xhci_configure_device(struct usb_device *udev) in xhci_configure_device() argument
2564 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_device()
2576 index = udev->controller_slot_id; in xhci_configure_device()
2591 for (hubdev = udev; hubdev != NULL; hubdev = hubdev->parent_hub) { in xhci_configure_device()
2620 switch (udev->speed) { in xhci_configure_device()
2623 if (udev->parent_hs_hub != NULL && in xhci_configure_device()
2624 udev->parent_hs_hub->ddesc.bDeviceProtocol == in xhci_configure_device()
2633 udev->ddesc.bDeviceProtocol == UDPROTO_HSHUBMTT) { in xhci_configure_device()
2640 if (udev->parent_hs_hub != NULL && in xhci_configure_device()
2641 udev->parent_hs_hub->ddesc.bDeviceProtocol == in xhci_configure_device()
2653 (udev->speed == USB_SPEED_SUPER || in xhci_configure_device()
2654 udev->speed == USB_SPEED_HIGH); in xhci_configure_device()
2677 hubdev = udev->parent_hs_hub; in xhci_configure_device()
2680 switch (udev->speed) { in xhci_configure_device()
2687 udev->hs_port_no); in xhci_configure_device()
2714 xhci_alloc_device_ext(struct usb_device *udev) in xhci_alloc_device_ext() argument
2716 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_alloc_device_ext()
2726 index = udev->controller_slot_id; in xhci_alloc_device_ext()
2791 xhci_free_device_ext(udev); in xhci_alloc_device_ext()
2797 xhci_free_device_ext(struct usb_device *udev) in xhci_free_device_ext() argument
2799 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_free_device_ext()
2803 index = udev->controller_slot_id; in xhci_free_device_ext()
2813 xhci_get_endpoint_ext(struct usb_device *udev, struct usb_endpoint_descriptor *edesc) in xhci_get_endpoint_ext() argument
2815 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_get_endpoint_ext()
2828 index = udev->controller_slot_id; in xhci_get_endpoint_ext()
2854 index = xfer->xroot->udev->controller_slot_id; in xhci_endpoint_doorbell()
2856 if (xfer->xroot->udev->flags.self_suspended == 0) { in xhci_endpoint_doorbell()
2870 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_transfer_remove()
2907 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_transfer_insert()
3265 xhci_roothub_exec(struct usb_device *udev, in xhci_roothub_exec() argument
3268 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_roothub_exec()
3790 xhci_get_endpoint_state(struct usb_device *udev, uint8_t epno) in xhci_get_endpoint_state() argument
3792 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_get_endpoint_state()
3800 hdev = &sc->sc_hw.devs[udev->controller_slot_id]; in xhci_get_endpoint_state()
3816 struct usb_device *udev; in xhci_configure_reset_endpoint() local
3827 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_reset_endpoint()
3830 udev = xfer->xroot->udev; in xhci_configure_reset_endpoint()
3831 index = udev->controller_slot_id; in xhci_configure_reset_endpoint()
3865 switch (xhci_get_endpoint_state(udev, epno)) { in xhci_configure_reset_endpoint()
3910 xhci_configure_mask(udev, mask, 1); in xhci_configure_reset_endpoint()
3924 xhci_configure_mask(udev, mask | 1U, 0); in xhci_configure_reset_endpoint()
3972 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_msg()
4042 xhci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, in xhci_ep_init() argument
4051 ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode); in xhci_ep_init()
4053 if (udev->parent_hub == NULL) { in xhci_ep_init()
4060 pepext = xhci_get_endpoint_ext(udev, edesc); in xhci_ep_init()
4062 USB_BUS_LOCK(udev->bus); in xhci_ep_init()
4072 sc = XHCI_BUS2SC(udev->bus); in xhci_ep_init()
4073 index = udev->controller_slot_id; in xhci_ep_init()
4077 USB_BUS_UNLOCK(udev->bus); in xhci_ep_init()
4081 xhci_ep_uninit(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_uninit() argument
4087 xhci_ep_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_clear_stall() argument
4093 if (udev->flags.usb_mode != USB_MODE_HOST) { in xhci_ep_clear_stall()
4097 if (udev->parent_hub == NULL) { in xhci_ep_clear_stall()
4102 pepext = xhci_get_endpoint_ext(udev, ep->edesc); in xhci_ep_clear_stall()
4104 USB_BUS_LOCK(udev->bus); in xhci_ep_clear_stall()
4107 USB_BUS_UNLOCK(udev->bus); in xhci_ep_clear_stall()
4111 xhci_device_init(struct usb_device *udev) in xhci_device_init() argument
4113 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_init()
4118 if (udev->parent_hub == NULL) in xhci_device_init()
4125 udev->controller_slot_id = sc->sc_noslot + 1; in xhci_device_init()
4149 udev->controller_slot_id = temp; in xhci_device_init()
4159 err = xhci_alloc_device_ext(udev); in xhci_device_init()
4166 err = xhci_set_address(udev, NULL, 0); in xhci_device_init()
4172 xhci_device_uninit(struct usb_device *udev) in xhci_device_uninit() argument
4174 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_uninit()
4178 if (udev->parent_hub == NULL) in xhci_device_uninit()
4183 index = udev->controller_slot_id; in xhci_device_uninit()
4190 xhci_free_device_ext(udev); in xhci_device_uninit()
4197 xhci_get_dma_delay(struct usb_device *udev, uint32_t *pus) in xhci_get_dma_delay() argument
4207 xhci_device_resume(struct usb_device *udev) in xhci_device_resume() argument
4209 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_resume()
4217 if (udev->parent_hub == NULL) in xhci_device_resume()
4220 index = udev->controller_slot_id; in xhci_device_resume()
4226 USB_BUS_LOCK(udev->bus); in xhci_device_resume()
4235 USB_BUS_UNLOCK(udev->bus); in xhci_device_resume()
4241 xhci_device_suspend(struct usb_device *udev) in xhci_device_suspend() argument
4243 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_suspend()
4251 if (udev->parent_hub == NULL) in xhci_device_suspend()
4254 index = udev->controller_slot_id; in xhci_device_suspend()
4278 xhci_device_state_change(struct usb_device *udev) in xhci_device_state_change() argument
4280 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_state_change()
4286 if (udev->parent_hub == NULL) in xhci_device_state_change()
4289 index = udev->controller_slot_id; in xhci_device_state_change()
4293 if (usb_get_device_state(udev) == USB_STATE_CONFIGURED) { in xhci_device_state_change()
4294 err = uhub_query_info(udev, &sc->sc_hw.devs[index].nports, in xhci_device_state_change()
4302 switch (usb_get_device_state(udev)) { in xhci_device_state_change()
4330 xhci_configure_mask(udev, 1, 0); in xhci_device_state_change()
4361 xhci_configure_mask(udev, 3, 0); in xhci_device_state_change()
4363 err = xhci_configure_device(udev); in xhci_device_state_change()
4383 xhci_set_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep, in xhci_set_endpoint_mode() argument
4392 udev->speed != USB_SPEED_SUPER) in xhci_set_endpoint_mode()