Lines Matching refs:udev

1341 xhci_set_address(struct usb_device *udev, struct mtx *mtx, uint16_t address)  in xhci_set_address()  argument
1345 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_set_address()
1355 if (udev->parent_hub == NULL) in xhci_set_address()
1358 index = udev->controller_slot_id; in xhci_set_address()
1374 xhci_configure_mask(udev, 3, 0); in xhci_set_address()
1377 err = xhci_configure_device(udev); in xhci_set_address()
1385 switch (udev->speed) { in xhci_set_address()
1398 pepext = xhci_get_endpoint_ext(udev, in xhci_set_address()
1399 &udev->ctrl_ep_desc); in xhci_set_address()
1402 USB_BUS_LOCK(udev->bus); in xhci_set_address()
1405 USB_BUS_UNLOCK(udev->bus); in xhci_set_address()
1407 err = xhci_configure_endpoint(udev, in xhci_set_address()
1408 &udev->ctrl_ep_desc, pepext, in xhci_set_address()
1445 udev->address = XHCI_SCTX_3_DEV_ADDR_GET(temp); in xhci_set_address()
2034 switch (usbd_get_speed(xfer->xroot->udev)) { in xhci_setup_generic_chain()
2248 xhci_configure_mask(struct usb_device *udev, uint32_t mask, uint8_t drop) in xhci_configure_mask() argument
2250 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_mask()
2258 index = udev->controller_slot_id; in xhci_configure_mask()
2306 xhci_configure_endpoint(struct usb_device *udev, in xhci_configure_endpoint() argument
2313 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_endpoint()
2321 index = udev->controller_slot_id; in xhci_configure_endpoint()
2368 switch (udev->speed) { in xhci_configure_endpoint()
2387 switch (udev->speed) { in xhci_configure_endpoint()
2472 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_endpoint_by_xfer()
2500 return (xhci_configure_endpoint(xfer->xroot->udev, in xhci_configure_endpoint_by_xfer()
2509 xhci_configure_device(struct usb_device *udev) in xhci_configure_device() argument
2511 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_configure_device()
2523 index = udev->controller_slot_id; in xhci_configure_device()
2538 for (hubdev = udev; hubdev != NULL; hubdev = hubdev->parent_hub) { in xhci_configure_device()
2567 switch (udev->speed) { in xhci_configure_device()
2570 if (udev->parent_hs_hub != NULL && in xhci_configure_device()
2571 udev->parent_hs_hub->ddesc.bDeviceProtocol == in xhci_configure_device()
2580 udev->ddesc.bDeviceProtocol == UDPROTO_HSHUBMTT) { in xhci_configure_device()
2587 if (udev->parent_hs_hub != NULL && in xhci_configure_device()
2588 udev->parent_hs_hub->ddesc.bDeviceProtocol == in xhci_configure_device()
2600 (udev->speed == USB_SPEED_SUPER || in xhci_configure_device()
2601 udev->speed == USB_SPEED_HIGH); in xhci_configure_device()
2624 hubdev = udev->parent_hs_hub; in xhci_configure_device()
2627 switch (udev->speed) { in xhci_configure_device()
2634 udev->hs_port_no); in xhci_configure_device()
2661 xhci_alloc_device_ext(struct usb_device *udev) in xhci_alloc_device_ext() argument
2663 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_alloc_device_ext()
2673 index = udev->controller_slot_id; in xhci_alloc_device_ext()
2738 xhci_free_device_ext(udev); in xhci_alloc_device_ext()
2744 xhci_free_device_ext(struct usb_device *udev) in xhci_free_device_ext() argument
2746 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_free_device_ext()
2750 index = udev->controller_slot_id; in xhci_free_device_ext()
2760 xhci_get_endpoint_ext(struct usb_device *udev, struct usb_endpoint_descriptor *edesc) in xhci_get_endpoint_ext() argument
2762 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_get_endpoint_ext()
2775 index = udev->controller_slot_id; in xhci_get_endpoint_ext()
2801 index = xfer->xroot->udev->controller_slot_id; in xhci_endpoint_doorbell()
2803 if (xfer->xroot->udev->flags.self_suspended == 0) { in xhci_endpoint_doorbell()
2817 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_transfer_remove()
2854 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_transfer_insert()
3212 xhci_roothub_exec(struct usb_device *udev, in xhci_roothub_exec() argument
3215 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_roothub_exec()
3738 xhci_get_endpoint_state(struct usb_device *udev, uint8_t epno) in xhci_get_endpoint_state() argument
3740 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_get_endpoint_state()
3748 hdev = &sc->sc_hw.devs[udev->controller_slot_id]; in xhci_get_endpoint_state()
3765 struct usb_device *udev; in xhci_configure_reset_endpoint() local
3776 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_reset_endpoint()
3779 udev = xfer->xroot->udev; in xhci_configure_reset_endpoint()
3780 index = udev->controller_slot_id; in xhci_configure_reset_endpoint()
3814 switch (xhci_get_endpoint_state(udev, epno)) { in xhci_configure_reset_endpoint()
3859 xhci_configure_mask(udev, mask, 1); in xhci_configure_reset_endpoint()
3873 xhci_configure_mask(udev, mask | 1U, 0); in xhci_configure_reset_endpoint()
3921 pepext = xhci_get_endpoint_ext(xfer->xroot->udev, in xhci_configure_msg()
3991 xhci_ep_init(struct usb_device *udev, struct usb_endpoint_descriptor *edesc, in xhci_ep_init() argument
4000 ep, udev->address, edesc->bEndpointAddress, udev->flags.usb_mode); in xhci_ep_init()
4002 if (udev->parent_hub == NULL) { in xhci_ep_init()
4009 pepext = xhci_get_endpoint_ext(udev, edesc); in xhci_ep_init()
4011 USB_BUS_LOCK(udev->bus); in xhci_ep_init()
4021 sc = XHCI_BUS2SC(udev->bus); in xhci_ep_init()
4022 index = udev->controller_slot_id; in xhci_ep_init()
4026 USB_BUS_UNLOCK(udev->bus); in xhci_ep_init()
4030 xhci_ep_uninit(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_uninit() argument
4032 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_ep_uninit()
4041 if (udev->parent_hub == NULL) { in xhci_ep_uninit()
4052 index = udev->controller_slot_id; in xhci_ep_uninit()
4057 USB_BUS_LOCK(udev->bus); in xhci_ep_uninit()
4058 xhci_configure_mask(udev, mask, 1); in xhci_ep_uninit()
4059 USB_BUS_UNLOCK(udev->bus); in xhci_ep_uninit()
4067 USB_BUS_LOCK(udev->bus); in xhci_ep_uninit()
4069 USB_BUS_UNLOCK(udev->bus); in xhci_ep_uninit()
4076 xhci_ep_clear_stall(struct usb_device *udev, struct usb_endpoint *ep) in xhci_ep_clear_stall() argument
4082 if (udev->flags.usb_mode != USB_MODE_HOST) { in xhci_ep_clear_stall()
4086 if (udev->parent_hub == NULL) { in xhci_ep_clear_stall()
4091 pepext = xhci_get_endpoint_ext(udev, ep->edesc); in xhci_ep_clear_stall()
4093 USB_BUS_LOCK(udev->bus); in xhci_ep_clear_stall()
4096 USB_BUS_UNLOCK(udev->bus); in xhci_ep_clear_stall()
4100 xhci_device_init(struct usb_device *udev) in xhci_device_init() argument
4102 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_init()
4107 if (udev->parent_hub == NULL) in xhci_device_init()
4114 udev->controller_slot_id = sc->sc_noslot + 1; in xhci_device_init()
4138 udev->controller_slot_id = temp; in xhci_device_init()
4148 err = xhci_alloc_device_ext(udev); in xhci_device_init()
4155 err = xhci_set_address(udev, NULL, 0); in xhci_device_init()
4161 xhci_device_uninit(struct usb_device *udev) in xhci_device_uninit() argument
4163 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_uninit()
4167 if (udev->parent_hub == NULL) in xhci_device_uninit()
4172 index = udev->controller_slot_id; in xhci_device_uninit()
4179 xhci_free_device_ext(udev); in xhci_device_uninit()
4186 xhci_get_dma_delay(struct usb_device *udev, uint32_t *pus) in xhci_get_dma_delay() argument
4196 xhci_device_resume(struct usb_device *udev) in xhci_device_resume() argument
4198 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_resume()
4206 if (udev->parent_hub == NULL) in xhci_device_resume()
4209 index = udev->controller_slot_id; in xhci_device_resume()
4215 USB_BUS_LOCK(udev->bus); in xhci_device_resume()
4224 USB_BUS_UNLOCK(udev->bus); in xhci_device_resume()
4230 xhci_device_suspend(struct usb_device *udev) in xhci_device_suspend() argument
4232 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_suspend()
4240 if (udev->parent_hub == NULL) in xhci_device_suspend()
4243 index = udev->controller_slot_id; in xhci_device_suspend()
4267 xhci_device_state_change(struct usb_device *udev) in xhci_device_state_change() argument
4269 struct xhci_softc *sc = XHCI_BUS2SC(udev->bus); in xhci_device_state_change()
4275 if (udev->parent_hub == NULL) in xhci_device_state_change()
4278 index = udev->controller_slot_id; in xhci_device_state_change()
4282 if (usb_get_device_state(udev) == USB_STATE_CONFIGURED) { in xhci_device_state_change()
4283 err = uhub_query_info(udev, &sc->sc_hw.devs[index].nports, in xhci_device_state_change()
4291 switch (usb_get_device_state(udev)) { in xhci_device_state_change()
4319 xhci_configure_mask(udev, 1, 0); in xhci_device_state_change()
4350 xhci_configure_mask(udev, 3, 0); in xhci_device_state_change()
4352 err = xhci_configure_device(udev); in xhci_device_state_change()
4372 xhci_set_endpoint_mode(struct usb_device *udev, struct usb_endpoint *ep, in xhci_set_endpoint_mode() argument
4381 udev->speed != USB_SPEED_SUPER) in xhci_set_endpoint_mode()