summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
AgeCommit message (Collapse)AuthorFilesLines
2009-03-24usb-serial: fix usb_serial_register bug when boot with nousb paramDave Young1-0/+3
With "nousb" cmdline booting, built-in serial drivers (ie. airecable) will trigger kernel oops. Indeed, if nousb, usb_serial_init will failed, and the usb serial bus type will not be registerd, then usb_serial_register call driver_register which try to register the driver to a not registered bus. Here add usb_disabled() check in usb_serial_register to fix it. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial: add qualcomm wireless modem driverGreg Kroah-Hartman3-0/+155
Driver originally written by Qualcomm, but rewritten by me due to the totally different coding style. Cleaned up the probe logic to make a bit more sense, this is one wierd device. They could have prevented all of this by just writing sane firmware for the modem. Cc: Tamm Liu <tamml@qualcomm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: symbolserial: log the ioctl commandsGreg Kroah-Hartman1-0/+59
We need to figure out what userspace programs are expecting from this driver, so log them so we can try to get it right. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial: add symbol serial driverGreg Kroah-Hartman3-0/+350
This is for the Symbol 6608 barcode scanner in a fake "HID" mode. Thanks to Dalibor Grgec for working with me to get this to start to work properly. Cc: Dalibor Grgec <dalibor.grgec@zemris.fer.hr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial: refuse to open recently removed USB Serial devicesJames Woodcock1-0/+5
A USB-serial converter device is plugged into a system, and a process opens it's device node. If the device is physically removed whilst the process still has its device node open, then other processes can sucessfully open the now non-existent device's node. I would expect that open() on a device that has been physically removed should return ENODEV. This is manifesting itself with getty on my system. I do the following: 1. set up inittab to spawn getty on ttyUSB0, eg: T1:23:respawn:/sbin/getty -L ttyUSB0 115200 vt100 2. Plug in USB-serial converter cable 3. Wait for a login prompt on a terminal program attached to the serial cable 4. Login 5. Pull the USB-serial converter cable from the box 6. getty doesn't realise that ttyUSB0 no longer exists as /dev/ttyUSB0 can still be opened. 7. Re-insert the USB-serial converter cable 8. You should no longer get a login prompt over the serial cable, as the the USB-serial cable now shows up as /dev/ttyUSB1, and getty is trying to talk to /dev/ttyUSB0. The attached patch will cause open("/dev/ttyUSB0", O_RDONLY) to return ENODEV after the USB-serial converter has been pulled. The patch was created against 2.6.28.1. I can supply it against something else if needs be. It is fairly simple, so should be OK. I am using a pl2303 device, although I don't think that makes any difference. From: James Woodcock <James.Woodcock@ACULAB.COM> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial: remove recourse to generic methodOliver Neukum1-1/+0
This removes the fallback to the generic method. It is cleaner to explicitely request it. Introducing this was my mistake. This will be solved by an explicit test and the driver being allowed to request what it needs to be done upon resumption. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial: opticon: add serial line ioctlsGreg Kroah-Hartman1-1/+64
This lets userspace determine what the state of the RTS line is, which is what is needed to properly handle data flow for this device (it raises RTS when there is data to be sent from it.) Cc: Kees Stoop <kees.stoop@opticon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial: opticon: add write supportGreg Kroah-Hartman1-2/+122
This patch allows data to be sent to the scanner. Cc: Kees Stoop <kees.stoop@opticon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: ftdi_sio: remove pointless syslog spewDavid Brownell1-9/+2
Remove some pointless messages from the FTDI serial driver; I found these filling up syslog on one system. Also remove a pointless "break" after a "return" in the same area. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial: use generic method if no alternative is provided in usb serial ↵Oliver Neukum1-2/+5
layer This patch makes use of the generic method if a serial driver provides no implementation. This simplifies implementing suspend/resume support in serial drivers. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial: export symbol of usb_serial_generic_resumeOliver Neukum1-0/+1
This exports a symbol for usb_serial_generic_resume, so that modules can use it. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial generic resume function fixOliver Neukum1-8/+0
This removes an unnecessary check for autoresume from the generic resume method. The check has been obsoleted by the now delayed increase of the usage counter which makes the error this check prevented impossible. This change allows drivers which only use the bulk read URB the use of the generic method even if they support autosuspend. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: serial: introduce a flag into the usb serial layer to tell drivers that ↵Oliver Neukum1-0/+4
their URBs are killed due to suspension This patch introduces a flag into the usb serial layer to tell drivers that their URBs are killed due to suspension. That is necessary to let drivers know whether they should report an error back. Signed-off-by: Oliver Neukum <oneukum@suse.de> Hi Greg, this is for 2.6.30. Patches to use this in drivers are under development. Regards Oliver
2009-03-24USB: suspend/resume for opticon driverOliver Neukum1-0/+26
this does the standard support for suspend/resume for the opticon driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: suspend/resume support for option driverOliver Neukum1-6/+80
This patch implements suspend and resume methods for the option driver. With my hardware I can even suspend the system and keep up a connection for a short time. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: usb-serial ch341: support for DTR/RTS/CTSWerner Cornelius1-72/+302
Fixup of Werner Cornelius patch to the ch341 USB-serial driver, which adds: - support all baudrates, not just a hard-coded set - support for controlling DTR, RTS and CTS Features still missing: - character length other than 8 bits - parity settings - break control I adapted his patch for the new usb_serial API introduced in 2.6.25-git8 by Alan Cox on 22 July 2008. Non-compliance to the new API was a reason for refusing a similar patch from Tollef Fog Heen. Usage example by Tollef Fog Heen : TEMPer USB thermometer <http://err.no/src/TEMPer.c> Signed-off-by: Werner Cornelius <Werner.Cornelius@cornelius-consult.de> Signed-off-by: Boris Hajduk <boris@hajduk.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: drivers: use USB API functions rather than constantsJulia Lawall1-1/+1
This set of patches introduces calls to the following set of functions: usb_endpoint_dir_in(epd) usb_endpoint_dir_out(epd) usb_endpoint_is_bulk_in(epd) usb_endpoint_is_bulk_out(epd) usb_endpoint_is_int_in(epd) usb_endpoint_is_int_out(epd) usb_endpoint_num(epd) usb_endpoint_type(epd) usb_endpoint_xfer_bulk(epd) usb_endpoint_xfer_control(epd) usb_endpoint_xfer_int(epd) usb_endpoint_xfer_isoc(epd) In some cases, introducing one of these functions is not possible, and it just replaces an explicit integer value by one of the following constants: USB_ENDPOINT_XFER_BULK USB_ENDPOINT_XFER_CONTROL USB_ENDPOINT_XFER_INT USB_ENDPOINT_XFER_ISOC An extract of the semantic patch that makes these changes is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r1@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) == - \(USB_ENDPOINT_XFER_CONTROL\|0\)) + usb_endpoint_xfer_control(epd) @r5@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) == - \(USB_DIR_IN\|0x80\)) + usb_endpoint_dir_in(epd) @inc@ @@ #include <linux/usb.h> @depends on !inc && (r1||r5)@ @@ + #include <linux/usb.h> #include <linux/usb/...> // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24USB: Remove redundant test in pxa27x_udc and ftdi_sioJulia Lawall1-9/+7
priv is checked not to be NULL near the beginning of the function and not changed subsequently, making the test redundant. A simplified version of the semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; position p1,p2; @@ if (x@p1 == NULL || ...) { ... when forall return ...; } ... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\) ( x@p2 == NULL | x@p2 != NULL ) // another path to the test that is not through p1? @s exists@ local idexpression r.x; position r.p1,r.p2; @@ ... when != x@p1 ( x@p2 == NULL | x@p2 != NULL ) @fix depends on !s@ position r.p1,r.p2; expression x,E; statement S1,S2; @@ ( - if ((x@p2 != NULL) || ...) S1 | - if ((x@p2 == NULL) && ...) S1 | - BUG_ON(x@p2 == NULL); ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: Add device id for Option GTM380 to option driverAchilleas Kotsis1-0/+2
Option GTM380 in Modem mode uses Product ID 0x7201. This has been tested and works on production systems for over 6 months. Signed-off-by: Achilleas Kotsis <akots@exponent.gr> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: Add Vendor/Product ID for new CDMA U727 to option driverDirk Hohndel1-0/+2
* newer versions of the Novatel Wireless U727 CDMA 3G USB stick have a different Product ID (0x5010); adding this ID makes them work just fine with the option driver Signed-off-by: Dirk Hohndel <hohndel@infradead.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: Option: let cdc-acm handle Sony Ericsson F3507g / Dell 5530Dan Williams1-8/+0
The generic cdc-acm driver is now the best one to handle Sony Ericsson F3507g-based devices (which the Dell 5530 is a rebrand of), now that all the pieces are in place (ie, cac477e8f1038c41b6f29d3161ce351462ef3df7). Removing the IDs from option allows cdc-acm to handle the device. Signed-off-by: Dan Williams <dcbw@redhat.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: option.c: add ZTE 622 modem deviceAlbert Pauw1-0/+2
Please consider this small patch for the usb option-card driver. This patch adds the ZTE 622 usb modem device. Signed-off-by: Albert Pauw <albert.pauw@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: serial: new cp2101 device idRobert M. Kenney1-0/+1
From: Robert M. Kenney <rmk@unh.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: serial: ftdi: enable UART detection on gnICE JTAG adaptors blacklist ↵Michael Hennerich2-0/+9
interface0 Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: serial: add FTDI USB/Serial converter devicesAxel Wachtler2-0/+16
Add the following devices to the USB FTDI SIO device table: Bus 001 Device 009: ID 03eb:2109 Atmel Corp. http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4187 Bus 001 Device 008: ID 1cf1:0001 http://www.dresden-elektronik.de/shop/prod75.html Bus 001 Device 007: ID 1c1f:0004 http://www.dresden-elektronik.de/shop/prod64.html Signed-off-by: Axel Wachtler <axel.wachtler@atmel.com> Signed-off-by: Robert Richter <robert.richter@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-27USB: serial: add support for second revision of Ericsson F3507G WWAN cardPatrik Kullman1-2/+4
I noticed that my revision of the F3507G WWAN card isn't listed in drivers/usb/serial/option.c Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-27USB: option: add BenQ 3g modem informationJesse Sung1-0/+5
This patch addes the BenQ 3g modem support to the option driver. From: Jesse Sung <jsung@novell.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09USB: option: New mobile broadband modems to be supportedDirk De Schepper1-28/+56
- New Novatel and Dell mobile broadband modem products added - Dell pid variables used in stead of numerical PIDs for known products Signed-off-by: Dirk De Schepper <ddeschepper@nvtl.com> Cc: stable <stable@kernel.org> Signed-off-by: Matthias Urlichs <matthias@urlichs.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09USB: two more usb ids for ti_usb_3410_5052Oliver Neukum2-3/+9
This patch adds device IDs and balances the counts to make the hot ID additioning mechanism work. Signed-off-by: Oliver Neukum <oneukum@suse.de> Cc: stable <stable@kernel.org> Cc: Chris Adams <cmadams@hiwaay.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09USB: ftdi_sio: unlock_kernel() on error in set_serial_info()Dan Carpenter1-1/+3
There was one error path where unlock_kernel() wasn't called. This was found with a code checker (http://repo.or.cz/w/smatch.git/) Compile tested only, sorry. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09USB: ftdi_sio: add support for the NDI Polaris systemStephane Clerambault2-0/+4
Add support for the NDI Polaris system *http://www.ndigital.com/). Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Oliver Neukum <oneukum@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09USB: usb-serial: fix the aircable_init failure pathDave Young1-2/+2
The failure path of aircable_init is wrong, fix the order of (goto) labels. Signed-off-by: Dave Young <hidave.darkstar@gmail.com> Acked-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-02-09Revert USB: option: add Pantech cardsGreg Kroah-Hartman1-9/+0
Revert 8b6346ec899713a90890c9e832f7eff91ea73504 as these devices really work just fine with the cdc-acm driver, as they follow the spec properly. Thanks to Chuck Ebbert for pointing out the problem here. Cc: Chuck Ebbert <cebbert@redhat.com> Cc: Dan Williams <dcbw@redhat.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27USB: option: add QUANTA HSDPA Data Card device idsAlex.Cheng@quantatw.com1-0/+12
This patch adds the support for the QUANTA Q101 series HSDPA Data Card. With the vendor and product IDs are set properly, the data card can be detected and works fine. Signed-off-by: Alex Cheng <alex.cheng@quantatw.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27USB: new id for ti_usb_3410_5052 driverOliver Neukum2-0/+5
This adds a new device id Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27USB: 'option' driver - onda device MT503HS has wrong idMarcel Sebek1-1/+1
While trying to make GSM modem Onda MT503HS working, I found a mismatch between device id in the driver code (0x0200) and id in the lsusb output (0x2000). This patch fixed it for me, but I don't know if the original device id was also correct and the new ID should be added instead of replacing the old one. Signed-off-by: Marcel Sebek <sebek64@post.cz> Acked-by: Domenico Riccio <domenico.riccio@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27USB: ftdi_sio driver support of bar code scanner from DieboldMhayk Whandson2-0/+6
Added the product id of bcs(bar code scanner) from Diebold Procomp Brazil. Signed-off-by: Mhayk Whandson <eu@mhayk.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27USB: ftdi_sio: added Alti-2 VID and Neptune 3 PIDRobie Basak2-0/+5
This patch adds the vendor and product ID for the Alti-2 Neptune 3 (http://www.alti-2.com) which uses the FTDI chip. Signed-off-by: Robie Basak <rb-oss-1@justgohome.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27USB: cp2101 deviceTomasz K1-0/+1
My girl use modem GSM (EDGE) Commanader 2 on iPlus Polsih provider, PLEASE add this vendor=0x10C4 and product=0x822B to USB serial driver cp2101.c From: Tomasz K <eros81@o2.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-27USB: cp2101: add fasttrax GPS evaluation kit vendor/product IDWolfgang Glas1-0/+1
This adds the vendor/product ID of the fasttrax GPS evaluation kit from: http://www.fastraxgps.com/products/evaluationtools/evaluationkit/ to the cp2101 module since this device is actually equipped with a CP210x USB to serial bridge. The vendor/product ID is: 0x10c4/0x826b. Signed-off-by: Wolfgang Glas <wolfgang.glas@ev-i.at> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-15ftdi_sio: fix kref leakJim Paris1-1/+1
Commit 4a90f09b20f4622dcbff1f0e1e6bae1704f8ad8c added kref stuff to ftdi_sio, but missed tty_kref_put at one exit point in ftdi_process_read. Signed-off-by: Jim Paris <jim@jtan.com> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-12ti_usb_3410_5052: add Multi-Tech firmwareChris Adams1-0/+3
Add the Multi-Tech cellular modem firmware to the TI USB serial driver. This firmware was extracted from: ftp://ftp.multitech.com/wireless/wireless_linux.zip Firmware licence: "all firmware components are redistributable in binary form" per support@multitech.com Copyright (C) 2005 Multi-Tech Systems, Inc. Signed-off-by: Chris Adams <cmadams@hiwaay.net> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-12ti_usb_3410_5052: add Multi-Tech modem supportChris Adams2-5/+39
Add Multi-Tech cellular modem support to the ti_usb_3410_5052 driver. Signed-off-by: Chris Adams <cmadams@hiwaay.net> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-12ti_usb_3410_5052: support alternate firmwareChris Adams1-15/+29
The TI USB serial driver supports specifying alternate vendor and product IDs (since the chips can and are used in devices under other vendor/product IDs). However, the alternate IDs were not loaded in the combined product table. This patch also adds support for loading alternate firmware for alternate vendor/product IDs. Signed-off-by: Chris Adams <cmadams@hiwaay.net> Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-12usb-serial: remove NULL checkAlan Cox1-3/+0
Julia Lawell found a case where a NULL check was misplaced in the usb-serial code. However as the object in question cannot be NULL the check can simply be removed. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-01-07USB: add siemens_mpi usb-serial "stub" driverGreg Kroah-Hartman3-0/+86
This driver got rescued from a few years ago and was requested to be added. So I cleaned it up, ported it to the latest kernel version and here it is. Cc: Thomas Hergenhahn <thomas.hergenhahn@suse.de> Cc: Emmanuele <iemmav@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: add new opticon serial driverGreg Kroah-Hartman3-0/+368
This is for the serial mode of the Opticon barcode scanner. Cc: Kees Stoop <kees.stoop@opticon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: option: increase outgoing buffer size and numberGreg Kroah-Hartman1-2/+2
This should speed up the option driver's upload speed quite a bit. It has been tested by a number of different people on different devices with success. Cc: Roland Wolters <roland.wolters@credativ.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: serial: fix up urb->status usageGreg Kroah-Hartman6-65/+68
Some of the usb-serial drivers are starting to use urb->status in ways they should not be doing. This fixes up some of them to prevent that. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: serial: usb_debug: Make staticRoel Kluin1-1/+1
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>