Loading drivers/usb/core/hcd.c +6 −0 Original line number Diff line number Diff line Loading @@ -1553,6 +1553,8 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) atomic_inc(&urb->use_count); atomic_inc(&urb->dev->urbnum); usbmon_urb_submit(&hcd->self, urb); if (hcd->driver->log_urb) hcd->driver->log_urb(urb, "S", urb->status); /* NOTE requirements on root-hub callers (usbfs and the hub * driver, for now): URBs' urb->transfer_buffer must be Loading @@ -1575,6 +1577,8 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) if (unlikely(status)) { usbmon_urb_submit_error(&hcd->self, urb, status); if (hcd->driver->log_urb) hcd->driver->log_urb(urb, "E", status); urb->hcpriv = NULL; INIT_LIST_HEAD(&urb->urb_list); atomic_dec(&urb->use_count); Loading Loading @@ -1663,6 +1667,8 @@ static void __usb_hcd_giveback_urb(struct urb *urb) unmap_urb_for_dma(hcd, urb); usbmon_urb_complete(&hcd->self, urb, status); if (hcd->driver->log_urb) hcd->driver->log_urb(urb, "C", status); usb_anchor_suspend_wakeups(anchor); usb_unanchor_urb(urb); if (likely(status == 0)) Loading drivers/usb/core/hub.c +3 −1 Original line number Diff line number Diff line Loading @@ -4327,7 +4327,9 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, for (i = 0; i < GET_DESCRIPTOR_TRIES; (++i, msleep(100))) { bool did_new_scheme = false; if (use_new_scheme(udev, retry_counter)) { if (use_new_scheme(udev, retry_counter) && !((hcd->driver->flags & HCD_RT_OLD_ENUM) && !hdev->parent)) { struct usb_device_descriptor *buf; int r = 0; Loading drivers/usb/host/ehci-hcd.c +8 −0 Original line number Diff line number Diff line Loading @@ -526,6 +526,8 @@ static int ehci_init(struct usb_hcd *hcd) hw->hw_alt_next = QTD_NEXT(ehci, ehci->async->dummy->qtd_dma); /* clear interrupt enables, set irq latency */ log2_irq_thresh = ehci->log2_irq_thresh; if (log2_irq_thresh < 0 || log2_irq_thresh > 6) log2_irq_thresh = 0; temp = 1 << (16 + log2_irq_thresh); Loading Loading @@ -778,6 +780,12 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) pstatus = ehci_readl(ehci, &ehci->regs->port_status[i]); /*set RS bit in case of remote wakeup*/ if (ehci_is_TDI(ehci) && !(cmd & CMD_RUN) && (pstatus & PORT_SUSPEND)) ehci_writel(ehci, cmd | CMD_RUN, &ehci->regs->command); if (pstatus & PORT_OWNER) continue; if (!(test_bit(i, &ehci->suspended_ports) && Loading drivers/usb/host/ehci-hub.c +16 −3 Original line number Diff line number Diff line Loading @@ -275,6 +275,14 @@ int ehci_bus_suspend (struct usb_hcd *hcd) if (t1 & PORT_OWNER) set_bit(port, &ehci->owned_ports); else if ((t1 & PORT_PE) && !(t1 & PORT_SUSPEND)) { /* clear RS bit before setting SUSP bit * and wait for HCH to get set. */ if (ehci->susp_sof_bug) { spin_unlock_irq(&ehci->lock); ehci_halt(ehci); spin_lock_irq(&ehci->lock); } t2 |= PORT_SUSPEND; set_bit(port, &ehci->bus_suspended); } Loading Loading @@ -338,8 +346,9 @@ int ehci_bus_suspend (struct usb_hcd *hcd) if (ehci->bus_suspended) udelay(150); /* turn off now-idle HC */ ehci_halt (ehci); /* if this bit is set, controller is already haled */ if (!ehci->susp_sof_bug) ehci_halt(ehci); /* turn off now-idle HC */ spin_lock_irq(&ehci->lock); if (ehci->enabled_hrtimer_events & BIT(EHCI_HRTIMER_POLL_DEAD)) Loading Loading @@ -1179,7 +1188,11 @@ int ehci_hub_control( */ temp &= ~PORT_WKCONN_E; temp |= PORT_WKDISC_E | PORT_WKOC_E; ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); if (ehci->susp_sof_bug) ehci_writel(ehci, temp, status_reg); else ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); if (ehci->has_tdi_phy_lpm) { spin_unlock_irqrestore(&ehci->lock, flags); msleep(5);/* 5ms for HCD enter low pwr mode */ Loading drivers/usb/host/ehci-msm-hsic.c +2 −1 Original line number Diff line number Diff line Loading @@ -1522,7 +1522,7 @@ static struct hc_driver msm_hsic_driver = { * generic hardware linkage */ .irq = msm_hsic_irq, .flags = HCD_USB2 | HCD_MEMORY, .flags = HCD_USB2 | HCD_MEMORY | HCD_RT_OLD_ENUM, .reset = ehci_hsic_reset, .start = ehci_run, Loading Loading @@ -1558,6 +1558,7 @@ static struct hc_driver msm_hsic_driver = { .bus_suspend = ehci_hsic_bus_suspend, .bus_resume = ehci_hsic_bus_resume, .log_urb = dbg_log_event, .dump_regs = dump_hsic_regs, .set_autosuspend_delay = ehci_msm_set_autosuspend_delay, Loading Loading
drivers/usb/core/hcd.c +6 −0 Original line number Diff line number Diff line Loading @@ -1553,6 +1553,8 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) atomic_inc(&urb->use_count); atomic_inc(&urb->dev->urbnum); usbmon_urb_submit(&hcd->self, urb); if (hcd->driver->log_urb) hcd->driver->log_urb(urb, "S", urb->status); /* NOTE requirements on root-hub callers (usbfs and the hub * driver, for now): URBs' urb->transfer_buffer must be Loading @@ -1575,6 +1577,8 @@ int usb_hcd_submit_urb (struct urb *urb, gfp_t mem_flags) if (unlikely(status)) { usbmon_urb_submit_error(&hcd->self, urb, status); if (hcd->driver->log_urb) hcd->driver->log_urb(urb, "E", status); urb->hcpriv = NULL; INIT_LIST_HEAD(&urb->urb_list); atomic_dec(&urb->use_count); Loading Loading @@ -1663,6 +1667,8 @@ static void __usb_hcd_giveback_urb(struct urb *urb) unmap_urb_for_dma(hcd, urb); usbmon_urb_complete(&hcd->self, urb, status); if (hcd->driver->log_urb) hcd->driver->log_urb(urb, "C", status); usb_anchor_suspend_wakeups(anchor); usb_unanchor_urb(urb); if (likely(status == 0)) Loading
drivers/usb/core/hub.c +3 −1 Original line number Diff line number Diff line Loading @@ -4327,7 +4327,9 @@ hub_port_init (struct usb_hub *hub, struct usb_device *udev, int port1, for (i = 0; i < GET_DESCRIPTOR_TRIES; (++i, msleep(100))) { bool did_new_scheme = false; if (use_new_scheme(udev, retry_counter)) { if (use_new_scheme(udev, retry_counter) && !((hcd->driver->flags & HCD_RT_OLD_ENUM) && !hdev->parent)) { struct usb_device_descriptor *buf; int r = 0; Loading
drivers/usb/host/ehci-hcd.c +8 −0 Original line number Diff line number Diff line Loading @@ -526,6 +526,8 @@ static int ehci_init(struct usb_hcd *hcd) hw->hw_alt_next = QTD_NEXT(ehci, ehci->async->dummy->qtd_dma); /* clear interrupt enables, set irq latency */ log2_irq_thresh = ehci->log2_irq_thresh; if (log2_irq_thresh < 0 || log2_irq_thresh > 6) log2_irq_thresh = 0; temp = 1 << (16 + log2_irq_thresh); Loading Loading @@ -778,6 +780,12 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) pstatus = ehci_readl(ehci, &ehci->regs->port_status[i]); /*set RS bit in case of remote wakeup*/ if (ehci_is_TDI(ehci) && !(cmd & CMD_RUN) && (pstatus & PORT_SUSPEND)) ehci_writel(ehci, cmd | CMD_RUN, &ehci->regs->command); if (pstatus & PORT_OWNER) continue; if (!(test_bit(i, &ehci->suspended_ports) && Loading
drivers/usb/host/ehci-hub.c +16 −3 Original line number Diff line number Diff line Loading @@ -275,6 +275,14 @@ int ehci_bus_suspend (struct usb_hcd *hcd) if (t1 & PORT_OWNER) set_bit(port, &ehci->owned_ports); else if ((t1 & PORT_PE) && !(t1 & PORT_SUSPEND)) { /* clear RS bit before setting SUSP bit * and wait for HCH to get set. */ if (ehci->susp_sof_bug) { spin_unlock_irq(&ehci->lock); ehci_halt(ehci); spin_lock_irq(&ehci->lock); } t2 |= PORT_SUSPEND; set_bit(port, &ehci->bus_suspended); } Loading Loading @@ -338,8 +346,9 @@ int ehci_bus_suspend (struct usb_hcd *hcd) if (ehci->bus_suspended) udelay(150); /* turn off now-idle HC */ ehci_halt (ehci); /* if this bit is set, controller is already haled */ if (!ehci->susp_sof_bug) ehci_halt(ehci); /* turn off now-idle HC */ spin_lock_irq(&ehci->lock); if (ehci->enabled_hrtimer_events & BIT(EHCI_HRTIMER_POLL_DEAD)) Loading Loading @@ -1179,7 +1188,11 @@ int ehci_hub_control( */ temp &= ~PORT_WKCONN_E; temp |= PORT_WKDISC_E | PORT_WKOC_E; ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); if (ehci->susp_sof_bug) ehci_writel(ehci, temp, status_reg); else ehci_writel(ehci, temp | PORT_SUSPEND, status_reg); if (ehci->has_tdi_phy_lpm) { spin_unlock_irqrestore(&ehci->lock, flags); msleep(5);/* 5ms for HCD enter low pwr mode */ Loading
drivers/usb/host/ehci-msm-hsic.c +2 −1 Original line number Diff line number Diff line Loading @@ -1522,7 +1522,7 @@ static struct hc_driver msm_hsic_driver = { * generic hardware linkage */ .irq = msm_hsic_irq, .flags = HCD_USB2 | HCD_MEMORY, .flags = HCD_USB2 | HCD_MEMORY | HCD_RT_OLD_ENUM, .reset = ehci_hsic_reset, .start = ehci_run, Loading Loading @@ -1558,6 +1558,7 @@ static struct hc_driver msm_hsic_driver = { .bus_suspend = ehci_hsic_bus_suspend, .bus_resume = ehci_hsic_bus_resume, .log_urb = dbg_log_event, .dump_regs = dump_hsic_regs, .set_autosuspend_delay = ehci_msm_set_autosuspend_delay, Loading