diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index 2d6d22951326..73d2f24050ab 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -684,6 +684,7 @@ static int dummy_wakeup (struct usb_gadget *_gadget) | |||
684 | /* hub notices our request, issues downstream resume, etc */ | 684 | /* hub notices our request, issues downstream resume, etc */ |
685 | dum->resuming = 1; | 685 | dum->resuming = 1; |
686 | dum->re_timeout = jiffies + msecs_to_jiffies(20); | 686 | dum->re_timeout = jiffies + msecs_to_jiffies(20); |
687 | mod_timer (&dummy_to_hcd (dum)->rh_timer, dum->re_timeout); | ||
687 | return 0; | 688 | return 0; |
688 | } | 689 | } |
689 | 690 | ||
@@ -709,6 +710,8 @@ static int dummy_pullup (struct usb_gadget *_gadget, int value) | |||
709 | dum->pullup = (value != 0); | 710 | dum->pullup = (value != 0); |
710 | set_link_state (dum); | 711 | set_link_state (dum); |
711 | spin_unlock_irqrestore (&dum->lock, flags); | 712 | spin_unlock_irqrestore (&dum->lock, flags); |
713 | |||
714 | usb_hcd_poll_rh_status (dummy_to_hcd (dum)); | ||
712 | return 0; | 715 | return 0; |
713 | } | 716 | } |
714 | 717 | ||
@@ -811,6 +814,8 @@ usb_gadget_register_driver (struct usb_gadget_driver *driver) | |||
811 | dum->pullup = 1; | 814 | dum->pullup = 1; |
812 | set_link_state (dum); | 815 | set_link_state (dum); |
813 | spin_unlock_irq (&dum->lock); | 816 | spin_unlock_irq (&dum->lock); |
817 | |||
818 | usb_hcd_poll_rh_status (dummy_to_hcd (dum)); | ||
814 | return 0; | 819 | return 0; |
815 | } | 820 | } |
816 | EXPORT_SYMBOL (usb_gadget_register_driver); | 821 | EXPORT_SYMBOL (usb_gadget_register_driver); |
@@ -845,6 +850,7 @@ usb_gadget_unregister_driver (struct usb_gadget_driver *driver) | |||
845 | set_link_state (dum); | 850 | set_link_state (dum); |
846 | spin_unlock_irqrestore (&dum->lock, flags); | 851 | spin_unlock_irqrestore (&dum->lock, flags); |
847 | 852 | ||
853 | usb_hcd_poll_rh_status (dummy_to_hcd (dum)); | ||
848 | return 0; | 854 | return 0; |
849 | } | 855 | } |
850 | EXPORT_SYMBOL (usb_gadget_unregister_driver); | 856 | EXPORT_SYMBOL (usb_gadget_unregister_driver); |
@@ -1669,6 +1675,9 @@ static int dummy_hub_control ( | |||
1669 | retval = -EPIPE; | 1675 | retval = -EPIPE; |
1670 | } | 1676 | } |
1671 | spin_unlock_irqrestore (&dum->lock, flags); | 1677 | spin_unlock_irqrestore (&dum->lock, flags); |
1678 | |||
1679 | if ((dum->port_status & PORT_C_MASK) != 0) | ||
1680 | usb_hcd_poll_rh_status (hcd); | ||
1672 | return retval; | 1681 | return retval; |
1673 | } | 1682 | } |
1674 | 1683 | ||
@@ -1745,6 +1754,7 @@ static int dummy_start (struct usb_hcd *hcd) | |||
1745 | /* only show a low-power port: just 8mA */ | 1754 | /* only show a low-power port: just 8mA */ |
1746 | hcd->power_budget = 8; | 1755 | hcd->power_budget = 8; |
1747 | hcd->state = HC_STATE_RUNNING; | 1756 | hcd->state = HC_STATE_RUNNING; |
1757 | hcd->uses_new_polling = 1; | ||
1748 | 1758 | ||
1749 | #ifdef CONFIG_USB_OTG | 1759 | #ifdef CONFIG_USB_OTG |
1750 | hcd->self.otg_port = 1; | 1760 | hcd->self.otg_port = 1; |