aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial
AgeCommit message (Collapse)AuthorFilesLines
2010-05-20USB: serial: refactor read urb submission in generic driverJohan Hovold2-25/+9
Use the already exported function for submitting the read urb associated with a usb_serial_port. Make sure it returns the result of usb_submit_urb and rename to the more descriptive usb_serial_generic_submit_read_urb. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: refactor generic closeJohan Hovold6-21/+8
Export usb_serial_generic_close so that drivers can easily kill the read and write urb and make sure that the write fifo is reset. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: clear fifo on closeJohan Hovold1-1/+7
Make sure fifo is emptied on close. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: fix missing locking on fifo in write callbackJohan Hovold1-2/+5
On errors the fifo was reset without any locking. This could race with write which do kfifo_put and perhaps also chars_in_buffer and write_room. Every other access to the fifo is protected using the port lock so better add it to the error path as well. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: fix generic chars_in_bufferJohan Hovold1-4/+11
Make sure chars_in_buffer accounts also for data in host stack queues. This fixes the problem with tty_wait_until_sent returning too soon at close which could cause the final write urb to be cancelled. Reported-by: Pete Zaitcev <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: pl2303: increase bulk-in buffer size to 256 byteJohan Hovold1-0/+1
The pl2303 requires a bulk-in buffer larger than endpoint size to keep up at high baudrates without loosing data. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: pl2303: increase the bulk-out buffer size to 256 byteJohan Hovold1-0/+1
Increase the bulk-out buffer size from 64 to 256 byte. This gives a significant increase in throughput already at 1Mbaud as well as lowered CPU usage. The buffer is big enough to keep up also at 3Mbaud (128b would not suffice). 64b 256b 921k: 640 KB/s 870 KB/s 3M: 640 KB/s 2520 KB/s Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: cp210x: increase bulk-in buffer size to 256 byteJohan Hovold1-0/+1
The cp210x requires a bulk-in buffer larger than endpoint size to keep up at high baudrates without loosing data. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: cp210x: increase the bulk-out buffer size to 256 byteJohan Hovold1-0/+1
Increase the bulk-out buffer size from 64 to 256 byte. This gives a significant increase in throughput already at 1Mbaud (e.g. 710 instead of 640 KB/s) as well as lowered CPU usage. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: serial: allow drivers to define bulk buffer sizesJohan Hovold4-71/+11
Allow drivers to define custom bulk in/out buffer sizes in struct usb_serial_driver. If not set, fall back to the default buffer size which matches the endpoint size. Three drivers are currently freeing the pre-allocated buffers and allocating larger ones to achieve this at port probe (ftdi_sio) or even at port open (ipaq and iuu_phoenix), which needless to say is suboptimal. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb: fix serial build when SYSRQ is disabledRandy Dunlap1-0/+9
Fix build error when CONFIG_MAGIC_SYSRQ is not enabled: drivers/usb/serial/generic.c:566: error: implicit declaration of function 'handle_sysrq' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB Serial Driver: ZIO MotherboardVijay Kumar3-0/+73
Add ZIO Motherboard USB serial interface driver. Signed-off-by: Vijay Kumar B. <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb-console: pass baud from console to the initial tty openJason Wessel1-12/+10
The usb console code has had a long standing problem of not being able to pass the baud rate from the kernel argument console=ttyUSB0,BAUD down to the initial tty open, unless you were willing to settle for 9600 baud. The solution is to directly use tty_init_termios() in usb_console_setup() as this will preserve any changes to the initial termios setting on future opens. CC: Alan Cox <[email protected]> CC: Alan Stern <[email protected]> Signed-off-by: Jason Wessel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20usb-serial: Use tty_port version console instead of usb_serial_portJason Wessel5-9/+8
Replace all instances of using the console variable in struct usb_serial_port with the struct tty_port version. CC: Alan Cox <[email protected]> CC: Alan Stern <[email protected]> CC: Oliver Neukum <[email protected]> CC: Andrew Morton <[email protected]> CC: [email protected] CC: [email protected] Signed-off-by: Jason Wessel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-04-30USB: ti_usb: fix printk format warningRandy Dunlap1-1/+1
Fix printk format warning in usbserial/ti_usb: drivers/usb/serial/ti_usb_3410_5052.c:1738: warning: format '%d' expects type 'int', but argument 5 has type 'size_t' Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-04-30USB: serial: option: add cinterion device idGreg Kroah-Hartman1-0/+3
This adds a device id for a Cinterion device. Reported-by: John Race <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-04-30USB: serial: option: ZTEAC8710 Support with Device ID 0xffffMahesh Kuruganti1-0/+2
PATCH TO EXTEND SUPPORT TO AC8710 WITH 0xFFFF Product ID. Signed-off-by: Mahesh Kuruganti <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-04-30USB: serial: pl2303: Hybrid reader Uniform HCR331Simone Contini2-0/+2
I tried a magnetic stripe reader (http://www.kimaldi.com/kimaldi_eng/productos/lectores_de_tarjetas/lectores_tarjeta_chip_y_dni/lector_hibrido_uniform_hcr_331) and I see that it is interfaced with a PL2303. I wrote a patch to use your driver which simply adds the product ID for the device and it seems working fine. From: Simone Contini <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-04-30USB: option: add ID for ZTE MF 330Dominik Brodowski1-0/+5
Based on the information provided for by Paweł Drobek, add a second vendor ID and the correct product ID for ZTE MF 330. Reported-by: Paweł Drobek <[email protected]> Signed-off: Dominik Brodowski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-04-22USB: pl2303: add AdLink ND-6530 USB IDsManuel Jander2-0/+5
I read a rumor that the AdLink ND6530 USB RS232, RS422 and RS485 isolated adapter is actually a PL2303 based usb serial adapter. I tried it out, and as far as I can tell it works. Signed-off-by: Manuel Jander <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-04-22USB: Add id for HP ev2210 a.k.a Sierra MC5725 miniPCI-e Cell Modem.William Lightning1-0/+1
Signed-off-by: William Lightning <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-04-22USB: qcaux: add LG Rumor and Sanyo Katana LX device IDsDan Williams1-0/+10
These phones also have the familiar ttyACM0/ttyUSB0 schizophrenia when placed into "Dial-up Networking" mode after connecting a USB cable. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-04-22USB: ti_usb_3410_5052: adding multitech dialup fax/modem devicesAlex Manoussakis2-4/+25
The following patch adds support for Multitech Systems' MT9234MU and MT9234ZBA usb dialup fax modems. It is based on a patch and firmware provided to me by Multitech Systems' support, after I reported to them that my MT9234MU modem was not working with recent linux kernels. Signed-off-by: Alex Manoussakis <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-30include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo11-1/+11
implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <[email protected]> Guess-its-ok-by: Christoph Lameter <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Lee Schermerhorn <[email protected]>
2010-03-19Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6Linus Torvalds1-0/+1
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6: tty_port,usb-console: Fix usb serial console open/close regression tty: cpm_uart: use resource_size() tty_buffer: Fix distinct type warning hvc_console: Fix race between hvc_close and hvc_remove uartlite: Fix build on sparc. tty: Take a 256 byte padding into account when buffering below sub-page units Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"
2010-03-19USB: cp210x: Remove double usb_control_msg from cp210x_set_configMichael Brunner1-5/+0
This patch removes a double usb_control_msg that sets the cp210x configuration registers a second time when calling cp210x_set_config. For data sizes >2 the second write gets corrupted. The patch has been created against 2.6.34-rc1, but all cp210x driver revisions are affected. Signed-off-by: Michael Brunner <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: ftdi_sio: Fix locking for change_speed() functionAlessio Igor Bogani1-2/+4
The change_speed() function should be serialized against multiple calls. Use the cfg_lock mutex to do this. Signed-off-by: Alessio Igor Bogani <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: option.c: Add Pirelli VID/PID and indicate Pirelli's modem interface is ↵spark1-0/+43
0xff Signed-off-by: spark <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: serial: Fix module name typo for qcaux Kconfig entry.Stefan Schmidt1-2/+2
The module is called qcaux and not moto_modem. Also use help instead of ---help-- to be in sync with the other Kconfig entries. Signed-off-by: Stefan Schmidt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: option: add support for a new CMOTECH device to usb/serial/optionNathaniel McCallum1-0/+2
Signed-off-by: Nathaniel McCallum <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: option: move hardcoded PID to a macro in usb/serial/optionNathaniel McCallum1-1/+2
Signed-off-by: Nathaniel McCallum <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: option: fix incorrect manufacturer name in usb/serial/option: ↵Nathaniel McCallum1-2/+2
MAXON->CMOTECH Signed-off-by: Nathaniel McCallum <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: serial: ftdi: add CONTEC vendor and product idDaniel Sangorrin2-0/+8
This is a patch to ftdi_sio_ids.h and ftdi_sio.c that adds identifiers for CONTEC USB serial converter. I tested it with the device COM-1(USB)H [[email protected]: keep the VIDs sorted a bit] Signed-off-by: Daniel Sangorrin <[email protected]> Cc: Andreas Mohr <[email protected]> Cc: Radek Liboska <[email protected]> Cc: stable <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: qcserial: add new device idsBernhard Rosenkraenzer1-0/+29
This patch adds various USB device IDs for Gobi 2000 devices, as found in the drivers available at https://www.codeaurora.org/wiki/GOBI_Releases Signed-off-by: Bernhard Rosenkraenzer <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: Option: Add support for a variant of DLink DWM 652 U5Huang Ying1-1/+2
I found a DLink DWM 652 U5 USB 3G modem has product ID 0xce1e instead of orignal 0xce16. The new ID is added. And I found there are two entries for 0xce16, one has raw number, the other has symbol DLINK_PRODUCT_DWM_652_U5. This is fixed too. Signed-off-by: Huang Ying <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: serial: use port endpoint size to determine if ep is availableJohan Hovold1-11/+19
It is possible to have a multi-port device with a port lacking an in or out bulk endpoint. Only checking for num_bulk_in or num_bulk_out is thus not sufficient to determine whether a specific port has an in or out bulk endpoint. This fixes potential null pointer dereferences in the generic open and write routines, as well as access to uninitialised fifo in write_room and chars_in_buffer. Also let write fail with ENODEV (instead of 0) on missing out endpoint (also on zero-length writes). Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: serial: fix softint not being called on errorsJohan Hovold1-10/+5
Make sure usb_serial_port_softint is called on errors also when using multi urb writes. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19USB: serial: fix error message on close in generic driverJohan Hovold1-1/+3
Resubmitting read urb fails with -EPERM if completion handler runs while urb is being killed on close. This should not be reported as an error. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-19tty_port,usb-console: Fix usb serial console open/close regressionJason Wessel1-0/+1
Commit e1108a63e10d344284011cccc06328b2cd3e5da3 ("usb_serial: Use the shutdown() operation") breaks the ability to use a usb console starting in 2.6.33. This was observed when using console=ttyUSB0,115200 as a boot argument with an FTDI device. The error is: ftdi_sio ttyUSB0: ftdi_submit_read_urb - failed submitting read urb, error -22 The handling of the ASYNCB_INITIALIZED changed in 2.6.32 such that in tty_port_shutdown() it always clears the flag if it is set. The fix is to add a variable to the tty_port struct to indicate when the tty port is a console. CC: Alan Cox <[email protected]> CC: Alan Stern <[email protected]> CC: Oliver Neukum <[email protected]> CC: Andrew Morton <[email protected]> Signed-off-by: Jason Wessel <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-08Merge branch 'for-next' into for-linusJiri Kosina3-3/+3
Conflicts: Documentation/filesystems/proc.txt arch/arm/mach-u300/include/mach/debug-macro.S drivers/net/qlge/qlge_ethtool.c drivers/net/qlge/qlge_main.c drivers/net/typhoon.c
2010-03-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds53-652/+1014
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (220 commits) USB: backlight, appledisplay: fix incomplete registration failure handling USB: pl2303: remove unnecessary reset of usb_device in urbs USB: ftdi_sio: remove obsolete check in unthrottle USB: ftdi_sio: remove unused tx_bytes counter USB: qcaux: driver for auxiliary serial ports on Qualcomm devices USB: pl2303: initial TIOCGSERIAL support USB: option: add Longcheer/Longsung vendor ID USB: fix I2C API usage in ohci-pnx4008. USB: usbmon: mask seconds properly in text API USB: sisusbvga: no unnecessary GFP_ATOMIC USB: storage: onetouch: unnecessary GFP_ATOMIC USB: serial: ftdi: add CONTEC vendor and product id USB: remove references to port->port.count from the serial drivers USB: tty: Prune uses of tty_request_room in the USB layer USB: tty: Add a function to insert a string of characters with the same flag USB: don't read past config->interface[] if usb_control_msg() fails in usb_reset_configuration() USB: tty: kill request_room for USB ACM class USB: tty: sort out the request_room handling for whiteheat USB: storage: fix misplaced parenthesis USB: vstusb.c: removal of driver for Vernier Software & Technology, Inc., devices and spectrometers ...
2010-03-02USB: pl2303: remove unnecessary reset of usb_device in urbsJohan Hovold1-6/+0
URBs are initialised at probe and do not change. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02USB: ftdi_sio: remove obsolete check in unthrottleJohan Hovold1-2/+1
No need to check ASYNCB_INITIALIZED anymore as commit e1108a63e10d344284011cccc06328b2cd3e5da3 (usb_serial: Use the shutdown() operation) make sure that there is no longer any call to unthrottle after device specific close (in which the read urb is killed). Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02USB: ftdi_sio: remove unused tx_bytes counterJohan Hovold1-6/+0
Remove counter that is never exported. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02USB: qcaux: driver for auxiliary serial ports on Qualcomm devicesDan Williams3-0/+108
qcaux: add driver for QCDM-capable ports on various devices Many Qualcomm-based devices provide a CDC-ACM port which accepts normal AT commands and PPP connections. But they only provide one which makes status or signal strength requests impossible while PPP is active. They also provide secondary USB interfaces that talk the Qualcomm Diagnostic Monitor (QCDM) protocol which can be used for status and strength. Make those QCDM ports accessible. Signed-off-by: Dan Williams <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02USB: pl2303: initial TIOCGSERIAL supportJohn Tsiombikas1-0/+13
I've got a trivial patch for the pl2303 driver, that's what I needed to make the wacom serial tablet driver work properly. It uses the TIOCGSERIAL ioctl to determine if it's talking to a serial device or not, which I gather is rather common, but the pl2303 driver didn't implement that ioctl. Here's a patch, I'm not sure it's absolutely correct, I mostly looked at other similar usbserial drivers to see what I must do, but it works for me. Signed-off-by: John Tsiombikas <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02USB: option: add Longcheer/Longsung vendor IDDan Williams1-2/+7
Longcheer is a Chinese company that manufactures the devices which a bunch of different companies like Alcatel, 4G Systems, and Mobidata rebrand. While I can't find Longcheer's USB ID registered anywhere, it's pretty clear the ID is theirs. Signed-off-by: Dan Williams <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02USB: serial: ftdi: add CONTEC vendor and product idDaniel Sangorrin2-0/+8
This is a patch to ftdi_sio_ids.h and ftdi_sio.c that adds identifiers for CONTEC USB serial converter. I tested it with the device COM-1(USB)H Signed-off-by: Daniel Sangorrin <[email protected]> Cc: Andreas Mohr <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02USB: remove references to port->port.count from the serial driversAlan Stern11-126/+66
This patch (as1344) removes references to port->port.count from the USB serial drivers. Now that serial ports are properly reference counted, port.count checking is unnecessary and incorrect. Drivers should assume that the port is in use from the time the open method runs until the close method is called. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02USB: tty: Prune uses of tty_request_room in the USB layerAlan Cox24-79/+25
We have lots of callers that do not need to do this in the first place. Remove the calls as they both cost CPU and for big buffers can mess up the multi-page allocation avoidance. Signed-off-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>