diff options
Diffstat (limited to 'drivers/usb/dwc2/hcd.c')
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index c78c8740db1d..fbbbac2150a5 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c | |||
@@ -257,6 +257,14 @@ static void dwc2_hcd_cleanup_channels(struct dwc2_hsotg *hsotg) | |||
257 | */ | 257 | */ |
258 | channel->qh = NULL; | 258 | channel->qh = NULL; |
259 | } | 259 | } |
260 | /* All channels have been freed, mark them available */ | ||
261 | if (hsotg->core_params->uframe_sched > 0) { | ||
262 | hsotg->available_host_channels = | ||
263 | hsotg->core_params->host_channels; | ||
264 | } else { | ||
265 | hsotg->non_periodic_channels = 0; | ||
266 | hsotg->periodic_channels = 0; | ||
267 | } | ||
260 | } | 268 | } |
261 | 269 | ||
262 | /** | 270 | /** |
@@ -1527,7 +1535,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, | |||
1527 | hprt0 |= HPRT0_RES; | 1535 | hprt0 |= HPRT0_RES; |
1528 | writel(hprt0, hsotg->regs + HPRT0); | 1536 | writel(hprt0, hsotg->regs + HPRT0); |
1529 | hprt0 &= ~HPRT0_SUSP; | 1537 | hprt0 &= ~HPRT0_SUSP; |
1530 | usleep_range(100000, 150000); | 1538 | msleep(USB_RESUME_TIMEOUT); |
1531 | 1539 | ||
1532 | hprt0 &= ~HPRT0_RES; | 1540 | hprt0 &= ~HPRT0_RES; |
1533 | writel(hprt0, hsotg->regs + HPRT0); | 1541 | writel(hprt0, hsotg->regs + HPRT0); |
@@ -1608,7 +1616,7 @@ static int dwc2_hcd_hub_control(struct dwc2_hsotg *hsotg, u16 typereq, | |||
1608 | dev_dbg(hsotg->dev, "GetHubDescriptor\n"); | 1616 | dev_dbg(hsotg->dev, "GetHubDescriptor\n"); |
1609 | hub_desc = (struct usb_hub_descriptor *)buf; | 1617 | hub_desc = (struct usb_hub_descriptor *)buf; |
1610 | hub_desc->bDescLength = 9; | 1618 | hub_desc->bDescLength = 9; |
1611 | hub_desc->bDescriptorType = 0x29; | 1619 | hub_desc->bDescriptorType = USB_DT_HUB; |
1612 | hub_desc->bNbrPorts = 1; | 1620 | hub_desc->bNbrPorts = 1; |
1613 | hub_desc->wHubCharacteristics = | 1621 | hub_desc->wHubCharacteristics = |
1614 | cpu_to_le16(HUB_CHAR_COMMON_LPSM | | 1622 | cpu_to_le16(HUB_CHAR_COMMON_LPSM | |