aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRupesh Gujare <rupesh.gujare@atmel.com>2013-08-27 11:53:42 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-27 20:00:00 -0400
commit0140eb27756899f0d7b2ee0af111839e4006f196 (patch)
treeb83c000b486a4594200eaa9413bd31cc418e35bc
parentf9f34d57bab010e6f11ec3ebd674b4ff4fc909ee (diff)
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: Rupesh Gujare <rupesh.gujare@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/ozwpan/ozhcd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 35488608df7a..4eb2f539f335 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -57,6 +57,10 @@
57 */ 57 */
58#define EP0_TIMEOUT_COUNTER 13 58#define EP0_TIMEOUT_COUNTER 13
59 59
60/* Debounce time HCD driver should wait before unregistering.
61 */
62#define OZ_HUB_DEBOUNCE_TIMEOUT 1500
63
60/* 64/*
61 * Used to link urbs together and also store some status information for each 65 * Used to link urbs together and also store some status information for each
62 * urb. 66 * urb.
@@ -2355,6 +2359,7 @@ error:
2355 */ 2359 */
2356void oz_hcd_term(void) 2360void oz_hcd_term(void)
2357{ 2361{
2362 msleep(OZ_HUB_DEBOUNCE_TIMEOUT);
2358 tasklet_kill(&g_urb_process_tasklet); 2363 tasklet_kill(&g_urb_process_tasklet);
2359 tasklet_kill(&g_urb_cancel_tasklet); 2364 tasklet_kill(&g_urb_cancel_tasklet);
2360 platform_device_unregister(g_plat_dev); 2365 platform_device_unregister(g_plat_dev);