diff options
author | Dan Williams <dcbw@redhat.com> | 2010-11-19 17:04:00 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-11-30 19:44:57 -0500 |
commit | 02303f73373aa1da19dbec510ec5a4e2576f9610 (patch) | |
tree | 965bb7f33b4c96fd543803d41248c962cb79958e /drivers/usb/serial/usb-wwan.h | |
parent | 73f35c60d5c4a98061fc0f94505bf26fd4bb1a1c (diff) |
usb-wwan: implement TIOCGSERIAL and TIOCSSERIAL to avoid blocking close(2)
Some devices (ex ZTE 2726) 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.
Signed-off-by: Dan Williams <dcbw@redhat.com>
Diffstat (limited to 'drivers/usb/serial/usb-wwan.h')
-rw-r--r-- | drivers/usb/serial/usb-wwan.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb-wwan.h b/drivers/usb/serial/usb-wwan.h index 2be298a1305b..3ab77c5d9819 100644 --- a/drivers/usb/serial/usb-wwan.h +++ b/drivers/usb/serial/usb-wwan.h | |||
@@ -18,6 +18,8 @@ extern void usb_wwan_set_termios(struct tty_struct *tty, | |||
18 | extern int usb_wwan_tiocmget(struct tty_struct *tty, struct file *file); | 18 | extern int usb_wwan_tiocmget(struct tty_struct *tty, struct file *file); |
19 | extern int usb_wwan_tiocmset(struct tty_struct *tty, struct file *file, | 19 | extern int usb_wwan_tiocmset(struct tty_struct *tty, struct file *file, |
20 | unsigned int set, unsigned int clear); | 20 | unsigned int set, unsigned int clear); |
21 | extern int usb_wwan_ioctl(struct tty_struct *tty, struct file *file, | ||
22 | unsigned int cmd, unsigned long arg); | ||
21 | extern int usb_wwan_send_setup(struct usb_serial_port *port); | 23 | extern int usb_wwan_send_setup(struct usb_serial_port *port); |
22 | extern int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port, | 24 | extern int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port, |
23 | const unsigned char *buf, int count); | 25 | const unsigned char *buf, int count); |