Commit 0140eb27 authored by Rupesh Gujare's avatar Rupesh Gujare Committed by Greg Kroah-Hartman

staging: ozwpan: Add debounce time before unregistering.

Fixes following error caused during unloading driver.

[ 1127.542888] usb 5-1: USB disconnect, device number 2
[ 1127.542909] ozwpan ozwpan: remove, state 1
[ 1127.542933] usb usb5: USB disconnect, device number 1
[ 1127.618634] hub 5-0:1.0: hub_port_status failed (err = -19)
[ 1127.618647] hub_port_connect_change: 45 callbacks suppressed
[ 1127.618657] hub 5-0:1.0: connect-debounce failed, port 1 disabled
[ 1127.618668] hub 5-0:1.0: cannot disable port 1 (err = -19)
Signed-off-by: default avatarRupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f9f34d57
...@@ -57,6 +57,10 @@ ...@@ -57,6 +57,10 @@
*/ */
#define EP0_TIMEOUT_COUNTER 13 #define EP0_TIMEOUT_COUNTER 13
/* Debounce time HCD driver should wait before unregistering.
*/
#define OZ_HUB_DEBOUNCE_TIMEOUT 1500
/* /*
* Used to link urbs together and also store some status information for each * Used to link urbs together and also store some status information for each
* urb. * urb.
...@@ -2355,6 +2359,7 @@ int oz_hcd_init(void) ...@@ -2355,6 +2359,7 @@ int oz_hcd_init(void)
*/ */
void oz_hcd_term(void) void oz_hcd_term(void)
{ {
msleep(OZ_HUB_DEBOUNCE_TIMEOUT);
tasklet_kill(&g_urb_process_tasklet); tasklet_kill(&g_urb_process_tasklet);
tasklet_kill(&g_urb_cancel_tasklet); tasklet_kill(&g_urb_cancel_tasklet);
platform_device_unregister(g_plat_dev); platform_device_unregister(g_plat_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment