cdc-acm: implement TIOCSSERIAL to avoid blocking close(2)
authorDan Williams <dcbw@redhat.com>
Thu, 8 Nov 2012 18:47:41 +0000 (12:47 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Dec 2012 19:07:41 +0000 (11:07 -0800)
commit45d6c5dd9615c481066d3377ad35edc681393fac
tree73486633d7a72fede9a9a1905bdb701b3e7bc5a6
parentf99b4b46d8e4a98fc1c4386a78f5a94296b6ebb0
cdc-acm: implement TIOCSSERIAL to avoid blocking close(2)

commit ba2d8ce9db0a61505362bb17b8899df3d3326146 upstream.

Some devices (ex Nokia C7) simply don't respond at all when data is sent
to some of their USB interfaces.  The data gets stuck in the TTYs queue
and sits there until close(2), which them blocks because closing_wait
defaults to 30 seconds (even though the fd is O_NONBLOCK).  This is
rarely desired.  Implement the standard mechanism to adjust closing_wait
and let applications handle it how they want to.

See also 02303f73373aa1da19dbec510ec5a4e2576f9610 for usb_wwan.c.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Acked-by: Oliver Neukum <oneukum@suse.de>
Tested-by: Aleksander Morgado <aleksander@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-acm.c