]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
usb: cdc-acm: drain writes on close
authorDavid Brownell <dbrownell@users.sourceforge.net>
Thu, 7 Aug 2008 01:46:10 +0000 (18:46 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Aug 2008 00:32:57 +0000 (17:32 -0700)
commite5fbab51b4219fbd1dab28666affe38a920b5f7e
treedc2d6ff5467f4eff183de712eb13403d35d13351
parent934da4635c2d05cef474e5243ef05df95b2ad264
usb: cdc-acm: drain writes on close

Add a mechanism to let the write queue drain naturally before
closing the TTY, rather than always losing that data.  There
is a timeout, so it can't wait too long.

Provide missing locking inside acm_wb_is_avail(); it matters
more now.  Note, this presumes an earlier patch was applied,
removing a call to this routine where the lock was held.

Slightly improved diagnostics on write URB completion, so we
can tell when a write URB gets killed and, if so, how much
data it wrote first ... and so that I/O path is normally
silent (and can't much change timings).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/class/cdc-acm.c
drivers/usb/class/cdc-acm.h