Lines Matching refs:dum_hcd

372 static void set_link_state_by_speed(struct dummy_hcd *dum_hcd)  in set_link_state_by_speed()  argument
374 struct dummy *dum = dum_hcd->dum; in set_link_state_by_speed()
376 if (dummy_hcd_to_hcd(dum_hcd)->speed == HCD_USB3) { in set_link_state_by_speed()
377 if ((dum_hcd->port_status & USB_SS_PORT_STAT_POWER) == 0) { in set_link_state_by_speed()
378 dum_hcd->port_status = 0; in set_link_state_by_speed()
381 dum_hcd->port_status &= ~(USB_PORT_STAT_CONNECTION | in set_link_state_by_speed()
383 if ((dum_hcd->old_status & in set_link_state_by_speed()
385 dum_hcd->port_status |= in set_link_state_by_speed()
389 dum_hcd->port_status |= (USB_PORT_STAT_CONNECTION | in set_link_state_by_speed()
391 if ((dum_hcd->old_status & in set_link_state_by_speed()
393 dum_hcd->port_status |= in set_link_state_by_speed()
395 if ((dum_hcd->port_status & USB_PORT_STAT_ENABLE) && in set_link_state_by_speed()
396 (dum_hcd->port_status & in set_link_state_by_speed()
398 dum_hcd->rh_state != DUMMY_RH_SUSPENDED) in set_link_state_by_speed()
399 dum_hcd->active = 1; in set_link_state_by_speed()
402 if ((dum_hcd->port_status & USB_PORT_STAT_POWER) == 0) { in set_link_state_by_speed()
403 dum_hcd->port_status = 0; in set_link_state_by_speed()
406 dum_hcd->port_status &= ~(USB_PORT_STAT_CONNECTION | in set_link_state_by_speed()
411 if ((dum_hcd->old_status & in set_link_state_by_speed()
413 dum_hcd->port_status |= in set_link_state_by_speed()
416 dum_hcd->port_status |= USB_PORT_STAT_CONNECTION; in set_link_state_by_speed()
417 if ((dum_hcd->old_status & in set_link_state_by_speed()
419 dum_hcd->port_status |= in set_link_state_by_speed()
421 if ((dum_hcd->port_status & USB_PORT_STAT_ENABLE) == 0) in set_link_state_by_speed()
422 dum_hcd->port_status &= ~USB_PORT_STAT_SUSPEND; in set_link_state_by_speed()
423 else if ((dum_hcd->port_status & in set_link_state_by_speed()
425 dum_hcd->rh_state != DUMMY_RH_SUSPENDED) in set_link_state_by_speed()
426 dum_hcd->active = 1; in set_link_state_by_speed()
432 static void set_link_state(struct dummy_hcd *dum_hcd) in set_link_state() argument
435 struct dummy *dum = dum_hcd->dum; in set_link_state()
438 dum_hcd->active = 0; in set_link_state()
440 if ((dummy_hcd_to_hcd(dum_hcd)->speed == HCD_USB3 && in set_link_state()
442 (dummy_hcd_to_hcd(dum_hcd)->speed != HCD_USB3 && in set_link_state()
446 set_link_state_by_speed(dum_hcd); in set_link_state()
447 power_bit = (dummy_hcd_to_hcd(dum_hcd)->speed == HCD_USB3 ? in set_link_state()
450 if ((dum_hcd->port_status & USB_PORT_STAT_ENABLE) == 0 || in set_link_state()
451 dum_hcd->active) in set_link_state()
452 dum_hcd->resuming = 0; in set_link_state()
455 if ((dum_hcd->port_status & power_bit) == 0 || in set_link_state()
456 (dum_hcd->port_status & USB_PORT_STAT_RESET) != 0) { in set_link_state()
458 dum_hcd->old_status & (~dum_hcd->port_status); in set_link_state()
460 (~dum_hcd->old_status) & dum_hcd->port_status; in set_link_state()
474 } else if (dum_hcd->active != dum_hcd->old_active && in set_link_state()
478 if (dum_hcd->old_active && dum->driver->suspend) in set_link_state()
480 else if (!dum_hcd->old_active && dum->driver->resume) in set_link_state()
486 dum_hcd->old_status = dum_hcd->port_status; in set_link_state()
487 dum_hcd->old_active = dum_hcd->active; in set_link_state()
506 struct dummy_hcd *dum_hcd; in dummy_enable() local
519 dum_hcd = gadget_to_dummy_hcd(&dum->gadget); in dummy_enable()
520 if (!is_enabled(dum_hcd)) in dummy_enable()
699 struct dummy_hcd *dum_hcd; in dummy_queue() local
711 dum_hcd = gadget_to_dummy_hcd(&dum->gadget); in dummy_queue()
712 if (!dum->driver || !is_enabled(dum_hcd)) in dummy_queue()
856 struct dummy_hcd *dum_hcd; in dummy_wakeup() local
858 dum_hcd = gadget_to_dummy_hcd(_gadget); in dummy_wakeup()
859 if (!(dum_hcd->dum->devstatus & ((1 << USB_DEVICE_B_HNP_ENABLE) in dummy_wakeup()
862 if ((dum_hcd->port_status & USB_PORT_STAT_CONNECTION) == 0) in dummy_wakeup()
864 if ((dum_hcd->port_status & USB_PORT_STAT_SUSPEND) == 0 && in dummy_wakeup()
865 dum_hcd->rh_state != DUMMY_RH_SUSPENDED) in dummy_wakeup()
871 dum_hcd->resuming = 1; in dummy_wakeup()
872 dum_hcd->re_timeout = jiffies + msecs_to_jiffies(20); in dummy_wakeup()
873 mod_timer(&dummy_hcd_to_hcd(dum_hcd)->rh_timer, dum_hcd->re_timeout); in dummy_wakeup()
900 struct dummy_hcd *dum_hcd; in dummy_pullup() local
905 dum_hcd = gadget_to_dummy_hcd(_gadget); in dummy_pullup()
909 set_link_state(dum_hcd); in dummy_pullup()
927 usb_hcd_poll_rh_status(dummy_hcd_to_hcd(dum_hcd)); in dummy_pullup()
998 struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g); in dummy_udc_start() local
999 struct dummy *dum = dum_hcd->dum; in dummy_udc_start()
1009 dev_err(dummy_dev(dum_hcd), "Unsupported driver max speed %d\n", in dummy_udc_start()
1029 struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g); in dummy_udc_stop() local
1030 struct dummy *dum = dum_hcd->dum; in dummy_udc_stop()
1122 static void dummy_udc_pm(struct dummy *dum, struct dummy_hcd *dum_hcd, in dummy_udc_pm() argument
1127 set_link_state(dum_hcd); in dummy_udc_pm()
1134 struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(&dum->gadget); in dummy_udc_suspend() local
1137 dummy_udc_pm(dum, dum_hcd, 1); in dummy_udc_suspend()
1138 usb_hcd_poll_rh_status(dummy_hcd_to_hcd(dum_hcd)); in dummy_udc_suspend()
1145 struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(&dum->gadget); in dummy_udc_resume() local
1148 dummy_udc_pm(dum, dum_hcd, 0); in dummy_udc_resume()
1149 usb_hcd_poll_rh_status(dummy_hcd_to_hcd(dum_hcd)); in dummy_udc_resume()
1187 static int dummy_ep_stream_en(struct dummy_hcd *dum_hcd, struct urb *urb) in dummy_ep_stream_en() argument
1196 return (1 << index) & dum_hcd->stream_en_ep; in dummy_ep_stream_en()
1206 static int get_max_streams_for_pipe(struct dummy_hcd *dum_hcd, in get_max_streams_for_pipe() argument
1211 max_streams = dum_hcd->num_stream[usb_pipeendpoint(pipe)]; in get_max_streams_for_pipe()
1220 static void set_max_streams_for_pipe(struct dummy_hcd *dum_hcd, in set_max_streams_for_pipe() argument
1226 max_streams = dum_hcd->num_stream[usb_pipeendpoint(pipe)]; in set_max_streams_for_pipe()
1234 dum_hcd->num_stream[usb_pipeendpoint(pipe)] = max_streams; in set_max_streams_for_pipe()
1237 static int dummy_validate_stream(struct dummy_hcd *dum_hcd, struct urb *urb) in dummy_validate_stream() argument
1242 enabled = dummy_ep_stream_en(dum_hcd, urb); in dummy_validate_stream()
1251 max_streams = get_max_streams_for_pipe(dum_hcd, in dummy_validate_stream()
1254 dev_err(dummy_dev(dum_hcd), "Stream id %d is out of range.\n", in dummy_validate_stream()
1267 struct dummy_hcd *dum_hcd; in dummy_urb_enqueue() local
1278 dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_urb_enqueue()
1279 spin_lock_irqsave(&dum_hcd->dum->lock, flags); in dummy_urb_enqueue()
1281 rc = dummy_validate_stream(dum_hcd, urb); in dummy_urb_enqueue()
1293 if (!dum_hcd->udev) { in dummy_urb_enqueue()
1294 dum_hcd->udev = urb->dev; in dummy_urb_enqueue()
1295 usb_get_dev(dum_hcd->udev); in dummy_urb_enqueue()
1296 } else if (unlikely(dum_hcd->udev != urb->dev)) in dummy_urb_enqueue()
1297 dev_err(dummy_dev(dum_hcd), "usb_device address has changed!\n"); in dummy_urb_enqueue()
1299 list_add_tail(&urbp->urbp_list, &dum_hcd->urbp_list); in dummy_urb_enqueue()
1301 if (!dum_hcd->next_frame_urbp) in dummy_urb_enqueue()
1302 dum_hcd->next_frame_urbp = urbp; in dummy_urb_enqueue()
1307 if (!dum_hcd->timer_pending) { in dummy_urb_enqueue()
1308 dum_hcd->timer_pending = 1; in dummy_urb_enqueue()
1309 hrtimer_start(&dum_hcd->timer, ns_to_ktime(DUMMY_TIMER_INT_NSECS), in dummy_urb_enqueue()
1314 spin_unlock_irqrestore(&dum_hcd->dum->lock, flags); in dummy_urb_enqueue()
1320 struct dummy_hcd *dum_hcd; in dummy_urb_dequeue() local
1326 dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_urb_dequeue()
1327 spin_lock_irqsave(&dum_hcd->dum->lock, flags); in dummy_urb_dequeue()
1330 if (rc == 0 && !dum_hcd->timer_pending) { in dummy_urb_dequeue()
1331 dum_hcd->timer_pending = 1; in dummy_urb_dequeue()
1332 hrtimer_start(&dum_hcd->timer, ns_to_ktime(0), HRTIMER_MODE_REL_SOFT); in dummy_urb_dequeue()
1335 spin_unlock_irqrestore(&dum_hcd->dum->lock, flags); in dummy_urb_dequeue()
1406 static int transfer(struct dummy_hcd *dum_hcd, struct urb *urb, in transfer() argument
1409 struct dummy *dum = dum_hcd->dum; in transfer()
1420 if (dummy_ep_stream_en(dum_hcd, urb)) { in transfer()
1570 #define is_active(dum_hcd) ((dum_hcd->port_status & \ argument
1619 static int handle_control_request(struct dummy_hcd *dum_hcd, struct urb *urb, in handle_control_request() argument
1624 struct dummy *dum = dum_hcd->dum; in handle_control_request()
1657 if (dummy_hcd_to_hcd(dum_hcd)->speed == in handle_control_request()
1664 if (dummy_hcd_to_hcd(dum_hcd)->speed == in handle_control_request()
1671 if (dummy_hcd_to_hcd(dum_hcd)->speed == in handle_control_request()
1704 if (dummy_hcd_to_hcd(dum_hcd)->speed == in handle_control_request()
1711 if (dummy_hcd_to_hcd(dum_hcd)->speed == in handle_control_request()
1718 if (dummy_hcd_to_hcd(dum_hcd)->speed == in handle_control_request()
1789 struct dummy_hcd *dum_hcd = from_timer(dum_hcd, t, timer); in dummy_timer() local
1790 struct dummy *dum = dum_hcd->dum; in dummy_timer()
1813 dev_err(dummy_dev(dum_hcd), "bogus device speed\n"); in dummy_timer()
1820 dum_hcd->timer_pending = 0; in dummy_timer()
1822 if (!dum_hcd->udev) { in dummy_timer()
1823 dev_err(dummy_dev(dum_hcd), in dummy_timer()
1828 dum_hcd->next_frame_urbp = NULL; in dummy_timer()
1837 list_for_each_entry_safe(urbp, tmp, &dum_hcd->urbp_list, urbp_list) { in dummy_timer()
1845 if (urbp == dum_hcd->next_frame_urbp) in dummy_timer()
1851 else if (dum_hcd->rh_state != DUMMY_RH_RUNNING) in dummy_timer()
1865 dev_dbg(dummy_dev(dum_hcd), in dummy_timer()
1881 dev_dbg(dummy_dev(dum_hcd), "ep %s halted, urb %p\n", in dummy_timer()
1916 value = handle_control_request(dum_hcd, urb, &setup, in dummy_timer()
1977 total -= transfer(dum_hcd, urb, ep, limit, &status); in dummy_timer()
1991 usb_hcd_unlink_urb_from_ep(dummy_hcd_to_hcd(dum_hcd), urb); in dummy_timer()
1993 usb_hcd_giveback_urb(dummy_hcd_to_hcd(dum_hcd), urb, status); in dummy_timer()
1999 if (list_empty(&dum_hcd->urbp_list)) { in dummy_timer()
2000 usb_put_dev(dum_hcd->udev); in dummy_timer()
2001 dum_hcd->udev = NULL; in dummy_timer()
2002 } else if (!dum_hcd->timer_pending && in dummy_timer()
2003 dum_hcd->rh_state == DUMMY_RH_RUNNING) { in dummy_timer()
2005 dum_hcd->timer_pending = 1; in dummy_timer()
2006 hrtimer_start(&dum_hcd->timer, ns_to_ktime(DUMMY_TIMER_INT_NSECS), in dummy_timer()
2026 struct dummy_hcd *dum_hcd; in dummy_hub_status() local
2030 dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_hub_status()
2032 spin_lock_irqsave(&dum_hcd->dum->lock, flags); in dummy_hub_status()
2036 if (dum_hcd->resuming && time_after_eq(jiffies, dum_hcd->re_timeout)) { in dummy_hub_status()
2037 dum_hcd->port_status |= (USB_PORT_STAT_C_SUSPEND << 16); in dummy_hub_status()
2038 dum_hcd->port_status &= ~USB_PORT_STAT_SUSPEND; in dummy_hub_status()
2039 set_link_state(dum_hcd); in dummy_hub_status()
2042 if ((dum_hcd->port_status & PORT_C_MASK) != 0) { in dummy_hub_status()
2044 dev_dbg(dummy_dev(dum_hcd), "port status 0x%08x has changes\n", in dummy_hub_status()
2045 dum_hcd->port_status); in dummy_hub_status()
2047 if (dum_hcd->rh_state == DUMMY_RH_SUSPENDED) in dummy_hub_status()
2051 spin_unlock_irqrestore(&dum_hcd->dum->lock, flags); in dummy_hub_status()
2111 struct dummy_hcd *dum_hcd; in dummy_hub_control() local
2118 dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_hub_control()
2120 spin_lock_irqsave(&dum_hcd->dum->lock, flags); in dummy_hub_control()
2128 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2133 if (dum_hcd->port_status & USB_PORT_STAT_SUSPEND) { in dummy_hub_control()
2135 dum_hcd->resuming = 1; in dummy_hub_control()
2136 dum_hcd->re_timeout = jiffies + in dummy_hub_control()
2141 dev_dbg(dummy_dev(dum_hcd), "power-off\n"); in dummy_hub_control()
2143 dum_hcd->port_status &= ~USB_SS_PORT_STAT_POWER; in dummy_hub_control()
2145 dum_hcd->port_status &= ~USB_PORT_STAT_POWER; in dummy_hub_control()
2146 set_link_state(dum_hcd); in dummy_hub_control()
2157 dum_hcd->port_status &= ~(1 << wValue); in dummy_hub_control()
2158 set_link_state(dum_hcd); in dummy_hub_control()
2169 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2201 if (dum_hcd->resuming && in dummy_hub_control()
2202 time_after_eq(jiffies, dum_hcd->re_timeout)) { in dummy_hub_control()
2203 dum_hcd->port_status |= (USB_PORT_STAT_C_SUSPEND << 16); in dummy_hub_control()
2204 dum_hcd->port_status &= ~USB_PORT_STAT_SUSPEND; in dummy_hub_control()
2206 if ((dum_hcd->port_status & USB_PORT_STAT_RESET) != 0 && in dummy_hub_control()
2207 time_after_eq(jiffies, dum_hcd->re_timeout)) { in dummy_hub_control()
2208 dum_hcd->port_status |= (USB_PORT_STAT_C_RESET << 16); in dummy_hub_control()
2209 dum_hcd->port_status &= ~USB_PORT_STAT_RESET; in dummy_hub_control()
2210 if (dum_hcd->dum->pullup) { in dummy_hub_control()
2211 dum_hcd->port_status |= USB_PORT_STAT_ENABLE; in dummy_hub_control()
2214 switch (dum_hcd->dum->gadget.speed) { in dummy_hub_control()
2216 dum_hcd->port_status |= in dummy_hub_control()
2220 dum_hcd->dum->gadget.ep0-> in dummy_hub_control()
2222 dum_hcd->port_status |= in dummy_hub_control()
2231 set_link_state(dum_hcd); in dummy_hub_control()
2232 ((__le16 *) buf)[0] = cpu_to_le16(dum_hcd->port_status); in dummy_hub_control()
2233 ((__le16 *) buf)[1] = cpu_to_le16(dum_hcd->port_status >> 16); in dummy_hub_control()
2242 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2256 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2265 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2270 if (dum_hcd->active) { in dummy_hub_control()
2271 dum_hcd->port_status |= USB_PORT_STAT_SUSPEND; in dummy_hub_control()
2276 set_link_state(dum_hcd); in dummy_hub_control()
2278 & dum_hcd->dum->devstatus) != 0) in dummy_hub_control()
2279 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2285 dum_hcd->port_status |= USB_SS_PORT_STAT_POWER; in dummy_hub_control()
2287 dum_hcd->port_status |= USB_PORT_STAT_POWER; in dummy_hub_control()
2288 set_link_state(dum_hcd); in dummy_hub_control()
2293 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2300 if (!(dum_hcd->port_status & USB_PORT_STAT_CONNECTION)) in dummy_hub_control()
2304 dum_hcd->port_status = in dummy_hub_control()
2309 dum_hcd->port_status &= ~(USB_PORT_STAT_ENABLE in dummy_hub_control()
2312 dum_hcd->port_status |= USB_PORT_STAT_RESET; in dummy_hub_control()
2318 dum_hcd->dum->devstatus &= in dummy_hub_control()
2324 dum_hcd->re_timeout = jiffies + msecs_to_jiffies(50); in dummy_hub_control()
2325 set_link_state(dum_hcd); in dummy_hub_control()
2342 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2352 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2359 dev_dbg(dummy_dev(dum_hcd), in dummy_hub_control()
2366 spin_unlock_irqrestore(&dum_hcd->dum->lock, flags); in dummy_hub_control()
2368 if ((dum_hcd->port_status & PORT_C_MASK) != 0) in dummy_hub_control()
2375 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_bus_suspend() local
2379 spin_lock_irq(&dum_hcd->dum->lock); in dummy_bus_suspend()
2380 dum_hcd->rh_state = DUMMY_RH_SUSPENDED; in dummy_bus_suspend()
2381 set_link_state(dum_hcd); in dummy_bus_suspend()
2383 spin_unlock_irq(&dum_hcd->dum->lock); in dummy_bus_suspend()
2389 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_bus_resume() local
2394 spin_lock_irq(&dum_hcd->dum->lock); in dummy_bus_resume()
2398 dum_hcd->rh_state = DUMMY_RH_RUNNING; in dummy_bus_resume()
2399 set_link_state(dum_hcd); in dummy_bus_resume()
2400 if (!list_empty(&dum_hcd->urbp_list)) { in dummy_bus_resume()
2401 dum_hcd->timer_pending = 1; in dummy_bus_resume()
2402 hrtimer_start(&dum_hcd->timer, ns_to_ktime(0), HRTIMER_MODE_REL_SOFT); in dummy_bus_resume()
2406 spin_unlock_irq(&dum_hcd->dum->lock); in dummy_bus_resume()
2460 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); in urbs_show() local
2465 spin_lock_irqsave(&dum_hcd->dum->lock, flags); in urbs_show()
2466 list_for_each_entry(urbp, &dum_hcd->urbp_list, urbp_list) { in urbs_show()
2473 spin_unlock_irqrestore(&dum_hcd->dum->lock, flags); in urbs_show()
2479 static int dummy_start_ss(struct dummy_hcd *dum_hcd) in dummy_start_ss() argument
2481 hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); in dummy_start_ss()
2482 dum_hcd->timer.function = dummy_timer; in dummy_start_ss()
2483 dum_hcd->rh_state = DUMMY_RH_RUNNING; in dummy_start_ss()
2484 dum_hcd->stream_en_ep = 0; in dummy_start_ss()
2485 INIT_LIST_HEAD(&dum_hcd->urbp_list); in dummy_start_ss()
2486 dummy_hcd_to_hcd(dum_hcd)->power_budget = POWER_BUDGET_3; in dummy_start_ss()
2487 dummy_hcd_to_hcd(dum_hcd)->state = HC_STATE_RUNNING; in dummy_start_ss()
2488 dummy_hcd_to_hcd(dum_hcd)->uses_new_polling = 1; in dummy_start_ss()
2490 dummy_hcd_to_hcd(dum_hcd)->self.otg_port = 1; in dummy_start_ss()
2495 return device_create_file(dummy_dev(dum_hcd), &dev_attr_urbs); in dummy_start_ss()
2500 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_start() local
2508 return dummy_start_ss(dum_hcd); in dummy_start()
2510 spin_lock_init(&dum_hcd->dum->lock); in dummy_start()
2511 hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_SOFT); in dummy_start()
2512 dum_hcd->timer.function = dummy_timer; in dummy_start()
2513 dum_hcd->rh_state = DUMMY_RH_RUNNING; in dummy_start()
2515 INIT_LIST_HEAD(&dum_hcd->urbp_list); in dummy_start()
2526 return device_create_file(dummy_dev(dum_hcd), &dev_attr_urbs); in dummy_start()
2531 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_stop() local
2533 hrtimer_cancel(&dum_hcd->timer); in dummy_stop()
2534 dum_hcd->timer_pending = 0; in dummy_stop()
2535 device_remove_file(dummy_dev(dum_hcd), &dev_attr_urbs); in dummy_stop()
2536 dev_info(dummy_dev(dum_hcd), "stopped\n"); in dummy_stop()
2576 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_alloc_streams() local
2586 spin_lock_irqsave(&dum_hcd->dum->lock, flags); in dummy_alloc_streams()
2589 if ((1 << index) & dum_hcd->stream_en_ep) { in dummy_alloc_streams()
2599 dev_dbg(dummy_dev(dum_hcd), "Ep 0x%x only supports %u " in dummy_alloc_streams()
2609 dum_hcd->stream_en_ep |= 1 << index; in dummy_alloc_streams()
2610 set_max_streams_for_pipe(dum_hcd, in dummy_alloc_streams()
2614 spin_unlock_irqrestore(&dum_hcd->dum->lock, flags); in dummy_alloc_streams()
2623 struct dummy_hcd *dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_free_streams() local
2629 spin_lock_irqsave(&dum_hcd->dum->lock, flags); in dummy_free_streams()
2632 if (!((1 << index) & dum_hcd->stream_en_ep)) { in dummy_free_streams()
2640 dum_hcd->stream_en_ep &= ~(1 << index); in dummy_free_streams()
2641 set_max_streams_for_pipe(dum_hcd, in dummy_free_streams()
2646 spin_unlock_irqrestore(&dum_hcd->dum->lock, flags); in dummy_free_streams()
2743 struct dummy_hcd *dum_hcd; in dummy_hcd_suspend() local
2749 dum_hcd = hcd_to_dummy_hcd(hcd); in dummy_hcd_suspend()
2750 if (dum_hcd->rh_state == DUMMY_RH_RUNNING) { in dummy_hcd_suspend()