From: Rupesh Gujare <rupesh.gujare@atmel.com>
To: <devel@linuxdriverproject.org>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<gregkh@linuxfoundation.org>
Subject: [PATCH 3/4] staging: ozwpan: Add debounce time before unregistering.
Date: Tue, 27 Aug 2013 16:53:42 +0100 [thread overview]
Message-ID: <1377618823-12246-3-git-send-email-rupesh.gujare@atmel.com> (raw)
In-Reply-To: <1377618823-12246-1-git-send-email-rupesh.gujare@atmel.com>
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>
---
drivers/staging/ozwpan/ozhcd.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index 39f5066..d9c43c3 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -57,6 +57,10 @@
*/
#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
* urb.
@@ -2355,6 +2359,7 @@ error:
*/
void oz_hcd_term(void)
{
+ msleep(OZ_HUB_DEBOUNCE_TIMEOUT);
tasklet_kill(&g_urb_process_tasklet);
tasklet_kill(&g_urb_cancel_tasklet);
platform_device_unregister(g_plat_dev);
--
1.7.9.5
next prev parent reply other threads:[~2013-08-27 15:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-27 15:53 [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Rupesh Gujare
2013-08-27 15:53 ` [PATCH 2/4] staging: ozwpan: Reset PORT_ENABLE bit Rupesh Gujare
2013-08-27 15:53 ` Rupesh Gujare [this message]
2013-08-27 15:53 ` [PATCH 4/4] staging: ozwpan: Return error, if PD is not connected Rupesh Gujare
2013-08-27 17:27 ` Sergei Shtylyov
2013-08-27 18:57 ` [PATCH 1/4] staging: ozwpan: Increase ISOC IN buffer depth Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377618823-12246-3-git-send-email-rupesh.gujare@atmel.com \
--to=rupesh.gujare@atmel.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®