Lines Matching refs:udev

1382 xhci_set_address(struct usb_device *udev, struct mtx *mtx, uint16_t address)  in xhci_set_address()  argument
1386 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_set_address()
1396 if (udev->parent_hub == NULL) in xhci_set_address()
1399 index = udev->controller_slot_id; in xhci_set_address()
1415 xhci_configure_mask(udev, 3, 0); in xhci_set_address()
1418 err = xhci_configure_device(udev); in xhci_set_address()
1426 switch (udev->speed) { in xhci_set_address()
1439 pepext = xhci_get_endpoint_ext(udev, in xhci_set_address()
1440 &udev->ctrl_ep_desc); in xhci_set_address()
1443 USB_BUS_LOCK(udev->bus); in xhci_set_address()
1446 USB_BUS_UNLOCK(udev->bus); in xhci_set_address()
1448 err = xhci_configure_endpoint(udev, in xhci_set_address()
1449 &udev->ctrl_ep_desc, pepext, in xhci_set_address()
1485 udev->address = XHCI_SCTX_3_DEV_ADDR_GET(temp); in xhci_set_address()
2077 switch (usbd_get_speed(xfer->xroot->udev)) { in xhci_setup_generic_chain()
2298 xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop) in xhci_configure_mask() argument
2300 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_mask()
2307 index = udev->controller_slot_id; in xhci_configure_mask()
2354 xhci_configure_endpoint(struct usb_device *udev, in xhci_configure_endpoint() argument
2361 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_endpoint()
2369 index = udev->controller_slot_id; in xhci_configure_endpoint()
2415 switch (udev->speed) { in xhci_configure_endpoint()
2434 switch (udev->speed) { in xhci_configure_endpoint()
2519 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_endpoint_by_xfer()
2547 return (xhci_configure_endpoint(xfer->xroot->udev, in xhci_configure_endpoint_by_xfer()
2556 xhci_configure_device(struct usb_device *udev) in xhci_configure_device() argument
2558 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_device()
2570 index = udev->controller_slot_id; in xhci_configure_device()
2585 for (hubdev = udev; hubdev != NULL; hubdev = hubdev->parent_hub) { in xhci_configure_device()
2615 switch (udev->speed) { in xhci_configure_device()
2618 if (udev->parent_hs_hub != NULL && in xhci_configure_device()
2619 udev->parent_hs_hub->ddesc.bDeviceProtocol == in xhci_configure_device()
2628 udev->ddesc.bDeviceProtocol == UDPROTO_HSHUBMTT) { in xhci_configure_device()
2635 if (udev->parent_hs_hub != NULL && in xhci_configure_device()
2636 udev->parent_hs_hub->ddesc.bDeviceProtocol == in xhci_configure_device()
2648 (udev->speed == USB_SPEED_SUPER || in xhci_configure_device()
2649 udev->speed == USB_SPEED_HIGH); in xhci_configure_device()
2663 switch (udev->speed) { in xhci_configure_device()
2689 hubdev = udev->parent_hs_hub; in xhci_configure_device()
2692 switch (udev->speed) { in xhci_configure_device()
2699 udev->hs_port_no); in xhci_configure_device()
2726 xhci_alloc_device_ext(struct usb_device *udev) in xhci_alloc_device_ext() argument
2728 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_alloc_device_ext()
2738 index = udev->controller_slot_id; in xhci_alloc_device_ext()
2804 xhci_free_device_ext(udev); in xhci_alloc_device_ext()
2810 xhci_free_device_ext(struct usb_device *udev) in xhci_free_device_ext() argument
2812 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_free_device_ext()
2816 index = udev->controller_slot_id; in xhci_free_device_ext()
2826 xhci_get_endpoint_ext(struct usb_device *udev, struct usb_endpoint_descriptor *edesc) in xhci_get_endpoint_ext() argument
2828 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_get_endpoint_ext()
2841 index = udev->controller_slot_id; in xhci_get_endpoint_ext()
2867 index = xfer->xroot->udev->controller_slot_id; in xhci_endpoint_doorbell()
2869 if (xfer->xroot->udev->flags.self_suspended == 0) { in xhci_endpoint_doorbell()
2883 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_transfer_remove()
2920 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_transfer_insert()
3091 switch (xfer->xroot->udev->speed) { in xhci_device_generic_open()
3109 switch (xfer->xroot->udev->speed) { in xhci_device_generic_close()
3298 xhci_roothub_exec(struct usb_device *udev, in xhci_roothub_exec() argument
3301 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_roothub_exec()
3831 struct usb_device *udev; in xhci_configure_reset_endpoint() local
3840 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_reset_endpoint()
3843 udev = xfer->xroot->udev; in xhci_configure_reset_endpoint()
3844 index = udev->controller_slot_id; in xhci_configure_reset_endpoint()
3902 xhci_configure_mask(udev, (1U << epno) | 1U, 0); in xhci_configure_reset_endpoint()
3947 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_msg()
4020 xhci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, in xhci_ep_init() argument
4026 ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode); in xhci_ep_init()
4028 if (udev->parent_hub == NULL) { in xhci_ep_init()
4035 pepext = xhci_get_endpoint_ext(udev, edesc); in xhci_ep_init()
4037 USB_BUS_LOCK(udev->bus); in xhci_ep_init()
4040 USB_BUS_UNLOCK(udev->bus); in xhci_ep_init()
4044 xhci_ep_uninit(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_uninit() argument
4050 xhci_ep_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_clear_stall() argument
4056 if (udev->flags.usb_mode != USB_MODE_HOST) { in xhci_ep_clear_stall()
4060 if (udev->parent_hub == NULL) { in xhci_ep_clear_stall()
4065 pepext = xhci_get_endpoint_ext(udev, ep->edesc); in xhci_ep_clear_stall()
4067 USB_BUS_LOCK(udev->bus); in xhci_ep_clear_stall()
4070 USB_BUS_UNLOCK(udev->bus); in xhci_ep_clear_stall()
4074 xhci_device_init(struct usb_device *udev) in xhci_device_init() argument
4076 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_init()
4081 if (udev->parent_hub == NULL) in xhci_device_init()
4088 udev->controller_slot_id = sc->sc_noslot + 1; in xhci_device_init()
4112 udev->controller_slot_id = temp; in xhci_device_init()
4122 err = xhci_alloc_device_ext(udev); in xhci_device_init()
4129 err = xhci_set_address(udev, NULL, 0); in xhci_device_init()
4135 xhci_device_uninit(struct usb_device *udev) in xhci_device_uninit() argument
4137 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_uninit()
4141 if (udev->parent_hub == NULL) in xhci_device_uninit()
4146 index = udev->controller_slot_id; in xhci_device_uninit()
4153 xhci_free_device_ext(udev); in xhci_device_uninit()
4160 xhci_get_dma_delay(struct usb_device *udev, uint32_t *pus) in xhci_get_dma_delay() argument
4170 xhci_device_resume(struct usb_device *udev) in xhci_device_resume() argument
4172 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_resume()
4180 if (udev->parent_hub == NULL) in xhci_device_resume()
4183 index = udev->controller_slot_id; in xhci_device_resume()
4189 USB_BUS_LOCK(udev->bus); in xhci_device_resume()
4198 USB_BUS_UNLOCK(udev->bus); in xhci_device_resume()
4204 xhci_device_suspend(struct usb_device *udev) in xhci_device_suspend() argument
4206 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_suspend()
4214 if (udev->parent_hub == NULL) in xhci_device_suspend()
4217 index = udev->controller_slot_id; in xhci_device_suspend()
4241 xhci_device_state_change(struct usb_device *udev) in xhci_device_state_change() argument
4243 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_state_change()
4249 if (udev->parent_hub == NULL) in xhci_device_state_change()
4252 index = udev->controller_slot_id; in xhci_device_state_change()
4256 if (usb_get_device_state(udev) == USB_STATE_CONFIGURED) { in xhci_device_state_change()
4257 err = uhub_query_info(udev, &sc->sc_hw.devs[index].nports, in xhci_device_state_change()
4265 switch (usb_get_device_state(udev)) { in xhci_device_state_change()
4291 xhci_configure_mask(udev, 1, 0); in xhci_device_state_change()
4314 xhci_configure_mask(udev, 3, 0); in xhci_device_state_change()
4316 err = xhci_configure_device(udev); in xhci_device_state_change()
4336 xhci_set_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep, in xhci_set_endpoint_mode() argument
4345 udev->speed != USB_SPEED_SUPER) in xhci_set_endpoint_mode()