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()
3948 xhci_configure_mask(udev, mask, 1); in xhci_configure_reset_endpoint()
3962 xhci_configure_mask(udev, mask | 1U, 0); in xhci_configure_reset_endpoint()
4010 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_msg()
4080 xhci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, in xhci_ep_init() argument
4089 ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode); in xhci_ep_init()
4091 if (udev->parent_hub == NULL) { in xhci_ep_init()
4098 pepext = xhci_get_endpoint_ext(udev, edesc); in xhci_ep_init()
4100 USB_BUS_LOCK(udev->bus); in xhci_ep_init()
4110 sc = XHCI_BUS2SC(udev->bus); in xhci_ep_init()
4111 index = udev->controller_slot_id; in xhci_ep_init()
4115 USB_BUS_UNLOCK(udev->bus); in xhci_ep_init()
4119 xhci_ep_uninit(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_uninit() argument
4121 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_ep_uninit()
4130 if (udev->parent_hub == NULL) { in xhci_ep_uninit()
4141 index = udev->controller_slot_id; in xhci_ep_uninit()
4146 USB_BUS_LOCK(udev->bus); in xhci_ep_uninit()
4147 xhci_configure_mask(udev, mask, 1); in xhci_ep_uninit()
4148 USB_BUS_UNLOCK(udev->bus); in xhci_ep_uninit()
4156 USB_BUS_LOCK(udev->bus); in xhci_ep_uninit()
4158 USB_BUS_UNLOCK(udev->bus); in xhci_ep_uninit()
4165 xhci_ep_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_clear_stall() argument
4171 if (udev->flags.usb_mode != USB_MODE_HOST) { in xhci_ep_clear_stall()
4175 if (udev->parent_hub == NULL) { in xhci_ep_clear_stall()
4180 pepext = xhci_get_endpoint_ext(udev, ep->edesc); in xhci_ep_clear_stall()
4182 USB_BUS_LOCK(udev->bus); in xhci_ep_clear_stall()
4185 USB_BUS_UNLOCK(udev->bus); in xhci_ep_clear_stall()
4189 xhci_device_init(struct usb_device *udev) in xhci_device_init() argument
4191 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_init()
4196 if (udev->parent_hub == NULL) in xhci_device_init()
4203 udev->controller_slot_id = sc->sc_noslot + 1; in xhci_device_init()
4227 udev->controller_slot_id = temp; in xhci_device_init()
4237 err = xhci_alloc_device_ext(udev); in xhci_device_init()
4244 err = xhci_set_address(udev, NULL, 0); in xhci_device_init()
4250 xhci_device_uninit(struct usb_device *udev) in xhci_device_uninit() argument
4252 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_uninit()
4256 if (udev->parent_hub == NULL) in xhci_device_uninit()
4261 index = udev->controller_slot_id; in xhci_device_uninit()
4268 xhci_free_device_ext(udev); in xhci_device_uninit()
4275 xhci_get_dma_delay(struct usb_device *udev, uint32_t *pus) in xhci_get_dma_delay() argument
4285 xhci_device_resume(struct usb_device *udev) in xhci_device_resume() argument
4287 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_resume()
4295 if (udev->parent_hub == NULL) in xhci_device_resume()
4298 index = udev->controller_slot_id; in xhci_device_resume()
4304 USB_BUS_LOCK(udev->bus); in xhci_device_resume()
4313 USB_BUS_UNLOCK(udev->bus); in xhci_device_resume()
4319 xhci_device_suspend(struct usb_device *udev) in xhci_device_suspend() argument
4321 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_suspend()
4329 if (udev->parent_hub == NULL) in xhci_device_suspend()
4332 index = udev->controller_slot_id; in xhci_device_suspend()
4356 xhci_device_state_change(struct usb_device *udev) in xhci_device_state_change() argument
4358 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_state_change()
4364 if (udev->parent_hub == NULL) in xhci_device_state_change()
4367 index = udev->controller_slot_id; in xhci_device_state_change()
4371 if (usb_get_device_state(udev) == USB_STATE_CONFIGURED) { in xhci_device_state_change()
4372 err = uhub_query_info(udev, &sc->sc_hw.devs[index].nports, in xhci_device_state_change()
4380 switch (usb_get_device_state(udev)) { in xhci_device_state_change()
4408 xhci_configure_mask(udev, 1, 0); in xhci_device_state_change()
4439 xhci_configure_mask(udev, 3, 0); in xhci_device_state_change()
4441 err = xhci_configure_device(udev); in xhci_device_state_change()
4461 xhci_set_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep, in xhci_set_endpoint_mode() argument
4470 udev->speed != USB_SPEED_SUPER) in xhci_set_endpoint_mode()