usb: ehci: fix test packet mode

When enter usb test packet mode the device no longer connect
normally, so stop the connect detect timer

Signed-off-by: lyz <lyz@rock-chips.com>
This commit is contained in:
lyz
2015-02-11 10:59:23 +08:00
parent 3d2090f535
commit f0be625fab

View File

@@ -214,8 +214,11 @@ static DEVICE_ATTR(debug_ehci, S_IRUGO, debug_show, NULL);
static int test_sq(struct ehci_hcd *ehci)
{
u32 portc = readl(&ehci->regs->port_status);
struct rk_ehci_hcd *rk_ehci = (struct rk_ehci_hcd *)ehci->priv;
if ((portc & PORT_PE) && !(portc & PORT_SUSPEND)) {
/* At first del usb connect detect timer */
del_timer_sync(&rk_ehci->connect_detect_timer);
writel(PORT_TEST_PKT, &ehci->regs->port_status);
EHCI_PRINT("Start packet test\n");
return 0;