Lines Matching refs:udev
1426 xhci_set_address(struct usb_device *udev, struct mtx *mtx, uint16_t address) in xhci_set_address() argument
1430 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_set_address()
1440 if (udev->parent_hub == NULL) in xhci_set_address()
1443 index = udev->controller_slot_id; in xhci_set_address()
1459 xhci_configure_mask(udev, 3, 0); in xhci_set_address()
1462 err = xhci_configure_device(udev); in xhci_set_address()
1470 switch (udev->speed) { in xhci_set_address()
1483 pepext = xhci_get_endpoint_ext(udev, in xhci_set_address()
1484 &udev->ctrl_ep_desc); in xhci_set_address()
1487 USB_BUS_LOCK(udev->bus); in xhci_set_address()
1490 USB_BUS_UNLOCK(udev->bus); in xhci_set_address()
1492 err = xhci_configure_endpoint(udev, in xhci_set_address()
1493 &udev->ctrl_ep_desc, pepext, in xhci_set_address()
1530 udev->address = XHCI_SCTX_3_DEV_ADDR_GET(temp); in xhci_set_address()
2119 switch (usbd_get_speed(xfer->xroot->udev)) { in xhci_setup_generic_chain()
2333 xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop) in xhci_configure_mask() argument
2335 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_mask()
2343 index = udev->controller_slot_id; in xhci_configure_mask()
2391 xhci_configure_endpoint(struct usb_device *udev, in xhci_configure_endpoint() argument
2398 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_endpoint()
2406 index = udev->controller_slot_id; in xhci_configure_endpoint()
2453 switch (udev->speed) { in xhci_configure_endpoint()
2472 switch (udev->speed) { in xhci_configure_endpoint()
2557 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_endpoint_by_xfer()
2585 return (xhci_configure_endpoint(xfer->xroot->udev, in xhci_configure_endpoint_by_xfer()
2594 xhci_configure_device(struct usb_device *udev) in xhci_configure_device() argument
2596 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_device()
2608 index = udev->controller_slot_id; in xhci_configure_device()
2623 for (hubdev = udev; hubdev != NULL; hubdev = hubdev->parent_hub) { in xhci_configure_device()
2652 switch (udev->speed) { in xhci_configure_device()
2655 if (udev->parent_hs_hub != NULL && in xhci_configure_device()
2656 udev->parent_hs_hub->ddesc.bDeviceProtocol == in xhci_configure_device()
2665 udev->ddesc.bDeviceProtocol == UDPROTO_HSHUBMTT) { in xhci_configure_device()
2672 if (udev->parent_hs_hub != NULL && in xhci_configure_device()
2673 udev->parent_hs_hub->ddesc.bDeviceProtocol == in xhci_configure_device()
2685 (udev->speed == USB_SPEED_SUPER || in xhci_configure_device()
2686 udev->speed == USB_SPEED_HIGH); in xhci_configure_device()
2709 hubdev = udev->parent_hs_hub; in xhci_configure_device()
2712 switch (udev->speed) { in xhci_configure_device()
2719 udev->hs_port_no); in xhci_configure_device()
2746 xhci_alloc_device_ext(struct usb_device *udev) in xhci_alloc_device_ext() argument
2748 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_alloc_device_ext()
2758 index = udev->controller_slot_id; in xhci_alloc_device_ext()
2823 xhci_free_device_ext(udev); in xhci_alloc_device_ext()
2829 xhci_free_device_ext(struct usb_device *udev) in xhci_free_device_ext() argument
2831 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_free_device_ext()
2835 index = udev->controller_slot_id; in xhci_free_device_ext()
2845 xhci_get_endpoint_ext(struct usb_device *udev, struct usb_endpoint_descriptor *edesc) in xhci_get_endpoint_ext() argument
2847 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_get_endpoint_ext()
2860 index = udev->controller_slot_id; in xhci_get_endpoint_ext()
2886 index = xfer->xroot->udev->controller_slot_id; in xhci_endpoint_doorbell()
2888 if (xfer->xroot->udev->flags.self_suspended == 0) { in xhci_endpoint_doorbell()
2902 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_transfer_remove()
2939 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_transfer_insert()
3297 xhci_roothub_exec(struct usb_device *udev, in xhci_roothub_exec() argument
3300 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_roothub_exec()
3823 xhci_get_endpoint_state(struct usb_device *udev, uint8_t epno) in xhci_get_endpoint_state() argument
3825 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_get_endpoint_state()
3833 hdev = &sc->sc_hw.devs[udev->controller_slot_id]; in xhci_get_endpoint_state()
3850 struct usb_device *udev; in xhci_configure_reset_endpoint() local
3861 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_reset_endpoint()
3864 udev = xfer->xroot->udev; in xhci_configure_reset_endpoint()
3865 index = udev->controller_slot_id; in xhci_configure_reset_endpoint()
3899 switch (xhci_get_endpoint_state(udev, epno)) { in xhci_configure_reset_endpoint()
3944 xhci_configure_mask(udev, mask, 1); in xhci_configure_reset_endpoint()
3958 xhci_configure_mask(udev, mask | 1U, 0); in xhci_configure_reset_endpoint()
4006 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_msg()
4076 xhci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, in xhci_ep_init() argument
4085 ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode); in xhci_ep_init()
4087 if (udev->parent_hub == NULL) { in xhci_ep_init()
4094 pepext = xhci_get_endpoint_ext(udev, edesc); in xhci_ep_init()
4096 USB_BUS_LOCK(udev->bus); in xhci_ep_init()
4106 sc = XHCI_BUS2SC(udev->bus); in xhci_ep_init()
4107 index = udev->controller_slot_id; in xhci_ep_init()
4111 USB_BUS_UNLOCK(udev->bus); in xhci_ep_init()
4115 xhci_ep_uninit(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_uninit() argument
4117 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_ep_uninit()
4126 if (udev->parent_hub == NULL) { in xhci_ep_uninit()
4137 index = udev->controller_slot_id; in xhci_ep_uninit()
4142 USB_BUS_LOCK(udev->bus); in xhci_ep_uninit()
4143 xhci_configure_mask(udev, mask, 1); in xhci_ep_uninit()
4144 USB_BUS_UNLOCK(udev->bus); in xhci_ep_uninit()
4152 USB_BUS_LOCK(udev->bus); in xhci_ep_uninit()
4154 USB_BUS_UNLOCK(udev->bus); in xhci_ep_uninit()
4161 xhci_ep_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_clear_stall() argument
4167 if (udev->flags.usb_mode != USB_MODE_HOST) { in xhci_ep_clear_stall()
4171 if (udev->parent_hub == NULL) { in xhci_ep_clear_stall()
4176 pepext = xhci_get_endpoint_ext(udev, ep->edesc); in xhci_ep_clear_stall()
4178 USB_BUS_LOCK(udev->bus); in xhci_ep_clear_stall()
4181 USB_BUS_UNLOCK(udev->bus); in xhci_ep_clear_stall()
4185 xhci_device_init(struct usb_device *udev) in xhci_device_init() argument
4187 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_init()
4192 if (udev->parent_hub == NULL) in xhci_device_init()
4199 udev->controller_slot_id = sc->sc_noslot + 1; in xhci_device_init()
4223 udev->controller_slot_id = temp; in xhci_device_init()
4233 err = xhci_alloc_device_ext(udev); in xhci_device_init()
4240 err = xhci_set_address(udev, NULL, 0); in xhci_device_init()
4246 xhci_device_uninit(struct usb_device *udev) in xhci_device_uninit() argument
4248 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_uninit()
4252 if (udev->parent_hub == NULL) in xhci_device_uninit()
4257 index = udev->controller_slot_id; in xhci_device_uninit()
4264 xhci_free_device_ext(udev); in xhci_device_uninit()
4271 xhci_get_dma_delay(struct usb_device *udev, uint32_t *pus) in xhci_get_dma_delay() argument
4281 xhci_device_resume(struct usb_device *udev) in xhci_device_resume() argument
4283 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_resume()
4291 if (udev->parent_hub == NULL) in xhci_device_resume()
4294 index = udev->controller_slot_id; in xhci_device_resume()
4300 USB_BUS_LOCK(udev->bus); in xhci_device_resume()
4309 USB_BUS_UNLOCK(udev->bus); in xhci_device_resume()
4315 xhci_device_suspend(struct usb_device *udev) in xhci_device_suspend() argument
4317 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_suspend()
4325 if (udev->parent_hub == NULL) in xhci_device_suspend()
4328 index = udev->controller_slot_id; in xhci_device_suspend()
4352 xhci_device_state_change(struct usb_device *udev) in xhci_device_state_change() argument
4354 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_state_change()
4360 if (udev->parent_hub == NULL) in xhci_device_state_change()
4363 index = udev->controller_slot_id; in xhci_device_state_change()
4367 if (usb_get_device_state(udev) == USB_STATE_CONFIGURED) { in xhci_device_state_change()
4368 err = uhub_query_info(udev, &sc->sc_hw.devs[index].nports, in xhci_device_state_change()
4376 switch (usb_get_device_state(udev)) { in xhci_device_state_change()
4404 xhci_configure_mask(udev, 1, 0); in xhci_device_state_change()
4435 xhci_configure_mask(udev, 3, 0); in xhci_device_state_change()
4437 err = xhci_configure_device(udev); in xhci_device_state_change()
4457 xhci_set_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep, in xhci_set_endpoint_mode() argument
4466 udev->speed != USB_SPEED_SUPER) in xhci_set_endpoint_mode()