aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial/usb_debug.c
AgeCommit message (Collapse)Author
2009-06-15USB: serial: usb_debug,usb_generic_serial: implement sysrq and serial breakJason Wessel
The usb_debug driver was modified to implement serial break handling by using a "magic" data packet comprised of the sequence: 0x00 0xff 0x01 0xfe 0x00 0xfe 0x01 0xff When the tty layer requests a serial break the usb_debug driver sends the magic packet. On the receiving side the magic packet is thrown away or a sysrq is activated depending on what kernel .config options have been set. The generic serial driver was modified as well as the usb serial headers to generically implement sysrq processing in the same way the non usb uart based drivers implement the sysrq handling. This will allow other usb serial devices to implement sysrq handling as desired. The new usb serial functions are named similarly and implemented similarly to the uart functions as follows: usb_serial_handle_break <-> uart_handle_break usb_serial_handle_sysrq_char <-> uart_handle_sysrq_char Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-15USB: usb_debug, usb_generic_serial: implement multi urb writeJason Wessel
The usb_debug driver, when used as the console, will always fail to insert the carriage return and new line sequence as well as randomly drop console output. This is a result of only having the single write_urb and that the tty layer will have a lock that prevents the processing of the back to back urb requests. The solution is to allow more than one urb to be outstanding and have a slightly deeper transmit queue. The idea and some code is borrowed from the ftdi_sio usb driver. The generic usb serial driver was modified so as to allow the classic method of 1 write urb, or a multi write urb scheme with N allowed outstanding urbs where N is controlled by max_in_flight_urbs. When max_in_flight_urbs in a "struct usb_serial_driver" is non zero the multi write urb scheme will be used. The size of 4000 was selected for the usb_debug driver so that the driver lowers possibility of losing the queued console messages during the kernel startup. Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: serial: usb_debug: Make staticRoel Kluin
Sparse asked whether these could be static. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-22usb_serial: API all changeAlan Cox
USB serial likes to use port->tty back pointers for the real work it does and to do so without any actual locking. Unfortunately when you consider hangup events, hangup/parallel reopen or even worse hangup followed by parallel close events the tty->port and port->tty pointers are not guaranteed to be the same as port->tty is the active tty while tty->port is the port the tty may or may not still be attached to. So rework the entire API to pass the tty struct. For console cases we need to pass both for now. This shows up multiple drivers that immediately crash with USB console some of which have been fixed in the process. Longer term we need a proper tty as console abstraction Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-07-21USB: debug port converter does not accept more than 8 byte packetsAleksey Gorelov
USB debug port only supports 8 byte rx/tx packets. Although spec implies that "if a packet larger than eight bytes is received from the remote computer, the device must break the larger packet into eight-byte packets before sending the data to the Debug Port", the real PLX NET20DC device does not handle it right - data is corrupted on debug port end if serial interface sends >8 byte urbs. Patch below fixes the issue by limiting tx urb to 8 byte. Signed off by: Aleks Gorelov <dared1st@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24USB: serial: remove unneeded number endpoints settingsGreg Kroah-Hartman
The usb-serial core no longer checks these fields so remove them from all of the individual drivers. They will be removed from the usb-serial core in a patch later in the series. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: add driver for the USB debug devicesGreg Kroah-Hartman
It's a simple usb-serial driver that just creates a tty device to read and write from. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>