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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
73f35c60d5
commit
02303f7337
@@ -18,6 +18,8 @@ extern void usb_wwan_set_termios(struct tty_struct *tty,
|
||||
extern int usb_wwan_tiocmget(struct tty_struct *tty, struct file *file);
|
||||
extern int usb_wwan_tiocmset(struct tty_struct *tty, struct file *file,
|
||||
unsigned int set, unsigned int clear);
|
||||
extern int usb_wwan_ioctl(struct tty_struct *tty, struct file *file,
|
||||
unsigned int cmd, unsigned long arg);
|
||||
extern int usb_wwan_send_setup(struct usb_serial_port *port);
|
||||
extern int usb_wwan_write(struct tty_struct *tty, struct usb_serial_port *port,
|
||||
const unsigned char *buf, int count);
|
||||
|
Reference in New Issue
Block a user