From f6920b2eed4d9bc16e9a56e2c7191686c126e92b Mon Sep 17 00:00:00 2001 From: wlf Date: Wed, 24 Sep 2014 19:38:03 +0800 Subject: [PATCH] USB: fix usb mouse detect insensitively. In hot-plug case, the hcd->frame_number variable is abnormal, and it will cause dwc_otg_hcd_handle_sof_intr to wait a long time for periodic schedule frame. So need to unset hcd->frame_number variable when devices disconnect. --- drivers/usb/dwc_otg_310/dwc_otg_hcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc_otg_310/dwc_otg_hcd.c b/drivers/usb/dwc_otg_310/dwc_otg_hcd.c index 20aaba08ff30..cc5198bb4e75 100755 --- a/drivers/usb/dwc_otg_310/dwc_otg_hcd.c +++ b/drivers/usb/dwc_otg_310/dwc_otg_hcd.c @@ -281,6 +281,7 @@ static int32_t dwc_otg_hcd_disconnect_cb(void *p) dwc_otg_hcd->non_periodic_qh_ptr = &dwc_otg_hcd->non_periodic_sched_active; dwc_otg_hcd->non_periodic_channels = 0; dwc_otg_hcd->periodic_channels = 0; + dwc_otg_hcd->frame_number =0; hprt0.d32 = DWC_READ_REG32(dwc_otg_hcd->core_if->host_if->hprt0); /* In some case, we don't disconnect a usb device, but -- 2.34.1