Commit Graph

77 Commits (62127a585cc72509a0bfae502cc16f9935a4cda6)

Author SHA1 Message Date
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
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
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
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
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
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 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
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
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
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
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
Mariusz Kozlowski 794c944ecd usb: ftdi_sio 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:34 -08:00
David Howells c4028958b6 WorkStruct: make allyesconfig
Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>
2006-11-22 14:57:56 +00:00
Frank Sievertsen fad14a0da8 USB: ftdi driver pid for dmx-interfaces
Please add a usb pid to the ftdi_sio driver. The pid is used by dmx4all
dmx-interfaces (for stage lighting).

The interfaces are using the usb-id 0403:c850. I added the id to the driver
and it works perfectly. I added a patch for linux 2.6.18.1, too.

From: Frank Sievertsen <frank@sievertsen.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-11-16 14:26:11 -08:00
Kjell Myksvoll 40c36092f7 USB: ftdi_sio: adds vendor/product id for a RFID construction kit
Adds the vendor and prodcut id for a RFID construction kit from the
Elektor Electronics magazine, september 2006.

From: Kjell Myksvoll <kmyksvo@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-11-16 14:26:11 -08:00
David Brownell 5c09d144ff USB: ftdi_sio whitespace fixes
Whitespace fixups for drivers/usb/serial/ftdi_sio.c ...
removing end-of-line whitespace, and space-before-tab.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-17 14:46:34 -07:00
David Howells 7d12e780e0 IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.

The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around.  On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).

Where appropriate, an arch may override the generic storage facility and do
something different with the variable.  On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.

Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions.  Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller.  A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.

I've build this code with allyesconfig for x86_64 and i386.  I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.

This will affect all archs.  Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

	struct pt_regs *old_regs = set_irq_regs(regs);

And put the old one back at the end:

	set_irq_regs(old_regs);

Don't pass regs through to generic_handle_irq() or __do_IRQ().

In timer_interrupt(), this sort of change will be necessary:

	-	update_process_times(user_mode(regs));
	-	profile_tick(CPU_PROFILING, regs);
	+	update_process_times(user_mode(get_irq_regs()));
	+	profile_tick(CPU_PROFILING);

I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().

Some notes on the interrupt handling in the drivers:

 (*) input_dev() is now gone entirely.  The regs pointer is no longer stored in
     the input_dev struct.

 (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking.  It does
     something different depending on whether it's been supplied with a regs
     pointer or not.

 (*) Various IRQ handler function pointers have been moved to type
     irq_handler_t.

Signed-Off-By: David Howells <dhowells@redhat.com>
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-10-05 15:10:12 +01:00
Justin Carlson a14848275b USB: add SeaLevel 2106 SeaLINK support to ftdi_sio
We have a couple of these USB-Serial converters around; they're slightly
different from the 2104 models in that they can handle 500Kb/sec over RS422.
The existing ftdi driver seems to work just fine if we add in the 
appropriate IDs.

Patch is against 2.6.17.6, but should apply cleanly to pretty much 
anything recent.

From: Justin Carlson <justinca@qatar.cmu.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:43 -07:00
Ian Abbott 9978f9e124 USB serial ftdi_sio: Add support for Tactrix OpenPort devices
This patch adds support for three OpenPort ECU data cables from Tactrix
Inc. to the ftdi_sio driver's device ID table.  One of the PIDs was
supplied by Donour Sizemore on the ftdi-usb-sio-devel mailing list.  The
other two were added by myself after examining the Windows driver software.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-28 15:36:43 -07:00
Greg Kroah-Hartman 13f4db9e1b USB: fix __must_check warnings in drivers/usb/serial/
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-27 11:58:58 -07:00
Ralf Schlatterbeck eaede2cb75 USB: New device ID for ftdi_sio usb serial driver
The patch adds a new device ID for the Gamma Scout Geiger counter
device.

Signed-off-by: Ralf Schlatterbeck <rsc@runtux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-09-07 15:23:04 -07:00
Jonathan Davies 2011e9249a USB: ftdi_sio driver - new PIDs
Signed-off-by: Jonathan Davies <jjd27@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-11 14:06:06 -07:00
Dave Platt 274a4bbc9d USB: Additional PID for the ftdi_sio driver
Here's a short patch which adds one PID to the set of devices
supported by the ftdi_sio driver.  The device in question is a
DLP module used as part of a ham radio USB-to-packet adapter.

From: Dave Platt <dplatt@radagast.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-08-02 16:41:41 -07:00
Greg Kroah-Hartman a969888ce9 [PATCH] USB: move usb-serial.h to include/linux/usb/
USB serial outside of the kernel tree can not build properly due to
usb-serial.h being buried down in the source tree.  This patch moves the
location of the file to include/linux/usb and fixes up all of the usb
serial drivers to handle the move properly.

Cc: Sergei Organov <osv@javad.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:25 -07:00
Colin Leroy e1979fef34 [PATCH] USB: Add one VID/PID to ftdi_sio
This patch adds the Testo USB interface to the list of devices
recognized by the ftdi_sio module. This device is based on a FT232BL
chip, and is used as an interface to get data from digital sensors
(thermometer, etc). See http://www.testo.com/

Signed-off-by: Colin Leroy <colin@colino.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:24 -07:00
Ian Abbott 224654004c [PATCH] USB serial ftdi_sio: Prevent userspace DoS
This patch limits the amount of outstanding 'write' data that can be
queued up for the ftdi_sio driver, to prevent userspace DoS attacks (or
simple accidents) that use up all the system memory by writing lots of
data to the serial port.

The original patch was by Guillaume Autran, who in turn based it on the
same mechanism implemented in the 'visor' driver.  I (Ian Abbott)
re-targeted the patch to the latest sources, fixed a couple of errors,
renamed his new structure members, and updated the implementations of
the 'write_room' and 'chars_in_buffer' methods to take account of the
number of outstanding 'write' bytes.  It seems to work fine, though at
low baud rates it is still possible to queue up an amount of data that
takes an age to shift (a job for another day!).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:22 -07:00
Christophe Mariac c0f8d56197 [PATCH] USB: new device ids for ftdi_sio driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:21 -07:00
D. Peter Siddons 48437486c6 [PATCH] USB: new device id for Thorlabs motor driver
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-12 16:03:20 -07:00
Jörn Engel 6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Ian Abbott eb79b4fda4 [PATCH] USB: ftdi_sio: add support for Yost Engineering ServoCenter3.1
This patch adds support for Yost Engineering Inc's ServoCenter 3.1 USB
product to the ftdi_sio driver's device ID table.  The PID was supplied
by Aaron Prose of Yost Engineering on the ftdi-usb-sio-devel list.  The
PID 0xE050 matches the Windows INF files for this device.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-21 15:04:14 -07:00
Pete Zaitcev cf2c7481d2 [PATCH] USB serial: encapsulate schedule_work, remove double-calling
I'm going to throw schedule_work away, it's retarded. But for starters,
let's have it encapsulated.

Also, generic and whiteheat were both calling usb_serial_port_softint
and scheduled work. Only one was necessary.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-21 15:04:13 -07:00
Guennadi Liakhovetski 57845bd104 [PATCH] USB: console: fix oops
Prevent NULL dereference when used as a USB-serial console.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-21 15:04:09 -07:00
Razvan Gavril 72a9f95842 [PATCH] USB: ftdi_sio: add device id for ACT Solutions HomePro ZWave interface
Signed-off-by: Razvan Gavril <razvan.g@plutohome.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:56 -07:00
Ian Abbott 20a0f47e18 [PATCH] USB: ftdi_sio: Add support for HCG HF Dual ISO RFID Reader
This patch adds support for ACG Identification Technologies GmbH's HF
Dual ISO Reader (an RFID tag reader) to the ftdi_sio driver's device ID
table.  The product ID was supplied by anotonios (anton at goto10 dot
org) on the ftdi-usb-sio-devel list and subsequently verified by myself
(Ian Abbott).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08 23:43:55 -07:00
Ian Abbott 7e0258fd28 [PATCH] USB: ftdi_sio: add support for ASK RDR 400 series card reader
This patch adds support for an ASK RDR 400 series contactless card
reader <http://www.ask.fr/uk/products_and_services/terminals.html> to
the ftdi_sio driver's device ID table.  The product ID was supplied by
Adriano Couto on the ftdi-usb-sio-devel list.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27 10:28:59 -07:00
Luiz Fernando N. Capitulino 69737dfaac [PATCH] USB: ftdi_sio: Adds support for iPlus device.
Adds support in ftdi_sio usbserial driver for USB modems sold by
Plus GSM Company in Poland.

Signed-off-by: Luiz Fernando Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27 10:28:59 -07:00
Nathan Bronson cdd3b1565a [PATCH] USB: ftdi_sio vendor code for RR-CirKits LocoBuffer USB
This patch adds recognition of the RR-CirKits LocoBuffer USB
to the existing FTDI driver.  http://www.rr-cirkits.com

Signed-off-by: Nathan Bronson <ngb@sns-usa.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27 10:28:59 -07:00
Folkert van Heusden 62a13db346 [PATCH] USB: add support for Papouch TMU (USB thermometer)
This patch adds support for new vendor (papouch) and one of their
devices - TMU (a USB thermometer).

More information:
vendor homepage:
	http://www.papouch.com/en/
product homepage (Polish):
	http://www.papouch.com/shop/scripts/_detail.asp?katcislo=0188

This patch is based on the submission from Folkert van Heusden [1].
Then reviseted by Kalin KOZHUHAROV [2] and retested by Folkert.

[1]	http://article.gmane.org/gmane.linux.kernel/392970
[2]	http://article.gmane.org/gmane.linux.kernel/393386

Signed-off-by: Folkert van Heusden <folkert@vanheusden.com>
Signed-off-by: Kalin KOZHUHAROV <kalin@thinrope.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:21 -07:00
Ian Abbott 7e1c0b86ac [PATCH] USB: ftdi_sio: add support for Eclo COM to 1-Wire USB adapter
This patch adds support for the Eclo COM to 1-Wire USB adapter
<http://www.eclo.pt/products_ibutton_adapters_usb01_en.asp> to the
ftdi_sio driver's device ID table.  Details were provided by Martin
Grill on the ftdi-sio-usb-devel mailing list and I (Ian Abbott)
confirmed it matched the INF file in the Eclo's Windows driver package.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:19 -07:00
A. Maitland Bottoms bf58fbd5e8 [PATCH] USB: ftdi_sio: add Icom ID1 USB product and vendor ids
The Icom ID-1 1.2 GHz band digital transceiver is a new radio
that has a USB interface. With this patch, the ftdi_sio driver
will report "Detected FT8U232AM" and provide a serial device
interface.

Signed-off-by: "A. Maitland Bottoms" <bottoms@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
Eric Sesterhenn 80b6ca4832 [PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Ian Abbott 34d1a8aa88 [PATCH] USB: ftdi_sio: new microHAM device IDs
This patch adds a bunch of new device IDs to the ftdi_sio driver for
various devices from microHAM using FTDI chips.

Micheal Studer supplied the PID for the USB-Y9 device.  I examined the
INF file in microHAM's Windows driver package for the USB-KW, USB-YS,
USB-IC, USB-DB9 and USB-RS232 devices.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-02-28 12:42:07 -08:00
Rui Santos 09c280a246 [PATCH] USB: ftdi: Two new ATIK based USB astronomical CCD cameras
Documentation: Specify grayscale specification on ATIK-ATK16
   and ATIK-ATK16HR comments.
New: Add ProductID and VendorID for devices ATIK-ATK16C and
   ATIK-ATK16HRC. These devices are also USB Astronomical CCD
   cameras that work through an FTDI 245BM chip, share the
   same base hardware but, it has a colour CCD chip instead
   of a grayscale one.

Signed-off-by: Rui Santos <rsantos@grupopie.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:37 -08:00
Wouter Paesen ce40d290c1 [PATCH] USB: ftdi_sio: new PID for PCDJ DAC2
The attached patch adds a new PID for the ftdi_sio driver.  It will
enable support for PC-DJ's DAC-2 controller module
(more information on http://www.pcdjhardware.com/DAC2.asp)

Signed-off-by: Wouter Paesen <wouter@kangaroot.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:36 -08:00
Ian Abbott a94b52ac84 [PATCH] USB: ftdi_sio: new IDs for Westrex devices
This patch adds two new devices to the ftdi_sio driver's device ID
table.  The device IDs were supplied by Cory Lee to support two POS
printers made by Westrex International (Model 777 and Model 8900F).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:36 -08:00
Louis Nyffenegger 641adaaee1 [PATCH] USB: new id for ftdi_sio.c and ftdi_sio.h
this patch includes the Vendor Id for a optic fiber to USB device named
TTUSB from thought Technology. It's just add the vendor Id to
ftdi_sio.h and add the Vendor ID and model Id to table_combined.

Signed-off-by: Louis Nyffenegger <louis.nyffenegger@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-31 17:23:36 -08:00
Alan Cox 33f0f88f1c [PATCH] TTY layer buffering revamp
The API and code have been through various bits of initial review by
serial driver people but they definitely need to live somewhere for a
while so the unconverted drivers can get knocked into shape, existing
drivers that have been updated can be better tuned and bugs whacked out.

This replaces the tty flip buffers with kmalloc objects in rings. In the
normal situation for an IRQ driven serial port at typical speeds the
behaviour is pretty much the same, two buffers end up allocated and the
kernel cycles between them as before.

When there are delays or at high speed we now behave far better as the
buffer pool can grow a bit rather than lose characters. This also means
that we can operate at higher speeds reliably.

For drivers that receive characters in blocks (DMA based, USB and
especially virtualisation) the layer allows a lot of driver specific
code that works around the tty layer with private secondary queues to be
removed. The IBM folks need this sort of layer, the smart serial port
people do, the virtualisers do (because a virtualised tty typically
operates at infinite speed rather than emulating 9600 baud).

Finally many drivers had invalid and unsafe attempts to avoid buffer
overflows by directly invoking tty methods extracted out of the innards
of work queue structs. These are no longer needed and all go away. That
fixes various random hangs with serial ports on overflow.

The other change in here is to optimise the receive_room path that is
used by some callers. It turns out that only one ldisc uses receive room
except asa constant and it updates it far far less than the value is
read. We thus make it a variable not a function call.

I expect the code to contain bugs due to the size alone but I'll be
watching and squashing them and feeding out new patches as it goes.

Because the buffers now dynamically expand you should only run out of
buffering when the kernel runs out of memory for real.  That means a lot of
the horrible hacks high performance drivers used to do just aren't needed any
more.

Description:

tty_insert_flip_char is an old API and continues to work as before, as does
tty_flip_buffer_push() [this is why many drivers dont need modification].  It
does now also return the number of chars inserted

There are also

tty_buffer_request_room(tty, len)

which asks for a buffer block of the length requested and returns the space
found.  This improves efficiency with hardware that knows how much to
transfer.

and tty_insert_flip_string_flags(tty, str, flags, len)

to insert a string of characters and flags

For a smart interface the usual code is

    len = tty_request_buffer_room(tty, amount_hardware_says);
    tty_insert_flip_string(tty, buffer_from_card, len);

More description!

At the moment tty buffers are attached directly to the tty.  This is causing a
lot of the problems related to tty layer locking, also problems at high speed
and also with bursty data (such as occurs in virtualised environments)

I'm working on ripping out the flip buffers and replacing them with a pool of
dynamically allocated buffers.  This allows both for old style "byte I/O"
devices and also helps virtualisation and smart devices where large blocks of
data suddenely materialise and need storing.

So far so good.  Lots of drivers reference tty->flip.*.  Several of them also
call directly and unsafely into function pointers it provides.  This will all
break.  Most drivers can use tty_insert_flip_char which can be kept as an API
but others need more.

At the moment I've added the following interfaces, if people think more will
be needed now is a good time to say

 int tty_buffer_request_room(tty, size)

Try and ensure at least size bytes are available, returns actual room (may be
zero).  At the moment it just uses the flipbuf space but that will change.
Repeated calls without characters being added are not cumulative.  (ie if you
call it with 1, 1, 1, and then 4 you'll have four characters of space.  The
other functions will also try and grow buffers in future but this will be a
more efficient way when you know block sizes.

 int tty_insert_flip_char(tty, ch, flag)

As before insert a character if there is room.  Now returns 1 for success, 0
for failure.

 int tty_insert_flip_string(tty, str, len)

Insert a block of non error characters.  Returns the number inserted.

 int tty_prepare_flip_string(tty, strptr, len)

Adjust the buffer to allow len characters to be added.  Returns a buffer
pointer in strptr and the length available.  This allows for hardware that
needs to use functions like insl or mencpy_fromio.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: John Hawkes <hawkes@sgi.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-01-10 08:01:59 -08:00
Ian Abbott 740a4282ed [PATCH] USB: ftdi_sio: new IDs for Teratronik devices
This patch adds vendor and product IDs to the ftdi_sio driver's device
ID table for two devices from teratronik.de.  The device IDs were
submitted by O. Wölfelschneider of Teratronik Elektronische Systeme
GmbH.

The charset of the patch is latin-1, same as the original files.

Please apply, thanks!  (I've tried to avoid a clash with Andrew Morton's
patch to add support for Posiflex PP-7700 printer to the same driver.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00
Pavel Fedin effac8be4e [PATCH] USB: Support for Posiflex PP-7000 retail printer in Linux
This little patch adds recognition of Posiflex PP-7000 retail printer to
ftdo_sio module. The printer uses FT232BM bridge programmed with custom
VID/PID.  The patch posted to lkml and sf.net was for 2.6.11.1 kernel,
here is one reworked for 2.6.12.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-01-04 13:51:43 -08:00