From: wlf Date: Wed, 24 Sep 2014 11:38:03 +0000 (+0800) Subject: USB: fix usb mouse detect insensitively. X-Git-Tag: firefly_0821_release~4640^2~7^2~8 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f6920b2eed4d9bc16e9a56e2c7191686c126e92b;p=firefly-linux-kernel-4.4.55.git 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. --- 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