As part of an SMP cleanliness pass over UML, I consted a bunch of
structures in order to not have to document their locking. One of these
structures was a struct tty_operations. In order to const it in UML
without introducing compiler complaints, the declaration of
tty_set_operations needs to be changed, and then all of its callers need to
be fixed.
This patch declares all struct tty_operations in the tree as const. In all
cases, they are static and used only as input to tty_set_operations. As an
extra check, I ran an i386 allyesconfig build which produced no extra
warnings.
53 drivers are affected. I checked the history of a bunch of them, and in
most cases, there have been only a handful of maintenance changes in the
last six months. serial_core.c was the busiest one that I looked at.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
We have a couple of these USB-Serial converters around; they're slightly
different from the 2104 models in that they can handle 500Kb/sec over RS422.
The existing ftdi driver seems to work just fine if we add in the
appropriate IDs.
Patch is against 2.6.17.6, but should apply cleanly to pretty much
anything recent.
From: Justin Carlson <justinca@qatar.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds support for three OpenPort ECU data cables from Tactrix
Inc. to the ftdi_sio driver's device ID table. One of the PIDs was
supplied by Donour Sizemore on the ftdi-usb-sio-devel mailing list. The
other two were added by myself after examining the Windows driver software.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adapted from an earlier patch by Greg KH <gregkh@suse.de>.
That patch added multiple read urbs and larger transfer buffers to allow
data transfers at full EvDO speed.
This version includes additional device IDs and fixes a memory leak in
the transfer buffer allocation.
Some (maybe all?) of the supported devices present multiple bulk endpoints,
the additional EPs can be used for control and status functions,
This version allocates 3 EPs by default, that can be changed using
the 'endpoints' module parameter.
Tested with Sierra Wireless EM5625 and MC5720 embedded modules.
Device ID (0x0c88, 0x17da) for the Kyocera Wireless KPC650/Passport
was added but is not yet tested.
From: Andy Gay <andy@andynet.net>
Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Patch to add support for Alcor Micro Corp. USB 2.0 TO RS-232 converter.
This patch adds VID and PID to pl2303.[ch], adds it to the "HORRIBLE
HACK FOR PL2303" in usb-serial.c and also prevents cdc-acm to claim
driving this device by blacklisting it in hid-core.
Signed-off-by: Johannes Steingraeber <Jo_Stein@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix printk format warnings:
drivers/usb/serial/aircable.c:221: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’
drivers/usb/serial/aircable.c:283: warning: format ‘%Zd’ expects type ‘signed size_t’, but argument 4 has type ‘int’
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add driver for AIRcable USB Bluetooth dongle.
Signed-off-by: Naranjo, Manuel Francisco <naranjo.manuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
When receiving a fatal error from the USB core, e.g. EILSEQ (which can
happen if the polling interval is too short), fail gracefully.
Previously the driver would fill the log with useless error messages
or (more alarmingly) silently spin forever trying to write updated
control information to the device. This change implements a new flag
which if cleared indicates that the driver has failed. The flag will
be set on initialization, cleared on fatal errors, and anything else
that touches the USB port in the driver will abort if the flag is
clear. When the flag is cleared, a message will be logged indicating
that the driver has failed.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fix usb core function error return checks to look for negative errno
values, not positive errno values. This bug had rendered those checks
useless. Also remove attempted error recovery on control endpoints
for EPIPE - with control endpoints EPIPE does not indicate a halted
endpoint so trying to recover with usb_clear_halt() is not the correct
action.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Rather than directly filling in URB fields, it's safer to use
usb_fill_int_urb(). This improves robustness of the driver; URB
changes in the future will not go uninitialized here. That point not
withstanding, this driver should at least be self-consistent. Either
use usb_fill_int_urb() everywhere or don't bother with it all.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The polling interval for the device can't always be 1msec. If it is
too quick, the device can fail causing a fatal (to the driver) EILSEQ
error from the USB core. The actual correct value is reported by the
device as part of its configuration data, so use that value as the
default. On a DeLorme Earthmate for example, the device reports that
it wants a 6msec interval. As part of this fix, the "interval" module
option has been fixed as well; the device's default can be overridden
by specifying interval=<value> as a module option.
Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The attached patch adds support for the new generation of gps receivers (eg.
GPSmap 60Cx) to garmin_gps.c.
Signed-off-by: Hermann Kneissel <herkne@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Commit b512504e5671f83638be0ddr085c4b1832f623d3 made ipaq_open() a bit
messy by moving the read urb submission far from its usb_fill_bulk_urb()
call and the comment explaining what it does.
This patch put they together again. Although only compiled tested, should
not break the fix introduced by b512504e5671f83638be0ddr085c4b1832f623d3,
of course.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Changes the functions pl2303_buf_clear and pl2303_buf_data_avail for
the purpose of keeping them under the 80 column limit, making them
more similar to similar functions and making then simpler.
Signed-off-by: Thiago Galesi <thiagogalesi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Fixes several lines that overrun 80 columns in Prolific pl2303 driver
and cleans up some space usages in the function calls.
Signed-off-by: Thiago Galesi <thiagogalesi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Add (dummy?) support for TIOCGSERIAL and TIOCSSERIAL ioctl calls to the USB
serial driver file `ark3116.c'. This is sufficient for me to run wvdial
successfully, receive my email, and do webbrowsing with firefox. On the
other hand, running the cvs program to update archives seems not to work,
and the traceroute command sometimes says
send failed: No buffer space available
Looks like a buffering problem... My knowledge of serial device drivers is
zero, so I can't fix this -- I just did a cut'n'paste from other USB serial
drivers...
Signed-off-by: Werner Lemberg <wl@gnu.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
A sufficiently-large number of USB serial devices causes a reference leak
when /proc/tty/drivers/usbserial is read.
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The patch adds a new device ID for the Gamma Scout Geiger counter
device.
Signed-off-by: Ralf Schlatterbeck <rsc@runtux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch removes support for a clone of Nokia DKU-5 cable made by Ours
Technology Inc, as it turned out that the cable does not use the pl2303
chip, but OTI-6858 chip which is not compatible with the pl2303.
Signed-off-by: Tomasz Kazmierczak <tomek.fizyk@op.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
I write a patch for ipaq.c.
Would you like to add upstream tree ?
This patch enables a support of "SHARP W-ZERO3(WS004SH)" and "SHARP W-ZERO3[es](WS007SH)".
From: Norihiko Tomiyama <norihiko.tomiyama@ctc-g.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Can you add the USB IDs for the Belkin USB Serial adapter (P/N F5U257)
to the pl2303 driver in the Linux Kernel? Are you the appropriate person
to approach for this?
I recently purchased a Belkin USB Serial adapter (P/N F5U257) and found
that it didn't work. After a bit of experimentation I found that it
works with the pl2303 driver once the ID has been added. See attached
patch to fix this. Also attached is the output from lsusb -v just in
case you require any information from there.
From: Kim Oldfield <luv@oldfield.wattle.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Here's a short patch which adds one PID to the set of devices
supported by the ftdi_sio driver. The device in question is a
DLP module used as part of a ham radio USB-to-packet adapter.
From: Dave Platt <dplatt@radagast.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This small patch enables a support of "SHARP WS003SH".
"SHARP WS003SH" (usullary called "W-ZERO3") is most polular All-in-one handheld
CellPhone-plus-WindowsMobile5.0 in Japan.
"SHARP WS003SH" has two modes, "Modem" and "ActiveSync".
But, "ActiveSync" mode uses NDIS connection.
Therefore, ipaq.c can only support "Modem" mode.
http://www.sharp.co.jp/ws/ (Japanese Site)
http://greggman.com/edit/editheadlines/2005-12-24.htm
From: Norihiko Tomiyama <norihiko.tomiyama@ctc-g.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The short driver names were not unique,
which prevented the driver from actually loading.
Also, one of the ioctl pointers was missing.
Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
USB serial outside of the kernel tree can not build properly due to
usb-serial.h being buried down in the source tree. This patch moves the
location of the file to include/linux/usb and fixes up all of the usb
serial drivers to handle the move properly.
Cc: Sergei Organov <osv@javad.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Anydata is using usb_serial_generic_write_bulk_callback() for its
read URB, but it should use usb_serial_generic_read_bulk_callback()
instead (it's a read URB, isn't it?).
Reported by Jon K Hellan <hellan@acm.org>.
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch adds the Testo USB interface to the list of devices
recognized by the ftdi_sio module. This device is based on a FT232BL
chip, and is used as an interface to get data from digital sensors
(thermometer, etc). See http://www.testo.com/
Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The below patch fixes the ipw module in kernel 2.6.17 for me; without
this change it simply does not work at all (all but the first writes are
refused because write_urb_busy is always 1).
This problem was there in 2.6.15 as well, but at that point I used the
(updated) ipw.c, version 0.4, from
http://www.neology.co.za/products/opensource/ipwireless/ which no longer
compiles with 2.6.17. It can be made to after a few changes but
obviously it's easier if the built-in ipw driver works instead of having
to download one from the neology site.
From: Bart Oldeman <bartoldeman@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Adds configurable waiting periods to the ipaq connection code. These are
not needed when the pocketpc device is running normally when plugged in,
but they need extra delays if they are physically connected while
rebooting.
There are two parameters :
* initial_wait : this is the delay before the driver attemts to start the
connection. This is needed because the pocktpc device takes much
longer to boot if the driver starts sending control packets too soon.
* connect_retries : this is the number of times the control urb is
retried before finally giving up. The patch also adds a 1 second delay
between retries.
I'm not sure if the cases where this patch is useful are general enough
to include this in the kernel.
Signed-off-by: Frank Gevaerts <frank.gevaerts@fks.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch fixes several problems in the ipaq.c driver with connecting
and disconnecting pocketpc devices:
* The read urb stayed active if the connect failed, causing nullpointer
dereferences later on.
* If a write failed, the driver continued as if nothing happened. Now it
handles that case the same way as other usb serial devices (fix by
Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>)
Signed-off-by: Frank Gevaerts <frank.gevaerts@fks.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch creates a new driver, sierra.c, that supports the new
non-composite Sierra Wireless WWAN devices. The older Sierra
Wireless and Airprime devices are supported in airprime.c.
Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch limits the amount of outstanding 'write' data that can be
queued up for the ftdi_sio driver, to prevent userspace DoS attacks (or
simple accidents) that use up all the system memory by writing lots of
data to the serial port.
The original patch was by Guillaume Autran, who in turn based it on the
same mechanism implemented in the 'visor' driver. I (Ian Abbott)
re-targeted the patch to the latest sources, fixed a couple of errors,
renamed his new structure members, and updated the implementations of
the 'write_room' and 'chars_in_buffer' methods to take account of the
number of outstanding 'write' bytes. It seems to work fine, though at
low baud rates it is still possible to queue up an amount of data that
takes an age to shift (a job for another day!).
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The anti user-DoS mechanism in the USB serial 'visor' driver can fail in
the following way:
visor_open: priv->outstanding_urbs = 0
visor_write: ++priv->outstanding_urbs
visor_close:
visor_open: priv->outstanding_urbs = 0
visor_write_bulk_callback: --priv->outstanding_urbs
So priv->outstanding_urbs ends up as (unsigned long)(-1). Not good!
I haven't seen this happen with the visor driver as I don't have the
hardware, but I have seen it while testing a patch to implement the same
functionality in the ftdi_sio driver (patch not yet submitted).
The fix is pretty simple: don't reinitialize outstanding_urbs in
visor_open. (Again, I haven't tested the fix in visor, but I have
tested it in ftdi_sio.)
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The Susteen Datapilot cable
(http://www.susteen.com/productdetail/71/producthl/Notempty) has an
internal pl2303 to communicate with a set of dummy connector-ends that
connect to a variety of cell phones. I've found that it works right out
of the box by simply adding the product/vendor id to the pl2303 driver.
Signed-off-by: Matt Meno <mmeno@idealcorp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>