usb: cdc-acm: stop dropping tx buffers
authorDavid Brownell <dbrownell@users.sourceforge.net>
Thu, 7 Aug 2008 01:44:12 +0000 (18:44 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Aug 2008 00:32:57 +0000 (17:32 -0700)
commit934da4635c2d05cef474e5243ef05df95b2ad264
tree0ce5d1645e8e6c79253e0b1133d65800122547e1
parent672c4e1843c54227ff1bdf1fdd96f9c45c56aa85
usb: cdc-acm: stop dropping tx buffers

The "increase cdc-acm write throughput" patch left in place two
now-obsolete mechanisms, either of which can make the cdc-acm
driver drop TX data (nasty!).  This patch removes them:

  - The write_ready flag ... if an URB and buffer were found,
    they can (and should!) always be used.

  - TX path acm_wb_is_used() ... used when the buffer was just
    allocated, so that check is pointless.

Also fix a won't-yet-matter leak of a write buffer on a disconnect path.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: David Engraf <david.engraf@netcom.eu>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/class/cdc-acm.c
drivers/usb/class/cdc-acm.h