From f0be625fab127950c8d0080f5fdc16ef58ae42c0 Mon Sep 17 00:00:00 2001 From: lyz Date: Wed, 11 Feb 2015 10:59:23 +0800 Subject: [PATCH] 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 --- drivers/usb/host/ehci-rockchip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/host/ehci-rockchip.c b/drivers/usb/host/ehci-rockchip.c index f3ee0bbec8d5..88ecd134c9ed 100755 --- a/drivers/usb/host/ehci-rockchip.c +++ b/drivers/usb/host/ehci-rockchip.c @@ -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; -- 2.34.1