Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: host: ehci: use new USB_RESUME_TIMEOUT

Make sure we're using the new macro, so our
resume signaling will always pass certification.

Cc: <stable@vger.kernel.org> # v3.10+
Signed-off-by: Felipe Balbi <balbi@ti.com>

+11 -8
+5 -5
drivers/usb/host/ehci-hcd.c
··· 792 792 ehci->reset_done[i] == 0)) 793 793 continue; 794 794 795 - /* start 20 msec resume signaling from this port, 796 - * and make hub_wq collect PORT_STAT_C_SUSPEND to 797 - * stop that signaling. Use 5 ms extra for safety, 798 - * like usb_port_resume() does. 795 + /* start USB_RESUME_TIMEOUT msec resume signaling from 796 + * this port, and make hub_wq collect 797 + * PORT_STAT_C_SUSPEND to stop that signaling. 799 798 */ 800 - ehci->reset_done[i] = jiffies + msecs_to_jiffies(25); 799 + ehci->reset_done[i] = jiffies + 800 + msecs_to_jiffies(USB_RESUME_TIMEOUT); 801 801 set_bit(i, &ehci->resuming_ports); 802 802 ehci_dbg (ehci, "port %d remote wakeup\n", i + 1); 803 803 usb_hcd_start_port_resume(&hcd->self, i);
+6 -3
drivers/usb/host/ehci-hub.c
··· 471 471 ehci_writel(ehci, temp, &ehci->regs->port_status [i]); 472 472 } 473 473 474 - /* msleep for 20ms only if code is trying to resume port */ 474 + /* 475 + * msleep for USB_RESUME_TIMEOUT ms only if code is trying to resume 476 + * port 477 + */ 475 478 if (resume_needed) { 476 479 spin_unlock_irq(&ehci->lock); 477 - msleep(20); 480 + msleep(USB_RESUME_TIMEOUT); 478 481 spin_lock_irq(&ehci->lock); 479 482 if (ehci->shutdown) 480 483 goto shutdown; ··· 945 942 temp &= ~PORT_WAKE_BITS; 946 943 ehci_writel(ehci, temp | PORT_RESUME, status_reg); 947 944 ehci->reset_done[wIndex] = jiffies 948 - + msecs_to_jiffies(20); 945 + + msecs_to_jiffies(USB_RESUME_TIMEOUT); 949 946 set_bit(wIndex, &ehci->resuming_ports); 950 947 usb_hcd_start_port_resume(&hcd->self, wIndex); 951 948 break;