Commit Graph

984 Commits (d7ac769068df87ca8c7f72d99cf67ead16739f18)

Author SHA1 Message Date
Alan Cox 4dbd5a0961 tty-usb-console: tidy the USB console code
Code tidy

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-22 13:03:22 -07:00
Alan Cox c97611c16d usb-serial-bus: tidy coding style
Tidy up

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-22 13:03:22 -07:00
Alan Cox b69c14992e belkin_sa: clean up code
Coding style tidy up for belkin_sa

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-22 13:03:22 -07:00
Alan Cox 72e2741256 whiteheat: fix bugs found in the tidy and audit
Termios tidy up, plus fix break and DTR.

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-22 13:03:22 -07:00
Alan Cox 80359a9c5c whiteheat: coding style
Bring ezusb and whiteheat into line with the coding style

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-22 13:03:22 -07:00
Alan Cox 95da310e66 usb_serial: API all change
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-22 13:03:22 -07:00
Oliver Neukum df3e1ab733 USB: fix double kfree in ipaq in error case
in the error case the ipaq driver leaves a dangling pointer to already
freed memory that will be freed again.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:47 -07:00
Aleksey Gorelov 71be4f81e9 USB: debug port converter does not accept more than 8 byte packets
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-07-21 15:16:37 -07:00
Oliver Neukum 62ad296b6c USB: fix usb serial pm counter decrement for disconnected interfaces
usb serial decrements the pm counter even if an interface has been
disconnected. If it was a logical disconnect the interface may belong
already to another driver. This patch introduces a check for disconnected
interfaces.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: Stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:36 -07:00
Ben Collins 188d636027 USB: keyspan: Remove duplicate device entries
The 28xb, as documented in comments, has the same ID's as the 28x.
Remove the duplicated ID's from the device tables, and expand the
comment to document this.

Signed-off-by: Ben Collins <ben.collins@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:35 -07:00
Benny Halevy 3b36a8fd67 usb: fix uninitialized variable warning in keyspan_pda
This fixes the compiler warning.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:35 -07:00
Andre Haupt dd9ca5d9be USB: usb-serial: fix a sparse warning about different signedness
fix the following sparse warning:

drivers/usb/serial/usb-serial.c:927:43: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/usb-serial.c:927:43:    expected unsigned int *minor
drivers/usb/serial/usb-serial.c:927:43:    got int *<noident>
  CHECK   drivers/usb/serial/generic.c

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:33 -07:00
Greg Kroah-Hartman 640c1bce86 USB: delete airprime driver
This driver is only for one device id, and the option driver should be
used instead for it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:31 -07:00
Felipe Balbi e0d795e4f3 usb: irda: cleanup on ir-usb module
General cleanup on ir-usb module. Introduced
a common header that could be used also on
usb gadget framework.

Lot's of cleanups and now using macros from the header
file.

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:27 -07:00
Harvey Harrison b2bdd1f504 USB: cp2101.c fix sparse signedness mismatch warnings
The get/set 2101_config helpers take an unsigned int rather than an
int.  It is safe to change these in each case and may even produce
better code as it will be an unsigned divide rather than a signed
divide in places.  All other manipulation was setting/masking bits
which will not be affected by the sign change.

Fixes the following sparse warnings:
drivers/usb/serial/cp2101.c:378:44: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:378:44:    expected unsigned int *data
drivers/usb/serial/cp2101.c:378:44:    got int *<noident>
drivers/usb/serial/cp2101.c:388:40: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:388:40:    expected unsigned int *data
drivers/usb/serial/cp2101.c:388:40:    got int *<noident>
drivers/usb/serial/cp2101.c:413:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:413:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:413:42:    got int *<noident>
drivers/usb/serial/cp2101.c:421:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:421:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:421:42:    got int *<noident>
drivers/usb/serial/cp2101.c:444:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:444:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:444:42:    got int *<noident>
drivers/usb/serial/cp2101.c:451:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:451:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:451:42:    got int *<noident>
drivers/usb/serial/cp2101.c:458:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:458:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:458:42:    got int *<noident>
drivers/usb/serial/cp2101.c:471:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:471:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:471:42:    got int *<noident>
drivers/usb/serial/cp2101.c:481:42: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:481:42:    expected unsigned int *data
drivers/usb/serial/cp2101.c:481:42:    got int *<noident>
drivers/usb/serial/cp2101.c:561:41: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:561:41:    expected unsigned int *data
drivers/usb/serial/cp2101.c:561:41:    got int *<noident>
drivers/usb/serial/cp2101.c:591:45: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:591:45:    expected unsigned int *data
drivers/usb/serial/cp2101.c:591:45:    got int *<noident>
drivers/usb/serial/cp2101.c:597:41: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:597:41:    expected unsigned int *data
drivers/usb/serial/cp2101.c:597:41:    got int *<noident>
drivers/usb/serial/cp2101.c:608:45: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:608:45:    expected unsigned int *data
drivers/usb/serial/cp2101.c:608:45:    got int *<noident>
drivers/usb/serial/cp2101.c:614:41: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:614:41:    expected unsigned int *data
drivers/usb/serial/cp2101.c:614:41:    got int *<noident>
drivers/usb/serial/cp2101.c:623:45: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:623:45:    expected unsigned int *data
drivers/usb/serial/cp2101.c:623:45:    got int *<noident>
drivers/usb/serial/cp2101.c:680:50: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:680:50:    expected unsigned int *data
drivers/usb/serial/cp2101.c:680:50:    got int *<noident>
drivers/usb/serial/cp2101.c:690:43: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:690:43:    expected unsigned int *data
drivers/usb/serial/cp2101.c:690:43:    got int *<noident>
drivers/usb/serial/cp2101.c:715:41: warning: incorrect type in argument 3 (different signedness)
drivers/usb/serial/cp2101.c:715:41:    expected unsigned int *data
drivers/usb/serial/cp2101.c:715:41:    got int *<noident>

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:23 -07:00
Harvey Harrison 5a33956a30 USB: digi_accelport.c trivial sparse lock annotation
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:16:22 -07:00
Adrian Bunk ea05af61a8 USB: remove CVS keywords
This patch removes CVS keywords that weren't updated for a long time
from comments.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:55 -07:00
Alan Cox 2742fd8899 USB: io_ti: FIrst cut at a big clean up
Sort out the insane naming like "OperationalFirmwareVersion" which seems
	designed to cause formatting problems and RSI
Merge various common code together
Clean up the pointlessly complex and spread about MCR handling

This is really just the low hanging fruit.

Needs lots of testing before it goes upstream so testers and reports
appreciated

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:53 -07:00
Harvey Harrison bd2c784595 USB: use get_unaligned_* helpers for kl5kusb105 driver
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Kay Sievers 0031a06e2f USB: usb dev_set_name() instead of dev->bus_id
The bus_id field is going away, use the dev_set_name() function
to set it properly.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:47 -07:00
Kay Sievers 7071a3ce0c USB: usb dev_name() instead of dev->bus_id
The bus_id field is going away, use the dev_name() function instead.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:46 -07:00
Jaswinder Singh d12b219a22 edgeport-ti: use request_firmware()
Firmware blob looks like this...
        uint8_t  MajorVersion
        uint8_t  MinorVersion
        __le16   BuildNumber
        uint8_t  data[]

Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-14 14:44:39 -07:00
Jaswinder Singh 5b9ea93226 edgeport: use request_firmware()
Version number provided in first HEX record.

Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
2008-07-14 14:44:37 -07:00
David Woodhouse ec6752f5af whiteheat: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10 14:49:38 +01:00
David Woodhouse 5f24e2d6b4 ti_usb_3410_5052: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10 14:49:34 +01:00
David Woodhouse 3edbf98b86 keyspan_pda: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10 14:49:09 +01:00
David Woodhouse 2971c579f9 keyspan: use request_firmware()
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2008-07-10 14:48:49 +01:00
Oliver Neukum b89cbb81ae USB: adding comment for ipaq forcing number of ports
The reason for forcing a number of ports should be documented.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-03 18:20:38 -07:00
Oliver Neukum 4edb966b37 USB: fix Oops on loading ipaq module since 2.6.26
Fixes bugzilla.kernel.org #10868

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-03 18:20:38 -07:00
Greg Kroah-Hartman 727df3569b USB: add a pl2303 device id
As reported by Ken A Scott <kscott9@sent.com>

Cc: Ken A Scott <kscott9@sent.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-03 18:20:38 -07:00
Greg Kroah-Hartman d2e2affba4 USB: another option device id
Thanks to umesh b <umesh.kollam@gmail.com> for the information here.

Cc: umesh b <umesh.kollam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-03 18:20:38 -07:00
Jon K Hellan 2542335ccf USB: New device ID for ftdi_sio driver
Here's a new device ID for the ftdio_sio driver.
The diff is with linus's tree as of this morning.

The device is the RigExpert Tiny USB Soundcard Transceiver Interface for ham
radio.

(I didn't actually test this. A fellow ham couldn't get the device to work, and
I suggested binding the device ID using sysfs - see
"http://jk.ufisa.uninett.no/usb/". However, he had had moved on to other things
by then. I guess adding the device ID to the kernel "on spec" won't hurt.
The relevant part of cat /proc/bus/usb/devices shows:

T:  Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0403 ProdID=ed22 Rev= 5.00
S:  Manufacturer=FTDI
S:  Product=MixW RigExpert Tiny
S:  SerialNumber=00000000
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
E:  Ad=83(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
)

From: Jon K Hellan <hellan@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-03 18:20:37 -07:00
Michael Karcher a7f3872c43 USB: usb-serial: option: Don't match Huawei driver CD images
Add the interface info matching to all Huawei cards, as they all also
contain a Mass Storage Device interface (usually containing Windows
drivers) which should not get bound by this driver.

See also drivers/usb/storage/unusual_devs.h

Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-29 13:59:06 -07:00
Steve Murphy 4be2fa186d USB: pl2303: another product ID
I've just got a USB GPRS/EDGE modem branded Manufacturer Micromax Model
MMX610U (see http://www.airtel.in/level2_t3data.aspx?path=1/106/179)
working by adding another product ID to pl2303.  Modem info reports same
module as  Max Arnold's i.e.SIMCOM SIM600  but  with product ID 0x0612
(cf Ox0611).

From: Steve Murphy <steve@gnusis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-29 13:59:06 -07:00
Ray Molenkamp ebb3770c01 USB: FTDI_SIO : Add support for Matrix Orbital PID Range
This patch adds support for the range of PIDs
that have been allocated for FTDI based devices
at Matrix Orbital.

A small number of units have been shipped early 2008
with a faulty USB Descriptor.  Products that may have
this issue have been marked with the existing quirk to
work around the problem.

Signed-off-by: R. Molenkamp <rmolenkamp@matrixorbital.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-29 13:59:02 -07:00
Michael F. Robbins 82078234d4 USB: serial: ch341: New VID/PID for CH341 USB-serial
Recent USB-serial devices using the WinChipHead CH340/CH341 chipset are
being shipped with a new vendor/product ID code pair, but an otherwise
identical device.  (This is confirmed by looking at INF for the included
Windows driver.)

Patch is tested and working, both with new and old devices.

Signed-off-by: Michael F. Robbins <mrobbins@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-20 14:14:15 -07:00
Arnaldo Carvalho de Melo 1b2d23d49c USB: OPTION: fix name of Onda MSA501HS HSDPA modem
This fixes the name of the onda MSA501HS device, I guess it is called
different things in different countries.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-20 14:14:14 -07:00
Greg Kroah-Hartman ee53b0ca01 USB: add TELIT HDSPA UC864-E modem to option driver
This adds the Telit UC864-E HDSPA modem support to the option driver.
This lets their customers comply with the GPL instead of having to use a
binary driver from the manufacturer.

Cc: Simon Kissel <kissel@viprinet.com>
Cc: Nico Erfurth <ne@nicoerfurth.de>
Cc: Andrea Ghezzo <TS-EMEA@telit.com>
Cc: Dietmar Staps <Dietmar.Staps@telit.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-20 14:14:14 -07:00
Atsushi Nemoto 26ab705396 usb-serial: Use ftdi_sio driver for RATOC REX-USB60F
This patch reverts 57833ea6b9
("usb-serial: pl2303: add support for RATOC REX-USB60F") and adds
support for the device to ftdi_sio driver.

Cc: Akira Tsukamoto <akirat@rd.scei.sony.co.jp>
Cc: stable <stable@kernel.org>
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-20 14:14:14 -07:00
Dan Williams 96cb15cf97 USB: option: add new Dell 5520 HSDPA variant
New variant of the 5520 found by Luke Sheldrick.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-14 10:00:29 -07:00
Eugeniy Meshcheryakov cdafc37a7b USB: do not handle device 1410:5010 in 'option' driver
This device is not a serial port, but a virtual CD-ROM device. For
example with my Novatel MC950D:

lsusb -v -d 1410:5010 | grep InterfaceClass
      bInterfaceClass         8 Mass Storage

After some time (ca. 5min) or if virtual CD is ejected, device id
changes to 1410:4400:

% lsusb -v -d 1410:4400 | grep InterfaceClass
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceClass       255 Vendor Specific Class

Variable name says that 0x5010 is a Novatel U727, but searching in
internet shows, that this device also provides virtual CD that should be
ejected before use. Product id for serial port in this case is 0x4100.

Signed-off-by: Eugeniy Meshcheryakov <eugen@debian.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-14 10:00:27 -07:00
andreoli@samba.ing.unimo.it 4c7d3137fe USB: Support for the ET502HS HDSPA modem in option driver
the proposed patch allows the ET502HS HDSPA modem to be handled by the
"option" driver. It has been tested for 1 month and works reliably (no
oopses, no hangs, 300KB/s throughput).

Signed-off-by: Mauro Andreolini <andreoli@weblab.ing.unimo.it>
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-14 10:00:27 -07:00
Greg Kroah-Hartman 23cacd65f6 USB: add Telstra NextG CDMA id to option driver
As reported by Magnus Boman <captain.magnus@opensuse.org>

Cc: Magnus Boman <captain.magnus@opensuse.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-14 10:00:26 -07:00
Greg Kroah-Hartman 6986a978ee USB: add new moto_modem driver for some Morotola phones
This should work on a KRZR K1m, and some other Motorola phones that do
not use the "standard" cdc ACM protocol to talk to USB hosts.

Tested-by: Jeff Garzik <jeff@garzik.org>
Cc: Jiang Dejun <a5652c@motorola.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-14 10:00:25 -07:00
Bernhard Beck 9662369786 usb-serial: Add ThinkOptics WavIT
Add ThinkOptics WavIt to cp2101 device table

Signed-off-by: Bernhard Beck <kernel@goodcoffee.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-11 10:18:00 -07:00
Steven Rostedt 8594303a7a fix irq flags for iuu_phoenix.c
The file drivers/usb/serial/iuu_phoenix.c uses "int" for flags.  This can
cause hard to find bugs on some architectures.  This patch converts the flags
to use "long" instead.

This bug was discovered by doing an allyesconfig make on the -rt kernel where
checks are done to ensure all flags are of size sizeof(long).

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-08 10:46:55 -07:00
Alan Cox c4d0f8cbca usb_serial: some coding style fixes
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-02 10:25:58 -07:00
Leonardo Chiquitto 21ae1dd1d4 USB: airprime: unlock mutex instead of trying to lock it again
The following patch fixes a [probable] copy & paste mistake in
airprime.c. Instead of unlocking an acquired mutex, the actual
code tries to lock it again.

Signed-off-by: Leonardo Chiquitto <lchiquitto@novell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-02 10:25:56 -07:00
Peter Mack 6e1ab3ed82 USB: add more FTDI device ids
Add more usb device ids to the ftdi driver.

From: Peter Mack <Peter.Mack@scs-ptc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-02 10:25:54 -07:00
Roel Kluin 87521c46f6 USB: mos7840: test and propagate set_uart_reg return value
The test for an mos7840_set_uart_reg() error return value only works when
status is signed. propagate its error value.

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Cc: SL Baur <steve@xemacs.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-05-02 10:25:53 -07:00
Alan Cox f34d7a5b70 tty: The big operations rework
- Operations are now a shared const function block as with most other Linux
  objects

- Introduce wrappers for some optional functions to get consistent behaviour

- Wrap put_char which used to be patched by the tty layer

- Document which functions are needed/optional

- Make put_char report success/fail

- Cache the driver->ops pointer in the tty as tty->ops

- Remove various surplus lock calls we no longer need

- Remove proc_write method as noted by Alexey Dobriyan

- Introduce some missing sanity checks where certain driver/ldisc
  combinations would oops as they didn't check needed methods were present

[akpm@linux-foundation.org: fix fs/compat_ioctl.c build]
[akpm@linux-foundation.org: fix isicom]
[akpm@linux-foundation.org: fix arch/ia64/hp/sim/simserial.c build]
[akpm@linux-foundation.org: fix kgdb]
Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-30 08:29:47 -07:00
Al Viro fd05e72009 drivers/usb annotations and fixes
* endianness annotations
* endianness fixes
* missing get_unaligned/put_unaligned

It's pretty much all over the place, changes to different files are independent.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Serial-parts-Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-28 10:03:31 -07:00
Ming Lei cdc9779228 USB: remove unnecessary type casting of urb->context
urb->context code cleanup

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:55 -07:00
Alan Cox a5b6f60c5a usb serial: more fixes and groundwork for tty changes
- If a termios change fails due to lack of memory we should copy the
   old settings back over as the device has not changed
 - Note various locking problems
 - kl5kusb105 had various remaining tty flag handling problems
 - Make safe_serial use tty_insert_flip_string not open coded loops
 - set termios speed properly in usb_serial

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:55 -07:00
Harvey Harrison 441b62c1ed USB: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:55 -07:00
Greg Kroah-Hartman 9aebfd6bda USB: serial: remove endpoints setting checks from core and header
Remove the unused check for num_interrupt and friends as well as remove
them from the header file because no usb-serial drivers no longer
reference them.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:52 -07:00
Greg Kroah-Hartman 0ba4034e20 USB: serial: remove unneeded number endpoints settings
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>
2008-04-24 21:16:52 -07:00
Chris Collins 5f760040bc USB: option.c: correct DTR behaviour
Setting DTR et al. should work for all interfaces
if you actually pass the interface number. :-P
 
This should help with devices that have important pseudo-serial ports
that aren't on the first interface in the device.

Signed-off-by: Chris Collins <chris@ursys.com.au>
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:51 -07:00
Robert P. J. Day 51c159e7a8 USB: Remove superfluous "depends on USB_SERIAL" from Kconfig.
Given that most of drivers/usb/serial/Kconfig is wrapped inside:

  if USB_SERIAL
  ...
  endif # USB_SERIAL

remove the consequently redundant dependencies on USB_SERIAL.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:50 -07:00
Paulius Zaleckas 97af0a911b USB: oti6858: fix TCFLSH ioctl handling
Removes unimplemented TCFLSH handling from oti6858, because it was 
preventing TCFLSH handling by upper layer (line discipline) drivers (see 
drivers/char/tty_io.c line 3450).

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:49 -07:00
Greg Kroah-Hartman 619a6f1d14 USB: add usb-serial spcp8x5 driver
Original version of the driver done by Linxb, changes by Harald, and
lots of cleanups by me in order to get it into a mergable state.

Cc: Linxb <xubin.lin@worldplus.com.cn>
Cc: Harald Klein <hari@vt100.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:44 -07:00
Kevin Lloyd 7106967ecc usb/usb-serial-sierra-add-new-dev-group
This patch is for the sierra driver and adds support for a new group of
devices that have a new USB configuration.
This targets kernel 2.6.25-rc7

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:44 -07:00
Kevin Lloyd 69a90f8189 USB: Serial: Sierra: C597 fix
This patch is for the sierra driver and fixes a Compass 597 bug that
allows users to access the SD-Card.

This targets kernel 2.6.25-rc7

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:44 -07:00
Kevin Lloyd f3564de4f5 USB: Serial: Sierra: Clean up
This patch cleans up some of the sierra driver code. Please package this
with the other patches in this group as I would like the driver version
to reflect their changes as well.

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:44 -07:00
Robert P. J. Day 1b75dc4de9 USB: Remove EXPERIMENTAL designation from USB serial/ Kconfig entries
Since nothing under the USB serial/ directory seems to be obviously
experimental, remove the EXPERIMENTAL dependency from all of those
Kconfig entries.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:43 -07:00
Alan Cox 8873aaa6e5 USB: cypress_m8: Speed handling
The recent changes to this driver cleaned it up a lot, follow that up
by sorting the speed side of things out as well

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:41 -07:00
Matthias Geissert e1879b19b0 USB: ipaq: fix devices having more than one endpoint
The ipaq module  supports devices with one endpoint only. Some devices,
e.g. Yakumo Delta 300, have more than one endpoint.

This patch fixes support for devices having up to 2 endpoints which used
to work on older kernel versions.

Signed-off-by: Matthias Geissert <matthias.geissert@web.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:40 -07:00
Ray Lee b56394bf32 USB: io_ti.c: remove unneeded null tty check
The Coverity checker (and Adrian Bunk) spotted an inconsistent NULL check of
port->tty (it's blindly dereferenced later without the check).

Alan Cox confirmed the check can go.

Signed-off-by: Ray Lee <ray-lk@madrabbit.org>
Cc: Adrian Bunk <bunk@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:40 -07:00
Julia Lawall dfa5ec79d2 USB: use DIV_ROUND_UP
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) /
(d)) but is perhaps more readable.

An extract of the semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@haskernel@
@@

#include <linux/kernel.h>

@depends on haskernel@
expression n,d;
@@

(
- (n + d - 1) / d
+ DIV_ROUND_UP(n,d)
|
- (n + (d - 1)) / d
+ DIV_ROUND_UP(n,d)
)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP((n),d)
+ DIV_ROUND_UP(n,d)

@depends on haskernel@
expression n,d;
@@

- DIV_ROUND_UP(n,(d))
+ DIV_ROUND_UP(n,d)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:39 -07:00
Alan Cox 3d71fe0bb2 USB: io_ti: lock mcr and msr shadows properly
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:39 -07:00
Alan Cox 04ca89d494 USB: ti_usb_3410_5052: Extend locking to msr and shadow mcr
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:39 -07:00
Alan Cox a40d8540f4 USB: kobil_sct: Get rid of unneeded priv->line_state
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:39 -07:00
Alan Cox 7b1fc8bc6d USB: iuu_phoenix: lock priv->tiostatus properly
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:39 -07:00
Alan Cox e298449401 USB: serial: Note mos7480 and option don't lock modem status
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:39 -07:00
Alan Cox 9b0f2582d5 USB: ftdi_sio: Note missing locking
The ftdi_sio driver has no internal locking on the dtr/rts state. Flag
that up for someone to fix.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:38 -07:00
Alan Cox 2097890c43 USB: usb-serial: Prepare for BKL push down
Take the lock in usb-serial instead. As it relies on the BKL internally
we can't push it any deeper yet.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:38 -07:00
Mike Isely 92983c2121 USB: cypress_m8: Limit baud rate to <=4800 for USB low speed devices
The cypress app note for the M8 states that for the USB low speed
version of the part, throughput is effectively limited to 800
bytes/sec.  So if we were to try a faster baud rate in such cases then
we risk overrun errors on receive.  Best to just identify this case
and limit the rate to 4800 baud or less (by ignoring any request to
set a faster rate).  The old baud rate setting code was somewhat
fragile; this change also hopefully makes it easier in the future to
better checking / limiting.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:38 -07:00
Mike Isely 6768306c3d USB: cypress_m8: Get rid of pointless NULL check
Remove a NULL check in cypress_m8; the check is useless in this
context because it is referenced earlier in the same code path thus
the kernel would be oops'ed before reaching this point anyway.  (And
it's really pointless here anyway; if this pointer somehow is NULL the
driver is going to have serious problems in many other places.)

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:37 -07:00
Mike Isely 3d6aa32065 USB: cypress_m8: Don't issue GET_CONFIG for certain devices
Earthmate LT-20 devices (both "old" and "new" versions) can't tolerate
a GET_CONFIG command.  The original Earthmate has no trouble with
this.  Presumably other non-Earthmate devices are still OK as well.
This change disables the use of GET_CONFIG for cases where it is known
not to work.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:37 -07:00
Mike Isely 3416eaa1f8 USB: cypress_m8: Packet format is separate from characteristic size
cypress_m8: Packet format is separate from characteristic size

The Cypress app note states that when using an 8 byte packet buffer
size that the packet format is modified (to be more compact).  However
I have since discovered that newer DeLorme Earthmate LT-20 devices
(those that are low speed USB with 8 byte packet size) STILL use the
format that is really supposed to correspond to 32 byte packets.
Further confusing things is the subsequent discovery that there are
actually two different types of LT-20 - older LT-20's use 32 byte
packets which is probably why this issue wasn't originally
encountered.  The solution here is to flag the packet format
separately from the buffer size.  Then at initialization time,
identify the correct combination and set it up.  This is a critical
fix for anyone with a newer LT-20.  Older devices and non-Earthmate
devices should remain unaffected by this change.  (If other devices
behave in this, uh, unexpected manner, it's now just a simple 1 line
change to fix them as well (change the pkt_fmt member for that
device).  Default behavior with this patch is still to drive the
format as per the app-note; of course for Earthmate devices this is
overridden.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:37 -07:00
Mike Isely 93075544d6 USB: cypress_m8: Feature buffer fixes
cypress_m8: Feature buffer fixes

From: Mike Isely <isely@pobox.com>

Don't hardcode the feature buffer size; use sizeof() instead.  That
way we can easily specify the size in a single spot.  Speaking of the
feature buffer size, the Cypress app note (and further testing with a
DeLorme Earthmate) suggests that this size should be 5 not 8 bytes.

Signed-off-by: Mike Isely <isely@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:36 -07:00
Andrew Morton 9544e833f9 USB: io_ti.c: remove pointless eye-candy in debug statements
These strings always come up as false positives whenever I'm doing
git-conflict fixups (ie: about 1000 times/day).

I don't think the zillion "<" and ">" characters are very useful and removing
them makes my life that little bit easier.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:36 -07:00
Stefan Seyfried 8f7f85e9f9 USB: Add HP hs2300 Broadband Wireless Module to sierra.c
Add the HP hs2300 Broadband Wireless Module (relabeled MC8775) USB IDs

Signed-off-by: Stefan Seyfried <seife@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:32 -07:00
Craig Shelley 59fba744da USB: CP2101 Add new device IDs
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-24 21:16:31 -07:00
Matthew Wilcox d3135846f6 drivers: Remove unnecessary inclusions of asm/semaphore.h
None of these files use any of the functionality promised by
asm/semaphore.h.  It's possible that they rely on it dragging in some
unrelated header file, but I can't build all these files, so we'll have
fix any build failures as they come up.

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
2008-04-18 22:16:32 -04:00
Greg Kroah-Hartman 07c3b1a100 USB: remove broken usb-serial num_endpoints check
The num_interrupt_in, num_bulk_in, and other checks in the usb-serial
code are just wrong, there are too many different devices out there with
different numbers of endpoints.  We need to just be sticking with the
device ids instead of trying to catch this kind of thing.  It broke too
many different devices.

This fixes a large number of usb-serial devices to get them working
properly again.


Cc: Oliver Neukum <oliver@neukum.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-15 22:30:53 -07:00
tang kai 32147be4cc USB: option: Add new vendor ID and device ID for AMOI HSDPA modem
This patch add new vendor ID and device ID  for AMOI HSDPA modem. 

From: tang kai <tangk73@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-15 22:30:53 -07:00
fangxiaozhi aad8a278f3 USB: support more Huawei data card product IDs
- declare the unusal device for Huawei data card devices in
   unusual_devs.h
 - disable the product ID matching for Huawei data card devices in
   usb_match_device function of driver.c
 - declare the product IDs in option.c.

Signed-off-by: fangxiaozhi <huananhu@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-15 22:30:52 -07:00
Matthias Urlichs a1d9bc12e0 USB: option.c: add more device IDs
Add devices by AMOI and NovatelWireless.

Signed-Off-By: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-15 22:30:52 -07:00
James Cameron 80d9709832 USB: Obscure Maxon BP3-USB Device Support 16d8:6280 for option driver
The modem was detected, the ttyUSB{0,1,2} appeared, a call could be
made, and the expected data rate was achieved.  Tested for an hour or
two, total of 100Mb.  I shall do more testing.

Signed-off-by: James Cameron <quozl@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-15 22:30:51 -07:00
Clark Rawlins 822470537d USB: Allow initialization of broken keyspan serial adapters.
Fixes the keyspan driver after the addition of additional
checking of driver requirements introduced in usb-serial.c
commit 063a2da8f0.  The initialization
of the keyspan usb_serial_driver structs were not initializing the
num_interrupt_out field and the additional checking was rejecting
the end point so the driver wouldn't finish initializing.

This commit initializes the fields to NUM_DONT_CARE.
It works for the keyspan USA-49WG and doesn't break the USA-19HS
which are the two keyspan devices I have to test with.

Signed-off-by: Clark Rawlins <clark.rawlins@escient.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-02 15:06:09 -07:00
Brad Sawatzky d04863e9e6 USB: serial: fix regression in Visor/Palm OS module for kernels >= 2.6.24
Fixes a bug/inconsistency revealed by the additional sanity checking in
   commit 063a2da8f0
introduced in the original 2.6.24 branch.

The Handspring Visor / PalmOS 4 device structure defines .num_bulk_out=2
but the usb-serial probe returns num_bulk_out=3, triggering the check in
the above commit and forcing a bail out when the device (a Garmin iQue in
my case) attempts to connect.  The patch bumps the expected number of
endpoints to 3.

FWIW, this patch will probably solve the following kernel bug report for
Treo users (identical symptoms, different model PalmOS units):
  <http://bugzilla.kernel.org/show_bug.cgi?id=10118>


Signed-off-by: Brad Sawatzky <brad+kernel@swatter.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-02 15:06:09 -07:00
Florian Fainelli e889868102 USB: cp2101: Add identifiers for the Telegesys ETRX2USB
This patch adds support for the Telegesys ETRX2USB which
works fine with the cp2101 driver.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Tested-by: Xavier Carcelle <xavier.carcelle@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-02 15:06:09 -07:00
Robert Spanton 1bfd6693cd USB: serial: ti_usb_3410_5052: Correct TUSB3410 endpoint requirements.
The changes introduced in commit
063a2da8f0 changed the semantics of the
num_interrupt_in, num_interrupt_out, num_bulk_in and num_bulk_out
entries of the usb_serial_driver struct to be the number of endpoints
the device has when probed.

This patch changes the ti_1port_device usb_serial_driver struct to
reflect this change.  The single port devices only have 1
bulk_out endpoint in their initial configuration, and so this patch
changes the number of other types to NUM_DONT_CARE.

The same change probably needs doing to the ti_2port_device struct,
but I don't have a two port device at hand.

Signed-off-by: Robert Spanton <rspanton@zepler.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-04-02 15:06:08 -07:00
Kevin Lloyd 7f170a632d USB: sierra: add another device id
Add support for the MC8775 device to the sierra driver.

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-24 22:26:15 -07:00
Oliver Neukum 4f4f9c53c2 USB: sierra: dma fixes
while I was adding autosuspend to that driver I noticed a few issues.
You were having DMAed buffers as a part of a structure.
This will fail on platforms that are not DMA-coherent (arm, sparc, ppc, ...)
Please test this patch to fix it.

Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-24 22:26:15 -07:00
Max Arnold b483b6aaa5 USB: pl2303: another product ID
Device like this http://aldiga.com/english/A-100-USB-EDGE10.htm
contains Prolific 2303 chip.
Actually their site a bit outdated - I have AlDiga AL-11U
GSM/GPRS/EDGE modem and it works with pl2303 module after adding
corresponding product ID.

By default modem uses baud rate 460800.  GSM chipset - SIMCom SIM600,
quad band 850/900/1800/1900 MHz

Device info:

T:  Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  5 Spd=12  MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=067b ProdID=0611 Rev= 0.00
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=pl2303
E:  Ad=81(I) Atr=03(Int.) MxPS=  10 Ivl=1ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=83(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms

From: Max Arnold <lwarxx@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-24 22:26:14 -07:00
Mirko Bordignon 11171d1bde USB: new ftdi_sio device id
Here is a patch that adds support for the propox jtagcable II dongle
(http://www.propox.com/products/t_117.html): their PID was missing,
therefore we were not able to have the device recognized though it uses
a standard FTDI chip.

Signed-off-by: Mirko Bordignon <mirko.bordignon@ieee.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-10 16:42:27 -07:00
Dirk DeSchepper 72ab6414cf USB: option: add novatel device ids
This updates the option driver with a lot more novatel driver ids.

From: Dirk DeSchepper <ddeschepper@nvtl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-10 16:42:26 -07:00
Dmitry Shapin 6f6f06ee6a USB: cypress_m8: add UPS Powercom (0d9f:0002)
Add support for UPS Powercom USB interface (0d9f:0002) in chip CY7C63723.
In my case, this Powercom BNT800AP.

Signed-off-by: Dmitry Shapin <shapin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-10 16:42:25 -07:00
Pete Zaitcev b507cc9710 USB: fix usb-serial generic recursive lock
Nobody should be using the generic usb-serial for anything other than
testing. Still, it's not a good thing that it's easy to lock up. There
is a traceback from NMI oopser here:
 https://bugzilla.redhat.com/show_bug.cgi?id=431379

But in short, if a line discipline has a chance to echo anything, input
can loop back a write method. So, don't call tty_flip_buffer_push from
under a lock taken on write path.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-10 16:42:25 -07:00
Sven Andersen 4ae897df80 USB: ftdi_sio - really enable EM1010PC
Add EM1010PC to ftdi_sio.c

Signed-off-by: Sven Andersen <s.andersen@cryonet.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-04 14:57:44 -08:00
Kevin Vance 546d7eec38 USB: ftdi_sio: Workaround for broken Matrix Orbital serial port
Workaround for the FT232RL-based, Matrix Orbital VK204-25-USB serial port
added to the ftdi_sio driver.

The device has an invalid endpoint descriptor, which must be modified
before it can be used.

Signed-off-by: Kevin Vance <kvance@kvance.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-04 14:57:44 -08:00
Daniel Kozák 85fb62a001 USB: Add support for AXESSTEL MV110H CDMA modem
Add entry for Axesstel MV110H CDMA modem (ID: 1726:1000) to option driver

Signed-off-by: Daniel Kozák <kozzi11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-04 14:57:44 -08:00
David Ludlow 11e1abb453 usb: Add support for the mos7820/7840-based B&B USB/RS485 converter to mos7840.c
Add support for the mos7820/7840-based B&B USOPTL4_2/USOPTL4_4 USB/RS485
converter to mos7840.c

Signed-off-by: Dave Ludlow <dave.ludlow@bay.ws>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-04 14:57:42 -08:00
Kevin Lloyd d726fb7577 USB: serial: move zte MF330 from sierra to option
Move the Onda H600/ZTE MF33 device from the sierra driver to the option
driver.

The reason it was moved is because the sierra driver is starting to support
more and more sierra proprietary features, so it makes more sense to keep
sierra only devices in there.


Signed-off-by: Kevin Lloyd <klloyd@sierrawireless.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:38:53 -08:00
Warren Turkal 7f4a9e8750 USB: Add another Novatel U727 ID to the device table for usbserial
Signed-off-by: Warren Turkal <turkal@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:38:52 -08:00
Stefan Bader aa59e053da USB: option: Added vendor id for Dell 5720 broadband modem
this is a small patch to add support for a rebranded Novatel modem (see
http://ubuntuforums.org/archive/index.php/t-608388.html for details).

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:38:52 -08:00
Dan Williams 564d61d30e USB: option: Add Kyocera KPC680 ids
Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:38:51 -08:00
Andy Shevchenko 59036e9473 USB: usb: yet another Dell wireless CDMA/EVDO modem
Add native support of the Dell wireless CDMA/EVDO modem.

# modprobe usbserial vendor=0x413c product=0x8129

Following seesion lines describe modem itself
at
OK
ati3
Manufacturer: NOVATEL WIRELESS INCORPORATED
Model: EXPEDITE ET620
Revision: M6500C-BBIRD_TLS_MINI_DELL-Q40306.166 [Aug 25 2006 14:00:00]
ESN: 0x5B39071D
+GCAP: +CIS707-A, CIS-856, +MS, +ES, +DS, +FCLASS

OK

Signed-off-by: Andy Shevchenko <andy@smile.org.ua>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:38:48 -08:00
Oliver Neukum 2129c4e1b4 USB: Sane memory allocation in option driver
The option driver
- violates DMA coherency rules
- allocates ~16500 bytes in one chunk
This patch splits out the buffers and uses __get_free_page() to avoid
higher order allocations.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-By: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:38:48 -08:00
Roel Kluin bbc5d276ec USB: ftdi_sio.c add missing '|'
add missing '|'

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21 15:38:48 -08:00
Stefan Bader 8dd70705c4 USB: Fix usb_serial_driver structure for Kobil cardreader driver.
The device setup did miss to initialize the num_interrupt_out field, thus
failing to successfully complete the probe function.

Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Cc: stable <stable@kernel.org>
Cc: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:06 -08:00
Denis Cheng b75be4abf1 USB: Use menuconfig objects
commit 04d06ad0f1 have added menuconfig support
for the whole USB Kconfig, but there are still menuconfig need for usb/serial,
usb/atm, and usb/gadget, so that the user can disable all the options in that
menu at once instead of having to disable each option separately.

Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:06 -08:00
Oliver Neukum 0915f490d8 USB: last abuses of intfdata in close for usb-serial drivers
these drivers abused intfdata in close() as flags for binding.
That races with reprobing of those devices. This patch fixes that by using
the flag and the locks introduced with the patch against mos7720.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:05 -08:00
Oliver Neukum 3edbc98650 USB: kl5kusb105 don't flush to logically disconnected devices
If disconnect() is called for a logical disconnect, no more IO must be
done after disconnect() returns, or the old and new drivers may conflict.
This patch avoids this by using the flag and lock introduced by the earlier
patch for the mos7720 driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:05 -08:00
Alan Cox b0a239da17 USB: oti6858: cleanup
- Rename the copied buffer functions from pl2303 to oti6858 to avodi
  confusion
- Initialise speeds properly
- Use modern baud rate handling
- Remove GSERIAL/SSERIAL ioctl hacks that reference termios unlocked

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:05 -08:00
Oliver Neukum 95bef012ea USB: more serial drivers writing after disconnect
this covers the rest of the obvious cases by using the flags
and locks to guard against disconnect which were introduced
in the earlier patch against mos7720.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:05 -08:00
Oliver Neukum e33fe4d86f USB: make sure usb serial drivers don't flush to logically disconnected devices
If disconnect() is called for a logical disconnect, no more IO must be
done after disconnect() returns, or the old and new drivers may conflict.
This patch avoids this by using the flag and lock introduced by the earlier
patch for the mos7720 driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:04 -08:00
Oliver Neukum 004b4f2d44 USB: fix memleak in ark3116 serial driver
in an error case memory already allocated must be freed again.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:04 -08:00
Oliver Neukum 9e3b1d8e3d USB: stop abuse of intfdata in cypress_m8
this driver uses usb_get_intfdata() == NULL as a test for disconnect().
You must not do that as this races with probe(). By the time you test
your erstwhile interface may already be somebody else's interface.
This fixes the close() method of cypress_m8 to use the recently introduced
flag and use locking against disconnect() where required in close().

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:04 -08:00
Oliver Neukum a1cd7e99b3 USB: stop io performed by mos7720 upon close()
This fixes a problem where the mos7720 driver will make io to a device from
which it has been logically disconnected. It does so by introducing a flag by
which the generic usb serial code can signal the subdrivers their
disconnection and appropriate locking.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:03 -08:00
Greg Kroah-Hartman 504b55cc8b USB: ftdi_sio: remove very old changelog entries from the file.
People keep trying to add entries to this section of the driver for
things.  That's what the Changelog is supposed to be for, not the .c
file.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:03 -08:00
Paul Chavent 7bd4b20c87 USB: usbserial: provide ezusb functions for an external module.
When building an external module, the ezusb_* functions are not defined
if we haven't loaded any built'in module that use them (whiteheat,
keyspan, ...).

This patch allow to build those functions even if we only have selected
the usbserial generic driver.

Signed-off-by: Paul Chavent <paul.chavent@fnac.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:03 -08:00
Kevin Lloyd 228426edac USB: sierra driver - add update dtr logic
The following improvements were made:
 - Fixed control line issue where asserting DTR on ep5 would close ep2
 - Added support for calc_num_ports (will help support future composite
   devices)

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:00 -08:00
Harald Welte 20734345b3 USB: ftdi_sio: Support for more JTAG adaptors
[PATCH] ftdi_sio: add support for more FTDI based JTAG adaptors

There are more devices similar to the Olimex JTAG adaptor, in that the first
port of the FT2232C is used for JTAG, and only the second port is available as
UART.

I have thus renamed ftdi_olimex_{probe,quirk} to ftdi_jtag_{probe,quirk} and
added vendor/product ID's for the OpenMoko Neo1973 Debug Board as well as the
OOCDlink device.

I've also updated the KERN_INFO message sent to userspace to remove the word
'olimex' and an extra '\n' that was causing an empty line in dmesg.

Signed-off-by: Harald Welte <laforge@openmoko.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:00 -08:00
Alan Cox d5f5bcd425 USB: io_ti: clean up termios handling
Don't pass NULL into termios functions when calling them internally
Remove all the crap which then checks for NULL which can't occur now
Clear CMSPAR as it is not supported
Report the baud rate back to the caller properly (See FIXME someone with
the docs)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:00 -08:00
Alan Cox 537699ef53 USB: ti_usb: termios cleanups
Remove internal NULL passing in termios code
Remove all the if checks it causes
Encode the baud rate back properly
Clear CMSPAR as it is not supported

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:35:00 -08:00
Alan Cox 65d063ab21 USB: mos7720: clean up termios
Remove lots of NULL checks that can no longer occur
Encode the baud rate back into the termios (again someone with docs see
FIXME to improve this further)

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:59 -08:00
Oliver Neukum e58679805d USB: fix NULL pointer dereference on drivers/usb/serial/whiteheat.c
Am Sonntag, 16. Dezember 2007 05:23:47 schrieb Andrew Morton:
> On Sat, 15 Dec 2007 07:08:52 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=9573
 
> > There's a null pointer dereference on drivers/usb/serial/whiteheat.c as
> > follows:
> > 
> > (1) line 613:  the test "if (port->tty)" implies that null is a legal value
> >     for "port->tty" at that point
> > 
> > (2) neither firm_open nor firm_purge initialize "port->tty"

drivers/usb/serial/usb-serial::serial_open() sets port->tty
The check for NULL is bogus. This patch removes the check.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:58 -08:00
Joe Perches dc0d5c1e5c USB: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:57 -08:00
Alan Cox d0fab0ddf3 USB: mct232: speed, new termios and compliance cleanups
Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Alan Cox e7806e366b USB: keyspan_pda: clean up speed handling
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Alan Cox 3ec466b496 USB: belkin_sa: clean up for new style termios and speed handling, plus style
A tester with actual hardware would be useful

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Sarah Sharp fcf9e55e06 USB: pl2303: Add autosuspend support to pl2303 usb serial converter.
Signed-off-by: Sarah Sharp <saharabeara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:56 -08:00
Sarah Sharp 3e152505a5 USB: pl2303: Move pl2303 vendor specific init to probe function.
Without this fix, the pl2303 usb-serial adapter would not suspend properly
unless it had been opened first.  A pl2303 type_1 chip will still break if the
system is hibernated while the RS-232 connector is powered by another system.
This was broken before, and a reset resume does not fix it.  All other suspend
and autosuspend scenarios work with ATEN pl2303 adaptors with HX and type_1 chips.

Signed-off-by: Sarah Sharp <saharabeara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:55 -08:00
Sarah Sharp eb44da0b3a USB: pl2303: Cleanup FISH and SOUP macros in pl2303 driver.
Replace the FISH and SOUP macros that violated the macro guidelines in CodingStyle.
Turn them into function calls with clearer variable names.

Signed-off-by: Sarah Sharp <saharabeara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:55 -08:00
Matthias Kaehlcke 241ca64fc5 USB: Edgeport USB Serial Converter: convert es_sem to mutex
Edgeport USB Serial Converter: convert semaphore es_sem to the
mutex API

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:53 -08:00
Andre Haupt 7b62cc8668 USB: cyberjack: remove a unnecessary variable.
This also fixes a sparse warning that symbol 'result' shadows an earlier one.

Signed-off-by: Andre Haupt <andre@bitwigglers.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:51 -08:00
Sarah Sharp f0fbd5b9ba USB: Prepare serial core for autosuspend.
Claim the interface for a USB to serial converter when the tty is open,
and release the interface when the tty is closed.

If a driver doesn't provide a resume function, use the generic resume
instead.

Make sure the generic resume function does not submit the URBs if we're
coming back from autosuspend.  On autoresume, we know that the open
function will be called next, which will attempt to submit the URBs.  If
we submit them in the resume function, the open will fail.

This works for:
 - autosuspend
 - suspending with the tty open or closed
 - hibernate with the tty closed

A hibernate (or a suspend that causes the USB subsystem to lose power)
has issues.  If you have the tty open when you hibernate, a new tty will
be created when the device re-enumerates during resume.

Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:51 -08:00
Aristeu Rozanski c87d6a4f67 USB: usb_serial_console: allocate fake tty and termios before calling driver open() method
The usb serial method set_termios() is called for the first time from
open() method in order to set up the termios structure with the default
device's settings, ignoring the current settings. Once it's initialized,
the next set_termios() calls will update the device with the
tty->termios settings.
Currently USB serial console code calls the driver open() method without
a tty and after that will allocate a fake tty and termios so the command
line arguments can be applied to the device
(console=ttyUSB0,115200,...). This makes the driver overwrite the
termios with the default settings and not applying the command line
options.

This patch changes usb_console_setup() to allocate the fake tty and
termios before the open() method is called.

Tested successfully with a pl2303

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:50 -08:00
Aristeu Rozanski 9a6b1efa6f USB: usb_serial: clean tty reference in the last close
When a usb serial adapter is used as console, the usb serial console
driver bumps the open_count on the port struct used but doesn't attach
a real tty to it (only a fake one temporaly). If this port is opened later
using the regular character device interface, the open method won't
initialize the port, which is the expected, and will receive a brand new
tty struct created by tty layer, which will be stored in port->tty.

When the last close is issued, open_count won't be 0 because of the
console usage and the port->tty will still contain the old tty value. This
is the last ttyUSB<n> close so the allocated tty will be freed by the
tty layer. The usb_serial and usb_serial_port are still in use by the
console, so port_free() won't be called (serial_close() ->
usb_serial_put() -> destroy_serial() -> port_free()), so the scheduled
work (port->work, usb_serial_port_work()) will still run. And
usb_serial_port_work() does:
(...)
        tty = port->tty;
        if (!tty)
                return;

        tty_wakeup(tty);
which causes (manually copied):

Faulting instruction address: 0x6b6b6b68
Oops: Kernel access of bad area, sig: 11 [#1]
PREEMPT PowerMac
Modules linked in: binfmt_misc ipv6 nfs lockd nfs_acl sunrpc dm_snapshot dm_mirror dm_mod hfsplus uinput ams input_polldev genrtc cpufreq_powersave i2c_powermac therm_adt746x snd_aoa_codec_tas snd_aoa_fabric_layout snd_aoa joydev snd_aoa_i2sbus snd_pcm_oss snd_mixer_oss snd_pcm snd_timer snd_page_alloc pmac_zilog serial_core evdev ide_cd cdrom snd appletouch soundcore snd_aoa_soundbus bcm43xx firmware_class usbhid ieee80211softmac ff_memless firewire_ohci firewire_core ieee80211 ieee80211_crypt crc_itu_t sungem sungem_phy uninorth_agp agpart ssb
NIP: 6b6b6b68 LR: c01b2108 CTR: 6b6b6b6b
REGS: c106de80 TRAP: 0400   Not tainted  (2.6.24-rc2)
MSR: 40009032 <EE,ME,IR,DR>  CR: 82004024  XER: 00000000
TASK = c106b4c0[5] 'events/0' THREAD: c106c000
GPR00: 6b6b6b6b c106df30 c106b4c0 c2d613a0 00009032 00000001 00001a00 00000001
GPR08: 00000008 00000000 00000000 c106c000 42004028 00000000 016ffbe0 0171a724
GPR16: 016ffcf4 00240e24 00240e70 016fee68 016ff9a4 c03046c4 c0327f50 c03046fc
GPR24: c106b6b9 c106b4c0 c101d610 c106c000 c02160fc c1eac1dc c2d613ac c2d613a0
NIP [6b6b6b68] 0x6b6b6b68
LR [c01b2108] tty_wakeup+0x6c/0x9c
Call Trace:
[c106df30] [c01b20e8] tty_wakeup+0x4c/0x9c (unreliable)
[c106df40] [c0216138] usb_serial_port_work+0x3c/0x78
[c106df50] [c00432e8] run_workqueue+0xc4/0x15c
[c106df90] [c0043798] worker_thread+0xa0/0x124
[c106dfd0] [c0048224] kthread+0x48/0x84
[c106dff0] [c00129bc] kernel_thread+0x44/0x60
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
Slab corruption: size-2048 start=c2d613a0, len=2048
Redzone: 0x9f911029d74e35b/0x9f911029d74e35b.
Last user: [<c01b16d8>](release_one_tty+0xbc/0xf4)
050: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
Prev obj: start=c2d60b88, len=2048
Redzone: 0x9f911029d74e35b/0x9f911029d74e35b.
Last user: [<c00f30ec>](show_stat+0x410/0x428)
000: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
010: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b

This patch avoids this, clearing port->tty considering if the port is
used as serial console or not

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:50 -08:00
Aristeu Rozanski 27680d232b USB: usb_serial_console: fix command line parsing
Currently usb serial console support ignores the device and always use
ttyUSB0.

Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:50 -08:00
Matthias Kaehlcke 9da0068a49 USB: TI 3410/5052 USB Serial: convert td_open_close_lock to mutex
TI 3410/5052 USB Serial: convert semaphore td_open_close_lock to the mutex
API.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:48 -08:00
Alain Degreffe 60a8fc0171 USB: add iuu_phoenix driver
Signed-off-by: Alain Degreffe <eczema@ecze.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:47 -08:00
Nate Carlson ab91d346c8 USB: Variant of the Dell Wireless 5520 driver
I've got a Dell wireless 5520 card with a different USB ID - specifically, 8136
instead of 8137. Attached a small patch to add support, and the output of an
'ati3'.

If we could get this in, that'd be sweet.  ;)  Thanks!

nc@knight:~/tmp/linux-2.6.24-rc8/drivers/usb/serial$ lsusb | grep 8136
	Bus 001 Device 005: ID 413c:8136 Dell Computer Corp.
nc@knight:~/tmp/linux-source-2.6.23/drivers/usb/serial$ cu -l ttyUSB0 -s 115200
	Connected.
	ati3
	Manufacturer: Novatel Wireless Incorporated
	Model: Expedite EU860D MiniCard
	Revision: 10.10.04.01-01  [2007-04-11 14:07:19]
	IMEI: 011186000228043
	+GCAP: +CGSM,+DS,+ES

From: Nate Carlson <natecars@natecarlson.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:46 -08:00
Ed Beroset 4bb0ef193b USB: ftdi driver - add support for optical probe device
Added support for the Elster Unicom III Optical Probe.
The device ID has already been added to the usb.ids file.

Cc: stable <stable@kernel.org>
Signed-off-by: Ed Beroset <beroset@mindspring.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Akira Tsukamoto 57833ea6b9 USB: pl2303: add support for RATOC REX-USB60F
pl2303: add support for RATOC REX-USB60F

This patch adds support for RATOC REX-USB60F Serial Adapters,
which is widely used in Japan recently.

Cc: stable <stable@kernel.org>
Signed-off-by: Akira Tsukamoto <akirat@rd.scei.sony.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Daniel Kozák 94cb373a75 USB: remove duplicate entry in Option driver and Pl2303 driver for Huawei modem
Remove entry for Huawei E620 UMTS/HSDPA card (ID: 12d1:1001) in pl2303 driver
Option driver is use instead

Cc: stable <stable@kernel.org>
Signed-off-by: Daniel Kozák <kozzi11@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Bruno Redondi e3e73c90e5 USB: sierra: add support for Onda H600/Zte MF330 datacard to USB Driver for Sierra Wireless
Added support for Onda H600/Zte MF330 GPRS/UMTS/HSDPA datacard

Cc: stable <stable@kernel.org>
Signed-off-by: Bruno Redondi <bruno.redondi@altarisoluzione.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Franco Lanza 34910434a2 USB: ftdi-sio: Patch to add vendor/device id for ATK_16IC CCD
little patches only to add vendor/device id of ATK_16IC CCD cam for
astronomy.

From: Franco Lanza <nextime@nexlab.it>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:45 -08:00
Peter Stark 42f8aa9456 USB: ftdi_sio - enabling multiple ELV devices, adding EM1010PC
I work with a group of people on a free home automation tool called
FHEM.  Some of the users own more than one USB-serial device by ELV. The
ftdi_sio driver has most of the ELV devices disabled by default and
needs to be re-enabled every time you get a new kernel. Additionally a
new device (EM 1010 PC - enegry monitor) is missing in the list.
Currently our users have to follow the instructions we provide at
http://www.koeniglich.de/fhem/linux.html ... However, to some users it
is too complicated to compile their own kernel module.

We are aware that you can specify one additional device using the
vendor/product option of the module. But lot's of users own more than
one device.

Cc: stable <stable@kernel.org>
Signed-off-by: Peter Stark <peter.stark@t-online.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:44 -08:00
Kevin Lloyd 6835b32c38 USB: sierra driver - add devices
The following improvements were made:
 - Added new product support: MC5725, AC 880 U, MP 3G (UMTS & CDMA)

Cc: stable <stable@kernel.org>
Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:44 -08:00
Damien Stuart cc311ee7d2 USB: Adding YC Cable USB Serial device to pl2303
This simply adds the "YC Cable" as a vendor and its pl2303-based
USB<->Serial adapter as a product.  This particular adapter is sold by
Radio Shack.  I've done limited testing on a few different systems with
no issues.

Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:43 -08:00
Jessica L. Blank 62aad3ab11 USB: Sierra - Add support for Aircard 881U
Adds the appropriate vendor and device IDs for the AirCard 881U to
sierra.c. (This device is often rebadged by AT&T as the USBConnect 881).

Cc: stable <stable@kernel.org>
Signed-off-by: Jessica L Blank <j@twu.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:43 -08:00
Piotr Roszatycki 002e8f2c80 USB: add support for 4348:5523 WinChipHead USB->RS 232 adapter
add support for:

  4348:5523 WinChipHead USB->RS 232 adapter with Prolifec PL 2303 chipset

[ mingo@elte.hu: merged it and nursed it upstream ]

Cc: stable <stable@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:43 -08:00
Craig Shelley 5de8b3acda USB: CP2101 New Device IDs
Six new device IDs for CP2101 driver.

Cc: stable <stable@kernel.org>
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:43 -08:00
Alan Cox 3004e5379a USB: keyspan: Fix oops
If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom. Fortunately all we need to do is process the URB
without trying to ram its contents down the throat of an ex-tty.

Cc: stable <stable@kernel.org>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01 14:34:42 -08:00
Alan Cox a5569a565f keyspan: fix oops
If we get a data URB back from the hardware after we have put the tty to
bed we go kaboom.  Fortunately all we need to do is process the URB without
trying to ram its contents down the throat of an ex-tty.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@akpm@linux-foundation.org>
2008-01-21 19:39:41 -08:00
Alan Cox bf5e5834bf pl2303: Fix mode switching regression
Cleaning out all the incorrect 'no change made' checks for termios
settings showed up a problem with the PL2303. The hardware here seems to
lose sync and bits if you tell it to make no changes. This shows up with
a real world application.

To fix this the driver check for meaningful hardware changes is restored
but doing the tests correctly and as a tty layer function so it doesn't
get duplicated wrongly everywhere if other drivers turn out to need it.

Signed-off-by: Alan Cox <alan@redhat.com>
Tested-by: Mirko Parthey <mirko.parthey@informatik.tu-chemnitz.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-08 16:16:34 -08:00
Martin Kusserow 014840ec57 USB: New device ID for the CP2101 driver
attached please find a new device ID for CP2101 driver. This device is a
usb stick from Dynastream to communicate with ANT wireless devices which
I suppose is fairly similar to the ANT dev board having product id 0x1003.

From: Martin Kusserow <kusserow@ife.ee.ethz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-22 23:14:33 -08:00
Kevin R Page ed0ccdbb61 USB: VID/PID update for sierra
Adds VID/PID for the MC8775 found internally in the Thinkpad X61s laptop
(and likely others). For commercial reasons the driver maintainer cannot
add VID/PIDs for laptop OEM devices himself.

Signed-off-by: Kevin R Page <linux-kernel@krp.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-22 23:14:33 -08:00
Jaime Velasco Juan b5ce18afec USB: option: Bind to the correct interface of the Huawei E220
This fixes a bunch of problems we are having with the Huawei devices...


Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jaime Velasco Juan <jsagarribay@gmail.com>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:15 -08:00
Jeff Long 8be27c2de6 USB: cp2101: new device id
This adds a device ID for the Aerocomm Radio Modem, which uses the
cp2102.  I'm sure changing num_bulk_in/num_bulk_out to NUM_DONT_CARE
is the wrong fix, but this is the only device I have with a cp2102,
so I have no idea what a good global value would be, if there is one.
Zero didn't work with this device.

From: Jeff Long <JeffLong@mitre.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:14 -08:00
agilmore@wirelessbeehive.com b9e13ac30f USB: sierra: fix product id
Attached is a patch to fix the addition of the new product ids I sent.

It is against 2.6.24-rc4, as Linus included the broken version of the
patch I sent you in that tree. :(

Not sure if this is the right method to go about this, but hopefully I got
it right this time.

Signed-off-by: Andrew Gilmore <agilmore@wirelessbeehive.com>
CC: Kevin Lloyd <klloyd@sierrawireless.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-12-17 10:47:14 -08:00
Andrew Morton f78ba15705 revert "keyspan: init termios properly"
Revert 7eea436433.

Lucy said:

  This patch will work with the 19HS but WILL BREAK all other Keyspan
  adapters.  It will take me a few days to get to looking at a correct fix but
  that keyspan_send_setup(port, 1) (and the '1' is the important part) must
  happen once when the port is first opened.  The cflag can just be set to
  whatever the normal default is for your serial environment.

So revert this again pending the proper fix.

Cc: Borislav Petkov <bbpetkov@yahoo.de>
Cc: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Lucy McCoy <lucy@keyspan.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29 09:24:54 -08:00
agilmore@wirelessbeehive.com 5fdcd0396b USB: sierra: new product id
Per the maintainer of the usbserial/sierra.c driver, the patch below adds
a new id to the list of supported cards for the sierra driver. Tested and
working for me on Fedora 8, kernel 2.6.23 and on the more recent sierra.c
available in
http://www.sierrawireless.com/resources/support/Software/Linux/v.1.2.6b(kernel2.6.21).zip

Hardware is a MiniPCI card in a Lenovo T61p.


Signed-off-by: Andrew Gilmore <agilmore@wirelessbeehive.com>
Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:35 -08:00
Borislav Petkov bfaeafcfc2 usbserial: fix inconsistent lock state
In commit acd2a847e7 usb_serial_generic_write()
disables interrupts when taking &port->lock which is also taken in
usb_serial_generic_read_bulk_callback() resulting in an inconsistent lock state
due to the latter not disabling interrupts on the local cpu. Fix that by
disabling interrupts in the latter call site also.

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:34 -08:00
Roel Kluin 7ced46c3ad USB: free memory when writing fails in usb/serial/mos7840.c
Free buffer when writing ZLP_REG5 failed

Signed-off-by: Roel Kluin <12o3l@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:33 -08:00
Magnus Damm 9e3285dba5 USB: pl2303: add support for Corega CG-USBRS232R
pl2303: add support for Corega CG-USBRS232R

This patch adds support for Corega CG-USBRS232R Serial Adapters.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-11-28 13:58:33 -08:00
Borislav Petkov 7eea436433 keyspan: init termios properly
Remove redundant code leading to NULL ptr deref and let terminal config
settings take place in the proper initialization path in
usb_console_setup().

Signed-off-by: Borislav Petkov <bbpetkov@yahoo.de>
Cc: <lucy@keyspan.com>
Cc: Greg KH <greg@kroah.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:44 -08:00
Sarah Sharp 8abaee238e USB: usb_serial_resume bug fix
Avoid potential null pointer dereference.

Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
Jiri Kosina acd2a847e7 USB: usbserial - fix potential deadlock between write() and IRQ
USB: usbserial - fix potential deadlock between write() and IRQ

usb_serial_generic_write() doesn't disable interrupts when taking port->lock,
and could therefore deadlock with usb_serial_generic_read_bulk_callback()
being called from interrupt, taking the same lock. Fix it.

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Acked-by: Larry Finger <larry.finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
Masakazu Mokuno 8a28dea3ac usb: serial/pl2303: support for IO Data Device RSAQ5
This patch adds support for the IO Data Device USB-RSAQ5, PL2303 based
USB-serial converter, to pl2303 driver

Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:45 -07:00
Alan Cox df64c47184 USB: pl2303: remove can't happen checks, set speed properly and report baud rate
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:44 -07:00
Alan Cox 3d3ddce568 USB: mos7840: Clean up old checks and stuff
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:44 -07:00
Alan Cox 6ce073bd8b USB: io_edgeport: cleanups, and tty speed reporting
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:43 -07:00
Andrew Morton bd5e47ccb6 USB: ftd_sio cleanups and updates for new termios work checkpatch fixes
WARNING: line over 80 characters
#23: FILE: drivers/usb/serial/ftdi_sio.c:297:
+	speed_t force_baud;	/* if non-zero, force the baud rate to this value */

ERROR: use tabs not spaces
#31: FILE: drivers/usb/serial/ftdi_sio.c:881:
+^I$

ERROR: use tabs not spaces
#39: FILE: drivers/usb/serial/ftdi_sio.c:890:
+^I$

WARNING: line over 80 characters
#111: FILE: drivers/usb/serial/ftdi_sio.c:1956:
+		tty_encode_baud_rate(port->tty, priv->force_baud, priv->force_baud);

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:42 -07:00
Alan Cox 669a6db103 USB: ftd_sio: cleanups and updates for new termios work
- Remove can't happen tests
- Rework speed validation in terms of baud rates not CBAUD bits
- Report speed set (or chosen)
- Minor termios correctness

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:42 -07:00
Alan Cox 9ab0f202e6 USB: cp2101: convert to new termios
- Convert to new baud rate functions
- Add baud rate reporting

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:42 -07:00
Alan Cox 01d1df2951 USB: whiteheat: clean up can't happen checks and encode baud rate
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:42 -07:00
Alan Cox 337850917a usb-serial: handle NULL termios methods as "no hardware changing support"
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:42 -07:00
Alan Cox ed1f12ec50 USB: sierra: termios
No hardware termios setting in this case so keep the old settings

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:42 -07:00
Alan Cox e650d8ae04 USB: option: termios handling
For the devices that have no hardware settings set up the termios return
properly.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:41 -07:00
Alan Cox a6ebf80dbc USB: kobil_sct: termios encoding fixups
- Clear unsupported CMSPAR
- Encode resulting speeds

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:41 -07:00
Alan Cox 74240b07a9 USB: keyspan termios tidy
- Clear unsupported CMSPAR bit
- Clean up long chains of a->b-> a bit
- Encode baud rate back into tty structure properly

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:41 -07:00
Alan Cox 560aac22e1 USB: ir_usb: termios handling
- Clean up paranoia checks
- Propogate back a correct fixed termios

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:41 -07:00
Alan Cox 998e863871 USB: empeg: clean up and handle speeds
The empeg is pretty fixed. Tidy up the long foo->bar->baz stuff and
encode the fixed speed properly.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:41 -07:00
Alan Cox 7fa36a994c USB: digi_acceleport: fix termios and also readability a bit
- Expand some x&y to x & y so I could read it when checking
- Clear CMSPAR bit in the termios (as the driver does not support it)
- Encode the speed using the new tty_encode_baud_rate facility

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:41 -07:00
Alan Cox 73f5930819 USB: ch341: fix termios handling
The ch341 currently doesn't support most of the hardware setting.  So to keep
the termios data right we propogate the old termios hardware values back then
encode the speed.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:40 -07:00
Alan Cox 7cc7ee2826 usb serial: kill another case we pass NULL and shouldn't
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:40 -07:00
Alan Cox adb5dca17d USB: ark3116: update termios handling
- Set the i/ospeed in the initial termios properly

- Use the tty_encode_baud_rate functions to report resulting rates properly

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:40 -07:00
Greg Kroah-Hartman 3657f6c018 USB: add new Novatel device ids to option driver
This adds support for the U727 and MC950 devices.

Cc: Rony Sarkis <rsarkis@nvtl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-25 12:18:40 -07:00
Matt LaPlante 01dd2fbf0d typo fixes
Most of these fixes were already submitted for old kernel versions, and were
approved, but for some reason they never made it into the releases.

Because this is a consolidation of a couple old missed patches, it touches both
Kconfigs and documentation texts.

Signed-off-by: Matt LaPlante <kernel1@cyberdogtech.com>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-20 01:34:40 +02:00
Jan Engelhardt 96de0e252c Convert files to UTF-8 and some cleanups
* Convert files to UTF-8.

  * Also correct some people's names
    (one example is Eißfeldt, which was found in a source file.
    Given that the author used an ß at all in a source file
    indicates that the real name has in fact a 'ß' and not an 'ss',
    which is commonly used as a substitute for 'ß' when limited to
    7bit.)

  * Correct town names (Goettingen -> Göttingen)

  * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313)

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19 23:21:04 +02:00
Joe Perches 898eb71cb1 Add missing newlines to some uses of dev_<level> messages
Found these while looking at printk uses.

Add missing newlines to dev_<level> uses
Add missing KERN_<level> prefixes to multiline dev_<level>s
Fixed a wierd->weird spelling typo
Added a newline to a printk

Signed-off-by: Joe Perches <joe@perches.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Mark M. Hoffman <mhoffman@lightlink.com>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Tilman Schmidt <tilman@imap.cc>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Greg KH <greg@kroah.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: James Smart <James.Smart@Emulex.Com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-18 14:37:28 -07:00
Al Viro 64a6f9500d signedness: module_param_array nump argument
... should be unsigned int

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-10-14 12:41:52 -07:00
Alan Stern 063a2da8f0 USB: serial core should respect driver requirements
This patch (as997) fixes a bug in the USB serial core.  The core needs
to pay attention to drivers' requirements regarding the number and
type of endpoints a device has.

At the same time, the patch changes the NUM_DONT_CARE constant (which
is stored in a single-byte field) from -1 to a safer, unsigned value.
It also improves the kerneldoc for several fields in the
usb_serial_driver structure.

Finally, the patch replaces a list_for_each() with list_for_each_entry().

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:34 -07:00
Nobuhiro Iwamatsu eecfb911a0 USB: Adding support for SHARP WS011SH to ipaq.c
This patch supports for SHARP WS011SH[0] to ipaq.c

[0]: http://www.willcom-inc.com/ja/lineup/ws/011sh/index.html
(Sorry , Japanese only.)

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:33 -07:00
Alan Cox f621b8437d USB: funsoft: Fix termios
Funsoft has a bogus ioctl handler doing bogus termios handling in a bogus
manner. Fortunately we can simply delete all the bogus bits and get the
right default behaviour !

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:32 -07:00
Alan Cox d9c563626d USB: visor: termios bits
Visor has a huge complex routine which displays termios bits for debug
but doesn't do anything. Get the correct behaviour by removing it all

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:32 -07:00
Adrian Bunk 93b6497da9 USB: usb/serial/ch341.c: make 4 functions static
This patch makes four needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:29 -07:00
Frank A Kingswood 6ce7610478 USB: Driver for CH341 USB-serial adaptor
This patch implements a USB serial port driver for the Winchiphead
CH341 USB-RS232 Converter. This chip also implements an IEEE 1284
parallel port, I2C and SPI, but that is not supported by the driver.

Signed-off-by: Frank A Kingswood <frank@kingswood-consulting.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:29 -07:00
Edouard Lafargue 1f4f714f88 USB: cp2101.c: add additional device ID
This patch adds an additional device ID to the cp2101 USB serial
driver. This device is a Gemalto Prox-PU or CU contactless card reader
(ISO14443-A/B and Mifare). The reader is a standard Gemalto serial
proximity reader using the Gemalto Block Protocol (see reader's
documentation) bundled with a built-in CP2102 for serial/USB
conversion.

Signed-off-by: Edouard Lafargue (edouard@lafargue.name)
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:28 -07:00
Oliver Neukum ed6590a861 USB: fix double frees in error code paths of ipaq driver
the error code paths can be enter with buffers to freed buffers.
Serial core would do a kfree() on memory already freed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:26 -07:00
Oliver Neukum 5adceac5da USB: fix errornous assumption in the usb serial framework revealed by iuu_phoenix
the iuu_phoenix driver submits another URB from a completion handler.
This dictates a certain order of calls to usb_kill_urb() in kill_traffic().
As other drivers may do it the other way round, we need to use both
orders in kill_traffic().
This patch does so and should be merged before iuu_phoenix is merged.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:25 -07:00
Andreas Loibl e7beb66784 usb: serial/pl2303: support for BenQ Siemens Mobile Phone EF81
This patch adds support for the BenQ Mobile Phone EF81 to pl2303

Signed-off-by: Andreas Loibl <andreas@andreas-loibl.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:21 -07:00
Jesper Juhl b84d2bf07f usb: avoid redundant cast of kmalloc() return value in OTi-6858 driver
In drivers/usb/serial/oti6858.c::pl2303_buf_alloc() the return value
of kmalloc() is being cast to "struct pl2303_buf *", but that need
not be done here since kmalloc() returns "void *".

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:21 -07:00
Roman Kagan ce0d9325b1 usb-serial: show port number in sysfs
Some usb-serial devices (e.g. certain Edgeport models) have more than
one serial port on the same USB device/interface.

Currently the only way to distinguish these ports in userspace is by
their minor device number: the driver makes them consecutive and in
stable order.

However, for the purpose of stable naming with udev this is
insufficient: when udev handles the ADD event for one of the ports it
doesn't know what minor number the other one has.

To make stable naming easier, export the port number via sysfs.

Signed-off-by: Roman Kagan <rkagan@sw.ru>
Signed-off-by: Dmitry Guryanov <dimak@dgap.mipt.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:20 -07:00
Alan Cox 94d0f7eac7 USB: kobil_sct: Rework driver
No hardware but this driver is currently totally broken so we can't make
it much worse. Remove all tbe broken invalid termios handling and replace
it with a proper set_termios method.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:20 -07:00
Alan Cox c4e41562e0 USB: cp2101: Coding style police
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:20 -07:00
Andrew M. Bishop ed6e52829c USB: ftdi_sio: Handle FT232RL devices like FT232BM devices
Handle the FT232RL device type in exactly the same way as FT232BM
devices (FT232RL detection was added around kernel 2.6.20 but not code
for handling it).

Signed-off-by: Andrew M. Bishop <amb@gedanken.demon.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:19 -07:00
Adrian Bunk f311cf58bd USB: ark3116.c: fix check-after-use
The Coverity checker spotted that we'd have already oops'ed if one of
these was NULL.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:16 -07:00
Andrew Morton b3aceb2bab USB: mct_u232-convert-to-proper-speed-handling-api-fix
Make Pete happy

Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:15 -07:00
Alan Cox 3f6ff6ef04 USB: kl5kusb105: witch to new speed API
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:55:15 -07:00
Robert P. J. Day 9f705bde6e USB: Remove dead references to "SAFE_SERIAL" CONFIG variables.
Remove the references to CONFIG_USBD_SAFE_SERIAL_{VENDOR,PRODUCT},
which aren't defined in any Kconfig file.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-10-12 14:54:59 -07:00
Satyam Sharma 03fc370bdc USB: drivers/usb/serial/bus.c: Fix incompatible pointer type warning
drivers/usb/serial/bus.c: In function usb_serial_bus_deregister:
drivers/usb/serial/bus.c:185:
warning: passing argument 1 of free_dynids from incompatible pointer type

Above build warning comes when CONFIG_HOTPLUG=n because argument of
free_dynids() in serial/bus.c is a struct usb_serial_driver, not a
struct usb_driver. This is not a runtime bug, because the function
is an empty stub and never dereferences the passed pointer anyway.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-09-11 07:48:17 -07:00
Greg Kroah-Hartman 2c4cd1f13a USB: option: Add Dell HSDPA 5520 to driver
This is based on information sent in by Christian Gothe.

Cc: Christian Gothe <christian.gothe@kapelan.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-09-11 07:48:15 -07:00
Jaime Velasco Juan a3209a0efc USB: option: Add a new device ID for the HUAWEI E220 HSDPA modem.
Signed-off-by: Jaime Velasco Juan <jaime@singular.local>
CC: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-09-11 07:48:15 -07:00
Pierre Castella d7fde2d672 USB: ftdi_sio: add of a new product/manufacturer, TML
I have added to a new product based on the FTDI 232R USB/Serial
transceiver, which is commercialized by The Mobility Lab. Here is a
trivial patch enclosed, against 2.6.22.6 kernel.

Signed-off-by: Pierre Castella <pp.castella@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-09-11 07:48:14 -07:00
Alan Cox fa0e6721e7 USB: oti6858: Remove broken ioctl code in -mm tree and also the broken fixes
This stuff is simply not needed.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-09-11 07:48:13 -07:00
Christian Heim 04cab13293 USB: Adding support for HTC Smartphones to ipaq
This patch enables support for HTC Smartphones. The original patch is at
https://bugs.gentoo.org/show_bug.cgi?id=187522. Original author is Mike Doty
<kingtaco@gentoo.org>.

Signed-off-by: Christian Heim <phreak@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-08-22 14:27:54 -07:00
Thomas Viehmann a66639ab28 usb-serial: fix oti6858.c segfault in termios handling
The oti6858 usb serial driver should use kernel_termios_to_user_termios/
user_termios_to_kernel_termios to avoid segfaults because the kernel
uses a structure differing from that of user space with a different
size.

Signed-off-by: Thomas Viehmann <tv@beamnet.de>
CC: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-08-22 14:27:48 -07:00
Andy Green e48eb085ac USB: belkin_sa: avoid divide by zero error
The belkin_sa module has a problem coping with a 0 return from
tty_get_baud_rate() -- the subsequent BELKIN_SA_BAUD macro

drivers/usb/serial/belkin_sa.h:#define BELKIN_SA_BAUD(b) (230400/b)

performs a divide with it leading to the following divide error:

usb 3-1: Belkin / Peracom / GoHubs USB Serial Adapter converter now attached to ttyUSB0
PM: Adding info for No Bus:usbdev3.3_ep81
PM: Adding info for No Bus:usbdev3.3_ep01
PM: Adding info for No Bus:usbdev3.3_ep82
divide error: 0000 [#1]
SMP
Modules linked in: vfat fat iwl3945 mac80211 cfg80211 belkin_sa usbserial usb_storage autofs4 vmnet(P) vmmon(P) aes nf_conntrack_netbios_ns ipt_REJECT nf_conntrack_ipv4 xt_state nf_conntrack nfnetlink xt_tcpudp iptable_filter ip_tables x_tables cpufreq_ondemand acpi_cpufreq video output sbs button dock battery ac arc4 snd_hda_intel ecb blkcipher snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss sr_mod snd_mixer_oss rtc_cmos cdrom iTCO_wdt iTCO_vendor_support snd_pcm rtc_core snd_timer serio_raw b44 ssb rtc_lib parport ata_piix snd soundcore snd_page_alloc mii ata_generic sg ahci libata sd_mod scsi_mod ext3 jbd mbcache ehci_hcd ohci_hcd uhci_hcd
CPU:    1
EIP:    0060:[<f8dd1747>]    Tainted: P        VLI
EFLAGS: 00010246   (2.6.23-rc1 #1)
EIP is at belkin_sa_set_termios+0x18e/0x5b9 [belkin_sa]
eax: 00038400   ebx: 00000000   ecx: 00000000   edx: 00000000
esi: 00038400   edi: 00001cb2   ebp: de49adb0   esp: de49ad6c
ds: 007b   es: 007b   fs: 00d8  gs: 0033  ss: 0068
Process minicom (pid: 7306, ti=de49a000 task=eed6c3b0 task.ti=de49a000)
Stack: d85c74f0 00000046 00000002 00000001 d85c74f0 d85c74f0 00000246 c887c658
       00000001 00000cb0 00000001 00000084 00000000 d01b58c0 f6ba10e0 de49ade8
       de49ae40 de49add0 f8e2526b d85c74b8 ca6e6dbc de49ae40 d85c746c eded72e8
Call Trace:
 [<c0405f35>] show_trace_log_lvl+0x1a/0x2f
 [<c0405fe5>] show_stack_log_lvl+0x9b/0xa3
 [<c04061a5>] show_registers+0x1b8/0x289
 [<c0406389>] die+0x113/0x246
 [<c0622f98>] do_trap+0x8a/0xa3
 [<c04068dc>] do_divide_error+0x85/0x8f
 [<c0622d6a>] error_code+0x72/0x78
 [<f8e2526b>] serial_set_termios+0x86/0x8d [usbserial]
 [<c0542d33>] set_termios+0x309/0x34c
 [<c0542ece>] n_tty_ioctl+0x158/0x4ba
 [<c054030b>] tty_ioctl+0xc78/0xcd6
 [<c048aea0>] do_ioctl+0x50/0x67
 [<c048b100>] vfs_ioctl+0x249/0x25c
 [<c048b15c>] sys_ioctl+0x49/0x61
 [<c0404ed2>] sysenter_past_esp+0x5f/0x99
 =======================
Code: 85 c0 79 14 c7 44 24 04 67 1c dd f8 c7 04 24 d4 1e dd f8 e8 96 99 65 c7 8b 46 04 be 00 84 03 00 e8 47 11 77 c7 31 d2 89 c1 89 f0 <f7> f1 66 85 c0 89 c1 b8 01 00 00 00 0f 44 c8 8b 45 d8 85 db 8b
EIP: [<f8dd1747>] belkin_sa_set_termios+0x18e/0x5b9 [belkin_sa] SS:ESP 0068:de49ad6c

The small patch below should take care of this situation.  Note that my
kernel was tainted (vmware) but the problem will occur if
tty_get_baud_rate() ever returns zero and should be taken care of.

Signed-off-by: Andy Green <andy@warmcat.com>
Cc: William Greathouse <wgreathouse@smva.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-08-22 14:27:46 -07:00
Søren Hauberg c1f8ea7d35 USB: Support for the Evolution Scorpion robots
The attached (mostly trivial) patches adds support for the Evolution
Scorpion Robots.
  Evolution Robotics supplies a patch against 2.6.8 with their
software. My patch is based on their work, so I don't know if I can
sign it off, or if you need some Evolution people to do this (which
might be hard).
  The patch adds device ID's for some robots which is trivial.



From: Søren Hauberg <hauberg@gmail.com>
Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Søren
2007-08-22 14:27:46 -07:00
Faidon Liambotis 96443218be USB: fix support for Dell Wireless Broadband (aka WWAN)
Dell Wireless Broadband ExpressCards are rebrands of Novatel's cards.
Add all of their known PCI IDs to date along with their mapping to the exact
Novatel model to the Option driver which already claims to support them.

Signed-off-by: Faidon Liambotis <paravoid@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-08-22 14:27:44 -07:00
Robert P. J. Day 3aec6e26d7 USB: Typo: "USB_SAFE_PADDED" -> "USB_SERIAL_SAFE_PADDED".
Fix typo in safe_serial.c to match the actual CONFIG variable.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-08-22 14:27:44 -07:00
Hermann Kneissel 468d13623b USB: serial: garmin_gps: fixes package loss if used from gpsbabel
This patch contains two fixes submitted by Ondrej Palkovsky:
- the 'ACK' packet is sent after the transfer of the USB packet is
completed, i.e. in the write_callback function. Because the close
function sends the 'abort' command, a parameter is added that allows
the caller of garmin_write_bulk to specify, if the 'ack' should be
propagated to the serial link or dimissed.
This fixes the problem with gpsbabel, it has sent several packets that
were acknowledged before they were sent to the GPS and GpsBabel closed
the device - thus effectively cancelled all outstanding requests in the
queue.
- removed the APP_RESP_SEEN and APP_REQ_SEEN flags and changed
them into counters. It evades USB reset of the gps on every device close.

Signed-off-by: Hermann Kneissel <hermann.kneissel@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-08-22 14:27:44 -07:00
Maximilian Attems c8ba84a0c6 USB: visor add ACER S10 palm device id
modprobe visor vendor=0x502 product=0x1
is said to work, plus there are patch instructions for it.
fixes http://bugs.debian.org/340547
see http://www.chinaitpower.com/A/2004-07-28/87909.html

Signed-off-by: Maximilian Attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-08-22 14:27:43 -07:00
Adam Kropelin bc71e479cd usb-serial: Fix edgeport regression on non-EPiC devices
Fix serious regression on non-EPiC edgeport usb-serial devices. Baud
rate and MCR/LCR registers are not being written on these models due
to apparent copy-n-paste errors introduced with EPiC support.

Failure reported by Nick Pasich <Nick@NickAndBarb.net>.

Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-30 13:27:47 -07:00
Adrian Bunk 82a24e6885 USB: drivers/usb/serial/sierra.c: make 3 functions static
This patch makes three needlessly global functions static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-30 13:27:46 -07:00
Oliver Neukum 3ddad8232c USB: fix BUG: sleeping function called from invalid context at /home/jeremy/hg/xen/paravirt/linux/drivers/usb/core/urb.c:524, in_atomic():1, irqs_disabled():0
Clearly there's a bug in
drivers/usb/serial/usb-serial.c:usb_serial_put().  It shouldn't call
kref_put() while holding a spinlock.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-30 13:27:46 -07:00
Alan Cox f424490031 USB: mct_u232: Convert to proper speed handling API
Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-30 13:27:46 -07:00
Alan Cox c6d61269f5 digi_acceleport: Drag the driver kicking and screaming into coding style
- The outbreak of acute bracketitus has been cured
- The belief that brackets should have spaces everywhere likewise
- Various other coding style tweaks
- Use baud rates not Bfoo in the speed setup switch

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-30 13:27:46 -07:00
Alan Cox 01e96d282a cp2101: Remove broken termios optimisation, use proper speed API
I've also enabled the commented out support for 7200, 14400, 55854,
127117 and 3686400 baud as you can now set such rates in the kernel.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-30 13:27:45 -07:00
Oliver Neukum e31c18804f USB: fix usb_serial_suspend(): buggy code
Am Montag 23 Juli 2007 schrieb Adrian Bunk:
> Commit ec22559e0b added the following 
> function to drivers/usb/serial/usb-serial.c:
> 
[..]
> 
> The Coverity checker spotted the inconsequent NULL checking for "serial".
> 
> Looking at the code it also doesn't seem to have been intended to always 
> return 0.

Coverity is right. The check for NULL is wrongly done and the error
return is lost.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-30 13:27:45 -07:00
Jesper Juhl 0d46c0079a USB: Remove pointless conditional in drivers/usb/serial/io_ti.c::edge_shutdown()
Coverity scan found (CID: 1708) this in
drivers/usb/serial/io_ti.c::edge_shutdown() :

...
2797 		for (i=0; i < serial->num_ports; ++i) {
2798 			edge_port = usb_get_serial_port_data(serial->port[i]);
2799 			edge_remove_sysfs_attrs(edge_port->port);
2800 			if (edge_port) {
2801 				edge_buf_free(edge_port->ep_out_buf);
2802 				kfree(edge_port);
2803 			}
2804 			usb_set_serial_port_data(serial->port[i], NULL);
2805 		}
...

It's complaining that we dereference 'edge_port' in line 2799 which
makes the test of that pointer against NULL in 2800 pointless, since if
edge_port was actually NULL we'd have crashed already before reaching
line 2800.
Reading the edge_open() function it seems to me that the pointer
returned by usb_get_serial_port_data(serial->port[i]) and stored in
'edge_port' can never actually be NULL here, so the test is entirely
superfluous (even if it could be NULL it would be pointless here,
ignoring the then possible crash in that case, since both
edge_buf_free() and kfree() can handle being passed NULL pointers.

This patch removes the pointless conditional (and also makes a few
tiny style corrections now that I was in the area anyway).


Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:05 -07:00
Florin Malita e94fa28f13 USB: mos7720, mos7840: remove redundant urb check
Coverity (1709, 1710, 1711, 1712, 1713) actually flagged these as
REVERSE_INULLs (NULL check performed after dereference). But looking at
the other drivers I can't see any similar tests and the USB core already
makes sure urb is non-null - so might as well get rid of the checks.


Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:04 -07:00
Kevin Lloyd 9454c46a89 USB: sierra: Add new devices
This patch adds new devices to the Sierra Wireless driver. This is being
resubmitted because the dependent patch (patch 01/02) needed to be
resubmitted.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:03 -07:00
Kevin Lloyd 112225b13c USB: sierra: Add TRU-Install (c) Support
This patch adds compatibility with Sierra Wireless' new TRU-Install
feature. Future devices that use this feature will not work unless this
patch has been applied.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19 17:46:03 -07:00
Alan Cox 6dc7310243 USB: io_*: remove bogus termios no change checks
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:41 -07:00
Alan Cox eb58c0c5f2 USB: mos7720: remove bogus no termios change check
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:41 -07:00
Alan Cox 9a64f25132 USB: visor and whiteheat: remove bogus termios change checks
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:41 -07:00
Alan Cox e0c79f512c USB: pl2303: remove bogus checks and fix speed support to use tty_get_baud_rate()
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:41 -07:00
Alan Cox 31473aae5a USB: mos7840.c: turn this into a serial driver
The MOS driver is "interesting", in a bad kind of 'how the hell did this
get merged' kind of way

- Remove the bogus termios change check
- Remove the duplicate code for half the ioctls
- Remove the supporting code to duplicate the ioctl code

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:41 -07:00
Oliver Neukum 0ffbbe25a7 USB: ftdi_sio: fix oops due to processing workarounds too early
Fix an oops that happens in relation with applying work arounds for buggy
ftdi_sio devices.  The quirks were handled too early because due to changes in
the initialisation of usb serial devices the device was not fully initialised
when the old hook was called.

Addresses bug 8564

Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:40 -07:00
Greg Kroah-Hartman 50d2dc7266 USB: mos7720: change developer email addresses
Update the original developer's email addresses at their request.


Cc: Vijaya Kumar <vijaykumar.gn@gmail.com>
Cc: Ajay Kumar <naanuajay@yahoo.com>
Cc: Gurudeva <ngurudeva@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:40 -07:00
Alan Cox a6ea438b6d USB: serial: ir_usb: Clean up the worst of it, remove exciting 'crash on open' feature
- Drivers don't call ldisc termios methods. They certainly don't call
them the way this one does - remove wrong call
- The tty buffer code isn't designed to be abused from IRQ handlers and
the new buffering removes the need for the uglies involved - fix them
- Style
- Remove incorrect baud and change handling for termios changes

The driver now has some style, but not a lot - it goes insane if you have
two dongles for example as it continues to use global variables for per
dongle state. That bit isn't my problem.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:37 -07:00
Alan Cox 9a8baec772 USB: serial: belkin_sa: Various needed fixes
Use the baud rate stuff from the kernel don't parse CBAUD directly
Remove pointless and wrong 'no change' check

Could do with some good testing as well but again better than adding &&
BROKEN

(The use of BELKIN_SA_BAUD() might seem a bit odd but x/a = b and x/b =
a (rounded for integers)).



Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:37 -07:00
Alan Cox 568c24adea USB: serial: ark3116.c: Mixed fixups
o	Don't parse the cflag for baud rates, its not valid to do so
	any more and this driver got it wrong anyway
o	Don't do clever termios change checks in drivers and get them
	wrong (arguably we should do some smart ones in the tty core but
	stty to change nothing is *not* a common or critical path

I don't have the hardware so if you can test this carefully please do. I
thought fixing it up this far was better than marking it and other bits of
USB serial && BROKEN

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:37 -07:00
Greg Kroah-Hartman 9e85c5f632 USB: sierra: cleanup the startup and shutdown path
This removes the ugly code that was copied from the keyspan driver and
allocates the in urbs in a much shorter code path that can be understood
easier.

Also turned off the interrupt urb when no port was open as it's not nice
to keep the bus busy for no good reason at all (this should be a power
savings.)

All in all, this saved over 40 lines of code and cleaned things up
better.

Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:37 -07:00
Greg Kroah-Hartman 17c2327419 USB: sierra: remove incorrect usage of the urb status field
You can't rely on the fact that the status really is correct like it was.

Also simplified the write path and now we allocate the urb and data on
the fly, instead of trying to do that really odd timeout check which I
am guessing doesn't really work properly.  This should speed up the
device by keeping the hardware queue full easier.

As a benefit, this reduces the size of the driver.

Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:37 -07:00
Greg Kroah-Hartman 0540001369 USB: serial: whiteheat: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:36 -07:00
Greg Kroah-Hartman 38e8c910ff USB: serial: visor: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:36 -07:00
Greg Kroah-Hartman 52171b4808 USB: serial: ti_usb_3410_5052: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Peter Berger <pberger@brimson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:36 -07:00
Greg Kroah-Hartman 17dd2215ad USB: serial: sierra: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:36 -07:00
Greg Kroah-Hartman 3a75ab9436 USB: serial: safe_serial: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Stuart Lynne <sl@lineo.com>
Cc: Tom Rushworth <tbr@lineo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:36 -07:00
Greg Kroah-Hartman 461d696aee USB: serial: pl2303: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:36 -07:00
Greg Kroah-Hartman 78c26aebd9 USB: serial: oti6858: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:36 -07:00
Greg Kroah-Hartman d6977b51d5 USB: serial: option: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:36 -07:00
Greg Kroah-Hartman fdc2deb389 USB: serial: omninet: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:35 -07:00
Greg Kroah-Hartman 9965d61263 USB: serial: navman: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:35 -07:00
Greg Kroah-Hartman 0643c72435 USB: serial: mos7840: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Paul Schroeder <pschroeder@uplogix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:35 -07:00
Greg Kroah-Hartman 8110598484 USB: serial: mos7720: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: VijayaKumar G.N. <vijaykumar@aspirecom.net>
Cc: AjayKumar <ajay@aspirecom.net>
Cc: Gurudeva N. <gurudev@aspirecom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:35 -07:00
Greg Kroah-Hartman e96da398ce USB: serial: mct_u232: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Wolfgang Grandegger <wolfgang@ces.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:35 -07:00
Greg Kroah-Hartman 6fcdcf04e3 USB: serial: kobil_sct: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Thomas Wahrenbruch <linuxusb@kobil.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:35 -07:00
Greg Kroah-Hartman 17c1b35a46 USB: serial: kl5kusb105: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Utz-Uwe Haus <haus@uuhaus.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:35 -07:00
Greg Kroah-Hartman 23189aee76 USB: serial: keyspan_pda: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:35 -07:00
Greg Kroah-Hartman 95b9345480 USB: serial: keyspan: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:35 -07:00
Greg Kroah-Hartman 3152b74f92 USB: serial: ir-usb: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:33 -07:00
Greg Kroah-Hartman b4a1579772 USB: serial: ipw: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Roelf Diedericks <roelfd@inet.co.za>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:33 -07:00
Greg Kroah-Hartman 2362deb578 USB: serial: ipaq: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Ganesh Varadarajan <ganesh@veritas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:33 -07:00
Greg Kroah-Hartman ee337c212a USB: serial: io_ti: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Peter Berger <pberger@brimson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:33 -07:00
Greg Kroah-Hartman 2a393f5fd8 USB: serial: io_edgeport: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Peter Berger <pberger@brimson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:33 -07:00
Greg Kroah-Hartman fbd272254b USB: serial: generic: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:33 -07:00
Greg Kroah-Hartman f9feb517fa USB: serial: garmin_gps: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Hermann Kneissel <herkne@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:32 -07:00
Greg Kroah-Hartman 0fb0aa188d USB: serial: ftdi_sio: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Kuba Ober <kuba@mareimbrium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:32 -07:00
Greg Kroah-Hartman 335202f44a USB: serial: empeg: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:32 -07:00
Greg Kroah-Hartman 85d7510711 USB: serial: digi_acceleport: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <borchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:32 -07:00
Greg Kroah-Hartman 8d7bc55ecf USB: serial: cypress_m8: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Neil Whelchel <koyama@firstlight.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:32 -07:00
Greg Kroah-Hartman 7dcc85cd9b USB: serial: cyberjack: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Cc: <support@reiner-sct.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:32 -07:00
Greg Kroah-Hartman f26aad25d2 USB: serial: belkin_sa: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:32 -07:00
Greg Kroah-Hartman d3434cf691 USB: serial: airprime: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:32 -07:00
Greg Kroah-Hartman 1373dbbca5 USB: serial: aircable: clean up urb->status usage
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.


Cc: <linux-usb-devel@lists.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:31 -07:00
Greg Kroah-Hartman 4d0dce3e0b USB: fix up license wording on some of my usb-serial drivers
Also update the copyright date on the pl2303 driver, as it was out of date.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:31 -07:00
Benny Halevy 52f6b5e1f1 synchronization in usb_serial_put
I think there is a race between usb_serial_put() and
usb_serial_get_by_index() (and get_free_serial()) with regards
to handling the serial port refcount.

usb_serial_get_by_index() gets a reference on the serial port under
table_lock while return_serial releases all the returned ports
from the table under the same lock.  However, the table_lock is not
taken around the call to kref_put, theoretically allowing to sneak
in and grab a reference after kref_put has already determined that
the reference count is zero (and before calling destroy_serial)
causing use after free.

Signed-off-by: Benny Halevy <bhalevy@ns1.bhalevy.com>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:31 -07:00
Oliver Neukum efdff60885 USB: io_ti: sleep with spinlock held detected by automatic tool
this fixes the sleep found with the automatic tool.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:31 -07:00
Alan Stern 59c2afa072 USB: option: fix usage of urb->status abuse
Might fix bug 8561

On Mon, 4 Jun 2007, Paulo Pereira wrote:

> The patch that you send is not resolving the problem... :(
> I stil have Kernel panic after 45/60 min of work with Ktorrent/Amule...
>
> The Drump is:
>
> Call Trace:
> [<c055fb36>] usb_hcd_submit+0xb1/0x763
> [<f9276488>] ipt_do_table+0x2c7/0x2ef [ip_tables]
> [<f929a6d7>] nf_ct_deliver_cached_events+0x41/0x96 [nf_conntrak]
> [<f9288254>] ipv4_confirm+0x36/0c3b [nf_conntrack_ipv4]
> [<c05ce7c2>] tcp_v4_rcv+0x827/0x899
> [<c05afcc0>] nf_hook_slow+0x4d/0xb5
> [<c042826f>] irq_enter+0x19/0x23
> [<c042826f>] irq_enter+0x19/0x23
> [<c040794c>] do_IRQ+0xbd/0xd1
> [<f90893c9>] option_write+0xa7/0xef [option]

Okay, from this it looks like there's a problem in the option.c serial
driver.  Glancing at the code, it's obvious why: The thing totally
abuses the USB API.

Try applying this patch; it should help.

From: Alan Stern <stern@rowland.harvard.edu>
Cc: Paulo Pereira <pfmp.404@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:30 -07:00
Al Borchers 5fea2a4dab USB: digi_acceleport further buffer clean up
Some further cleanup after Oliver's patch to update the tty
buffering.  The input buffer is not used at all anymore, so
I removed it.

Signed-off-by: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:29 -07:00
Oliver Neukum 08a2b3b610 USB: whiteheat driver update
this is an update of the whiteheat driver. It fixes:

- switch from spinlocks to mutexes to prevent sleeping with a spinlock held
- locking to stop races with disconnect
- error handling for commands that time out

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:34:28 -07:00
t.sefzick 715f9527c1 USB: flow control fix for pl2303
in order to be able to switch back to 'flow-control none'
after having activated 'flow-control rts/cts', I made
a small change to 'pl2303.c'.


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:51 -07:00
Oliver Neukum 1abdeeb1d5 USB: generic usb serial to new buffering scheme
the generic driver also had its own buffering.

Signed-off-by: Oliver Neukum <oneukum@suse.de_
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:51 -07:00
Oliver Neukum 39892da44b USB: Digi AccelePort adapted to new tty buffering
this fixes the flushing trouble due to its own buffering for this driver.


Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:51 -07:00
Oliver Neukum b308e74d9c USB: visor driver adapted to new tty buffering
the new tty buffering code allows usb drivers to stop private buffering.
In fact we must do so to allow flushing to work correctly. This does so
for the visor driver.


Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:51 -07:00
Stepan Moskovchenko 97cd49ebf7 USB: ftdi_sio.c: Allow setting latency timer on FT232RL
The new FT232RL allows setting and getting the value of the latency
timer, like on the FT232BM. However, the driver will not create the
sysfs entries for the RL without this one-line patch. 

I have tested it on two systems with successful results.


From: Stepan Moskovchenko <stevenm86@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:50 -07:00
Dave Platt 45b844df5a USB: RTS/CTS handshaking support, DTR fixes for MCT U232 serial adapter
Improvements and fixes to the MCT U232 USB/serial interface driver.
Implement RTS/CTS hardware flow control.  Implement HUPCL.  Bring
handling of DTR and RTS into conformance with other Linux serial
port drivers - assert both signals when opening device, even if
"crtscts" is not currently selected.

Signed-off-by: Dave Platt <dplatt@radagast.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:48 -07:00
Martin K. Petersen fc4cbd755b USB: io_ti: Digi EdgePort update for new devices
This patch adds support for the most recent Digi EdgePort USB serial
devices.

Signed-off-by: Martin K. Petersen <mkp@mkp.net>
Signed-off-by: Mike Swift <mikes@digi.com>
Signed-off-by: Jeremy McBane <jmcbane@digi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:48 -07:00
Kees Lemmens 49cdee0ed0 USB: oti6858 usb-serial driver (in Nokia CA-42 cable)
Last week I've been searching for a driver for the CA-42 cable (see usb
 below) that fitted my kernel 2.6.20. I only found an abandoned version for a
 driver on your website that indeed worked on 2.6.18 but wouldn't even
 compile with a more recent 2.6.20 kernel.

I fiddled 2 evenings with the kernel code and have patched it up now to work
with the modifications in the 2.6.20 kernel. The patch is attached hereafter
and it works fine (at least for me :-) ).

Bus 2 Device 13: ID 0ea0:6858 Ours Technology, Inc.

I had to fiddle a little with the settings in .gnokiirc but that also
 occurred with the older 2.6.18 kernel. Nevertheless, on one system with this
 cable and my Nokia 6070 I had best results with :

model = 6510
connection = dku5

while on an other system with the same kernel, cable and phone it only worked
with :

model = AT
connection = serial
serial_write_usleep = 1


From: Kees Lemmens <C.W.J.Lemmens@ewi.tudelft.nl>
Cc: <pawel.kot@gmail.com>
Cc: <bozo@andrews.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:47 -07:00
Lucy McCoy 0ca1268e10 USB Serial Keyspan: add support for USA-49WG & USA-28XG
Add support for Keyspan adapters: USA-49WG and USA-28XG

Signed-off-by: Lucy P. McCoy <lucy@keyspan.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:45 -07:00
Oliver Neukum ec22559e0b USB: suspend support for usb serial
this implements generic support for suspend/resume for usb serial.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-12 16:29:44 -07:00
Luiz Fernando N. Capitulino d099321bdb USB: ftdio_sio: New IPlus device ID
Reported by Grzegorz Chimosz <gchimi@gmail.com>

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-25 23:38:06 -07:00
Alexander Gattin 46269db99c USB: add new device id to option driver
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-25 23:38:06 -07:00
Oliver Neukum 74ac07e8b8 USB: fix race leading to use after free in io_edgeport
usb_unlink_urb() is asynchronous, therefore an URB's buffer may not
be freed without waiting for the completion handler. This patch switches
to usb_kill_urb(), which is synchronous.
Thanks to Alan for making me look at the remaining users of usb_unlink_urb()


Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-25 23:38:06 -07:00
Oliver Neukum 944dc184f6 USB: ti serial driver sleeps with spinlock held
you are submitting an URB with GFP_KERNEL holding a spinlock.
In this case the spinlock can be dropped earlier.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Cc: Al Borchers <alborchers@steinerpoint.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-06-25 23:38:05 -07:00
Tony Lindgren fa91d43b91 USB: Add support for Olimex arm-usb-ocd JTAG interface serial port
This patch adds support for the serial port on Olimex arm-usb-ocd
JTAG interface.

The device appears as two serial ports, but the first one is reserved
for the JTAG interface. The JTAG interface can be used with OpenOCD
from userspace. For more information, please see:

http://openocd.berlios.de/web/
http://www.olimex.com/dev/arm-usb-ocd.html

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:51 -07:00
Danny Budik 5b7da8f6ff USB: Add support for Sierra Wireless Aircard 595U
This patch adds support for the newly released Aircard 595U EVDO
modem to the Sierra Wireless driver (sierra.c) in kernel 2.6.21.

I suspect that my mailer may be mangling patches so let me know and
I'll try to resend it.


From: Danny Budik <dbudik@ist-traffic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:51 -07:00
Guido Scholz 2adb80e9c5 USB: ftdi_sio: Add USB Product Id for OpenDCC
USB product id registration for the OpenDCC (www.opendcc.de)
model railway central unit. Applies to 2.6.21.1.

Signed-off-by: Guido Scholz <guido.scholz@bayernline.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:51 -07:00
Jan Engelhardt b268f484f9 USB: Fix debug output of ark3116
Fix debug output. Previously, it would output "0xFFFFFFB0" on 32-bit
archs (and probably "0xFFFFFFFFFFFFFFB0" on 64-bits), because buf is
taken as signed char, which is promoted to signed int, while %x always
expects an unsigned int.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:50 -07:00
Ben Collins 9a03095831 USB: Remove duplicate IDs from option card driver
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:49 -07:00
Neil \"Superna\" ARMSTRONG 762e92fa17 USB: New device PID for ftdi_sio driver
Hello,

I need to use MaxStream's PKG-U modules which includes a ftdi sio chipset for
usb2serial communication, here are the patches for handling Maxstream's modules.

The VID & PID to use with the open-source driver are provided on the CD-ROM
bundled with the modules.

From: Neil Superna ARMSTRONG <superna@na-prod.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:49 -07:00
Oliver Neukum deb3d7fff0 USB: remove useless check in mos7840 found by coverity
this useless check should be removed.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:48 -07:00
Oliver Neukum 5ac43d1fbb USB: fix omninet memory leak found by coverity
the transfer of allocating the descriptor in attach and no longer in open
was incomplete resulting in a memory leak coverity spotted. This fix
is against the patch set you posted.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-22 23:45:48 -07:00
Robert P. J. Day beb7dd86a1 Fix misspellings collected by members of KJ list.
Fix the misspellings of "propogate", "writting" and (oh, the shame
:-) "kenrel" in the source tree.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09 07:14:03 +02:00
David Sterba 3dde6ad8fc Fix trivial typos in Kconfig* files
Fix several typos in help text in Kconfig* files.

Signed-off-by: David Sterba <dave@jikos.cz>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-05-09 07:12:20 +02:00
Randy Dunlap e63340ae6b header cleaning: don't include smp_lock.h when not used
Remove includes of <linux/smp_lock.h> where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:07 -07:00
Hans Engelen a03c6facf8 USB: dell device id for option.c
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:42 -07:00
Craig Shelley 92f5cae2e8 USB: CP2101 New Device IDs
Two new device IDs for CP2101 driver.

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:42 -07:00
Leon Leong 3f6e58467c USB: BandRich BandLuxe HSDPA Data Card Driver
Add the detection for the BandRich BandLuxe C100/C100S/C120 HSDPA Data
Card.  With the vendor and product IDs are set properly, the data card can
be detected and works fine.

Signed-off-by: Leon Leong <upleong@bandrich.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:41 -07:00
Greg Kroah-Hartman f094e4f358 USB: sierra: add more checks on shutdown
This should help with any potential NULL pointer usages as reported by a
few users.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:40 -07:00
Richard Knutsson 38c3cb5b67 USB: whiteheat: Convert to generic boolean
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Acked-by: Stuart MacDonald <stuartm@connecttech.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:39 -07:00
Oliver Neukum 5ec1862e7b USB: fix omninet write vs. close race
omninet kills all URBs in close. However write() returns as soon as
the URB has been submitted. Killing the last URB means a race that
can lose that date written in the last call to write().
As a fix this is moved to shutdown().

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:38 -07:00
Oliver Neukum 2f007de2f4 USB: fix error handling for mct_u232
we report errors to the caller. THis patch adds error handling to the driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:38 -07:00
Oliver Neukum 9306fff17d USB: fix error handling in kl5kusb
- report errors
- cleanup in error case
- use of endianness macros

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:38 -07:00
Oliver Neukum 4edf2c8363 USB: fix ark3116 memory leak
this driver has a memory leak in an error case.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:38 -07:00
Jelle Foks 868e440d2f USB: ftdi_sio: Add USB ID of ADSTech USBX-707
This patch adds the USB ID of the ADS Tech USBX-707 USB IR blaster (that
comes with the ADS Tech PTV-305 grabber card), which has a ftdi232bm
inside hooked up to a pic.

With this it should be fairly straightforward to make at least lirc
receiving work with this device. I will submit a patch to lirc for that
as soon as I have one ready, I'm getting data with minicom with this
patch, but need to figure out some more details such as best/correct
baudrate.

Signed-off-by: Jelle Foks <jelle@foks.8m.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:38 -07:00
Oliver Neukum 62127a585c USB: fix race in ftdio_write
this has the same race as the visor driver. The counter must be incremented
under the lock it is checked under.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:38 -07:00
Oliver Neukum b80349b17c USB: fix race in visor_write
this fixes a small race in visor_write.


Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:38 -07:00
Oliver Neukum b19d402a34 USB: aircable cleanup
- proper endianness macros
- scheduling in interrupt in error case

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com>
2007-04-27 13:28:37 -07:00
Oliver Neukum ebcf3ede6d USB: sierra close race
the sierra driver does not directly use usb_kill_urb(). It uses a wrapper.
This wrapper means that callbacks which are running are not killed during
close, resubmitting and illicitly pushing data into the tty layer.
The whole purpose of usb_kill_urb() is subverted. The wrapper must be removed.
The same problem as the option driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:37 -07:00
Oliver Neukum 7d28e74b97 USB: option close race
the option driver does not directly use usb_kill_urb(). It uses a wrapper.
This wrapper means that callbacks which are running are not killed during
close, resubmitting and illicitly pushing data into the tty layer.
The whole purpose of usb_kill_urb() is subverted. The wrapper must be removed.

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>
2007-04-27 13:28:37 -07:00
Oliver Neukum 4f93b3e821 USB: omninet memory leak in error case
memory allocated must be freed in the error case.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:37 -07:00
Oliver Neukum 325b70c233 USB: fix endianness in mos7720
there's code unclean w.r.t. endianness in the mos7720 driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:36 -07:00
Richard Knutsson cb8eaa8b2b USB: io_edgeport: Convert to generic boolean
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:36 -07:00
Oliver Neukum 0de9a7024e USB: overhaul of mos7840 driver
This fixes:

- breaking DMA rules about buffers
- usage of _global_ variables to save a single device's attributes
- racy access to urb->status
- smp monotonity issue with statistics
- use of one buffer for many simultaneous URBs
- error handling introduced
- several instances of following NULL pointers
- use after free
- unnecessary GFP_ATOMIC
- GFP_KERNEL in interrupt
- various cleanups
- write room granularity issue that bit cdc-acm
- race in shutdown

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:36 -07:00
Oliver Neukum 96c706ed1c USB: io_edgeport race condition in counters
io_edgeport is using a global variable without locking.
This is _the_ classical race condition. This patch switches to atomic_t.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:36 -07:00
Oliver Neukum 378465396e USB: help text for mos 7720 driver
this driver's help text incorrectly claims to support only single port
devices.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:35 -07:00
Oliver Neukum fe4b65ec91 mos7720 update
this driver has an interesting way of handling ENOMEM: complain and ignore.
If you decide to live with allocation failures, you must

1. guard against URBs without corresponding buffers
2. complete allocation failures
3. always test entries for NULL before you follow the pointers

This patch does so.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:35 -07:00
Oliver Neukum c2cf3f6ec5 USB: unnecessary GFP_ATOMIC in mos7720 driver
GFP_KERNEL will do.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:34 -07:00
Norihiko Tomiyama c51e9749ab Adding PID of SHARP S01SH for ipaq.c
I write a patch adding support "SHARP EMONE(S01SH)" device for ipaq.c.
EMONE is a PDA with built-in HSDPA function.



From: Norihiko Tomiyama <norihiko.tomiyama@ctc-g.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27 13:28:33 -07:00
David Brownell 3b009c637f USB: fix usb-serial/ftdi build warning
Fix annoying build warning:

drivers/usb/serial/ftdi_sio.c:890: warning: enumeration value `FT232RL' not handled in switch

Also add logic to detect FT232R chips (version 6.00, usb 2.0 full speed),
so that case isn't completely useless.  (NOTE:  FT232RL and FT232RQ are
the same chip in different packages:  L is SSOP, Q is QFN.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-26 14:17:48 -07:00
David Brownell b46d60fc4b USB: fix usb-serial/generic build warning
Fix annoying build warning when CONFIG_USB_SERIAL_GENERIC is undefined.

  drivers/usb/serial/generic.c:24: warning: `generic_probe' declared `static' but never defined

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-26 14:17:48 -07:00
Jon K Hellan 4928245163 USB: remove duplicated device id in airprime driver
Both airprime and option now want to handle vendor ID 0x1410,
device ID 0x1100. Airprime calls it 'ExpressCard34 Qualcomm 3G CDMA'.
Option calls it 'Novatel Merlin XS620/S640'. Patch attached to remove it
from airprime.

From: Jon K Hellan <jon.kare.hellan@uninett.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-26 14:17:48 -07:00
Greg Kroah-Hartman 69806d5631 USB: new Novatel device ids for option driver
This moves all of the Novatel device ids to the option driver, where
they belong.

Thanks to Novatel for providing a list of all supported devices.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19 13:39:51 -07:00
Mark Glines e5740b5d75 airprime: USB ID for Novatel EV620 mini PCI-E card
Add an ID to recognise the Novatel EV620 wireless adapter.
http://www.novatelwireless.com/products/expedite/ev620.html

It looks like a mini PCI-Express adapter.  The mPCIE connector includes USB
pins... the card shows up to the system as a USB device, and powers itself
from the PCI bus.

The card I have isn't activated yet, so I can't get a PPP session up yet, but
I have tested basic serial communication successfully in both 2.6.18 and
2.6.20 kernels, once the product ID was added.  (the driver changed quite a
bit between the two revs.)  In both drivers, it responds to AT commands and
such.

Signed-off-by: Mark Glines <mark@glines.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19 13:22:18 -07:00
Oliver Neukum e8e30c765c USB: necessary update for mos7720 driver
these devices have a shared interrupt endpoint. For serialcore to pass
an interrupt endpoint to a subdriver, the subdriver must define and
_export_ a fitting callback. The mos7720 driver failed to do so. This led
invariably to an oops upon open. This patch fixes it. The driver is useless
without it. Please try to get this into 2.6.21 and the stable kernels that
have this driver.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19 13:22:18 -07:00
Jim Radford 521b85ae66 USB: fix usb-serial regression
This patch reverts d9a7ecacac since it
breaks drivers that need to access the ->port[] array in shutdown
(most of them).

Signed-Off: Jim Radford <radford@blackbean.org>
Acked-by: Mark Lord <mlord@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-19 13:22:18 -07:00
Gard Spreemann d8b2160683 USB: Product ID for FT232RL in ftdi_sio
Here is a patch adding the PID for the FT232RL to ftdi_sio. The patch
generates a warning during compilation because get_ftdi_divisor doesn't
explicitly handle the FT232RL with this patch, so I guess you don't want
to use it in its current state. It is all I could come up with with the
knowledge I have of the drivers at the moment, though, and I hope you
can have some use for it at least. It works fine with my DLP-TILT with
an FT232RL.

From: Gard Spreemann <spreeman@stud.ntnu.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:25 -08:00
Andre Spahlinger 62d909ced0 USB: ipaq.c: Additional devices
Additional devices

Signed-off-by: Andre Spahlinger <uenz@gmx.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:25 -08:00
Oliver Neukum a1f721c812 USB: further fix for usb-serial
this is a fix for the outstanding usb-serial issues.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Oliver Neukum c744f99eb6 USB: fix usb-serial device naming bug
Am Montag, 26. Februar 2007 15:16 schrieb Craig Schlenter:
> Hi Greg
> 
> 34ef50e5b1 is definitely
> the source of the problem. Reverting that makes the
> ftdi port show up as ttyUSB0 again for me and it
> can actually be opened.

This patch should fix the issue.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Craig Schlenter <craig@codefountain.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Martin Schiller cf0cb1ae02 USB: RTS/DTR signal patch for airprime driver
I encountered some problems with the airprime driver in use with a Novatel
Merlin XU870:

Closing an open Connection to e.g. /dev/ttyUSB0 doesn't reset the
RTS/DTR lines of the Modem.  Consequently, when I use minicom to
establish a connection by "ATD*99#" the modem doesn't hang up even if i
exit minicom and so I cannot reuse the modem unless I remove it and plug
it in again.

With the attached patch, the RTS/DTR lines are resetted on a close.  The
code was mainly taken from the option.c driver.
2007-03-09 19:52:24 -08:00
Jim Radford 12bdbe03c8 USB: ftdi_sio: use port_probe / port_remove thereby fixing access to the latency_timer
Convert all the port specific code in attach / shutdown to use the new
port_probe / port_register callbacks from device_register /
device_unregister allowing adding the sysfs attributes to be added at
the correct time and to the serial port device itself, instead of to
the unadorned usb device, avoiding a NULL dereference.

Signed-off-by: Jim Radford <radford@blackbean.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Jim Radford d9a7ecacac usb-serial: fix shutdown / device_unregister order
Ensure that the ->port_remove() callbacks get called before the
->shutdown() callback which makeing the order symmetric with
->attach() being called before ->port_probe().

Signed-off-by: Jim Radford <radford@blackbean.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Thomas Schleusener 4eaf60e011 USB: add Additional PIDs in ftdi_sio
I've developed some devices with FTDI chips (FT232xx). FTDI was so kind
to give some own PID's which I can use together with their VID. Some of
the devices are already very popular here and I have customers from
universities, institutes .....

I use the FTDI VID 0x0403. My PID's are:

0xff38 - IBS US485 (USB<-->RS422/485 interface)
0xff39 - IBS PIC-Programmer
0xff3a - IBS Card reader for PCMCIA SRAM-cards
0xff3b - IBS PK1 - Particel counter
0xff3c - IBS RS232 - Monitor
0xff3d - APP 70 (dust monitoring system)
0xff3e - IBS PEDO-Modem (RF modem 868.35 MHz)
0xff3f - future device

The company is "IBS Ing.-Buero Schleusener".


From: Thomas Schleusener <thomas@be-schl.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Michael Olberg ef31fec01a USB: add QL355P power supply ids to fdti_sio 2007-03-09 19:52:24 -08:00
Jon K Hellan fc4bd64cbb USB: New device IDs for cp2101 driver
Here are two new device IDs for the cp2101 driver.
The diff is with linus's tree as of this evending.

From: Jon K Hellan <hellan@acm.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-03-09 19:52:24 -08:00
Micke Prag 822c7ef48b USB: ftdi_sio: Adding VID and PID for Tellstick
I would like to add the VID and PID for Telldus Technologies Homeautomation
usb-dongle to the ftdi_sio driver.


From: Micke Prag <micke.prag@telldus.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 15:03:45 -08:00
Greg Kroah-Hartman fd978bfa12 USB: option: add a bunch of new device ids
This adds all of the known Option device ids to the driver.
Many thanks to some Option engineers for getting me this list.

Cc: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 15:03:45 -08:00
Greg Kroah-Hartman b656b2cbd7 USB: option: remove duplicate device id table
There is no need to have two tables with the same device ids in it.

Cc: Matthias Urlichs <smurf@smurf.noris.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-23 15:03:44 -08:00
Pozsar Balazs ebaf494e2a USB: another id for cp2101 driver
This patch adds another usb id to the cp2101. It seems to work well.

Please apply, thanks.

Signed-off-by: Pozsar Balazs <pozsy@uhulinux.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:23 -08:00
Kevin Lloyd 6160beb5bf usb: Remove Airprime device from option.c
from: Kevin Lloyd <linux@sierrawireless.com>

This patch removes the Airprime 5220 device (branded as Audiovox) from
the option.c driver. This device is already supported by the sierra.c
driver.

This was based off of the option.c driver found in kernel 2.6.20-git11.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:22 -08:00
Pete Zaitcev af59cf404f USB: Fix error cleanup path in airprime
Fix up the error processing path: in usb_submit_urb failed, we forgot
to free buffers. Also, don't free buffers in read callback: less error
prone, 21 LOC less, no need to comment so much. N.B. write path is ok
to do kfree.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:18 -08:00
Joris van Rantwijk 253ca92328 USB: add flow control to usb-serial generic driver.
I added two fields to struct usb_serial_port to keep track of the
throttle state. Other usb-serial drivers typically use private data for
such things, but the generic driver can not really do that because some
of its code is also used by other drivers (which may have their own
private data needs).

As it is, I am not sure that this patch is useful in all scenarios.
It is certainly helpful for low-bandwidth devices that can hold their
data in response to throttling. But for devices that pump data in
real-time as fast as possible (webcam, A/D converter, etc), throttling
may actually cause more data loss.

From: Joris van Rantwijk <jorispubl@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:18 -08:00
YOSHIFUJI Hideaki 2d94b981c7 USB: PL2303: Willcom WS002IN Support.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-16 15:32:17 -08:00
Jiri Slaby b963a8441c [PATCH] Char: tty_wakeup cleanup
tty_wakeup cleanup

- remove wake_up_interruptible(&tty->write_wait) surrounding
  tty_wakup(tty);
- substitute tty->ldisc.write_wakeup(tty) + wake_up() by tty_wakeup(tty);

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:26 -08:00
Al Viro 53ebb3b826 [PATCH] trivial usb endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-09 09:14:08 -08:00
Greg Kroah-Hartman 33c6b7e99f USB: remove duplicate device id from keyspan
As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:40 -08:00
Greg Kroah-Hartman 210b197579 USB: remove duplicate device id from ftdi_sio
As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:40 -08:00
Greg Kroah-Hartman 9da88d78bc USB: remove duplicate device id from visor
As pointed out by Kay Sievers <kay.sievers@suse.de>

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:40 -08:00
Kevin Lloyd e43062dd20 USB: Sierra Wireless auto set D0
This patch ensures that the device is turned on when inserted into the system.
It also adds more VID/PIDs and matches the N_OUT_URB with the airprime driver.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:39 -08:00
Oliver Neukum 3ff4fd94c8 USB: race fixes for usb-serial, step 3
- fix an error code returned if a device has been disconnected

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:38 -08:00
Oliver Neukum 4b10f0f3a0 USB: race fixes for usb-serial, step 2
- take BKL before looking up a driver to associate with a device to make
  sure the module is not unloaded after looking up but before association
  & bumping module count

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:38 -08:00
Oliver Neukum 34ef50e5b1 USB: race fixes for usb-serial step 1
- introduce a spinlock for serial_table to eliminate the window between
  looking up a device and getting a reference
- delay inscription of a new device into serial_table until it is fully
  initialised
- make sure disconnect() kills all URBs to avoid leckage across a soft unbind


Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:38 -08:00
Rainer Weikusat fdcba53e2d fix for bugzilla #7544 (keyspan USB-to-serial converter)
At least the Keyspan USA-19HS USB-to-serial converter supports
two different configurations, one where the input endpoints
have interrupt transfer type and one where they are bulk endpoints.
The default UHCI configuration uses the interrupt input endpoints.
The keyspan driver, OTOH, assumes that the device has only bulk
endpoints (all URBs are initialized by calling usb_fill_bulk_urb
in keyspan.c/ keyspan_setup_urb). This causes the interval field
of the input URBs to have a value of zero instead of one, which
'accidentally' worked with Linux at least up to 2.6.17.11 but
stopped to with 2.6.18, which changed the UHCI support code handling
URBs for interrupt endpoints. The patch below modifies to driver to
initialize its input URBs either as interrupt or as bulk URBs,
depending on the transfertype contained in the associated endpoint
descriptor (only tested with the default configuration) enabling
the driver to again receive data from the serial converter.

Greg K-H reworked the patch.

Signed-off-by: Rainer Weikusat <rweikusat@sncag.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:38 -08:00
Johannes Hölzl 52d67f0b5c USB: Bugfix for aircable: Add module and name to usb_serial_driver
While adding the dynamic-id support to usb serial I found a small bug in
the air cable driver:

Adds module and name information to the usb_serial_driver instance
of aircable. So the aircable driver is correctly shown under
/sys/bus/usb-serial/drivers/aircable and has the module link.

Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:34 -08:00
Johannes Hölzl d9b1b78773 USB serial: add driver pointer to all usb-serial drivers
Every usb serial driver should have a pointer to the corresponding usb driver.
So the usb serial core can add a new id not only to the usb serial driver, but
also to the usb driver.

Also the usb drivers of ark3116, mos7720 and mos7840 missed the flag
no_dynamic_id=1. This is added now.

Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-02-07 15:44:34 -08:00
Greg Kroah-Hartman 93bacefc4c USB serial: add dynamic id support to usb-serial core
Thanks to Johannes Hölzl <johannes.hoelzl@gmx.de> for fixing a few
things and getting it all working properly.

This adds support for dynamic usb ids to the usb serial core.  The file
"new_id" will show up under the usb serial driver, not the usb driver
associated with the usb-serial driver (yeah, it can be a bit confusing
at first glance...)

This patch also modifies the USB core to allow the usb-serial core to
reuse much of the dynamic id logic.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Johannes Hölzl <johannes.hoelzl@gmx.de>
2007-02-07 15:44:33 -08:00
Greg Kroah-Hartman 6e8cf7751f USB: add EPIC support to the io_edgeport driver
This patch adds EPiC support to the io_edgeport driver which adds
support for a number of NCR printers:
	- NCR (Axiohm) 7401-K580 printer
	- NCR (TEC) 7401-K590 printer, 7402-K592
	- NCR (TEC) 7167, 7168 printers
	- NCR (TEC) 7197, 7198, F306, F307, F309 printers
	- NCR (Axiohm) 7194 printer
	- NCR (Axiohm) 7158 printer
and a few more.

It is based on the 2.6.19 kernel.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2007-02-07 15:44:30 -08:00
Al Viro c3ea6729fe [PATCH] funsoft: ktermios fix
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-23 11:09:49 -08:00
garrett_damore@tadpole.com 53e8f84dc6 USB: add vendor/device id for Option GT Max 3.6 cards
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=7814


Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-22 11:55:16 -08:00
David Miller 88bf7b391d [PATCH] really fix funsoft driver
Fix void cast and re-enable on sparc.

Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-11 18:18:21 -08:00
Andrew Morton 6a3c3d4952 USB: funsoft is borken on sparc
drivers/usb/serial/funsoft.c: In function `funsoft_ioctl':
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_iflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_iflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_iflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_oflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_oflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_oflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_lflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_lflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_lflag' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_line' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_line' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_line' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'
drivers/usb/serial/funsoft.c:35: warning: dereferencing `void *' pointer
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: error: request for member `c_cc' in something not a structure or union
drivers/usb/serial/funsoft.c:35: warning: type defaults to `int' in declaration of `type name'

Cc: David Clare <david@funsoft.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:09 -08:00
Miguel Angel Alvarez 8c1527132c USB: fix interaction between different interfaces in an "Option" usb device
Just the serial port in the first interface should control DTR and RTS
lines. This way, the closing of the rest of the ports does not produce a=
hangup in the communication.

Signed-off-by: Miguel Angel Alvarez <ma.alvarez@ziv.es>
Signed-off-by: Matthias Urlichs <matthias@urlichs.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-01-05 12:19:08 -08:00
Eric Smith 11e82730cc [PATCH] usb serial: add support for Novatel S720/U720 CDMA/EV-DO modems
Add USB vendor/device IDs for Novatel Wireless S720 and U720 CDMA/EV-DO
modems to airprime.c.

Signed-off-by: Eric Smith <eric@brouhaha.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 11:29:18 -08:00
Johann Wilhelm ab19589055 usb-gsm-driver: Added VendorId and ProductId for Huawei E220 USB Modem
Added VendorId and ProductId for Huawei E220 USB Modem

Signed-off-by: Johann Wilhelm <johann.wilhelm@student.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
David Clare c2585d9625 USB: Prevent the funsoft serial device from entering raw mode
Added a device specific ioctl function to prevent the disabling of canonical
mode.  EINVAL is returned for any TCSETSF ioctl that doesn't have ICANON set.
This patch is for 2.6.17 or later kernels.

When "hwinfo --modem" is executed it opens the funsoft USB serial device and
disables canonical mode.  The device is kept this way until hwininfo has
finished probing any modems on a system.  The funsoft device expects to be
running in canonical mode.  Switching the device to raw mode can cause
incomplete data packets and device timeouts.

Signed-off-by: David Clare <david@funsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Johannes Hoelzl e05998d50d Add Baltech Reader ID to CP2101 driver
this patch adds the Baltech Reader ID to the list of USB IDs in the
CP2101 driver.

From: Johannes Hoelzl <johannes.hoelzl@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:14:25 -08:00
Alan b1cff285ae usb serial: Eliminate bogus ioctl code
Several drivers have bogus ioctl code that tries unneccessarily to
override the standard processing. In the three cases here the actual code
is not only wrong but also not required as they implement the proper
set_termios method as well.

Remove the junk.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Jan Capek ec434e9b43 USB: ftdi_sio - MachX product ID added
below is a patch for the ftdi_sio driver to include a new device ID for
CCS MachX PIC programmer.


From: Jan Capek <jan@ccsinfo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Eagle Jones 87f28bde94 USB: airprime: add device id for dell wireless 5500 hsdpa card
Added the device id (0x413c, 0x8115) for the Dell wireless HSDPA 5500,
which is a rebranded Novatel EU730.

Signed-off-by: Eagle Jones <eagle@newdream.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-20 10:13:23 -08:00
Robert P. J. Day 5cbded585d [PATCH] getting rid of all casts of k[cmz]alloc() calls
Run this:

	#!/bin/sh
	for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
	  echo "De-casting $f..."
	  perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
	done

And then go through and reinstate those cases where code is casting pointers
to non-pointers.

And then drop a few hunks which conflicted with outstanding work.

Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:58 -08:00
Alan Cox 606d099cdd [PATCH] tty: switch to ktermios
This is the grungy swap all the occurrences in the right places patch that
goes with the updates.  At this point we have the same functionality as
before (except that sgttyb() returns speeds not zero) and are ready to
begin turning new stuff on providing nobody reports lots of bugs

If you are a tty driver author converting an out of tree driver the only
impact should be termios->ktermios name changes for the speed/property
setting functions from your upper layers.

If you are implementing your own TCGETS function before then your driver
was broken already and its about to get a whole lot more painful for you so
please fix it 8)

Also fill in c_ispeed/ospeed on init for most devices, although the current
code will do this for you anyway but I'd like eventually to lose that extra
paranoia

[akpm@osdl.org: bluetooth fix]
[mp3@de.ibm.com: sclp fix]
[mp3@de.ibm.com: warning fix for tty3270]
[hugh@veritas.com: fix tty_ioctl powerpc build]
[jdike@addtoit.com: uml: fix ->set_termios declaration]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Martin Peschke <mp3@de.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@de.ibm.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:57 -08:00
Christoph Lameter 54e6ecb239 [PATCH] slab: remove SLAB_ATOMIC
SLAB_ATOMIC is an alias of GFP_ATOMIC

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:24 -08:00
David Howells 4c1ac1b491 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:

	drivers/infiniband/core/iwcm.c
	drivers/net/chelsio/cxgb2.c
	drivers/net/wireless/bcm43xx/bcm43xx_main.c
	drivers/net/wireless/prism54/islpci_eth.c
	drivers/usb/core/hub.h
	drivers/usb/input/hid-core.c
	net/core/netpoll.c

Fix up merge failures with Linus's head and fix new compilation failures.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-12-05 14:37:56 +00:00
Linus Torvalds 9641219825 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (103 commits)
  usbcore: remove unused argument in autosuspend
  USB: keep count of unsuspended children
  USB hub: simplify remote-wakeup handling
  USB: struct usb_device: change flag to bitflag
  OHCI: make autostop conditional on CONFIG_PM
  USB: Add autosuspend support to the hub driver
  EHCI: Fix root-hub and port suspend/resume problems
  USB: create a new thread for every USB device found during the probe sequence
  USB: add driver for the USB debug devices
  USB: added dynamic major number for USB endpoints
  USB: pegasus error path not resetting task's state
  USB: endianness fix for asix.c
  USB: build the appledisplay driver
  USB serial: replace kmalloc+memset with kzalloc
  USB: hid-core: canonical defines for Apple USB device IDs
  USB: idmouse cleanup
  USB: make drivers/usb/core/driver.c:usb_device_match() static
  USB: lh7a40x_udc remove double declaration
  USB: pxa2xx_udc recognizes ixp425 rev b0 chip
  usbtouchscreen: add support for DMC TSC-10/25 devices
  ...
2006-12-01 16:41:58 -08:00
Greg Kroah-Hartman 958e8741bf USB: add driver for the USB debug devices
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>
2006-12-01 14:25:52 -08:00
Burman Yan 7ac9da10af USB serial: replace kmalloc+memset with kzalloc
Replace kmalloc+memset with kzalloc

Signed-off-by: Yan Burman <yan_952@hotmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:25:51 -08:00
Mariusz Kozlowski 2e46b74852 usb: cypress_m8 init error path fix
If at some point cypress_init() fails deregister
only the resources that were registered until that point.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:23:37 -08:00
Naranjo Manuel Francisco 7a5c7b42d3 USB: fix aircable.c: inconsequent NULL checking
> 2006/11/11, Adrian Bunk <bunk@stusta.de>:
> > The Coverity checker spotted the following in
> > drivers/usb/serial/aircable.c:
> >
> > <--  snip  -->
> >
> > ...
> > static void aircable_read(void *params)
> > {
> > ...


Hi everyone,
Sorry for the long time response but here is the patch, I think this way should
work, if anyone has any suggestion let me know. What I do now is, in case I
don't have the tty available I reschedule the work, I have tried it and it
works with no problem, I even tried removing the device, and didn't find
anything strange.

Signed-off-by: Naranjo Manuel <naranjo.manuel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:23:35 -08:00
Mariusz Kozlowski bcb54a5403 usb: visor kill urb cleanup
- usb_kill_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:23:35 -08:00