From: lyz Date: Wed, 11 Feb 2015 02:59:23 +0000 (+0800) Subject: usb: ehci: fix test packet mode X-Git-Tag: firefly_0821_release~4263^2~48 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f0be625fab127950c8d0080f5fdc16ef58ae42c0;p=firefly-linux-kernel-4.4.55.git 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 --- 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;