Lines Matching refs:dynamic
58 } dynamic; member
83 } dynamic; member
153 dev_obj->dynamic.state = USB_DEVICE_STATE_DEFAULT; in device_alloc()
202 if (!dev_obj->dynamic.flags.in_pending_list) { in _dev_set_actions()
204 TAILQ_REMOVE(&p_usbh_obj->dynamic.devs_idle_tailq, dev_obj, dynamic.tailq_entry); in _dev_set_actions()
205 TAILQ_INSERT_TAIL(&p_usbh_obj->dynamic.devs_pending_tailq, dev_obj, dynamic.tailq_entry); in _dev_set_actions()
206 dev_obj->dynamic.action_flags |= action_flags; in _dev_set_actions()
207 dev_obj->dynamic.flags.in_pending_list = 1; in _dev_set_actions()
286 if (dev_obj->dynamic.flags.in_pending_list) { in handle_dev_free()
287 dev_obj->dynamic.flags.in_pending_list = 0; in handle_dev_free()
288 TAILQ_REMOVE(&p_usbh_obj->dynamic.devs_pending_tailq, dev_obj, dynamic.tailq_entry); in handle_dev_free()
290 TAILQ_REMOVE(&p_usbh_obj->dynamic.devs_idle_tailq, dev_obj, dynamic.tailq_entry); in handle_dev_free()
322 TAILQ_INIT(&usbh_obj->dynamic.devs_idle_tailq); in usbh_install()
323 TAILQ_INIT(&usbh_obj->dynamic.devs_pending_tailq); in usbh_install()
396 while (!TAILQ_EMPTY(&p_usbh_obj->dynamic.devs_pending_tailq)){ in usbh_process()
398 device_t *dev_obj = TAILQ_FIRST(&p_usbh_obj->dynamic.devs_pending_tailq); in usbh_process()
399 TAILQ_REMOVE(&p_usbh_obj->dynamic.devs_pending_tailq, dev_obj, dynamic.tailq_entry); in usbh_process()
400 TAILQ_INSERT_TAIL(&p_usbh_obj->dynamic.devs_idle_tailq, dev_obj, dynamic.tailq_entry); in usbh_process()
402 uint32_t action_flags = dev_obj->dynamic.action_flags; in usbh_process()
403 dev_obj->dynamic.action_flags = 0; in usbh_process()
404 dev_obj->dynamic.flags.in_pending_list = 0; in usbh_process()
432 dev_obj->dynamic.num_ctrl_xfers_inflight -= num_urbs; in usbh_process()
501 TAILQ_FOREACH(dev_obj, &p_usbh_obj->dynamic.devs_idle_tailq, dynamic.tailq_entry) { in usbh_dev_addr_list_fill()
510 TAILQ_FOREACH(dev_obj, &p_usbh_obj->dynamic.devs_pending_tailq, dynamic.tailq_entry) { in usbh_dev_addr_list_fill()
533 TAILQ_FOREACH(dev_obj, &p_usbh_obj->dynamic.devs_idle_tailq, dynamic.tailq_entry) { in usbh_dev_open()
539 TAILQ_FOREACH(dev_obj, &p_usbh_obj->dynamic.devs_idle_tailq, dynamic.tailq_entry) { in usbh_dev_open()
548 …if (dev_obj->dynamic.flags.is_gone || dev_obj->dynamic.flags.waiting_port_disable || dev_obj->dyna… in usbh_dev_open()
551 dev_obj->dynamic.ref_count++; in usbh_dev_open()
569 dev_obj->dynamic.ref_count--; in usbh_dev_close()
571 if (dev_obj->dynamic.ref_count == 0) { in usbh_dev_close()
573 …assert(dev_obj->dynamic.num_ctrl_xfers_inflight == 0); //There cannot be any control transfer inf… in usbh_dev_close()
574 … assert(!dev_obj->dynamic.flags.waiting_free); //This can only be set when ref count reaches 0 in usbh_dev_close()
575 if (dev_obj->dynamic.flags.is_gone) { in usbh_dev_close()
577 dev_obj->dynamic.flags.waiting_free = 1; in usbh_dev_close()
579 } else if (dev_obj->dynamic.flags.waiting_close) { in usbh_dev_close()
581 dev_obj->dynamic.flags.waiting_port_disable = 1; in usbh_dev_close()
609 dev_obj_cur = TAILQ_FIRST(&p_usbh_obj->dynamic.devs_pending_tailq); in usbh_dev_mark_all_free()
611 dev_obj_cur = TAILQ_FIRST(&p_usbh_obj->dynamic.devs_idle_tailq); in usbh_dev_mark_all_free()
614 assert(!dev_obj_cur->dynamic.flags.waiting_close); //Sanity check in usbh_dev_mark_all_free()
616 dev_obj_next = TAILQ_NEXT(dev_obj_cur, dynamic.tailq_entry); in usbh_dev_mark_all_free()
617 if (dev_obj_cur->dynamic.ref_count == 0 && !dev_obj_cur->dynamic.flags.is_gone) { in usbh_dev_mark_all_free()
619 dev_obj_cur->dynamic.flags.waiting_port_disable = 1; in usbh_dev_mark_all_free()
623 dev_obj_cur->dynamic.flags.waiting_close = 1; in usbh_dev_mark_all_free()
660 …if (!(dev_obj->dynamic.state == USB_DEVICE_STATE_CONFIGURED || dev_obj->dynamic.state == USB_DEVIC… in usbh_dev_get_info()
687 …USBH_CHECK_FROM_CRIT(dev_obj->dynamic.state == USB_DEVICE_STATE_CONFIGURED, ESP_ERR_INVALID_STATE); in usbh_dev_get_desc()
702 if (dev_obj->dynamic.state != USB_DEVICE_STATE_CONFIGURED) { in usbh_dev_get_config_desc()
721 …USBH_CHECK_FROM_CRIT(dev_obj->dynamic.state == USB_DEVICE_STATE_CONFIGURED, ESP_ERR_INVALID_STATE); in usbh_dev_submit_ctrl_urb()
723 dev_obj->dynamic.num_ctrl_xfers_inflight++; in usbh_dev_submit_ctrl_urb()
740 dev_obj->dynamic.num_ctrl_xfers_inflight--; in usbh_dev_submit_ctrl_urb()
776 if (dev_obj->dynamic.state != USB_DEVICE_STATE_CONFIGURED) { in usbh_ep_alloc()
928 dev_obj->dynamic.flags.is_gone = 1; in usbh_hub_pass_event()
930 if (dev_obj->dynamic.ref_count == 0) { in usbh_hub_pass_event()
931 dev_obj->dynamic.flags.waiting_free = 1; in usbh_hub_pass_event()
945 …assert(dev_obj->dynamic.ref_count == 0); //At this stage, the device should have been closed by… in usbh_hub_pass_event()
946 dev_obj->dynamic.flags.waiting_free = 1; in usbh_hub_pass_event()
969 dev_obj->dynamic.state = USB_DEVICE_STATE_ADDRESS; in usbh_hub_enum_fill_dev_addr()
1040 dev_obj->dynamic.state = USB_DEVICE_STATE_CONFIGURED; in usbh_hub_enum_done()
1042 …TAILQ_INSERT_TAIL(&p_usbh_obj->dynamic.devs_idle_tailq, dev_obj, dynamic.tailq_entry); //Add it … in usbh_hub_enum_done()