usb: ehci: fix test packet mode
authorlyz <lyz@rock-chips.com>
Wed, 11 Feb 2015 02:59:23 +0000 (10:59 +0800)
committerlyz <lyz@rock-chips.com>
Thu, 12 Feb 2015 02:54:50 +0000 (10:54 +0800)
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>
drivers/usb/host/ehci-rockchip.c

index f3ee0bbec8d540e0cd0ce3f592104b0057c3ca15..88ecd134c9ed118febc4cc63d8fb77fc4eeaf182 100755 (executable)
@@ -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;