[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120528031210.621282534@decadent.org.uk>
Date: Mon, 28 May 2012 04:12:58 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: torvalds@...ux-foundation.org, akpm@...ux-foundation.org,
alan@...rguk.ukuu.org.uk,
Bjørn Mork <bjorn@...k.no>,
Oliver Neukum <oneukum@...e.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [ 056/117] USB: cdc-wdm: add debug messages on cleanup
3.2-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bjørn Mork <bjorn@...k.no>
commit 880bca3a2a6f159d7453e0cbcbfe2f1d8204d907 upstream.
Device state cleanup is done in either wdm_disconnect or
wdm_release depending on the order they are called. Adding
a couple of debug messages to document the program flow.
Signed-off-by: Bjørn Mork <bjorn@...k.no>
Acked-by: Oliver Neukum <oneukum@...e.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/usb/class/cdc-wdm.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/usb/class/cdc-wdm.c
+++ b/drivers/usb/class/cdc-wdm.c
@@ -588,10 +588,12 @@
if (!desc->count) {
dev_dbg(&desc->intf->dev, "wdm_release: cleanup");
kill_urbs(desc);
- if (!test_bit(WDM_DISCONNECTING, &desc->flags))
+ if (!test_bit(WDM_DISCONNECTING, &desc->flags)) {
desc->intf->needs_remote_wakeup = 0;
- else
+ } else {
+ dev_dbg(&desc->intf->dev, "%s: device gone - cleaning up\n", __func__);
cleanup(desc);
+ }
}
mutex_unlock(&wdm_mutex);
return 0;
@@ -807,6 +809,8 @@
mutex_unlock(&desc->rlock);
if (!desc->count)
cleanup(desc);
+ else
+ dev_dbg(&intf->dev, "%s: %d open files - postponing cleanup\n", __func__, desc->count);
mutex_unlock(&wdm_mutex);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists