Some usbserial functions returns -EINVAL if the port doesn't exist or if
it's not opened. However, the right error code for such situations is
-ENODEV.
Signed-off-by: Luiz Fernando N. Capitulino <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If either the driver's open() method or try_module_get() fails, we need to
set 'tty->driver_data' and 'port->tty' to NULL in serial_open(), otherwise
we'll get an OOPS in usb_device_disconnect() when the device is disconnected.
Signed-off-by: Frank Gevaerts <[email protected]>
Acked-by: Luiz Fernando N. Capitulino <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Al Borchers suggested to do this in his review of my previous patch.
I guess that I skipped this initially because of my visceral dislike
of sizeof(data). But in this case it seems well localized.
Signed-off-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
While an Edgeport is allocating individual port structures, if kmalloc
returns NULL, the serial structure is freed and -ENOMEM, but the ports
allocated before the failure are not freed. This patch addresses that
condition.
Signed-off-by: Christopher Lund <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch extends the "option" driver with a few more devices, some of
which are actually connected to USB the "right" way -- as opposed to
doing it via PCMCIA and OHCI.
Signed-Off-By: Matthias Urlichs <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch adds support for Yost Engineering Inc's ServoCenter 3.1 USB
product to the ftdi_sio driver's device ID table. The PID was supplied
by Aaron Prose of Yost Engineering on the ftdi-usb-sio-devel list. The
PID 0xE050 matches the Windows INF files for this device.
Signed-off-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add a couple of supported devices into the help message.
It's a long story... I promised this comment changed to a user long ago,
so I'd like to have that promise kept. In reality though, nobody is
likely to read this anyway.
Signed-off-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
I'm going to throw schedule_work away, it's retarded. But for starters,
let's have it encapsulated.
Also, generic and whiteheat were both calling usb_serial_port_softint
and scheduled work. Only one was necessary.
Signed-off-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Clean up the unicode handling in io_edgeport. Make get_string size-limited.
Signed-off-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Prevent sending further output to a USB-serial console after the dongle is
disconnected, take care not to leak kref.
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Prevent ENODEV on a /dev/ttyUSBx, used as a USB-serial console.
From: Paul Fulghum <[email protected]>
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Prevent NULL dereference when used as a USB-serial console.
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Append Carriage-Returns after Line-Feeds, analogous to the serial driver.
From: Paul Fulghum <[email protected]>
Signed-off-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
I introduced this way back in 2.6.13 when adding the port lock logic.
This device talks out through different "ports" all at the same time, so
the lock logic was wrong, preventing any data from ever being sent
properly.
Thanks a lot to Bernhard Reiter <[email protected]> for being
patient and helping with debugging this.
Cc: Bernhard Reiter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Based on Simon's original driver, with some minor code cleanups and
tidying by me.
Cc: Simon Schulz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If serial_open() fails at the port assignment or mutex_lock_interruptible()
is interrupted, the 'serial' object will never be freed.
We should call kref_put() when those errors happens.
Signed-off-by: Luiz Fernando N. Capitulino <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If the device is disconnected while serial_open() is executing and
either try_module_get() or the device specific open function fails, the
kref_put() call in the 'bailout_kref_put' label will free the memory
pointed out by 'port'.
The subsequent dereferences in the 'bailout_kref_put' label will be
invalid.
The fix is just to assure kref_put() is called after any 'port' usage.
Signed-off-by: Luiz Fernando N. Capitulino <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This adds the Sierra Wireless card to airprime.c.
I tested this on my laptop.
Signed-off-by: Ken Brush <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch adds support for ACG Identification Technologies GmbH's HF
Dual ISO Reader (an RFID tag reader) to the ftdi_sio driver's device ID
table. The product ID was supplied by anotonios (anton at goto10 dot
org) on the ftdi-usb-sio-devel list and subsequently verified by myself
(Ian Abbott).
Signed-off-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Adds support in ftdi_sio usbserial driver for USB modems sold by
Plus GSM Company in Poland.
Signed-off-by: Luiz Fernando Capitulino <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add new iTegno usb CDMA 1x card (usbid '0eba:2080') support to pl2303 driver
Signed-off-by: Wang Jun <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We may return from drivers/usb/serial/whiteheat.c::whiteheat_attach()
without freeing `result' if we leave via the no_firmware: label.
Spotted by the coverity checker as #670
Signed-off-by: Jesper Juhl <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This prevents an Oops if booted with "console=ttyUSB0" but without a
USB-serial dongle, and plugged one in afterwards.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch adds support for a clone of Nokia DKU-5 cable made by
Ours Technology Inc for Nokia phones with PopPort (Nokia 3100 and others).
The cable uses PL2303 USB-to-serial converter from Prolific Technology Inc.
Signed-off-by: Tomasz Kazmierczak <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The usbserial's port semaphore used to synchronize serial_open()
and serial_close() are strict mutexes, convert them to the mutex
implementation.
Signed-off-by: Luiz Capitulino <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch adds support for the Eclo COM to 1-Wire USB adapter
<http://www.eclo.pt/products_ibutton_adapters_usb01_en.asp> to the
ftdi_sio driver's device ID table. Details were provided by Martin
Grill on the ftdi-sio-usb-devel mailing list and I (Ian Abbott)
confirmed it matched the INF file in the Eclo's Windows driver package.
Signed-off-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Since the arrays are declared as in_urbs[N_IN_URB]
and out_urbs[N_OUT_URB], both for loops go one
over the end of the array. This fixes coverity id #555.
Signed-off-by: Eric Sesterhenn <[email protected]>
Signed-Off-By: Matthias Urlichs <[email protected]>
Signed-Off-By: Linus Torvalds <[email protected]>
Thanks to Warren Lewis <[email protected]> for the information needed to
write the driver and for testing it out.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The Icom ID-1 1.2 GHz band digital transceiver is a new radio
that has a USB interface. With this patch, the ftdi_sio driver
will report "Detected FT8U232AM" and provide a serial device
interface.
Signed-off-by: "A. Maitland Bottoms" <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch adds a new device ID to the cp2101 driver
Signed-off-by: Craig Shelley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The USB data cable for my Samsung GSM phone contains the USB-to-serial
converter chip MS3303H from Speed Dragon Multimedia, Inc. that appears to
be compatible with the PL2303 chip. The following patch adds support for
this chip to the pl2303 driver.
Signed-off-by: Dick Streefland <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
A while ago, I posted about TIOCMIWAIT not working with the PL2303
USB-serial adapter.
After a brief exchange with Greg, I tracked this to a missing wake-up
in the USB interrupt procedures. I got our systems staff to install
the enclosed very simple patch to our 2.6.12 kernels, and it all works
fine as expected. I guess this should also apply to the latest version
and go into the mainstream.
Apologies for the long delay in posting the result.
The routine being patched is pl2303_update_line_status
Signed-off-by: Julian Bradfield <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch adds support for the Nokia ca42 version 2 cable to the
cypress_m8 driver. The device was tested by others with this patch and
found to be compatible with the cypress_m8 driver. A special note
should be taken that this cable seems to vary in the type of chipset
used. This patch supports the cable with product id 0x4101.
Signed-off-by: Lonnie Mendez <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This fixes a use-after-free bug in the usb-serial core. It is simple to
trigger this (open a usb-serial port, then yank the device out before
closing the port.) Thanks to Stefan Seyfried <[email protected]> for
reporting this, and to the slab debugging code which enabled it to be
tracked down.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This patch adds a bunch of new device IDs to the ftdi_sio driver for
various devices from microHAM using FTDI chips.
Micheal Studer supplied the PID for the USB-Y9 device. I examined the
INF file in microHAM's Windows driver package for the USB-KW, USB-YS,
USB-IC, USB-DB9 and USB-RS232 devices.
Signed-off-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Added the USB vendorID of GSPDA and the productID of GSPDA's palm
smartphone 'xplore m68' to the list of known devices.
Signed-off-by: Hendrik Schweppe <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>