History log of /linux-master/drivers/usb/serial/ftdi_sio.c
Revision Date Author Comments
# 17a2f0b4 07-Feb-2024 Colin Ian King <colin.i.king@gmail.com>

USB: serial: ftdi_sio: remove redundant assignment to variable cflag

The variable cflag is being assigned a value that is not being read
afterwards, it is being re-assigned later on. The assignment is
redundant and can be removed.

Cleans up clang scan warning:
drivers/usb/serial/ftdi_sio.c:2613:15: warning: Value stored to 'cflag'
during its initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 3fb7bc4f 11-Feb-2024 Daniel Vogelbacher <daniel@chaospixel.com>

USB: serial: ftdi_sio: add support for GMC Z216C Adapter IR-USB

The GMC IR-USB adapter cable utilizes a FTDI FT232R chip.

Add VID/PID for this adapter so it can be used as serial device via
ftdi_sio.

Signed-off-by: Daniel Vogelbacher <daniel@chaospixel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# 513d88a8 20-Dec-2023 Mark Glover <mark.glover@actisense.com>

USB: serial: ftdi_sio: update Actisense PIDs constant names

Update the constant names for unused USB PIDs (product identifiers) to
reflect the new products now using the PIDs.

Signed-off-by: Mark Glover <mark.glover@actisense.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# 6ff58ae1 04-Jun-2023 Johan Hovold <johan@kernel.org>

USB: serial: return errors from break handling

Start propagating errors to user space when setting the break state
fails.

This will be used by follow-on changes to also report when a driver or
device does not support break control.

Tested-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 6b2fe3df 19-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up driver prefix

Drop the "sio" infix from the few remaining definitions and symbol names
that still had it.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# a8619505 19-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: move driver structure

Move the definition of the USB serial driver structure to the end of the
file where it is used and drop the now redundant forward declarations.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# c142bdc5 19-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up attribute visibility logic

Clean up the attribute visibility logic by defaulting to attributes
being visible and explicitly listing the exceptions.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 0f6632e2 14-Sep-2022 Jiasheng Jiang <jiasheng@iscas.ac.cn>

USB: serial: ftdi_sio: convert to use dev_groups

The driver core supports the ability to handle the creation and removal
of device-specific sysfs files in a race-free manner.

Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
[ johan: rebase on type rework, make groups static, clean up, amend
commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# cfebcd53 11-Sep-2022 Amireddy mallikarjuna reddy <mallikarjuna.reddy@ftdichip.com>

USB: serial: ftdi_sio: add support for HP and HA devices

Add the product IDs for the USB-to-Serial devices FT2233HP, FT2232HP,
FT4233HP, FT4232HP, FT233HP, FT232HP, and FT4232HA.
Also include BCD values so that the chip type can be determined.

Signed-off-by: Amireddy mallikarjuna reddy <mallikarjuna.reddy@ftdichip.com>
Link: https://lore.kernel.org/r/ac28f2c5eba23a645b3b9299c224f2755a233eef.1658385786.git.mallikarjuna.reddy@ftdichip.com
[ johan: rebase on type-handling rework, drop "Q" from automotive type
name ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# 1a039891 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: simplify divisor handling

In preparation for adding further Hi-Speed types, assume the device type
is Hi-Speed unless it's an explicitly listed legacy type when
determining divisors.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 4d50f4fc 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: assume hi-speed type

In preparation for adding further Hi-Speed types, assume a 120 MHz clock
and set the channel index by default and instead override these values
as needed for legacy types.

Signed-off-by: Johan Hovold <johan@kernel.org>


# a146cc4d 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up baudrate request

Multi-channel devices need to encode the channel selector in their
control requests and newer single-channel chip types use the same
request format.

Set the channel index also for these single-channel types so that the
index can be used to determine the baudrate request format instead of
listing types explicitly.

Note that FT232H and FTX accept either 0 or 1 as selector for their
single channel, presumably for backward compatibility reasons.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 4d045b98 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up attribute handling

The driver exposes two attributes for all chip types but FT232A, which
doesn't have a configurable latency timer, and SIO, which (probably)
doesn't support the event-char mechanism either.

Explicitly test for the exceptions rather than list each and every
supported device type in the attribute helpers.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 6fbd9142 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up modem-status handling

All chip types but the original SIO (FT8U100AX) return a two-byte modem
status and there's no need to explicitly list every other type in the
handler.

Signed-off-by: Johan Hovold <johan@kernel.org>


# f353c0d4 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: tighten device-type detection

Clean up and tighten the device-type detection, which is based on
bcdDevice.

Don't make assumptions about unknown (future) types (currently assumed
to be either FT2232C or FT-X depending on bNumInterfaces) and instead
log an error and refuse to bind so that we can add proper support when
needed.

Note that the bcdDevice values have been provided by FTDI.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 027bf37d 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: rename channel index

Multi-channel devices require a channel selector to be included in
control requests.

Replace "interface" with the less ambiguous "channel", which is the
terminology used for newer devices, in the corresponding defines and
variables.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 64b12fda 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: include FT2232D in type string

Include the updated D-version in the type string for the FT2232C type.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 01aeb31f 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: rename chip types

Shorten the chip type enum and string representation for A, B and R chip
types so that they don't include the IC package type in the name.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 25eb9486 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: drop redundant chip type comments

Drop redundant chip type comments.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 366e89aa 11-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up chip type enum

Clean up the chip type enum by dropping the explicit values and moving
the definition to the implementation to make it easier to add further
types.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 7bd7ad3c 13-Sep-2022 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix 300 bps rate for SIO

The 300 bps rate of SIO devices has been mapped to 9600 bps since
2003... Let's fix the regression.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# f6d47fe5 16-Aug-2022 Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

usb: serial: Make ->set_termios() old ktermios const

There should be no reason to adjust old ktermios which is going to get
discarded anyway.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220816115739.10928-8-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 001047ea 01-Aug-2022 Niek Nooijens <niek.nooijens@omron.com>

USB: serial: ftdi_sio: add Omron CS1W-CIF31 device id

works perfectly with:
modprobe ftdi_sio
echo "0590 00b2" | tee
/sys/module/ftdi_sio/drivers/usb-serial\:ftdi_sio/new_id > /dev/null

but doing this every reboot is a pain in the ass.

Signed-off-by: Niek Nooijens <niek.nooijens@omron.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# 7c239a07 24-Jun-2022 Lucien Buchmann <lucien.buchmann@gmx.net>

USB: serial: ftdi_sio: add Belimo device ids

Those two product ids are known.

Signed-off-by: Lucien Buchmann <lucien.buchmann@gmx.net>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# 1b30499a 25-Apr-2022 Daniels Umanovskis <du@axentia.se>

USB: serial: ftdi_sio: clean up printk format specifier

The latency is an unsigned int and should be printed as such (even if it
only holds values in the range 0..255).

Signed-off-by: Daniels Umanovskis <du@axentia.se>
Link: https://lore.kernel.org/r/20220426123714.2000-1-du@axentia.se
[ johan: amend commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# fbb9b194 01-Feb-2022 Cameron Williams <cang1@live.co.uk>

USB: serial: ftdi_sio: add support for Brainboxes US-159/235/320

This patch adds support for the Brainboxes US-159, US-235 and US-320
USB-to-Serial devices.

Signed-off-by: Cameron Williams <cang1@live.co.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# a7388592 01-Aug-2021 Himadri Pandya <himadrispandya@gmail.com>

USB: serial: ftdi_sio: use usb_control_msg_recv()

usb_control_msg_recv() nicely wraps usb_control_msg() and removes the
compulsion of using DMA buffers for USB messages. It also includes proper
error check for possible short read. So use the wrapper where
appropriate and remove DMA buffers from the callers.

Signed-off-by: Himadri Pandya <himadrispandya@gmail.com>
Link: https://lore.kernel.org/r/20210801203122.3515-5-himadrispandya@gmail.com
[ johan: amend commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# a65ab973 25-Aug-2021 Utkarsh Verma <utkarshverma294@gmail.com>

USB: serial: replace symbolic permissions by octal permissions

Replace symbolic permission macros with octal permission numbers
because octal permission numbers are easier to read and understand
instead of their symbolic macro names.

No functional change.

Suggested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Signed-off-by: Utkarsh Verma <utkarshverma294@gmail.com>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 8da0e55c 04-Aug-2021 David Bauer <mail@david-bauer.net>

USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2

The Auto-M3 OP-COM v2 is a OBD diagnostic device using a FTD232 for the
USB connection.

Signed-off-by: David Bauer <mail@david-bauer.net>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# bc96c72d 03-Jun-2021 George McCollister <george.mccollister@gmail.com>

USB: serial: ftdi_sio: add NovaTech OrionMX product ID

Add PID for the NovaTech OrionMX so it can be automatically detected.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# c5a80540 22-Apr-2021 Dominik Andreas Schorpp <dominik.a.schorpp@ids.de>

USB: serial: ftdi_sio: add IDs for IDS GmbH Products

Add the IDS GmbH Vendor ID and the Product IDs for SI31A (2xRS232)
and CM31A (LoRaWAN Modem).

Signed-off-by: Dominik Andreas Schorpp <dominik.a.schorpp@ids.de>
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# 0428bf68 06-Apr-2021 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up TIOCSSERIAL

The TIOCSSERIAL implementation needs to compare the old flag and divisor
settings with the new to detect ASYNC_SPD changes, but there's no need
to copy all driver state to the stack for that.

While at it, unbreak the function parameter list.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# c12860c0 06-Apr-2021 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: simplify TIOCGSERIAL permission check

Changing the deprecated custom_divisor field is an unprivileged
operation so after verifying that flag field does not contain any
privileged changes both updates can be carried out by any user.

Combine the two branches and drop the erroneous comment.

Note that private flags field is only used for ASYNC flags so there's no
need to try to retain any other bits when updating the flags.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 9378379b 06-Apr-2021 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: ignore baud_base changes

The TIOCSSERIAL error handling is inconsistent at best, but drivers tend
to ignore requests to change parameters which cannot be changed rather
than return an error.

The FTDI driver ignores change requests for all immutable parameters but
baud_base so return success also in this case for consistency.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 01fd45f6 06-Apr-2021 Johan Hovold <johan@kernel.org>

USB: serial: add generic support for TIOCSSERIAL

TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
serial devices is only useful for setting the close_delay and
closing_wait parameters.

The closing_wait parameter determines how long to wait for the transfer
buffers to drain during close and the default timeout of 30 seconds may
not be sufficient at low line speeds. In other cases, when for example
flow is stopped, the default timeout may instead be too long.

Add generic support for TIOCSSERIAL and TIOCGSERIAL with handling of the
three common parameters close_delay, closing_wait and line for the
benefit of all USB serial drivers while still allowing drivers to
implement further functionality through the existing callbacks.

This currently includes a few drivers that report their base baud clock
rate even if that is really only of interest when setting custom
divisors through the deprecated ASYNC_SPD_CUST interface; an interface
which only the FTDI driver actually implements.

Some drivers have also been reporting back a fake UART type, something
which should no longer be needed and will be dropped by a follow-on
patch.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 2ab58361 06-Apr-2021 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix TIOCGSERIAL implementation

TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
serial devices is only useful for setting the close_delay and
closing_wait parameters.

The FTDI driver is the only USB serial driver supporting the deprecated
ASYNC_SPD flags, which are reported back as they should by TIOCGSERIAL,
but the returned parameters did not include the line number.

The close_delay and closing_wait parameters returned by TIOCGSERIAL are
specified in centiseconds. The driver does not yet support changing
these, but let's report back the default values actually used (0.5 and
30 seconds, respectively).

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# c5d1448f 08-Feb-2021 Uwe Kleine-König <uwe@kleine-koenig.org>

USB: serial: make remove callback return void

All usb_serial drivers return 0 in their remove callbacks and driver
core ignores the value returned by usb_serial_device_remove(). So change
the remove callback to return void and return 0 unconditionally in
usb_serial_device_remove().

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Link: https://lore.kernel.org/r/20210208143149.963644-2-uwe@kleine-koenig.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# 1ef26803 26-Jan-2021 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: restore divisor-encoding comments

Add back a few explanatory comments related to the divisor encoding
which got lost in a coding-style clean up many years ago.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 528222d0 26-Jan-2021 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix FTX sub-integer prescaler

The most-significant bit of the sub-integer-prescaler index is set in
the high byte of the baudrate request wIndex also for FTX devices.

This fixes rates like 1152000 which got mapped to 1.2 MBd.

Reported-by: Vladimir <svv75@mail.ru>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=210351
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# fddd408a 04-Dec-2020 Marc Zyngier <maz@kernel.org>

USB: serial: ftdi_sio: log the CBUS GPIO validity

The validity of the ftdi CBUS GPIO is pretty hidden so far,
and finding out *why* some GPIOs don't work is sometimes
hard to identify. So let's help the user by displaying the
map of the CBUS pins that are valid for a GPIO.

Suggested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201204164739.781812-4-maz@kernel.org
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
[johan: demote to KERN_DEBUG, rephrase messages, drop ftx-prog warning]
Signed-off-by: Johan Hovold <johan@kernel.org>


# 5d47c887 04-Dec-2020 Marc Zyngier <maz@kernel.org>

USB: serial: ftdi_sio: drop GPIO line checking dead code

Now that gpiolib can track the validity of GPIO pins, there is no need
to check whether the line is valid in request().

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201204164739.781812-5-maz@kernel.org
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
[johan: amend commit message]
Signed-off-by: Johan Hovold <johan@kernel.org>


# 11fb08cf 04-Dec-2020 Marc Zyngier <maz@kernel.org>

USB: serial: ftdi_sio: report the valid GPIO lines to gpiolib

Since it is pretty common for only some of the CBUS lines to be
valid as GPIO lines, let's report such validity to the rest of
the kernel.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20201204164739.781812-3-maz@kernel.org
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 711a3781 02-Oct-2020 Mychaela N. Falconia <falcon@freecalypso.org>

USB: serial: ftdi_sio: use cur_altsetting for consistency

ftdi_determine_type() function had this construct in it to get the
number of the interface it is operating on:

inter = serial->interface->altsetting->desc.bInterfaceNumber;

Elsewhere in this driver cur_altsetting is used instead for this
purpose. Change ftdi_determine_type() to use cur_altsetting
for consistency.

Signed-off-by: Mychaela N. Falconia <falcon@freecalypso.org>
[ johan: fix old style issues; drop braces and random white space ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# 75240ac4 28-Sep-2020 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up jtag quirks

Drivers should not assume that interface descriptors have been parsed in
any particular order so match on interface number instead when rejecting
JTAG interfaces.

Also use the interface struct device for notifications so that the
interface number is included.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 6cf87e5e 15-Sep-2020 Mychaela N. Falconia <falcon@freecalypso.org>

USB: serial: ftdi_sio: add support for FreeCalypso JTAG+UART adapters

There exist many FT2232-based JTAG+UART adapter designs in which
FT2232 Channel A is used for JTAG and Channel B is used for UART.
The best way to handle them in Linux is to have the ftdi_sio driver
create a ttyUSB device only for Channel B and not for Channel A:
a ttyUSB device for Channel A would be bogus and will disappear as
soon as the user runs OpenOCD or other applications that access
Channel A for JTAG from userspace, causing undesirable noise for
users. The ftdi_sio driver already has a dedicated quirk for such
JTAG+UART FT2232 adapters, and it requires assigning custom USB IDs
to such adapters and adding these IDs to the driver with the
ftdi_jtag_quirk applied.

Boutique hardware manufacturer Falconia Partners LLC has created a
couple of JTAG+UART adapter designs (one buffered, one unbuffered)
as part of FreeCalypso project, and this hardware is specifically made
to be used with Linux hosts, with the intent that Channel A will be
accessed only from userspace via appropriate applications, and that
Channel B will be supported by the ftdi_sio kernel driver, presenting
a standard ttyUSB device to userspace. Toward this end the hardware
manufacturer will be programming FT2232 EEPROMs with custom USB IDs,
specifically with the intent that these IDs will be recognized by
the ftdi_sio driver with the ftdi_jtag_quirk applied.

Signed-off-by: Mychaela N. Falconia <falcon@freecalypso.org>
[johan: insert in PID order and drop unused define]
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# 6ccc48e0 06-Aug-2020 Patrick Riphagen <patrick.riphagen@xsens.com>

USB: serial: ftdi_sio: add IDs for Xsens Mti USB converter

The device added has an FTDI chip inside.
The device is used to connect Xsens USB Motion Trackers.

Cc: stable@vger.kernel.org
Signed-off-by: Patrick Riphagen <patrick.riphagen@xsens.com>
Signed-off-by: Johan Hovold <johan@kernel.org>


# eb0c68ea 08-Jul-2020 Johan Hovold <johan@kernel.org>

USB: serial: drop redundant transfer-buffer casts

Drop redundant URB transfer-buffer casts.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 37ae2315 08-Jul-2020 Johan Hovold <johan@kernel.org>

USB: serial: only set sysrq timestamp for consoles

Only set the sysrq timestamp for console ports to avoid having every
driver also check the console flag when processing incoming data.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 733fff67 08-Jul-2020 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix break and sysrq handling

Only the last NUL in a packet should be flagged as a break character,
for example, to avoid dropping unrelated characters when IGNBRK is set.

Also make sysrq work by consuming the break character instead of having
it immediately cancel the sysrq request, and by not processing it
prematurely to avoid triggering a sysrq based on an unrelated character
received in the same packet (which was received *before* the break).

Note that the break flag can be left set also for a packet received
immediately following a break and that and an ending NUL in such a
packet will continue to be reported as a break as there's no good way to
tell it apart from an actual break.

Tested on FT232R and FT232H.

Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on break")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# ce054039 08-Jul-2020 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up receive processing

Clean up receive processing by dropping the character pointer and
keeping the length argument unchanged throughout the function.

Also make it more apparent that sysrq processing can consume a
characters by adding an explicit continue.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# ab4cc4ef 08-Jul-2020 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: make process-packet buffer unsigned

Use an unsigned type for the process-packet buffer argument and give it
a more apt name.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# c1a1f273 13-Nov-2019 Fabio D'Urso <fabiodurso@hotmail.it>

USB: serial: ftdi_sio: add device IDs for U-Blox C099-F9P

This device presents itself as a USB hub with three attached devices:
- An ACM serial port connected to the GPS module (not affected by this
commit)
- An FTDI serial port connected to the GPS module (1546:0502)
- Another FTDI serial port connected to the ODIN-W2 radio module
(1546:0503)

This commit registers U-Blox's VID and the PIDs of the second and third
devices.

Datasheet: https://www.u-blox.com/sites/default/files/C099-F9P-AppBoard-Mbed-OS3-FW_UserGuide_%28UBX-18063024%29.pdf

Signed-off-by: Fabio D'Urso <fabiodurso@hotmail.it>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 357f16d9 04-Sep-2019 Beni Mahler <beni.mahler@gmx.net>

USB: serial: ftdi_sio: add device IDs for Sienna and Echelon PL-20

Both devices added here have a FTDI chip inside. The device from Echelon
is called 'Network Interface' it is actually a LON network gateway.

ID 0403:8348 Future Technology Devices International, Ltd
https://www.eltako.com/fileadmin/downloads/de/datenblatt/Datenblatt_PL-SW-PROF.pdf

ID 0920:7500 Network Interface
https://www.echelon.com/products/u20-usb-network-interface

Signed-off-by: Beni Mahler <beni.mahler@gmx.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 7a786b84 15-Aug-2019 Matthew Michilot <matthew.michilot@gmail.com>

USB: serial: ftdi_sio: add support for FT232H CBUS gpios

Enable support for cbus gpios on FT232H. The cbus configuration is
stored in two words in the EEPROM at byte-offset 0x1a with the mux
config for ACBUS5, ACBUS6, ACBUS8 and ACBUS9 (only pins that can be
configured as I/O mode).

Tested using FT232H by configuring one ACBUS pin at a time.

Reviewed-by: Tim Harvey <tharvey@gateworks.com>
Signed-off-by: Matthew Michilot <matthew.michilot@gmail.com>
[ johan: fix copy-paste error in commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# f8377eff 28-Jun-2019 Andreas Fritiofson <andreas.fritiofson@unjo.com>

USB: serial: ftdi_sio: add ID for isodebug v1

This adds the vid:pid of the isodebug v1 isolated JTAG/SWD+UART. Only the
second channel is available for use as a serial port.

Signed-off-by: Andreas Fritiofson <andreas.fritiofson@unjo.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# ecefae6d 18-Jun-2019 Mauro Carvalho Chehab <mchehab+samsung@kernel.org>

docs: usb: rename files to .rst and add them to drivers-api

While there are a mix of things here, most of the stuff
were written from Kernel developer's PoV. So, add them to
the driver-api book.

A follow up for this patch would be to move documents from
there that are specific to sysadmins, adding them to the
admin-guide.

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 422c2537 05-Mar-2019 George McCollister <george.mccollister@gmail.com>

USB: serial: ftdi_sio: add additional NovaTech products

Add PIDs for the NovaTech OrionLX+ and Orion I/O so they can be
automatically detected.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 8d7fa3d4 14-Feb-2019 Mans Rullgard <mans@mansr.com>

USB: serial: ftdi_sio: add ID for Hjelmslund Electronics USB485

This adds the USB ID of the Hjelmslund Electronics USB485 Iso stick.

Signed-off-by: Mans Rullgard <mans@mansr.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# a8eda9fa 14-Jan-2019 Karoly Pados <pados@pados.hu>

USB: serial: ftdi_sio: fix GPIO not working in autosuspend

There is a bug in the current GPIO code for ftdi_sio: it failed to take USB
autosuspend into account. If the device is in autosuspend, calls to
usb_control_msg() fail with -EHOSTUNREACH. Because the standard value for
autosuspend timeout is usually 2-5 seconds, this made it almost impossible
to use the GPIOs on machines that have USB autosuspend enabled. This patch
fixes the issue by acquiring a PM lock on the device for the duration of
the USB transfers. Tested on an FT231X device.

Signed-off-by: Karoly Pados <pados@pados.hu>
[ johan: simplify code somewhat ]
Fixes: ba93cc7da896 ("USB: serial: ftdi_sio: implement GPIO support for FT-X devices")
Cc: stable <stable@vger.kernel.org> # 4.20
Signed-off-by: Johan Hovold <johan@kernel.org>


# 6abd8371 22-Nov-2018 Nikolaj Fogh <nikolajfogh@gmail.com>

USB: serial: ftdi_sio: use rounding when calculating baud rate divisors

Improve baud-rate generation by using rounding-to-closest instead of
truncation in divisor calculation.

Results have been verified by logic analyzer on an FT232RT (232BM) chip.
The following table shows the wanted baud rate, the baud rate obtained
with the old method (truncation), with the new method (rounding) and the
baud rate generated by the windows 10 driver. The numbers in parentheses
is the error.

+- Wanted --+------ Old -------+------ New -------+------ Win -------+
|   9600  |   9600 (0.00%)  |   9604 (0.05%)  |   9605 (0.05%)  |
|   19200   |   19200 (0.00%)  |   19199 (0.01%)  |   19198 (0.01%)  |
|   38400   |   38395 (0.01%)  |   38431 (0.08%)  |   38394 (0.02%)  |
|   57600   |   57725 (0.22%)  |   57540 (0.10%)  |   57673 (0.13%)  |
|  115200   |  115307 (0.09%)  |  115330 (0.11%)  |  115320 (0.10%)  |
|  921600   |  919963 (0.18%)  |  920386 (0.13%)  |  920810 (0.09%)  |
|  961200   |  996512 (3.67%)  |  956480 (0.49%)  |  956937 (0.44%)  |
+-----------+------------------+------------------+------------------+

The error due to noise in the measurements is in the order of a few
tenths of a %. As can be seen, the baud rate is significantly improved
for some rates (e.g. 961200), and corresponds to the output given by the
windows driver.

The theoretical baud rate has been calculated for all baud rates from 1
to 3M, and as expected, the error is centered around 0, with a triangle
shape instead of a sawtooth, so the maximum error is decreased to half.

Signed-off-by: Nikolaj Fogh <nikolajfogh@gmail.com>
[ johan: edit commit message slightly ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# 3ae36bed 11-Sep-2018 Al Viro <viro@zeniv.linux.org.uk>

fdti_sio: switch to ->[sg]et_serial()

Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>


# ff32d97e 30-Sep-2018 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: add support for FT232R CBUS gpios

Enable support for cbus gpios on FT232R. The cbus configuration is
stored in one word in the EEPROM at offset 0x0a (byte-offset 0x14) with
the mux config for CBUS0, CBUS1, CBUS2 and CBUS3 in bits 0..3, 4..7,
8..11 and 12..15, respectively.

Tested using FT232RL by configuring one cbus pin at a time.

Signed-off-by: Johan Hovold <johan@kernel.org>


# e0658e30 30-Sep-2018 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix gpio name collisions

Drop the gpio line names, which cause gpiolib to complain loudly
whenever a second ftdi gpiochip is registered:

gpio gpiochip5: Detected name collision for GPIO name 'CBUS0'
gpio gpiochip5: Detected name collision for GPIO name 'CBUS1'
gpio gpiochip5: Detected name collision for GPIO name 'CBUS2'
gpio gpiochip5: Detected name collision for GPIO name 'CBUS3'

and also prevents the legacy sysfs interface from being used (as the
line names are used as device names whenever they are set):

sysfs: cannot create duplicate filename '/class/gpio/CBUS0'

Until non-unique names are supported by gpiolib (without warnings and
stack dumps), let's leave the gpio lines unnamed.

Signed-off-by: Johan Hovold <johan@kernel.org>


# ba93cc7d 25-Sep-2018 Karoly Pados <pados@pados.hu>

USB: serial: ftdi_sio: implement GPIO support for FT-X devices

This patch allows using the CBUS pins of FT-X devices as GPIO in CBUS
bitbanging mode. There is no conflict between the GPIO and VCP
functionality in this mode. Tested on FT230X and FT231X.

As there is no way to request the current CBUS register configuration
from the device, all CBUS pins are set to a known state when the first
GPIO is requested. This allows using libftdi to set the GPIO pins
before loading this module for UART functionality, a behavior that
existing applications might be relying upon (though no specific case
is known to the authors of this patch).

Signed-off-by: Karoly Pados <pados@pados.hu>
[ johan: minor style changes ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# df1cd63d 18-May-2018 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up flow control management

Clean up the somewhat convoluted hardware-assisted flow control
handling.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 16410115 18-May-2018 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: drop unnecessary urb_ variable prefixes

Drop urb_ prefixes from value and index variables used in control
requests.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# fd54a99a 18-May-2018 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: use non-underscore fixed types

Replace all __u types with their u counterparts throughout the driver
(whose structures are not exported to user space).

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 5ada9842 18-May-2018 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix IXON/IXOFF mixup

Since forever this driver has had IXON and IXOFF mixed up, and has used
the latter rather than the former to enable hardware-assisted software
flow control on output.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 470b5d6f 11-Apr-2018 Vasyl Vavrychuk <vvavrychuk@gmail.com>

USB: serial: ftdi_sio: use jtag quirk for Arrow USB Blaster

Arrow USB Blaster integrated on MAX1000 board uses the same vendor ID
(0x0403) and product ID (0x6010) as the "original" FTDI device.

This patch avoids picking up by ftdi_sio of the first interface of this
USB device. After that this device can be used by Arrow user-space JTAG
driver.

Signed-off-by: Vasyl Vavrychuk <vvavrychuk@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 5267c5e0 29-Mar-2018 Johan Hovold <johan@kernel.org>

Revert "USB: serial: ftdi_sio: add Id for Physik Instrumente E-870"

This reverts commit 79a0b33165d8d8ec0840fcfc74fd0a8f219abeee.

Turns out this is not an FTDI device after all.

Fixes: 79a0b33165d8 ("USB: serial: ftdi_sio: add Id for Physik Instrumente E-870")
Reported-by: Martin Teichmann <martin.teichmann@xfel.eu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 79a0b331 29-Mar-2018 Teichmann, Martin <martin.teichmann@xfel.eu>

USB: serial: ftdi_sio: add Id for Physik Instrumente E-870

This adds support for the Physik Instrumente E-870 PIShift Drive
Electronics, a Piezo motor driver.

Signed-off-by: Martin Teichmann <martin.teichmann@xfel.eu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 6555ad13 16-Mar-2018 Clemens Werther <clemens.werther@gmail.com>

USB: serial: ftdi_sio: add support for Harman FirmwareHubEmulator

Add device id for Harman FirmwareHubEmulator to make the device
auto-detectable by the driver.

Signed-off-by: Clemens Werther <clemens.werther@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9608e5c0 23-Feb-2018 Major Hayden <major@mhtx.net>

USB: serial: ftdi_sio: add RT Systems VX-8 cable

This patch adds a device ID for the RT Systems cable used to
program Yaesu VX-8R/VX-8DR handheld radios. It uses the main
FTDI VID instead of the common RT Systems VID.

Signed-off-by: Major Hayden <major@mhtx.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ca35910a 23-Jan-2018 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: move many drivers to use DEVICE_ATTR_WO

Instead of "open coding" a DEVICE_ATTR() define, use the
DEVICE_ATTR_WO() macro instead, which does everything properly instead.

This does require a few static functions to be renamed to work properly,
but thanks to a script from Joe Perches, this was easily done.

Reported-by: Joe Perches <joe@perches.com>
Cc: Peter Chen <Peter.Chen@nxp.com>
Cc: Valentina Manea <valentina.manea.m@gmail.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Johan Hovold <johan@kernel.org>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c6a36ad3 20-Dec-2017 Max Schulze <max.schulze@posteo.de>

USB: serial: ftdi_sio: add id for Airbus DS P8GR

Add AIRBUS_DS_P8GR device IDs to ftdi_sio driver.

Signed-off-by: Max Schulze <max.schulze@posteo.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 6ca98bc2 02-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: Remove redundant license text

Now that the SPDX tag is in all USB files, that identifies the license
in a specific and legally-defined manner. So the extra GPL text wording
can be removed as it is no longer needed at all.

This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.

No copyright headers or other non-license-description text was removed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5fd54ace 03-Nov-2017 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: add SPDX identifiers to all remaining files in drivers/usb/

It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.

Update the drivers/usb/ and include/linux/usb* files with the correct
SPDX license identifier based on the license text in the file itself.
The SPDX identifier is a legally binding shorthand, which can be used
instead of the full boiler plate text.

This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a6c215e2 08-Sep-2017 Jeffrey Chu <jeffrey.chu@cypress.com>

USB: serial: ftdi_sio: add id for Cypress WICED dev board

Add CYPRESS_VID vid and CYPRESS_WICED_BT_USB and CYPRESS_WICED_WL_USB
device IDs to ftdi_sio driver.

Signed-off-by: Jeffrey Chu <jeffrey.chu@cypress.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 83c9a2d1 05-Jun-2017 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: remove broken alt-speed handling

Remove the broken alt_speed code, and warn when trying to set the line
speed using TIOCSSERIAL and SPD flags.

The use of SPD flags to set the line speed has been deprecated since
v2.1.69 and support for alt_speed (e.g. "warp") has even been removed
from TTY core in v3.10 by commit 6865ff222cca ("TTY: do not warn about
setting speed via SPD_*"), effectively breaking all driver
implementations of this except for serial core.

Also remove the verbose and outdated comment on how to set baud rates.

Note that setting a custom divisor will continue to work with the
caveat that 38400 must again be selected every time the divisor is
changed since v2.6.24 and commit 669a6db1037e ("USB: ftd_sio: cleanups
and updates for new termios work") which started reporting back the
actual baud rate used.

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f3e8ae65 05-Jun-2017 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: simplify TIOCSSERIAL flag logic

Simplify TIOCSSERIAL flag logic somewhat.

Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5f63424a 16-May-2017 Andrey Korolyov <andrey@xdel.ru>

USB: serial: ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs

This patch adds support for recognition of ARM-USB-TINY(H) devices which
are almost identical to ARM-USB-OCD(H) but lacking separate barrel jack
and serial console.

By suggestion from Johan Hovold it is possible to replace
ftdi_jtag_quirk with a bit more generic construction. Since all
Olimex-ARM debuggers has exactly two ports, we could safely always use
only second port within the debugger family.

Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# bb246681 05-May-2017 Anthony Mallet <anthony.mallet@laas.fr>

USB: serial: ftdi_sio: fix setting latency for unprivileged users

Commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY
flag") enables unprivileged users to set the FTDI latency timer,
but there was a logic flaw that skipped sending the corresponding
USB control message to the device.

Specifically, the device latency timer would not be updated until next
open, something which was later also inadvertently broken by commit
c19db4c9e49a ("USB: ftdi_sio: set device latency timeout at port
probe").

A recent commit c6dce2626606 ("USB: serial: ftdi_sio: fix extreme
low-latency setting") disabled the low-latency mode by default so we now
need this fix to allow unprivileged users to again enable it.

Signed-off-by: Anthony Mallet <anthony.mallet@laas.fr>
[johan: amend commit message]
Fixes: 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag")
Fixes: c19db4c9e49a ("USB: ftdi_sio: set device latency timeout at port probe").
Cc: stable <stable@vger.kernel.org> # 2.6.31
Signed-off-by: Johan Hovold <johan@kernel.org>


# 31c5d192 18-Apr-2017 Marek Vasut <marex@denx.de>

USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit

This development kit has an FT4232 on it with a custom USB VID/PID.
The FT4232 provides four UARTs, but only two are used. The UART 0
is used by the FlashPro5 programmer and UART 2 is connected to the
SmartFusion2 CortexM3 SoC UART port.

Note that the USB VID is registered to Actel according to Linux USB
VID database, but that was acquired by Microsemi.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# f1ce25f2 08-Mar-2017 Ian Abbott <abbotti@mev.co.uk>

USB: serial: ftdi_sio: allow other bases for "event_char"

The 'store' function for the "event_char" device attribute currently
expects a base 10 value. The value is composed of an enable bit in bit
8 and an 8-bit "event character" code in bits 7 to 0. It seems
reasonable to allow hexadecimal and octal numbers to be written to the
device attribute in addition to decimal. Make it so.

Change the debug message to show the value in hexadecimal, rather than
decimal.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>


# d0559a2f 08-Mar-2017 Ian Abbott <abbotti@mev.co.uk>

USB: serial: ftdi_sio: only allow valid event_char values

The "event_char" device attribute value, when written, is interpreted as
an enable bit in bit 8, and an "event character" in bits 7 to 0.

Return an error -EINVAL for out-of-range values. Use kstrtouint() to
parse the integer instead of the obsolete simple_strtoul().

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>


# db924066 08-Mar-2017 Ian Abbott <abbotti@mev.co.uk>

USB: serial: ftdi_sio: only allow valid latency timer values

Valid latency timer values are between 1 ms and 255 ms in 1 ms steps.
The store function for the "latency_timer" device attribute currently
allows any value, although only the lower 16 bits will be sent to the
device, and the device only stores the lower 8 bits. The hardware
appears to accept the (invalid) value 0 and treats it the same as 1
(resulting in a latency of 1 ms).

Change the latency_timer_store() function to accept only the values 0 to
255, returning an error -EINVAL for out-of-range values. Call
kstrtou8() to parse the integer instead of the obsolete
simple_strtoul().

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 7e1e6ced 08-Mar-2017 Ian Abbott <abbotti@mev.co.uk>

USB: serial: ftdi_sio: detect BM chip with iSerialNumber bug

If a BM type chip has iSerialNumber set to 0 in its EEPROM, an incorrect
value is read from the bcdDevice field of the USB descriptor, making it
look like an AM type chip. Attempt to correct this in
ftdi_determine_type() by attempting to read the latency timer for an AM
type chip if it has iSerialNumber set to 0. If that succeeds, assume it
is a BM type chip.

Currently, read_latency_timer() bails out without reading the latency
timer for an AM type chip, so factor out the guts of
read_latency_timer() into a new function _read_latency_timer() that
attempts to read the latency timer regardless of chip type, and returns
either the latency timer value or a negative error number.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 2dea7cd7 08-Mar-2017 Ian Abbott <abbotti@mev.co.uk>

USB: serial: ftdi_sio: don't access latency timer on old chips

The latency timer was introduced with the FT232BM and FT245BM chips. Do
not bother attempting to read or write it for older chip versions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Johan Hovold <johan@kernel.org>


# a6bb1e17 02-Feb-2017 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix line-status over-reporting

FTDI devices use a receive latency timer to periodically empty the
receive buffer and report modem and line status (also when the buffer is
empty).

When a break or error condition is detected the corresponding status
flags will be set on a packet with nonzero data payload and the flags
are not updated until the break is over or further characters are
received.

In order to avoid over-reporting break and error conditions, these flags
must therefore only be processed for packets with payload.

This specifically fixes the case where after an overrun, the error
condition is continuously reported and NULL-characters inserted until
further data is received.

Reported-by: Michael Walle <michael@walle.cc>
Fixes: 72fda3ca6fc1 ("USB: serial: ftd_sio: implement sysrq handling on
break")
Fixes: 166ceb690750 ("USB: ftdi_sio: clean up line-status handling")
Cc: stable <stable@vger.kernel.org> # v2.6.35
Signed-off-by: Johan Hovold <johan@kernel.org>


# 59556608 25-Jan-2017 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: clean up ioctl handler

Clean up the ioctl handler and make sure to pass an unsigned-int rather
than serial_struct pointer to the TIOCSERGETLSR helper as this it what
the user argument really is.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# c6dce262 25-Jan-2017 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix extreme low-latency setting

Since commit 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY
flag") the FTDI driver has been using a receive latency-timer value of
1 ms instead of the device default of 16 ms.

The latency timer is used to periodically empty a non-full receive
buffer, but a status header is always sent when the timer expires
including when the buffer is empty. This means that a two-byte bulk
message is received every millisecond also for an otherwise idle port as
long as it is open.

Let's restore the pre-2009 behaviour which reduces the rate of the
status messages to 1/16th (e.g. interrupt frequency drops from 1 kHz to
62.5 Hz) by not setting ASYNC_LOW_LATENCY by default.

Anyone willing to pay the price for the minimum-latency behaviour should
set the flag explicitly instead using the TIOCSSERIAL ioctl or a tool
such as setserial (e.g. setserial /dev/ttyUSB0 low_latency).

Note that since commit 0cbd81a9f6ba ("USB: ftdi_sio: remove
tty->low_latency") the ASYNC_LOW_LATENCY flag has no other effects but
to set a minimal latency timer.

Reported-by: Antoine Aubert <a.aubert@overkiz.com>
Fixes: 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag")
Cc: stable@vger.kernel.org # v2.6.31: e3e574ad85a2
Signed-off-by: Johan Hovold <johan@kernel.org>


# e3e574ad 12-Jan-2017 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix latency-timer error handling

Make sure to detect short responses when reading the latency timer to
avoid using stale buffer data.

Note that no heap data would currently leak through sysfs as
ASYNC_LOW_LATENCY is set by default.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 427c3a95 12-Jan-2017 Johan Hovold <johan@kernel.org>

USB: serial: ftdi_sio: fix modem-status error handling

Make sure to detect short responses when fetching the modem status in
order to avoid parsing uninitialised buffer data and having bits of it
leak to user space.

Note that we still allow for short 1-byte responses.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 2fbd69c4 08-Nov-2016 Johan Hovold <johan@kernel.org>

USB: serial: fix invalid user-pointer checks

Drop invalid user-pointer checks from ioctl handlers.

A NULL-pointer can be valid in user space and copy_to_user() takes care
of sanity checking.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 9bfef729 04-Nov-2016 Doug Brown <doug@schmorgal.com>

USB: serial: ftdi_sio: add support for TI CC3200 LaunchPad

This patch adds support for the TI CC3200 LaunchPad board, which uses a
custom USB vendor ID and product ID. Channel A is used for JTAG, and
channel B is used for a UART.

Signed-off-by: Doug Brown <doug@schmorgal.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# ca006f78 06-Oct-2016 Stefan Tauner <stefan.tauner@technikum-wien.at>

USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7

This adds support to ftdi_sio for the Infineon TriBoard TC2X7
engineering board for first-generation Aurix SoCs with Tricore CPUs.
Mere addition of the device IDs does the job.

Signed-off-by: Stefan Tauner <stefan.tauner@technikum-wien.at>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# ae34d12c 28-Jul-2016 Sheng-Hui J. Chu <s.jeffrey.chu@gmail.com>

USB: serial: ftdi_sio: add device ID for WICED USB UART dev board

BCM20706V2_EVAL is a WICED dev board designed with FT2232H USB 2.0
UART/FIFO IC.

To support BCM920706V2_EVAL dev board for WICED development on Linux.
Add the VID(0a5c) and PID(6422) to ftdi_sio driver to allow loading
ftdi_sio for this board.

Signed-off-by: Sheng-Hui J. Chu <s.jeffrey.chu@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 6977495c 28-Jul-2016 Robert Deliën <robert@delien.nl>

USB: serial: ftdi_sio: add PIDs for Ivium Technologies devices

Ivium Technologies uses the FTDI VID with custom PIDs for their line of
electrochemical interfaces and the PalmSens they developed for PalmSens
BV.

Signed-off-by: Robert Delien <robert@delien.nl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 3c77f7c9 09-Apr-2016 Julia Lawall <Julia.Lawall@lip6.fr>

USB: serial: ftdi_sio: constify ftdi_sio_quirk structures

The ftdi_sio_quirk structures are never modified, so declare them as
const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Johan Hovold <johan@kernel.org>


# ea6db90e 10-Mar-2016 Josh Boyer <jwboyer@fedoraproject.org>

USB: serial: ftdi_sio: Add support for ICP DAS I-756xU devices

A Fedora user reports that the ftdi_sio driver works properly for the
ICP DAS I-7561U device. Further, the user manual for these devices
instructs users to load the driver and add the ids using the sysfs
interface.

Add support for these in the driver directly so that the devices work
out of the box instead of needing manual configuration.

Reported-by: <thesource@mail.ru>
CC: stable <stable@vger.kernel.org>
Signed-off-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# fb571101 04-Feb-2016 Mathieu Othacehe <m.othacehe@gmail.com>

USB: serial: fix compare_const_fl.cocci warnings

Move constants to the right of binary operators where it increases
readability.

Generated by: scripts/coccinelle/misc/compare_const_fl.cocci

Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
[johan: drop some chunks and fix others, amend commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# e03cdf22 20-Jan-2016 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: ftdi_sio: add support for Yaesu SCU-18 cable

Harald Linden reports that the ftdi_sio driver works properly for the
Yaesu SCU-18 cable if the device ids are added to the driver. So let's
add them.

Reported-by: Harald Linden <harald.linden@7183.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 1fb8dc36 18-Aug-2015 Matthijs Kooijman <matthijs@stdin.nl>

USB: ftdi_sio: Added custom PID for CustomWare products

CustomWare uses the FTDI VID with custom PIDs for their ShipModul MiniPlex
products.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1df5b888 19-May-2015 Patrick Riphagen <patrick.riphagen@xsens.com>

USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board

This adds support for new Xsens device, Motion Tracker Development Board,
using Xsens' own Vendor ID

Signed-off-by: Patrick Riphagen <patrick.riphagen@xsens.com>
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>


# b229a0f8 23-Mar-2015 Doug Goldstein <cardoe@cardoe.com>

USB: ftdi_sio: Use jtag quirk for SNAP Connect E10

This patch uses the existing CALAO Systems ftdi_8u2232c_probe in order
to avoid attaching a TTY to the JTAG port as this board is based on the
CALAO Systems reference design and needs the same fix up.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
CC: stable <stable@vger.kernel.org>
[johan: clean up probe logic ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# 4899c054 15-Mar-2015 Doug Goldstein <cardoe@cardoe.com>

USB: ftdi_sio: Added custom PID for Synapse Wireless product

Synapse Wireless uses the FTDI VID with a custom PID of 0x9090 for their
SNAP Stick 200 product.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# c7d373c3 02-Mar-2015 Max Mansfield <max.m.mansfield@gmail.com>

usb: ftdi_sio: Add jtag quirk support for Cyber Cortex AV boards

This patch integrates Cyber Cortex AV boards with the existing
ftdi_jtag_quirk in order to use serial port 0 with JTAG which is
required by the manufacturers' software.

Steps: 2

[ftdi_sio_ids.h]
1. Defined the device PID

[ftdi_sio.c]
2. Added a macro declaration to the ids array, in order to enable the
jtag quirk for the device.

Signed-off-by: Max Mansfield <max.m.mansfield@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# f6950344 13-Feb-2015 Mark Glover <mark@actisense.com>

USB: ftdi_sio: add PIDs for Actisense USB devices

These product identifiers (PID) all deal with marine NMEA format data
used on motor boats and yachts. We supply the programmed devices to
Chetco, for use inside their equipment. The PIDs are a direct copy of
our Windows device drivers (FTDI drivers with altered PIDs).

Signed-off-by: Mark Glover <mark@actisense.com>
Cc: stable <stable@vger.kernel.org>
[johan: edit commit message slightly ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# 204ec6e0 17-Nov-2014 Troy Clark <tclark@matrixorbital.ca>

usb: serial: ftdi_sio: add PIDs for Matrix Orbital products

Add PIDs for new Matrix Orbital GTT series products.

Signed-off-by: Troy Clark <tclark@matrixorbital.ca>
Cc: stable <stable@vger.kernel.org>
[johan: shorten commit message ]
Signed-off-by: Johan Hovold <johan@kernel.org>


# 7f2719f0 22-Oct-2014 Perry Hung <iperry@gmail.com>

usb: serial: ftdi_sio: add "bricked" FTDI device PID

An official recent Windows driver from FTDI detects counterfeit devices
and reprograms the internal EEPROM containing the USB PID to 0, effectively
bricking the device.

Add support for this VID/PID pair to correctly bind the driver on these
devices.

See:
http://hackaday.com/2014/10/22/watch-that-windows-update-ftdi-drivers-are-killing-fake-chips/

Signed-off-by: Perry Hung <iperry@gmail.com>
Cc: stable <stable@vger.kernel.org>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# edd74ffa 10-Oct-2014 Frans Klaver <frans.klaver@xsens.com>

usb: serial: ftdi_sio: add Awinda Station and Dongle products

Add new IDs for the Xsens Awinda Station and Awinda Dongle.

While at it, order the definitions by PID and add a logical separation
between devices using Xsens' VID and those using FTDI's VID.

Cc: <stable@vger.kernel.org>
Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 9c491c37 07-Aug-2014 Taylor Braun-Jones <taylor.braun-jones@ge.com>

USB: ftdi_sio: Add support for GE Healthcare Nemo Tracker device

Signed-off-by: Taylor Braun-Jones <taylor.braun-jones@ge.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# ee444609 18-Aug-2014 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: add support for NOVITUS Bono E thermal printer

Add device id for NOVITUS Bono E thermal printer.

Reported-by: Emanuel Koczwara <poczta@emanuelkoczwara.pl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 646907f5 15-Aug-2014 Jaša Bartelj <jasa.bartelj@gmail.com>

USB: ftdi_sio: Added PID for new ekey device

Added support to the ftdi_sio driver for ekey Converter USB which
uses an FT232BM chip.

Signed-off-by: Jaša Bartelj <jasa.bartelj@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 6552cc7f 13-Aug-2014 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: add Basic Micro ATOM Nano USB2Serial PID

Add device id for Basic Micro ATOM Nano USB2Serial adapters.

Reported-by: Nicolas Alt <n.alt@mytum.de>
Tested-by: Nicolas Alt <n.alt@mytum.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>


# 4bdcde35 24-Jul-2014 Patrick Riphagen <patrick.riphagen@xsens.com>

USB: serial: ftdi_sio: Add support for new Xsens devices

This adds support for new Xsens devices, using Xsens' own Vendor ID.

Signed-off-by: Patrick Riphagen <patrick.riphagen@xsens.com>
Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d8279a40 10-Jul-2014 Michal Sojka <sojkam1@fel.cvut.cz>

USB: serial: ftdi_sio: Add Infineon Triboard

This adds support for Infineon TriBoard TC1798 [1]. Only interface 1
is used as serial line (see [2], Figure 8-6).

[1] http://www.infineon.com/cms/de/product/microcontroller/development-tools-software-and-kits/tricore-tm-development-tools-software-and-kits/starterkits-and-evaluation-boards/starter-kit-tc1798/channel.html?channel=db3a304333b8a7ca0133cfa3d73e4268
[2] http://www.infineon.com/dgdl/TriBoardManual-TC1798-V10.pdf?folderId=db3a304412b407950112b409ae7c0343&fileId=db3a304333b8a7ca0133cfae99fe426a

Signed-off-by: Michal Sojka <sojkam1@fel.cvut.cz>
Cc: Johan Hovold <johan@kernel.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5a7fbe7e 08-Jul-2014 Bert Vermeulen <bert@biot.com>

USB: ftdi_sio: Add extra PID.

This patch adds PID 0x0003 to the VID 0x128d (Testo). At least the
Testo 435-4 uses this, likely other gear as well.

Signed-off-by: Bert Vermeulen <bert@biot.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 19de4278 05-Jun-2014 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove redundant mtxorb quirk

Remove redundant mtxorb quirk used to fix up incorrect wMaxPacketSize,
which was added before 895f28badce9 ("USB: ftdi_sio: fix hi-speed device
packet size calculation") which does the same thing for all devices.

Signed-off-by: Johan Hovold <johan@kernel.org>


# 47e57595 05-Jun-2014 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: clean up ftdi_set_max_packet_size()

Code and comment style clean ups of ftdi_set_max_packet_size().

Signed-off-by: Johan Hovold <johan@kernel.org>


# a90d84ad 05-Jun-2014 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix max-packet-size warning

Promote max-packet-size-override message to warning level and use the
port device for logging, while using actual endpoint numbers in the
message itself.

Signed-off-by: Johan Hovold <johan@kernel.org>


# af6f9e83 05-Jun-2014 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: make port probe less verbose

There's no need to print the number of endpoints per interface or
endpoint wMaxPacketSize during port probe. This information is readily
available using lsusb should it ever be needed.

Note that this also fixes the wMaxPacketSize being incorrectly reported
on big-endian systems due to a missing le16_to_cpu().

Signed-off-by: Johan Hovold <johan@kernel.org>


# aea1ae87 05-Jun-2014 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix null deref at port probe

Fix NULL-pointer dereference when probing an interface with no
endpoints.

These devices have two bulk endpoints per interface, but this avoids
crashing the kernel if a user forces a non-FTDI device to be probed.

Note that the iterator variable was made unsigned in order to avoid
a maybe-uninitialized compiler warning for ep_desc after the loop.

Fixes: 895f28badce9 ("USB: ftdi_sio: fix hi-speed device packet size
calculation")

Reported-by: Mike Remski <mremski@mutualink.net>
Tested-by: Mike Remski <mremski@mutualink.net>
Cc: <stable@vger.kernel.org> # 2.6.31
Signed-off-by: Johan Hovold <johan@kernel.org>


# d0839d75 25-Apr-2014 George McCollister <george.mccollister@gmail.com>

USB: ftdi_sio: add NovaTech OrionLXm product ID

The NovaTech OrionLXm uses an onboard FTDI serial converter for JTAG and
console access.

Here is the lsusb output:
Bus 004 Device 123: ID 0403:7c90 Future Technology Devices
International, Ltd

Signed-off-by: George McCollister <george.mccollister@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# efe26e16 31-Mar-2014 Michele Baldessari <michele@acksyn.org>

USB: serial: ftdi_sio: add id for Brainboxes serial cards

Custom VID/PIDs for Brainboxes cards as reported in
https://bugzilla.redhat.com/show_bug.cgi?id=1071914

Signed-off-by: Michele Baldessari <michele@acksyn.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6dbd46c8 21-Feb-2014 Joerg Dorchain <joerg@dorchain.net>

USB: ftdi_sio: add Cressi Leonardo PID

Hello,

the following patch adds an entry for the PID of a Cressi Leonardo
diving computer interface to kernel 3.13.0.
It is detected as FT232RL.
Works with subsurface.

Signed-off-by: Joerg Dorchain <joerg@dorchain.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 76f24e3f 02-Feb-2014 Ulrich Hahn <uhahn@eanco.de>

USB: ftdi_sio: add Tagsys RFID Reader IDs

Adding two more IDs to the ftdi_sio usb serial driver.
It now connects Tagsys RFID readers.
There might be more IDs out there for other Tagsys models.

Signed-off-by: Ulrich Hahn <uhahn@eanco.de>
Cc: Johan Hovold <johan@hovold.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 67847bae 14-Jan-2014 Bjørn Mork <bjorn@mork.no>

usb: ftdi_sio: add Mindstorms EV3 console adapter

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 803a5362 08-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com>

usb: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c1f15196 06-Jan-2014 Colin Leitner <colin.leitner@googlemail.com>

USB: ftdi_sio: added CS5 quirk for broken smartcard readers

Genuine FTDI chips support only CS7/8. A previous fix in commit
8704211f65a2 ("USB: ftdi_sio: fixed handling of unsupported CSIZE
setting") enforced this limitation and reported it back to userspace.

However, certain types of smartcard readers depend on specific
driver behaviour that requests 0 data bits (not 5) to change into a
different operating mode if CS5 has been set.

This patch reenables this behaviour for all FTDI devices.

Tagged to be added to stable, because it affects a lot of users of
embedded systems which rely on these readers to work properly.

Cc: stable <stable@vger.kernel.org>
Reported-by: Heinrich Siebmanns <H.Siebmanns@t-online.de>
Tested-by: Heinrich Siebmanns <H.Siebmanns@t-online.de>
Signed-off-by: Colin Leitner <colin.leitner@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 10c642d0 29-Dec-2013 Johan Hovold <johan@kernel.org>

USB: serial: remove redundant OOM messages

Remove redundant error messages on allocation failures, which have
already been logged.

Cc: Joe Perches <joe@perches.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4d5147ec 29-Dec-2013 Johan Hovold <johan@kernel.org>

USB: serial: clean up ioctl debugging

Remove redundant ioctl debugging from subdrivers. The ioctl request code
has already been logged by usb-serial core.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5c6b98dd 29-Dec-2013 Johan Hovold <johan@kernel.org>

USB: serial: constify device-id tables

Declare device-id tables as const where possible.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8704211f 05-Nov-2013 Colin Leitner <colin.leitner@googlemail.com>

USB: ftdi_sio: fixed handling of unsupported CSIZE setting

FTDI UARTs support only 7 or 8 data bits. Until now the ftdi_sio driver would
only report this limitation for CS6 to dmesg and fail to reflect this fact to
tcgetattr.

This patch reverts the unsupported CSIZE setting and reports the fact with less
severance to dmesg for both CS5 and CS6.

To test the patch it's sufficient to call

stty -F /dev/ttyUSB0 cs5

which will succeed without the patch and report an error with the patch
applied.

As an additional fix this patch ensures that the control request will always
include a data bit size.

Signed-off-by: Colin Leitner <colin.leitner@gmail.com>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e1466ad5 01-Nov-2013 Алексей Крамаренко <alexeyk13@yandex.ru>

USB: serial: ftdi_sio: add id for Z3X Box device

Custom VID/PID for Z3X Box device, popular tool for cellphone flashing.

Signed-off-by: Alexey E. Kramarenko <alexeyk13@yandex.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d14654df 16-Sep-2013 Paul Chavent <Paul.Chavent@onera.fr>

USB: serial: call handle_dcd_change in ftdi driver.

When the device receive a DCD status change, forward the signal to the
USB serial system. This way, we can detect, for instance, PPS pulses.

Signed-off-by: Paul Chavent <paul.chavent@onera.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 154547c4 23-Aug-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: clean up attribute permissions

Clean up the DEVICE_ATTR usage in the USB serial drivers, making them
more obvious as to the permissions that the sysfs files should be.

Note: ftdi_sio.c still has a DEVICE_ATTR() used, that will have to wait
until after 3.12-rc1 comes out when DEVICE_ATTR_WO() shows up in Linus's
tree.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fed1f1ed 29-Jul-2013 Rick Farina (Zero_Chaos) <zerochaos@gentoo.org>

USB: serial: ftdi_sio: add more RT Systems ftdi devices

RT Systems makes many usb serial cables based on the ftdi_sio driver for
programming various amateur radios. This patch is a full listing of
their current product offerings and should allow these cables to all
be recognized.

Signed-off-by: Rick Farina (Zero_Chaos) <zerochaos@gentoo.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 28439882 26-Jun-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove unused defines

Remove some unused defines.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e17c1aa2 26-Jun-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove vendor/product module parameters

Remove the vendor and product module parameters which were added a long
time ago when we did not have the dynamic sysfs interface to add
new device ids (and which isn't limited to a single new vid/pid pair).

A vid/pid pair can be added dynamically using sysfs, for example:

echo 0403 1234 >/sys/bus/usb-serial/drivers/ftdi_sio/new_id

Also fix up the in-code comment that got the sysfs path wrong.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 3177130f 26-Jun-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove redundant raise of DTR/RTS at open

Do not raise DTR/RTS a second time in set_termios at open -- this has
already been taken care of by the tty layer.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# be0278cc 26-Jun-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: clean up device initialisation

Do not use zeroed termios data to determine when to unconditionally
configure the device at open.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 71381439 17-May-2013 Gomella, Andrew (NIH/NHLBI) [F] <andrew.gomella@nih.gov>

USB: ftdi_sio: Add support for Newport CONEX motor drivers

Here are two more devices that use FTDI USB-to-serial chips with new product ID's.

The devices are the Newport Conex-AGP and Conex-CC motor controllers.
(http://www.newport.com/CONEX-AGP-Integrated-Piezo-Motor-Rotation-Stages-/987623/1033/info.aspx)
(http://www.newport.com/CONEX-CC-DC-Servo-Controller-Actuators/934114/1033/info.aspx)

usb-devices command yields:

P: Vendor=104d ProdID=3002 Rev=06.00
S: Manufacturer=Newport
S: Product=CONEX-CC

as well as

P: Vendor=104d ProdID=3006 Rev=06.00
S: Manufacturer=Newport
S: Product=CONEX-AGP

Signed-off-by: Andrew Gomella <andrew.gomella@nih.gov>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a37025b5 05-May-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix chars_in_buffer overhead

Use the new generic usb-serial wait_until_sent implementation to wait
for hardware buffers to drain.

This removes the need to check the hardware buffers in chars_in_buffer
and thus removes the overhead introduced by commit 6f602912 ("usb:
serial: ftdi_sio: Add missing chars_in_buffer function") without
breaking tty_wait_until_sent (used by, for example, tcdrain, tcsendbreak
and close).

Reported-by: Stas Sergeev <stsp@list.ru>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c4133648 05-May-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: clean up get_modem_status

Use usb-serial port rather than tty as argument to get_modem_status.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 71d9a2b9 24-Apr-2013 Adrian Thomasset <adrian.thomasset@st.com>

USB: ftdi_sio: enable two UART ports on ST Microconnect Lite

The FT4232H used in the ST Micro Connect Lite has four hi-speed UART ports.
The first two ports are reserved for the JTAG interface.

We enable by default ports 2 and 3 as UARTs (where port 2 is a
conventional RS-232 UART)

Signed-off-by: Adrian Thomasset <adrian.thomasset@st.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 9f06d15f 22-Apr-2013 Adrian Thomasset <adrian.thomasset@st.com>

USB: ftdi_sio: correct ST Micro Connect Lite PIDs

The current ST Micro Connect Lite uses the FT4232H hi-speed quad USB
UART FTDI chip. It is also possible to drive STM reference targets
populated with an on-board JTAG debugger based on the FT2232H chip with
the same STMicroelectronics tools.

For this reason, the ST Micro Connect Lite PIDs should be
ST_STMCLT_2232_PID: 0x3746
ST_STMCLT_4232_PID: 0x3747

Signed-off-by: Adrian Thomasset <adrian.thomasset@st.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 58f8b6c4 06-Apr-2013 Stefani Seibold <stefani@seibold.net>

USB: add ftdi_sio USB ID for GDM Boost V1.x

This patch add a missing usb device id for the GDMBoost V1.x device

The patch is against 3.9-rc5

Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 482b0b5d 28-Mar-2013 Konstantin Holoborodko <klh.kernel@gmail.com>

usb: ftdi_sio: Add support for Mitsubishi FX-USB-AW/-BD

It enhances the driver for FTDI-based USB serial adapters
to recognize Mitsubishi Electric Corp. USB/RS422 Converters
as FT232BM chips and support them.
https://search.meau.com/?q=FX-USB-AW

Signed-off-by: Konstantin Holoborodko <klh.kernel@gmail.com>
Tested-by: Konstantin Holoborodko <klh.kernel@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 659597b7 20-Mar-2013 Johan Hovold <johan@kernel.org>

USB: serial: update copyright information

Update copyright information.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6f86fec9 20-Mar-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: switch to generic get_icount implementation

Switch to the generic get_icount implementation.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f307e5cd 20-Mar-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: switch to generic TIOCMIWAIT implementation

Switch to the generic TIOCMIWAIT implementation which does not suffer
from the races involved when using the deprecated sleep_on functions.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cb1676a6 20-Mar-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: use port icount

Use the port-data icount for interrupt counters.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 4cba98ff 20-Mar-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove obsolete port data refcounting

Remove the port data refcounting and release the private data
explicitly at port remove.

The port data refcounting was used to make sure the port data was not
freed until the last tty reference was closed. Since moving over to tty
ports, the underlying assumptions are no longer valid as close is now
called as part of tty port shutdown, which can occur before the final
tty reference is dropped on device disconnect.

This means that the private port data refcounting is now completely
useless, as the last reference will always be dropped on port_remove.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 71ccb9b0 19-Mar-2013 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix use-after-free in TIOCMIWAIT

Use the port wait queue and make sure to check the serial disconnected
flag before accessing private port data after waking up.

This is is needed as the private port data (including the wait queue
itself) can be gone when waking up after a disconnect.

When switching to tty ports, some lifetime assumptions were changed.
Specifically, close can now be called before the final tty reference is
dropped as part of hangup at device disconnect. Even with the ftdi
private-data refcounting this means that the port private data can be
freed while a process is sleeping on modem-status changes and thus
cannot be relied on to detect disconnects when woken up.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b2ca6990 13-Feb-2013 Johan Hovold <johan@kernel.org>

USB: serial: fix null-pointer dereferences on disconnect

Make sure serial-driver dtr_rts is called with disc_mutex held after
checking the disconnected flag.

Due to a bug in the tty layer, dtr_rts may get called after a device has
been disconnected and the tty-device unregistered. Some drivers have had
individual checks for disconnect to make sure the disconnected interface
was not accessed, but this should really be handled in usb-serial core
(at least until the long-standing tty-bug has been fixed).

Note that the problem has been made more acute with commit 0998d0631001
("device-core: Ensure drvdata = NULL when no driver is bound") as the
port data is now also NULL when dtr_rts is called resulting in further
oopses.

Reported-by: Chris Ruehl <chris.ruehl@gtsys.com.hk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 0ba3b2cc 01-Feb-2013 Petr Kubánek <petr@kubanek.net>

USB: ftdi_sio: add Zolix FTDI PID

Add support for Zolix Omni 1509 monochromator custom USB-RS232 converter.

Signed-off-by: Petr Kubánek <petr@kubanek.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c249f911 01-Feb-2013 Sven Killig <sven@killig.de>

USB: ftdi_sio: add PID/VID entries for ELV WS 300 PC II

Add PID/VID entries for ELV WS 300 PC II weather station

Signed-off-by: Sven Killig <sven@killig.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2e124b4a 03-Jan-2013 Jiri Slaby <jirislaby@kernel.org>

TTY: switch tty_flip_buffer_push

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

Now, the one where most of tty_port_tty_get gets removed:
tty_flip_buffer_push.

IOW we also closed all the races in drivers not using tty_port_tty_get
at all yet.

Also we move tty_flip_buffer_push declaration from include/linux/tty.h
to include/linux/tty_flip.h to all others while we are changing it
anyway.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 92a19f9c 03-Jan-2013 Jiri Slaby <jirislaby@kernel.org>

TTY: switch tty_insert_flip_char

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty in many
call sites. Only tty_port will needed and hence no more
tty_port_tty_get in those paths.

tty_insert_flip_char is the next one to proceed. This one is used all
over the code, so the patch is huge.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2f693357 03-Jan-2013 Jiri Slaby <jirislaby@kernel.org>

TTY: convert more flipping functions

Now, we start converting tty buffer functions to actually use
tty_port. This will allow us to get rid of the need of tty pointer in
many call sites. Only tty_port will be needed and hence no more
tty_port_tty_get calls in those paths.

Now 4 string flipping ones are on turn:
* tty_insert_flip_string_flags
* tty_insert_flip_string_fixed_flag
* tty_prepare_flip_string
* tty_prepare_flip_string_flags

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8cf65dc3 13-Jan-2013 Tomasz Mloduchowski <q@qdot.me>

usb: ftdi_sio: Crucible Technologies COMET Caller ID - pid added

Simple fix to add support for Crucible Technologies COMET Caller ID
USB decoder - a device containing FTDI USB/Serial converter chip,
handling 1200bps CallerID messages decoded from the phone line -
adding correct USB PID is sufficient.

Tested to apply cleanly and work flawlessly against 3.6.9, 3.7.0-rc8
and 3.8.0-rc3 on both amd64 and x86 arches.

Signed-off-by: Tomasz Mloduchowski <q@qdot.me>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d7e14b37 21-Nov-2012 Martin Teichmann <lkb.teichmann@gmail.com>

USB: ftdi_sio: Add support for Newport AGILIS motor drivers

The Newport AGILIS model AG-UC8 compact piezo motor controller
(http://search.newport.com/?q=*&x2=sku&q2=AG-UC8)
is yet another device using an FTDI USB-to-serial chip. It works
fine with the ftdi_sio driver when adding

options ftdi-sio product=0x3000 vendor=0x104d

to modprobe.d. udevadm reports "Newport" as the manufacturer,
and "Agilis" as the product name.

Signed-off-by: Martin Teichmann <lkb.teichmann@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1a88d5ee 22-Nov-2012 Peter Korsgaard <jacmet@sunsite.dk>

usb: ftdi_sio: fixup BeagleBone A5+ quirk

BeagleBone A5+ devices ended up getting shipped with the
'BeagleBone/XDS100V2' product string, and not XDS100 like it
was agreed, so adjust the quirk to match.

For details, see the thread on the beagle list:

https://groups.google.com/forum/#!msg/beagleboard/zrFPew9_Wvo/ibWr1-eE8JwJ

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5fb0432e 29-Oct-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: use ftdi_get_modem_status in chars_in_buffer

Use ftdi_get_modem_status to check hardware buffers in chars_in_buffer.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8da636d9 29-Oct-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: optimise chars_in_buffer

No need to check hardware buffers when we know that the software
buffers are non-empty.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 755b6040 29-Oct-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: use generic chars_in_buffer

Use generic chars_in_buffer rather than copying it's implementation.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a4afff6b 29-Oct-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: refactor modem-control status retrieval

Refactor modem-control status retrieval.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2c2ee545 29-Oct-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix tiocmget and tiocmset return values

Make sure we do not return USB-internal error codes to userspace.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fef0b828 29-Oct-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix tiocmget indentation

Align the modem-control status operands as was originally indented.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 81e84424 29-Oct-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove unused private port-data

Remove unused port field from private port data.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d067a315 29-Oct-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove unnecessary memset

No need to memset a kzalloced struct.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6f602912 10-Oct-2012 Jarkko Huijts <jarkko.huijts@gmail.com>

usb: serial: ftdi_sio: Add missing chars_in_buffer function

The driver does not wait until the hardware buffer (for data from the PC to the
UART line) is drained when tcdrain or close is called in an application.
Solution: Implement a chars_in_buffer function that checks both the software
and hardware buffer. If the TEMT (TX empty) bit of the line status register
indicates the hw buffer is not empty, let the function return at least 1. This
has been verified to work correctly with an FT232RL. The check on the hw buffer
can not be done for the original SIO device.

Signed-off-by: Jarkko Huijts <jarkko.huijts@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 54575b05 23-Sep-2012 Antonio Ospite <ospite@studenti.unina.it>

USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support

TIAO/DIYGADGET USB Multi-Protocol Adapter (TUMPA) is an FTDI FT2232H
based device which provides an easily accessible JTAG, SPI, I2C, serial
breakout.

http://www.diygadget.com/tiao-usb-multi-protocol-adapter-jtag-spi-i2c-serial.html
http://www.tiaowiki.com/w/TIAO_USB_Multi_Protocol_Adapter_User%27s_Manual

FTDI FT2232H provides two serial channels (A and B), but on the TUMPA
channel A is dedicated to JTAG/SPI while channel B can be used for
UART/RS-232: use the ftdi_jtag_quirk to expose only channel B as
a usb-serial interface to userspace.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1a71bd2e 18-Sep-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: ftdi_sio: remove startup message

No one needs to know that the driver is loaded (almost all other USB
serial drivers are now quiet), so just load quietly.

Also remove unused, and unneeded version information from the driver,
that was pointless.

Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e6e367b2 14-Sep-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: ftdi_sio.c: remove debug module parameter

Now that the dbg() macro is no longer being used in the driver,
the debug module parameter doesn't do anything at all. So remove
it so as to not confuse people.

CC: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
CC: Simon Arlott <simon@fire.lp0.eu>
CC: Andrew Worsley <amworsley@gmail.com>
CC: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# bfc51614 14-Sep-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: ftdi_sio.c: remove dbg() usage

dbg() was a very old USB-serial-specific macro.
This patch removes it from being used in the
driver and uses dev_dbg() instead.

CC: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
CC: Simon Arlott <simon@fire.lp0.eu>
CC: Andrew Worsley <amworsley@gmail.com>
CC: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# f08dea73 09-Sep-2012 Bjørn Mork <bjorn@mork.no>

USB: ftdi_sio: do not claim CDC ACM function

The Microchip vid:pid 04d8:000a is used for their CDC ACM
demo firmware application. This is a device with a single
function conforming to the CDC ACM specification and with
the intention of demonstrating CDC ACM class firmware and
driver interaction. The demo is used on a number of
development boards, and may also be used unmodified by
vendors using Microchip hardware.

Some vendors have re-used this vid:pid for other types of
firmware, emulating FTDI chips. Attempting to continue to
support such devices without breaking class based
applications that by matching on interface
class/subclass/proto being ff/ff/00. I have no information
about the actual device or interface descriptors, but this
will at least make the proper CDC ACM devices work again.
Anyone having details of the offending device's descriptors
should update this entry with the details.

Reported-by: Florian Wöhrl <fw@woehrl.biz>
Reported-by: Xiaofan Chen <xiaofanc@gmail.com>
Cc: stable <stable@vger.kernel.org>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Bruno Thomsen <bruno.thomsen@gmail.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 26a538b9 30-Aug-2012 Horst Schirmeier <horst@schirmeier.com>

USB: ftdi_sio: PID for NZR SEM 16+ USB

This adds the USB PID for the NZR SEM 16+ USB energy monitor device
<http://www.nzr.de>. It works perfectly with the GPL software on
<http://schou.dk/linux/sparometer/>.

Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# dafc4f7b 04-Sep-2012 Éric Piel <piel@delmic.com>

USB: ftdi-sio: add support for more Physik Instrumente devices

Commit b69cc672052540 added support for the E-861. After acquiring a C-867, I
realised that every Physik Instrumente's device has a different PID. They are
listed in the Windows device driver's .inf file. So here are all PIDs for the
current (and probably future) USB devices from Physik Instrumente.

Compiled, but only actually tested on the E-861 and C-867.

Signed-off-by: Éric Piel <piel@delmic.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a816e311 06-Aug-2012 Ying Xue <ying.xue@windriver.com>

USB: ftdi_sio: Quiet sparse noise about using plain integer was NULL pointer

Pointers should not be compared to plain integers.
Quiets the sparse warning:
warning: Using plain integer as NULL pointer

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 7724a1ed 10-Aug-2012 Ozan Çağlayan <ozancag@gmail.com>

USB: ftdi_sio: Add VID/PID for Kondo Serial USB

This adds VID/PID for Kondo Kagaku Co. Ltd. Serial USB Adapter
interface:
http://www.kondo-robot.com/EN/wp/?cat=28

Tested by controlling an RCB3 board using libRCB3.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# adc8d746 14-Jul-2012 Alan Cox <alan@linux.intel.com>

tty: move the termios object into the tty

This will let us sort out a whole pile of tty related races. The
alternative would be to keep points and refcount the termios objects.
However
1. They are tiny anyway
2. Many devices don't use the stored copies
3. We can remove a pty special case

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# e00a54d7 25-May-2012 Evan McNabb <evan@mcnabbs.org>

USB: ftdi-sio: Add support for RT Systems USB-RTS01 serial adapter

Add support for RT Systems USB-RTS01 USB to Serial adapter:
http://www.rtsystemsinc.com/Photos/USBRTS01.html

Tested by controlling Icom IC-718 amateur radio transceiver via hamlib.

Signed-off-by: Evan McNabb <evan@mcnabbs.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 68e24113 08-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: rework usb_serial_register/deregister_drivers()

This reworks the usb_serial_register_drivers() and
usb_serial_deregister_drivers() to not need a pointer to a struct
usb_driver anymore. The usb_driver structure is now created dynamically
and registered and unregistered as needed.

This saves lines of code in each usb-serial driver. All in-kernel users
of these functions were also fixed up at this time. The pl2303 driver
was tested that everything worked properly.

Thanks for the idea to do this from Alan Stern.

Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Support Department <support@connecttech.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: William Greathouse <wgreathouse@smva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# b69cc672 06-May-2012 Éric Piel <piel@delmic.com>

USB: ftdi-sio: add support for Physik Instrumente E-861

This adds VID/PID for the PI E-861. Without it, I had to do:
modprobe -q ftdi-sio product=0x1008 vendor=0x1a72

http://www.physikinstrumente.com/en/products/prdetail.php?sortnr=900610

Signed-off-by: Éric Piel <piel@delmic.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 32078f91 07-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: remove usb_serial_disconnect call in all drivers

This is now set by the usb-serial core, no need for the driver to
individually set it.

Thanks to Alan Stern for the idea to get rid of it.

Cc: William Greathouse <wgreathouse@smva.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Support Department <support@connecttech.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Julia Lawall <julia@diku.dk>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 5026bb07 07-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: serial: remove usb_serial_probe call in all drivers

This is now set by the usb-serial core, no need for the driver to
individually set it.

Thanks to Alan Stern for the idea to get rid of it.

Cc: William Greathouse <wgreathouse@smva.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Support Department <support@connecttech.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Julia Lawall <julia@diku.dk>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# a09aa7dd 03-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: ftdi_sio.c: remove dbg() tracing calls

dbg() was used a lot a long time ago to trace code flow. Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
CC: Simon Arlott <simon@fire.lp0.eu>
CC: Andrew Worsley <amworsley@gmail.com>
CC: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 876ae50d 26-Mar-2012 Simon Arlott <simon@octiron.net>

USB: ftdi_sio: fix race condition in TIOCMIWAIT, and abort of TIOCMIWAIT when the device is removed

There are two issues here, one is that the device is generating
spurious very fast modem status line changes somewhere:

CTS becomes high then low 18µs later:
[121226.924373] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=6
[121226.924378] ftdi_process_packet: status=10 prev=00 diff=10
[121226.924382] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=7
(wake_up_interruptible is called)
[121226.924391] ftdi_process_packet: prev rng=0 dsr=10 dcd=0 cts=7
[121226.924394] ftdi_process_packet: status=00 prev=10 diff=10
[121226.924397] ftdi_process_packet: now rng=0 dsr=10 dcd=0 cts=8
(wake_up_interruptible is called)

This wakes up the task in TIOCMIWAIT:
[121226.924405] ftdi_ioctl: 19451 rng=0->0 dsr=10->10 dcd=0->0 cts=6->8
(wait from 20:51:46 returns and observes both changes)

Which then calls TIOCMIWAIT again:
20:51:46.400239 ioctl(3, TIOCMIWAIT, 0x20) = 0
22:11:09.441818 ioctl(3, TIOCMGET, [TIOCM_DTR|TIOCM_RTS]) = 0
22:11:09.442812 ioctl(3, TIOCMIWAIT, 0x20) = -1 EIO (Input/output error)
(the second wake_up_interruptible takes effect and an I/O error occurs)

The other issue is that TIOCMIWAIT will wait forever (unless the task is
interrupted) if the device is removed.

This change removes the -EIO return that occurs if the counts don't
appear to have changed. Multiple counts may have been processed as
one or the waiting task may have started waiting after recording the
current count.

It adds a bool to indicate that the device has been removed so that
TIOCMIWAIT doesn't wait forever, and wakes up any tasks so that they can
return -EIO.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# fca5430d 26-Mar-2012 Simon Arlott <simon@octiron.net>

USB: ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNT

Handling of TIOCMIWAIT was changed by commit 1d749f9afa657f6ee9336b2bc1fcd750a647d157
USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers

FTDI_STATUS_B0_MASK does not indicate the changed modem status lines,
it indicates the value of the current modem status lines. An xor is
still required to determine which lines have changed.

The count was only being incremented if the line was high. The only
reason TIOCMIWAIT still worked was because the status packet is
repeated every 1ms, so the count was always changing. The wakeup
itself still ran based on the status lines changing.

This change fixes handling of updates to the modem status lines and
allows multiple processes to use TIOCMIWAIT concurrently.

Tested with two processes waiting on different status lines being
toggled independently.

Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 970e2486 30-Mar-2012 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Documentation: remove references to /etc/modprobe.conf

Usage of /etc/modprobe.conf file was deprecated by module-init-tools and
is no longer parsed by new kmod tool. References to this file are
replaced in Documentation, comments and Kconfig according to the
context.

There are also some references to the old /etc/modules.conf from 2.4
kernels that are being removed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Acked-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 57e596f3 15-Mar-2012 Michał Wróbel <michal.wrobel@flytronic.pl>

USB: ftdi_sio: new PID: LUMEL PD12

Signed-off-by: Michał Wróbel <michal.wrobel@flytronic.pl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# dc0827c1 14-Mar-2012 Jim Paris <jim@jtan.com>

USB: ftdi_sio: add support for FT-X series devices

Add PID 0x6015, corresponding to the new series of FT-X chips
(FT220XD, FT201X, FT220X, FT221X, FT230X, FT231X, FT240X). They all
appear as serial devices, and seem indistinguishable except for the
default product string stored in their EEPROM. The baudrate
generation matches FT232RL devices.

Tested with a FT201X and FT230X at various baudrates (100 - 3000000).

Sample dmesg:
ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
usb 2-1: new full-speed USB device number 6 using ohci_hcd
usb 2-1: New USB device found, idVendor=0403, idProduct=6015
usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 2-1: Product: FT230X USB Half UART
usb 2-1: Manufacturer: FTDI
usb 2-1: SerialNumber: DC001WI6
ftdi_sio 2-1:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: ftdi_sio_port_probe
drivers/usb/serial/ftdi_sio.c: ftdi_determine_type: bcdDevice = 0x1000, bNumInterfaces = 1
usb 2-1: Detected FT-X
usb 2-1: Number of endpoints 2
usb 2-1: Endpoint 1 MaxPacketSize 64
usb 2-1: Endpoint 2 MaxPacketSize 64
usb 2-1: Setting MaxPacketSize 64
drivers/usb/serial/ftdi_sio.c: read_latency_timer
drivers/usb/serial/ftdi_sio.c: write_latency_timer: setting latency timer = 1
drivers/usb/serial/ftdi_sio.c: create_sysfs_attrs
drivers/usb/serial/ftdi_sio.c: sysfs attributes for FT-X
usb 2-1: FTDI USB Serial Device converter now attached to ttyUSB0

Signed-off-by: Jim Paris <jim@jtan.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 47594d55 09-Mar-2012 Michał Wróbel <Michal.Wrobel@flytronic.pl>

USB: ftdi_sio: new PID: Distortec JTAG-lock-pick

Signed-off-by: Michał Wróbel <michal.wrobel@flytronic.pl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# c1cee1d8 04-Mar-2012 Bruno Thomsen <bruno.thomsen@gmail.com>

USB: Microchip VID mislabeled as Hornby VID in ftdi_sio.

Microchip VID (0x04d8) was mislabeled as Hornby VID according to USB-IDs.

A Full Speed USB Demo Board PID (0x000a) was mislabeled as
Hornby Elite (an Digital Command Controller Console for model railways).

Most likely the Hornby based their design on
PIC18F87J50 Full Speed USB Demo Board.

Signed-off-by: Bruno Thomsen <bruno.thomsen@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 444aa7fa 29-Feb-2012 Peter Korsgaard <jacmet@sunsite.dk>

USB: ftdi_sio: add support for BeagleBone rev A5+

BeagleBone changed to the default FTDI 0403:6010 id in rev A5 to make life
easier for Windows users, so we need a similar workaround as the Calao
board to support it.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 656d2b39 28-Feb-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: ftdi_sio: fix problem when the manufacture is a NULL string

On some misconfigured ftdi_sio devices, if the manufacturer string is
NULL, the kernel will oops when the device is plugged in. This patch
fixes the problem.

Reported-by: Wojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Tested-by: Wojciech M Zabolotny <W.Zabolotny@elka.pw.edu.pl>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 6d161b99 24-Feb-2012 Scott Dial <scott.dial@scientiallc.com>

usb-serial: Add support for the Sealevel SeaLINK+8 2038-ROHS device

This patch adds new device IDs to the ftdi_sio module to support
the new Sealevel SeaLINK+8 2038-ROHS device.

Signed-off-by: Scott Dial <scott.dial@scientiallc.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 97b6b6d2 23-Feb-2012 Alan Stern <stern@rowland.harvard.edu>

usb-serial: use new registration API in [d-h]* drivers

This patch (as1524) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:

digi_acceleport, empeg, ftdi_sio, funsoft, garmin_gps,
and hp4x.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 90451e69 03-Feb-2012 Milan Kocian <milon@wq.cz>

USB: usbserial: add new PID number (0xa951) to the ftdi driver

Signed-off-by: Milan Kocian <milon@wq.cz>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 2353f806 26-Jan-2012 Alan Cox <alan@linux.intel.com>

USB: ftdi_sio: Add more identifiers

0x04d8, 0x000a: Hornby Elite

Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# fc216ec3 17-Jan-2012 Peter Naulls <peter@chocky.org>

USB: serial: ftdi additional IDs

I tested this against 2.6.39 in the Ubuntu kernel, however I see the IDs
are not in latest 3.2 git.

This adds IDs for the FTDI controller in the Rainforest Automation
Zigbee dongle.

Signed-off-by: Peter Naulls <peter@chocky.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 55f13aea 18-Jan-2012 Peter Korsgaard <jacmet@sunsite.dk>

USB: ftdi_sio: add PID for TI XDS100v2 / BeagleBone A3

Port A for JTAG, port B for serial.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 108e02b1 17-Jan-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix initial baud rate

Fix regression introduced by commit b1ffb4c851f1 ("USB: Fix Corruption
issue in USB ftdi driver ftdi_sio.c") which caused the termios settings
to no longer be initialised at open. Consequently it was no longer
possible to set the port to the default speed of 9600 baud without first
changing to another baud rate and back again.

Reported-by: Roland Ramthun <mail@roland-ramthun.de>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Tested-by: Roland Ramthun <mail@roland-ramthun.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# eb833a9e 10-Jan-2012 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix TIOCSSERIAL baud_base handling

Return EINVAL if new baud_base does not match the current one.

The baud_base is device specific and can not be changed. This restores
the old (pre-2005) behaviour which was changed due to a
misunderstanding regarding this fact (see
https://lkml.org/lkml/2005/1/20/84).

Reported-by: Torbjörn Lofterud <torbjorn@pi.nxs.se>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 90ab5ee9 12-Jan-2012 Rusty Russell <rusty@rustcorp.com.au>

module_param: make bool parameters really bool (drivers & misc)

module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>


# 307369b0 30-Nov-2011 Marcin Kościelnicki <koriakin@0x04.net>

usb: ftdi_sio: add PID for Propox ISPcable III

Signed-off-by: Marcin Kościelnicki <koriakin@0x04.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c515598e 22-Nov-2011 Andrew Worsley <amworsley@gmail.com>

USB: serial: ftdi_sio: Handle the old_termios == 0 case e.g. uart_resume_port()

Handle null old_termios in ftdi_set_termios() calls from uart_resume_port().

Signed-off-by: Andrew Worsley <amworsley@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# b1ffb4c8 18-Nov-2011 Andrew Worsley <amworsley@gmail.com>

USB: Fix Corruption issue in USB ftdi driver ftdi_sio.c

Fix for ftdi_set_termios() glitching output

ftdi_set_termios() is constantly setting the baud rate, data bits and parity
unnecessarily on every call, . When called while characters are being
transmitted can cause the FTDI chip to corrupt the serial port bit stream
output by stalling the output half a bit during the output of a character.
Simple fix by skipping this setting if the baud rate/data bits/parity are
unchanged.

Signed-off-by: Andrew Worsley <amworsley@gmail.com>
Cc: stable <stable@vger.kernel.org>
----

I had a brief run with strace on the getty and it was doing ioctl()s on
each call but it didn't look relavant to the problem. I think the issue is
that XON/XOFF flow control was being implmented via hardware - for the ixoff
to allow the user to use XON/XOFF to control output. Unfortunately it would
send 3 Control URBs updating all of the settings after each piece of input

I am trying to work around the issue of gmail messing with the tab/spacing
by submitting via SMTP via gmail which I believe should fix the issue.

The patch is against v3.2-rc2 and compiles - but no additional testing in
this kernel has been done.

Thanks

Andrew
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 1d749f9a 10-Oct-2011 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

USB: ftdi_sio.c: Use ftdi async_icount structure for TIOCMIWAIT, as in other drivers

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 005b3cde 10-Oct-2011 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

USB: ftdi_sio.c:Fill MSR fields of the ftdi async_icount structure

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ac295f39 10-Oct-2011 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

USB: ftdi_sio.c: Fill LSR fields of the ftdi async_icount structure

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# da7fbb6d 10-Oct-2011 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

USB: ftdi_sio.c:Fill TX field of the ftdi async_icount structure

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c9222ec9 10-Oct-2011 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

USB: ftdi_sio.c: Fill the RX field of the ftdi async_icount structure

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c75ccd48 10-Oct-2011 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

USB: ftdi_sio.c: Basic icount infrastructure for ftdi_sio

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 3687f641 09-Oct-2011 Peter Stuge <peter@stuge.se>

USB: ftdi_sio: Support TI/Luminary Micro Stellaris BD-ICDI Board

Some Stellaris evaluation kits have the JTAG/SWD FTDI chip onboard,
and some, like EK-LM3S9B90, come with a separate In-Circuit Debugger
Interface Board. The ICDI board can also be used stand-alone, for
other boards and chips than the kit it came with. The ICDI has both
old style 20-pin JTAG connector and new style JTAG/SWD 10-pin 1.27mm
pitch connector.

Tested with EK-LM3S9B90, where the BD-ICDI board is included.

Signed-off-by: Peter Stuge <peter@stuge.se>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 74bdf22b 03-Oct-2011 Hakan Kvist <hakan.kvist@sonyericsson.com>

USB: ftdi_sio: add PID for Sony Ericsson Urban

Add PID 0xfc8a, 0xfc8b for device Sony Ericsson Urban

Signed-off-by: Hakan Kvist <hakan.kvist@sonyericsson.com>
Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c96fbdd0 25-Aug-2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

USB: ftdi_sio: add Calao reference board support

Calao use on there dev kits a FT2232 where the port 0 is used for the JTAG and
port 1 for the UART

They use the same VID and PID as FTDI Chip but they program the manufacturer
name in the eeprom

So use this information to detect it

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Gregory Hermant <gregory.hermant@calao-systems.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 29cc8897 23-Aug-2011 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

USB: use usb_endpoint_maxp() instead of le16_to_cpu()

Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size
instead of le16_to_cpu(desc->wMaxPacketSize).
This patch fix it up

Cc: Armin Fuerst <fuerst@in.tum.de>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Johannes Erdfelt <johannes@erdfelt.com>
Cc: Vojtech Pavlik <vojtech@suse.cz>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: David Kubicek <dave@awk.cz>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Brad Hards <bhards@bigpond.net.au>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Dahlmann <dahlmann.thomas@arcor.de>
Cc: David Brownell <david-b@pacbell.net>
Cc: David Lopo <dlopo@chipidea.mips.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Michal Nazarewicz <m.nazarewicz@samsung.com>
Cc: Xie Xiaobo <X.Xie@freescale.com>
Cc: Li Yang <leoli@freescale.com>
Cc: Jiang Bo <tanya.jiang@freescale.com>
Cc: Yuan-hsin Chen <yhchen@faraday-tech.com>
Cc: Darius Augulis <augulis.darius@gmail.com>
Cc: Xiaochen Shen <xiaochen.shen@intel.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: OKI SEMICONDUCTOR, <toshiharu-linux@dsn.okisemi.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Ben Dooks <ben@simtec.co.uk>
Cc: Thomas Abraham <thomas.ab@samsung.com>
Cc: Herbert Pötzl <herbert@13thfloor.at>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Roman Weissgaerber <weissg@vienna.at>
Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Tony Olech <tony.olech@elandigitalsystems.com>
Cc: Florian Floe Echtler <echtler@fs.tum.de>
Cc: Christian Lucht <lucht@codemercs.com>
Cc: Juergen Stuber <starblue@sourceforge.net>
Cc: Georges Toth <g.toth@e-biz.lu>
Cc: Bill Ryder <bryder@sgi.com>
Cc: Kuba Ober <kuba@mareimbrium.org>
Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ce7e9065 09-Aug-2011 Artur Zimmer <artur128@3dzimmer.de>

USB: Serial: Add PID(0xF7C0) to FTDI SIO driver for a zeitcontrol-device

Here is a patch for a new PID (zeitcontrol-device mifare-reader FT232BL(like FT232BM but lead free)).

Signed-off-by: Artur Zimmer <artur128@3dzimmer.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 0ee404cc 22-Jul-2011 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

usb: serial: ftdi_sio.c: For the FT232H FTDI_SIO_SET_BAUDRATE_REQUEST, index needs to be shifted too

the recent addition of the FT232H showed that baudrate was set wrong. See
gmane.linux.usb.general: "[ftdi_sio] FT232H support". With the old code,
the MSB of the 4 encoded fractional divider bits and more important the
clock predivider bits got lost. Adding the FT232H to the code patch were
these bits are shifted solves the problem. I verified baud rates with a
scope now.

I suspect, that the BM device probably needs these bits shifted too. But
there is no predivider bit, so this is not obvious, and a missing MSB of the
encoded fractional divider only shifts the resulting baudrate minimal.
The AM has only 3 bits of encoded fractional divider, so it is not impacted.

I have no BM device to test, so I only added a comment and left the code for
the BM untouched.

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 1862cdd5 11-Jul-2011 Ionut Nicu <ionut.nicu@cloudbit.ro>

USB: ftdi_sio: fix minor typo in get_ftdi_divisor

Even if it's unlikely for this to cause an error,
there is a typo in the code that uses the bitwise-AND
operator instead of the logical one.

Signed-off-by: Ionut Nicu <ionut.nicu@cloudbit.ro>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 309427b6 17-Jun-2011 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>

USB: Add new FT232H chip to drivers/usb/serial/ftdi_sio.c

appended patch adds support for the new FTDI FT232H chip. This chip is a
single channel version of the dual FT2232H/quad FT4232H, coming with it's
own default PID 0x6014 (FT2232H uses the same PID 0x6010 like FT2232C,
FT4232H has also it's own PID).

The patch was checked on an UM232H module and a terminal program with TX/RX
shorted to that typing in the terminal reproduced the characters.

Signed-off-by: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a26d31ce 07-Jun-2011 Steffen Sledz <sledz@dresearch-fe.de>

USB: serial: add another 4N-GALAXY.DE PID to ftdi_sio driver

E.g. newer CAN 2.0 A/B <=> USB 2.0 converters report idProduct=f3c2.

Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 37909fe5 19-Apr-2011 Benedek László <benedekl@gmail.com>

USB: serial: ftdi_sio: adding support for TavIR STK500

Adding support for the TavIR STK500 (id 0403:FA33)
Atmel AVR programmer device based on FTDI FT232RL.

Signed-off-by: Benedek László <benedekl@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c53c2fab 18-Mar-2011 Paul Friedrich <Paul.Friedrich@hameg.com>

USB: ftdi_sio: add ids for Hameg HO720 and HO730

usb serial: ftdi_sio: add two missing USB ID's for Hameg interfaces HO720
and HO730

Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 11a31d84 08-Apr-2011 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: add PID for OCT DK201 docking station

Add PID 0x0103 for serial port of the OCT DK201 docking station.

Reported-by: Jan Hoogenraad <jan@hoogenraad.net>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 5a9443f0 28-Mar-2011 Christian Simon <simon@swine.de>

USB: ftdi_sio: Added IDs for CTI USB Serial Devices

I added new ProdutIds for two devices from CTI GmbH Leipzig.

Signed-off-by: Christian Simon <simon@swine.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 25985edc 30-Mar-2011 Lucas De Marchi <lucas.demarchi@profusion.mobi>

Fix common misspellings

Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>


# b88ccf6f 09-Mar-2011 JF Argentino <jf.argentino@free.fr>

USB: serial: ftdi_sio: adding support for OLIMEX ARM-USB-OCD-H

Adding support for the OLIMEX ARM-USB-OCD-H JTAG device (id 15ba:002b)
based on FTDI FT2232H

Signed-off-by: JF Argentino <jf.argentino@free.fr>
Acked-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 00a0d0d6 14-Feb-2011 Alan Cox <alan@linux.intel.com>

tty: remove filp from the USB tty ioctls

We don't use it so we can trim it from here as we try and stamp the file
object dependencies out of the serial code.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 20b9d177 14-Feb-2011 Alan Cox <alan@linux.intel.com>

tiocmset: kill the file pointer argument

Doing tiocmget was such fun we should do tiocmset as well for the same
reasons

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 60b33c13 14-Feb-2011 Alan Cox <alan@linux.intel.com>

tiocmget: kill off the passing of the struct file

We don't actually need this and it causes problems for internal use of
this functionality. Currently there is a single use of the FILE * pointer.
That is the serial core which uses it to check tty_hung_up_p. However if
that is true then IO_ERROR is also already set so the check may be removed.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 28fe2eb0 27-Jan-2011 Michael Williamson <michael.h.williamson@gmail.com>

USB: ftdi_sio: Add VID=0x0647, PID=0x0100 for Acton Research spectrograph

Add the USB Vendor ID and Product ID for a Acton Research Corp.
spectrograph device with a FTDI chip for serial I/O.

Signed-off-by: Michael H Williamson <michael.h.williamson@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 6ec2f46c 29-Jan-2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

USB: ftdi_sio: add ST Micro Connect Lite uart support

on ST Micro Connect Lite we have 4 port
Part A and B for the JTAG
Port C Uart
Port D for PIO

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# f6c259a3 10-Jan-2011 Daniel Glöckner <dg@emlix.com>

USB: ftdi_sio: fix resolution of 2232H baud rate dividers

The 2232H high speed baud rates also support fractional baud
rate divisors, but when the performing the divisions before
the multiplication, the fractional bits are lost.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Acked-by: Mark Adamson <mark.adamson@ftdichip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a9d61bc4 17-Jan-2011 Pieter Maes <maescool@gmail.com>

USB: serial: Updated support for ICOM devices

I found the original patch on the db0fhn repeater wiki (couldn't find the email
of the origial author) I guess it was never commited.
I updated and added some Icom HAM-radio devices to the ftdi driver.
Added extra comments to make clear what devices it are.

Signed-off-by: Pieter Maes <maescool@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c466cd2b 16-Dec-2010 Greg Kroah-Hartman <gregkh@suse.de>

USB: serial: ftdi_sio: add support for TIOCSERGETLSR

Willem-Jan noticed that the ftdi_sio driver did not support the
TIOCSERGETLSR ioctl, and some userspace programs rely on it. This patch
adds the support.

Reported-by: Willem-Jan de Hoog <wdehoog@exalondelft.nl>
Tested-by: Willem-Jan de Hoog <wdehoog@exalondelft.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 5363cdc3 01-Dec-2010 Florian Faber <faberman@linuxproaudio.org>

USB: ftdi_sio: Add D.O.Tec PID

Add FTDI PID to identify D.O.Tec devices correctly.

Signed-off-by: Florian Faber <faberman@linuxproaudio.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 6fdbad80 24-Nov-2010 Jacques Viviers <jacques.viviers@gmail.com>

USB: serial: ftdi_sio: Vardaan USB RS422/485 converter PID added

Add the PID for the Vardaan Enterprises VEUSB422R3 USB to RS422/485
converter. It uses the same chip as the FTDI_8U232AM_PID 0x6001.

This should also work with the stable branches for:
2.6.31, 2.6.32, 2.6.33, 2.6.34, 2.6.35, 2.6.36

Signed-off-by: Jacques Viviers <jacques.viviers@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 28942bb6 17-Nov-2010 Michael Stuermer <ms@mallorn.de>

USB: ftdi_sio: Add ID for RT Systems USB-29B radio cable

Another variant of the RT Systems programming cable for ham radios.

Signed-off-by: Michael Stuermer <ms@mallorn.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7fea0f71 03-Nov-2010 Sebastien Bourdeauducq <sebastien@milkymist.org>

USB: ftdi_sio: add device IDs for Milkymist One JTAG/serial

Add the USB IDs for the Milkymist One FTDI-based JTAG/serial adapter
(http://projects.qi-hardware.com/index.php/p/mmone-jtag-serial-cable/)
to the ftdi_sio driver and disable the first serial channel (used as
JTAG from userspace).

Signed-off-by: Sebastien Bourdeauducq <sebastien@milkymist.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 0f266abd 19-Oct-2010 Greg Kroah-Hartman <gregkh@suse.de>

USB: ftdi_sio: add device ids for ScienceScope

This adds the requested device ids to the ftdi_sio driver.

Reported-by: Ewan Bingham <ewan@auc.co.uk>
Cc: Kuba Ober <kuba@mareimbrium.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c19db4c9 11-Oct-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: set device latency timeout at port probe

No need to set latency timeout at every open.

This also fixes an issue with the read latency being as high as 250ms
(instead of 1ms) for the first read after port probe.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 59c6ccd9 12-Oct-2010 Daniel Suchy <danny@danysek.cz>

USB: ftdi_sio: new VID/PIDs for various Papouch devices

This patch for FTDI USB serial driver ads new VID/PIDs used on various
devices manufactured by Papouch (http://www.papouch.com). These devices
have their own VID/PID, although they're using standard FTDI chip. In
ftdi_sio.c, I also made small cleanup to have declarations for all
Papouch devices together.

Signed-off-by: Daniel Suchy <danny@danysek.cz>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 99c1e4f8 27-Sep-2010 Rainer Keller <mail@rainerkeller.de>

USB: add PID for FTDI based OpenDCC hardware

The OpenDCC project is developing a new hardware. This patch adds its
PID to the list of known FTDI devices. The PID can be found at
http://www.opendcc.de/elektronik/usb/opendcc_usb.html

Signed-off-by: Rainer Keller <mail@rainerkeller.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 677aeafe 12-Sep-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: revert "USB: ftdi_sio: fix DTR/RTS line modes"

This reverts commit 6a1a82df91fa0eb1cc76069a9efe5714d087eccd.

RTS and DTR should not be modified based on CRTSCTS when calling
set_termios.

Modem control lines are raised at port open by the tty layer and should stay
raised regardless of whether hardware flow control is enabled or not.

This is in conformance with the way serial ports work today and many
applications depend on this behaviour to be able to talk to hardware
implementing hardware flow control (without the applications actually using
it).

Hardware which expects different behaviour on these lines can always
use TIOCMSET/TIOCMBI[SC] after port open to change them.

Reported-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Dave Mielke <dave@mielke.cc>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 3126d823 13-Sep-2010 Rich Mattes <richmattes@gmail.com>

USB: ftdi_sio: Add PID for accesio products

Adds support for Accesio USB to Serial adapters, which are built around
FTDI FT232 UARTs. Tested with the Accesio USB-COM-4SM.

Signed-off-by: Rich Mattes <richmattes@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 0bca1b91 16-Sep-2010 Alan Cox <alan@linux.intel.com>

tty: Convert the USB drivers to the new icount interface

Simple pasting job using the new ops function. Also fix a couple of devices
directly returning the internal struct (which happens at this point to match
for the fields that matter but isn't correct or futureproof)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 65737388 02-Sep-2010 Luke Lowrey <luke@chamsys.co.uk>

USB: ftdi_sio: Added custom PIDs for ChamSys products

Added the 0xDAF8 to 0xDAFF PID range for ChamSys limited USB interface/wing products

Signed-off-by: Luke Lowrey <luke@chamsys.co.uk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ea233f80 19-Aug-2010 Galen Seitz <galens@seitzassoc.com>

USB: ftdi_sio: add product ID for Lenz LI-USB

Add ftdi product ID for Lenz LI-USB, a model train interface. This
was NOT tested against 2.6.35, but a similar patch was tested with the
CentOS 2.6.18-194.11.1.el5 kernel. It wasn't clear to me what
ordering is being used in ftdi_sio.c, so I inserted the ID after another
model train entry(SPROG_II).

Signed-off-by: Galen Seitz <galens@seitzassoc.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 666cc076 10-Aug-2010 Martin Michlmayr <tbm@cyrius.com>

USB: ftdi_sio: Add ID for Ionics PlugComputer

Add the ID for the Ionics PlugComputer (<http://ionicsplug.com/>).

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# d1ab903d 18-Aug-2010 Michael Wileczka <mikewileczka@yahoo.com>

USB: ftdi_sio: fix endianess of max packet size

The USB max packet size (always little-endian) was not being byte
swapped on big-endian systems.

Applicable since [USB: ftdi_sio: fix hi-speed device packet size calculation] approx 2.6.31

Signed-off-by: Michael Wileczka <mikewileczka@yahoo.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 6ee9f4b4 17-Aug-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com>

USB: drop tty argument from usb_serial_handle_sysrq_char()

Since handle_sysrq() does not take tty as argument anymore we can
drop it from usb_serial_handle_sysrq_char() as well.

Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# b6180ef7 26-Jul-2010 dranch@trinnet.net <dranch@trinnet.net>

USB: ftdi_sio: device id for Navitator

This patch is to add a US Interface, Inc. "Navigator" USB device.
Specifically, it's a HAM Radio USB sound modem that also
incorporates three pairs of unique FTDI serial ports. The standard
Linux FTDI serial driver will only recognize the first two serial
ports of an unknown FDTI derived device and this patch adds in
recognition to these specific new IDs.

Signed-off-by: David A. Ranch <dranch@trinnet.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# afad1964 24-Jul-2010 John G. Rogers <jgrogers@gmail.com>

USB: serial: enabling support for Segway RMP in ftdi_sio

I have added the ProductID=0xe729 VendorID=FTDI_VID=0x0403 which will
enable support for the Segway Robotic Mobility Platform (RMP200) in the
ftdi_sio kernel module. Currently, users of the Segway RMP200 must use
a RUN+="/sbin/modprobe -q ftdi-sio product=0xe729 vendor=0x0403 in a
udev rule to get the ftdi_sio module to handle the usb interface and
mount it on /dev/ttyXXX. This is not a good solution because some users
will have multiple USB to Serial converters which will use the ftdi_sio
module.

Signed-off-by: John Rogers <jgrogers@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7f26b3a7 04-Aug-2010 Joe Perches <joe@perches.com>

drivers/usb: Remove unnecessary return's from void functions

Greg prefers this to go through the trivial tree.
http://lkml.org/lkml/2010/6/24/1

There are about 2500 void functions in drivers/usb
Only a few used return; at end of function.

Standardize them a bit.

Moved a statement down a line in drivers/usb/host/u132-hcd.c

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# fcc6cb78 21-Jul-2010 Corey Minyard <minyard@acm.org>

USB: FTDI: Add support for the RT System VX-7 radio programming cable

RT Systems has put out bunch of ham radio cables based on the FT232RL
chip. Each cable type has a unique PID, this adds one for the Yaesu VX-7
radios.

Signed-off-by: Corey Minyard <minyard@acm.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 77dbd74e 01-Jul-2010 Colin Leitner <colin.leitner@googlemail.com>

USB: ftdi_sio: support for Signalyzer tools based on FTDI chips

ftdi_sio: support for Signalyzer tools based on FTDI chips

This patch adds support for the Xverve Signalyzers.

Signed-off-by: Colin Leitner <colin.leitner@googlemail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 9a49a14d 18-Jun-2010 Daniel Sangorrin <daniel.sangorrin@gmail.com>

USB: serial: ftdi: correct merge conflict with CONTEC id

This patch corrects a problem with the merge of a previous
patch to add the CONTEC identifier.

I believe the merge problem occurred with the commit:
dee5658b482e9e2ac7d6205dc876fc11d4008138

Originally I submitted a patch and then they asked me to order the IDs
and resubmit, so did I. But unfortunately in the end somehow both
patches were merged.

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 6a1a82df 03-Jun-2010 Daniel Mack <daniel@caiaq.de>

USB: ftdi_sio: fix DTR/RTS line modes

Call set_mctrl() and clear_mctrl() according to the flow control mode
selected. This makes serial communication for FT232 connected devices
work when CRTSCTS is not set.

This fixes a regression introduced by 4175f3e31 ("tty_port: If we are
opened non blocking we still need to raise the carrier"). This patch
calls the low-level driver's dtr_rts() function which consequently sets
TIOCM_DTR | TIOCM_RTS. A later call to set_termios() without CRTSCTS in
cflags, however, does not reset these bits, and so data is not actually
sent out on the serial wire.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c1aa075a 18-May-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix legacy SIO-device header

Length field of header was incorrectly set to available payload space
rather than the actual payload size.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 3bb36aa2 17-May-2010 Greg Kroah-Hartman <gregkh@suse.de>

USB: ftdi_sio: checkpatch cleanups

Minor whitespace cleanups to make checkpatch happy.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 166ceb69 08-May-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: clean up line-status handling

Reverse priority of errors reported to ldisc so that it matches that of
other serial drivers (break takes precedence over parity, which takes
precedence over framing errors).

Also make sure overrun errors are handled as in other drivers, that is,
an overrun error is always reported and is not associated with any
received character (instead a NULL character with the TTY_OVERRUN flag
set is inserted).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 49b2597a 08-May-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: use tty_insert_flip_string_fixed_flag

Use tty_insert_flip_string_fixed_flag to report errors to line
discipline.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c23e5fc1 05-May-2010 Johan Hovold <johan@kernel.org>

USB: serial: remove multi-urb write from generic driver

Remove multi-urb write from the generic driver and simplify the
prepare_write_buffer prototype:

int (*prepare_write_buffer)(struct usb_serial_port *port,
void *dest, size_t size);

The default implementation simply fills dest with data from port write
fifo but drivers can override it if they need to process the outgoing
data (e.g. add headers).

Turn ftdi_sio into a generic fifo-based driver, which lowers CPU usage
significantly for small writes while retaining maximum throughput.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# e8770484 05-May-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: clean up SIO write support

The original SIO devices require a control byte for every packet
written. Clean up the unnecessarily messy implementation of this.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# d3901a06 05-May-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: switch to generic write implementation

Switch to the generic, multi-urb, write implementation.

Note that this will also make it fairly easy to use the generic
fifo-based write implementation: simply unset the multi_urb_write flag
and modify prepare_write_buffer (or unset if not using a legacy SIO
device). This may be desirable for instance on an embedded system where
optimal throughput at high baudrates may not be as important as other
factors (e.g. no allocations during runtime and less pressure on host
stack).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# e49bbce1 17-Mar-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix some coding style issues

Remove unnecessary comments stating function names at (some)
opening/closing braces.
Fix some whitespace issues.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 1b551015 17-Mar-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: switch to generic read implementation

Switch to generic read implementation and use process_read_urb to do
device specific processing (handle line status).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# bbcb2b90 17-Mar-2010 Johan Hovold <johan@kernel.org>

USB: serial: allow drivers to define bulk buffer sizes

Allow drivers to define custom bulk in/out buffer sizes in struct
usb_serial_driver. If not set, fall back to the default buffer size
which matches the endpoint size.

Three drivers are currently freeing the pre-allocated buffers and
allocating larger ones to achieve this at port probe (ftdi_sio) or even
at port open (ipaq and iuu_phoenix), which needless to say is suboptimal.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# bd5afa9e 08-Mar-2010 Jason Wessel <jason.wessel@windriver.com>

usb-serial: Use tty_port version console instead of usb_serial_port

Replace all instances of using the console variable in struct
usb_serial_port with the struct tty_port version.

CC: Alan Cox <alan@linux.intel.com>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Oliver Neukum <oliver@neukum.org>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: linux-usb@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 9c67d28e 13-Mar-2010 Alessio Igor Bogani <abogani@texware.it>

USB: ftdi_sio: Fix locking for change_speed() function

The change_speed() function should be serialized against multiple calls.
Use the cfg_lock mutex to do this.

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# dee5658b 11-Mar-2010 Daniel Sangorrin <daniel.sangorrin@gmail.com>

USB: serial: ftdi: add CONTEC vendor and product id

This is a patch to ftdi_sio_ids.h and ftdi_sio.c that adds identifiers for
CONTEC USB serial converter. I tested it with the device COM-1(USB)H

[akpm@linux-foundation.org: keep the VIDs sorted a bit]
Signed-off-by: Daniel Sangorrin <daniel.sangorrin@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Cc: Radek Liboska <liboska@uochb.cas.cz>
Cc: stable <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a880830e 25-Feb-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove obsolete check in unthrottle

No need to check ASYNCB_INITIALIZED anymore as commit
e1108a63e10d344284011cccc06328b2cd3e5da3 (usb_serial: Use the shutdown()
operation) make sure that there is no longer any call to unthrottle
after device specific close (in which the read urb is killed).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 04b922c4 25-Feb-2010 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove unused tx_bytes counter

Remove counter that is never exported.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 46b72d78 21-Feb-2010 Daniel Sangorrin <daniel.sangorrin@gmail.com>

USB: serial: ftdi: add CONTEC vendor and product id

This is a patch to ftdi_sio_ids.h and ftdi_sio.c that adds
identifiers for CONTEC USB serial converter. I tested it
with the device COM-1(USB)H

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 759f3634 05-Feb-2010 Joe Perches <joe@perches.com>

USB: serial: Remove unnecessary \n's from dbg uses

#define dbg adds the newline, messages shouldn't.
Converted dbg("%s", "some string") to dbg("some string")

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 9714080d 12-Feb-2010 Mitchell Solomon <mitchjs@rush2112.net>

USB: add new ftdi_sio device ids

PID patch for my products

Signed-off-by: Mitchell Solomon <mitchjs@rush2112.net>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# bd09a9f5 02-Feb-2010 Alessio Igor Bogani <abogani@texware.it>

USB: ftdi_sio: Replace BKL with a mutex

As Alan Cox have pinpointed the driver still required protection against
parallels calls to the config ioctl(). If lock is still necessary the use of
BKL is abused here. So replace BKL with a more convenient mutex.

Signed-off-by: Alessio Igor Bogani <abogani@texware.it>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Alan Cox <alan@linux.intel.com>
Cc: Daniel Mack <daniel@caiaq.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 330e3c4c 17-Jan-2010 Andreas Mohr <andi@lisas.de>

USB: ftdi_sio: correct spelling in implementation file

- correct spelling
- correct non-tabbed .tiocmget/.tiocmset entries


Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c1284d77 23-Dec-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove unnecessary initialisations

Return values are being initialised to zero only to be unconditionally
assigned to a few instructions later. This may give the impression that
zero is returned on success, which is not the case.

Note also that ftdi_NDI_device_setup never reports errors.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a3f8168b 23-Dec-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: clean up modem status handling

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 66e47e60 23-Dec-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix DMA buffers on stack

Also remove unnecessary buffer allocations for zero-length transfers.

Reported-by: Matti Aarnio <matti.aarnio@zmailer.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 54f328d0 23-Dec-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix latency-timeout endianess bug

Also fixes DMA transfer to stack for latency buffer.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 4357369d 23-Dec-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: use error code from usb stack in read_latency_timer

Use same semantics as for write_latency_timer.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# cabe6cc2 24-Nov-2009 Mark Adamson <mark.adamson@ftdichip.com>

USB: ftdi_sio: remove support for 5 and 6 data bits

Removed CS5 and CS6 from data bits since these are not supported
in FTDI hardware.


Signed-off-by: Mark J. Adamson <mark.adamson@ftdichip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 8c4f99cd 22-Nov-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix initialisation of latency timeout

Latency timeout was read but never stored on port probe. When
ASYNC_LOW_LATENCY was cleared the device timeout would get set to 0
rather than the default 16ms.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 0076b4be 22-Nov-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove obsolete comment

We always push characters to ldisc immediately regardless of
ASYNC_LOW_LATENCY.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# e2b5cbfe 22-Nov-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: fix error message on close

Resubmitting read urb fails with -EPERM if completion handler runs while
urb is being killed on close. This should not be reported as an error.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 65e1ec67 17-Jan-2010 Andreas Mohr <andi@lisas.de>

USB: ftdi_sio: add device IDs (several ELV, one Mindstorms NXT)

- add FTDI device IDs for several ELV devices and NXTCam of Lego Mindstorms NXT
- add hopefully helpful new_id comment
- remove less helpful "Due to many user requests for multiple ELV devices we enable
them by default." comment (we simply add _all_ known devices - an
enduser shouldn't have to fiddle with obscure module parameters...).
- add myself to DRIVER_AUTHOR

The missing NXTCam ID has been found at
http://www.unixboard.de/vb3/showthread.php?t=44155
, ELV devices taken from ELV Windows .inf file.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a7787e50 27-Jan-2010 Radek Liboska <liboska@uochb.cas.cz>

USB: ftdi_sio: new device id for papouch AD4USB

added new device pid (PAPOUCH_AD4USB_PID) to ftdi_sio.h and ftdi_sio.c

AD4USB measuring converter is a 4-input A/D converter which enables the
user to measure to four current inputs ranging from 0(4) to 20 mA or
voltage between 0 and 10 V. The measured values are then transferred to
a superior system in digital form. The AD4USB communicates via USB.
Powered is also via USB. datasheet in english is here:
http://www.papouch.com/shop/scripts/pdf/ad4usb_en.pdf


Signed-off-by: Radek Liboska <liboska@uochb.cas.cz>


# 31844d55 16-Dec-2009 Andreas Mohr <andi@lisas.de>

USB: ftdi_sio: isolate all device IDs to new ftdi_sio_ids.h header

This is a strictly move-only patch to relocate all FTDI device
product ID definitions to their own ftdi_sio_ids.h header
(following the usual *_ids.h kernel tree convention, too),
thus correcting the slightly too messy appearance
(crucial driver defines were stuck somewhere in the decaying middle swamp
of the huge existing header).

Compile-tested, based on latest mainline git.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a8cbd90a 01-Dec-2009 Cliff Brake <cbrake@bec-systems.com>

USB: ftdi_sio: add USB device ID's for B&B Electronics line

Reviewed-by: John Pilles <jpilles@bb-elec.com>
Signed-off-by: Cliff Brake <cbrake@bec-systems.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 38fcb830 05-Oct-2009 Roland Koebler <r.koebler@yahoo.de>

USB: serial: ftdi_sio: add space/mark parity

Add mark and space parity, since the device supports it.

Signed-off-by: Roland Koebler <r.koebler@yahoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 0de6ab8b 17-Nov-2009 Eric W. Biederman <ebiederm@xmission.com>

USB: ftdi_sio: Keep going when write errors are encountered.

The use of urb->actual_length to update tx_outstanding_bytes
implicitly assumes that the number of bytes actually written is the
same as the number of bytes we tried to write. On error that
assumption is violated so just use transfer_buffer_length the number
of bytes we intended to write to the device.

If an error occurs we need to fall through and call
usb_serial_port_softint to wake up processes waiting in
tty_wait_until_sent.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# cc01f17d 07-Oct-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: re-implement read processing

- Re-structure read processing.
- Kill obsolete work queue and always push to tty in completion handler.
- Use tty_insert_flip_string instead of per character push when
possible.
- Fix stalled-read regression in 2.6.31 by using urb status to
determine when port is closed rather than port count.
- Fix race with open/close by checking ASYNCB_INITIALIZED in
unthrottle.
- Kill private rx_flag and lock and use throttle flags in
usb_serial_port instead.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# e63e278b 07-Oct-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: clean up read completion handler

Remove superfluous error checks in completion handler:

- No need to check private data and urb pointers as we check urb-status
before dereferencing priv (which is not freed until urb has been killed
on close).
- No need to check tty as it is checked again when processing.
- No need to check urb->number_of_packets on bulk urb.

Note that both private data and tty are checked again before processing
(possibly from work queue which also is cancelled on close).

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 63b00612 07-Oct-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove unused rx_byte counter

Remove unused rx_byte counter which is never exposed as noted by Alan
Cox.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 0cbd81a9 07-Oct-2009 Johan Hovold <johan@kernel.org>

USB: ftdi_sio: remove tty->low_latency

Fixes tty_flip_buffer_push being called from hard interrupt context with
low_latency set.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 11eaf170 14-Sep-2009 Michael Hennerich <michael.hennerich@analog.com>

USB: serial: ftdi: handle gnICE+ JTAG adaptors

Detect the UART on interface1 and blacklist interface0 (as that is the
JTAG port).

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ec3815c3 03-Sep-2009 mail@rainerkeller.de <mail@rainerkeller.de>

USB: add PIDs for FTDI based OpenDCC hardware

Some devices from the OpenDCC project are missing in the list
of the FTDI PIDs. These PIDs are listed at
http://www.opendcc.de/elektronik/usb/opendcc_usb.html
(Sorry for the german only page.)
This patch adds the three missing devices.

Signed-off-by: Rainer Keller <mail@rainerkeller.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# e7d7fcc0 27-Aug-2009 Pawel Ludwikow <pludwiko@rab.ict.pwr.wroc.pl>

USB: serial: ftdi_sio: new hardware support - hameg power supply

I'd like to present my small patch enabling to use Hameg HM8143 programmable
power supply with linux.

Signed-off-by: Pawel Ludwikow <pludwiko@rab.ict.pwr.wroc.pl>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a509a7e4 19-Sep-2009 Alan Cox <alan@linux.intel.com>

tty: USB does not need the filp argument in the drivers

And indeed none of them use it. Clean this up as it will make moving to a
standard open method rather easier.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 50d0678e 07-Aug-2009 Dhaval Vasa <dhaval.vasa@einfochips.com>

USB: ftdi_sio: add product_id for Marvell OpenRD Base, Client

reference:
http://www.open-rd.org

Signed-off-by: Dhaval Vasa <dhaval.vasa@einfochips.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c47aacc6 31-Jul-2009 Marko Hänninen <bugitus@gmail.com>

USB: ftdi_sio: add vendor and product id for Bayer glucose meter serial converter cable

Attached patch adds USB vendor and product IDs for Bayer's USB to serial
converter cable used by Bayer blood glucose meters. It seems to be a
FT232RL based device and works without any problem with ftdi_sio driver
when this patch is applied. See: http://winglucofacts.com/cables/


Signed-off-by: Marko Hänninen <bugitus@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# fca4404c 14-Jul-2009 Ville Sundberg <vsundber@gmail.com>

USB: ftdi_sio: Add support for GN Otometrics Aurical USB Audiometer

The patch adds support for the GN Otometrics Aurical USB Audiometer
(FT232BM-based).
A new VID and a new PID is added.

Signed-off-by: Ville Sundberg <vsundber@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 14511412 09-Jul-2009 Krzysztof Halasa <khc@pm.waw.pl>

USB serial: Add ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter.

Adds USB ID for Turtelizer, an FT2232L-based JTAG/RS-232 adapter.

Signed-off-by: Krzysztof Ha³asa <khc@pm.waw.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# b760dac2 02-Jul-2009 Martin Geleynse <mgeleyns@ndigital.com>

USB: ftdi: support NDI devices

It enhances the driver for FTDI-based USB serial adapters to recognize and
support Northern Digital Inc (NDI) measurement equipment. NDI has been
providing this patch for various kernel flavors for several years and we would
like to see these changes built in to the driver so that our equipement works
without the need for customers to patch the kernel themselves.

The patch makes small modifications to 2 files: ./drivers/usb/serial/ftdi_sio.c
and ./drivers/usb/serial/ftdi_sio.h. It accomplishes 3 things:

1. Define the VID and PIDs to allow the driver to recognize the NDI devices.
2. Map the 19200 baud rate setting to our higher baud rate of 1.2Mb
We would have chosen to map 38400 to the higher rate, similar to what
several other vendors have done, but some of our legacy customers actually
use 38400, therefore we remap 19200 to the higher rate.
3. We set the default transmit latency in the FTDI chip to 1ms for our devices.
Our devices are typically polled at 60Hz and the default ftdi latency
seriously affects turn-around time and results in missed data frames. We
have created a modprobe option that allows this setting to be increased.
This has proven necessary particularly in some virtualized environments.

Signed-off-by: Martin P. Geleynse <mgeleyns@ndigital.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# b34efeea 19-Jun-2009 Folkert van Heusden <folkert@vanheusden.com>

USB: serial: FTDI with product code FB80 and vendor id 0403

It seems an USB device with vendor id 0403 and product code FB80 has an
FTDI serial io chip as well: http://ftdichip.com/Drivers/D2XX.htm
This device in fact is a true random generantor by comsci:
http://comscire.com/Products/R2000KU/
So the following patch should add support for this device if I am
correct. Not tested as I do not own this device (I would like support in
the kernel so that my entropybroker application (which distributes
entrop data (random values) between servers and clients)).


From: Folkert van Heusden <folkert@vanheusden.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 9d37ff64 10-Jun-2009 Jan Capek <jan@ccsinfo.com>

USB: ftdi_sio - product ID's for CCS PIC programmers

The product ID's for the following devices have been added:
- LOAD-n-GO
- ICD-U64
- PRIME-8

Signed-off-by: Jan Capek <jan@ccsinfo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 405f5571 11-Jul-2009 Alexey Dobriyan <adobriyan@gmail.com>

headers: smp_lock.h redux

* Remove smp_lock.h from files which don't need it (including some headers!)
* Add smp_lock.h to files which do need it
* Make smp_lock.h include conditional in hardirq.h
It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

This will make hardirq.h inclusion cheaper for every PREEMPT=n config
(which includes allmodconfig/allyesconfig, BTW)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 24a15a62 09-Jul-2009 Alan Cox <alan@linux.intel.com>

tty: Fix USB kref leak

The sysrq code acquired a kref leak. Fix it by passing the tty separately
from the caller (thus effectively using the callers kref which all the
callers hold anyway)

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# f9c99bb8 02-Jun-2009 Alan Stern <stern@rowland.harvard.edu>

USB: usb-serial: replace shutdown with disconnect, release

This patch (as1254) splits up the shutdown method of usb_serial_driver
into a disconnect and a release method.

The problem is that the usb-serial core was calling shutdown during
disconnect handling, but drivers didn't expect it to be called until
after all the open file references had been closed. The result was an
oops when the close method tried to use memory that had been
deallocated by shutdown.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 72fda3ca 11-May-2009 Jason Wessel <jason.wessel@windriver.com>

USB: serial: ftd_sio: implement sysrq handling on break

Change driver to make use of the new functions in
include/linux/usb/serial.h so as to allow the driver to handle the
sysrq

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 87c1edd2 11-May-2009 Jason Wessel <jason.wessel@windriver.com>

USB: serial: ftd_sio usb: move status check

Alan Stern commented that the private driver counts must be updated
regard less of the status return on the urb when the write call back
is executed.

This patch alters the behavior to update the private driver counts by
simply moving the status check to after the driver count update.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 895f28ba 01-May-2009 Mark Adamson <mark.adamson@ftdichip.com>

USB: ftdi_sio: fix hi-speed device packet size calculation

Added a function to set the packet size to be used based on the value from the
device endpoint descriptor. The FT2232H and FT4232H hi-speed devices will have
wMaxPacketSize of 512 bytes when connected to a USB 2.0 hi-speed host, but will
use alternative descriptors with wMaxPacketSize of 64 bytes if connected to a
USB 1.1 host or hub. All other FTDI devices have wMaxPacketSize of 64 bytes,
except some FT232R and FT245R devices which customers have mistakenly
programmed to have wMaxPacketSize of 0 - this is an error and will be
overridden to use wMaxPacketSize of 64 bytes. The packet size used is
important as it determines where the driver removes the status bytes from the
incoming data. If it is incorrect, it will lead to data corruption.


Signed-off-by: Mark J. Adamson <mark.adamson@ftdichip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 094c2e6d 09-Apr-2009 Mark Adamson <mark.adamson@ftdichip.com>

USB: serial: FTDI: add high speed device support

Added support for FTDI's USB 2.0 hi-speed devices - FT2232H (2
interfaces) and FT4232H (4 interfaces), including a new baud rate
calculation for these devices which can now achieve up to 12Mbaud by
turning off a divide by 2.5 in the baud rate generator of the chips. In
order to achieve baud rates of <1200 baud, the divide by 2.5 must be
active. The default product ID of the FT2232H is 0x6010 (same as the
FT2232C IC). The default PID of the FT4232H is 0x6011.


Signed-off-by: Mark J. Adamson <mark.adamson@ftdichip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# d46130ab 13-May-2009 Daniel Suchy <danny@danysek.cz>

USB: FTDI-SIO new device ids

I would like to have added new device to usbserial/ftdi_sio driver.
These ids used USB track device (http://www.l-and-b.dk/access_alt.html).
They use differend device IDs, but it works as standard usb-serial
conventer.

From: Daniel Suchy <danny@danysek.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7e9cd3a6 11-Jun-2009 Alan Cox <alan@linux.intel.com>

ftdi_sio: don't override modem bits

The new open/close logic handles DTR and friends, so don't do it in our own
open routine as well.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 557aaa7f 11-Jun-2009 Alan Cox <alan@linux.intel.com>

ft232: support the ASYNC_LOW_LATENCY flag

This allows users to use the standard setserial command with this FT232
feature as well as obscure chip specific interfaces we have now. We keep
track of and respect the sysfs value for non-low-latency cases. In theory we
could do smart stuff with VTIME and the like but this seems of questionable
worth.

Closes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=9120
Signed-off-by: Alan Cox <alan@linux.intel.com)
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 335f8514 10-Jun-2009 Alan Cox <alan@lxorguk.ukuu.org.uk>

tty: Bring the usb tty port structure into more use

This allows us to clean stuff up, but is probably also going to cause
some app breakage with buggy apps as we now implement proper POSIX behaviour
for USB ports matching all the other ports. This does also mean other apps
that break on USB will now work properly.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 80193195 18-May-2009 David Woodhouse <dwmw2@infradead.org>

Fix oops on close of hot-unplugged FTDI serial converter

Commit c45d6320 ("fix reference counting of ftdi_private") stopped
ftdi_sio_port_remove() from directly freeing the port-private data, with
the intention if the port was still open, it would be freed when
ftdi_close() is eventually called and releases the last refcount on the
structure.

That's all very well, but ftdi_sio_port_remove() still contains a call
to usb_set_serial_port_data(port, NULL) -- so by the time we get to
ftdi_close() for the port which was unplugged, it _still_ oopses on
dereferencing that NULL pointer, as it did before (and does in 2.6.29).

The fix is just not to clear the private data in ftdi_sio_port_remove().
Then the refcount is properly reduced to zero when the final kref_put()
happens in ftdi_close().

Remove a bogus comment too, while we're at it. And stop doing things
inside "if (priv)" -- it must _always_ be there.

Based loosely on an earlier patch by Daniel Mack, and suggestions by
Alan Stern.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Tested-by: Daniel Mack <daniel@caiaq.de>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# c45d6320 30-Apr-2009 Alan Stern <stern@rowland.harvard.edu>

usb-serial: ftdi_sio: fix reference counting of ftdi_private

This patch (as1238) adds proper reference counting for ftdi_sio's
private data structure. Without it, the driver will free the
structure while it is still in use if the user unplugs the serial
device before closing the device file.

The patch also replaces a slightly dangerous
cancel_delayed_work/flush_scheduled_work pair with
cancel_delayed_work_sync, which is always safer.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: Daniel Mack <daniel@caiaq.de>
Tested-by: Daniel Mack <daniel@caiaq.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 1002bb77 23-Apr-2009 Nicolas Pitre <nico@cam.org>

USB: ftdi_sio: add vendor/product id for the Marvell SheevaPlug

For reference:
http://www.marvell.com/products/embedded_processors/developer/kirkwood/sheevaplug.jsp

Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ae27d843 25-Mar-2009 Peter Korsgaard <jacmet@sunsite.dk>

USB: ftdi_sio: add vendor/project id for JETI specbos 1201 spectrometer

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 8c209e67 06-Mar-2009 Greg Kroah-Hartman <gregkh@suse.de>

USB: make actual_length in struct urb field u32

actual_length should also be a u32 and not a signed value. This patch
changes this field to be 'u32' to prevent any potential negative
conversion and comparison errors.

This triggered a few compiler warning messages when these fields were
being used with the min macro, so they have also been fixed up in this
patch.

Cc: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 5d1ca6cf 06-Feb-2009 David Brownell <dbrownell@users.sourceforge.net>

USB: ftdi_sio: remove pointless syslog spew

Remove some pointless messages from the FTDI serial driver;
I found these filling up syslog on one system. Also remove
a pointless "break" after a "return" in the same area.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 00185a60 21-Dec-2008 Julia Lawall <julia@diku.dk>

USB: Remove redundant test in pxa27x_udc and ftdi_sio

priv is checked not to be NULL near the beginning of the function and not
changed subsequently, making the test redundant.

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

// <smpl>
@r exists@
local idexpression x;
expression E;
position p1,p2;
@@

if (x@p1 == NULL || ...) { ... when forall
return ...; }
... when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\)
(
x@p2 == NULL
|
x@p2 != NULL
)

// another path to the test that is not through p1?
@s exists@
local idexpression r.x;
position r.p1,r.p2;
@@

... when != x@p1
(
x@p2 == NULL
|
x@p2 != NULL
)

@fix depends on !s@
position r.p1,r.p2;
expression x,E;
statement S1,S2;
@@

(
- if ((x@p2 != NULL) || ...)
S1
|
- if ((x@p2 == NULL) && ...) S1
|
- BUG_ON(x@p2 == NULL);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# b0d65900 06-Mar-2009 Michael Hennerich <michael.hennerich@analog.com>

USB: serial: ftdi: enable UART detection on gnICE JTAG adaptors blacklist interface0

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7f82b6dd 05-Mar-2009 Axel Wachtler <axel.wachtler@atmel.com>

USB: serial: add FTDI USB/Serial converter devices

Add the following devices to the USB FTDI SIO device table:

Bus 001 Device 009: ID 03eb:2109 Atmel Corp.
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4187

Bus 001 Device 008: ID 1cf1:0001
http://www.dresden-elektronik.de/shop/prod75.html

Bus 001 Device 007: ID 1c1f:0004
http://www.dresden-elektronik.de/shop/prod64.html

Signed-off-by: Axel Wachtler <axel.wachtler@atmel.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 64905b48 03-Feb-2009 Dan Carpenter <error27@gmail.com>

USB: ftdi_sio: unlock_kernel() on error in set_serial_info()

There was one error path where unlock_kernel() wasn't called.

This was found with a code checker (http://repo.or.cz/w/smatch.git/)
Compile tested only, sorry.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# e38c2874 02-Feb-2009 Stephane Clerambault <stephane.clerambault@free.fr>

USB: ftdi_sio: add support for the NDI Polaris system

Add support for the NDI Polaris system *http://www.ndigital.com/).

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ca80801b 09-Jan-2009 Mhayk Whandson <eu@mhayk.com.br>

USB: ftdi_sio driver support of bar code scanner from Diebold

Added the product id of bcs(bar code scanner) from Diebold Procomp Brazil.

Signed-off-by: Mhayk Whandson <eu@mhayk.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 45eeff84 12-Jan-2009 Robie Basak <rb-oss-1@justgohome.co.uk>

USB: ftdi_sio: added Alti-2 VID and Neptune 3 PID

This patch adds the vendor and product ID for the Alti-2 Neptune 3
(http://www.alti-2.com) which uses the FTDI chip.

Signed-off-by: Robie Basak <rb-oss-1@justgohome.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a9fec710 15-Jan-2009 Jim Paris <jim@jtan.com>

ftdi_sio: fix kref leak

Commit 4a90f09b20f4622dcbff1f0e1e6bae1704f8ad8c added kref stuff to
ftdi_sio, but missed tty_kref_put at one exit point in
ftdi_process_read.

Signed-off-by: Jim Paris <jim@jtan.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 6b447f04 02-Jan-2009 Alan Cox <alan@redhat.com>

tty: Drop the lock_kernel in the private ioctl hook

We don't need the BKL here any more so it can go. In a couple of spots the
driver requirements are not clear so push the lock down into the driver.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 01ba0856 04-Dec-2008 Andrew Ewert <andrew@ewertenergy.com>

USB: ftdi_sio: Adding Ewert Energy System's CANdapter PID

The following patch adds in the USB PID for Ewert Energy System's CANdapter
device (CANBUS to USB-Serial which uses the FTDI 245R chipset) to the ftdi_sio
device driver.

The patch was tested successfully on Linux kernel 2.6.27 under Ubuntu.

Relevant output from /proc/bus/usb/devices (With patch installed):

T: Bus=01 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=9f80 Rev= 6.00
S: Manufacturer=Ewert Energy Systems
S: Product=CANdapter
S: SerialNumber=A6RGB3Z3
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr= 90mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms


Signed-off-by: Andrew Ewert <andrew@ewertenergy.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# f2ee6955 07-Dec-2008 Alan Cox <alan@redhat.com>

USB: tty: SprogII DCC controller identifiers

Someone on rmweb reminded me this had been overlooked from ages ago..

Add the identifiers for the Sprog II USB. This is a DCC control interface
using the FTDI-SIO hardware: http://www.sprog-dcc.co.uk/. People have been
using it with insmod options for ages, this just puts it into the driver
data.

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>


# c4f01240 05-Dec-2008 Nick Andrew <nick@nick-andrew.net>

Fix incorrect use of loose in tty/serial drivers

[Folded together as one diff from 3]

It should be 'lose', not 'loose'.

Signed-off-by: Nick Andrew <nick@nick-andrew.net>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 194343d9 20-Aug-2008 Greg Kroah-Hartman <gregkh@suse.de>

USB: remove use of err() in drivers/usb/serial

err() is going away, so switch to dev_err() or printk() if it's really
needed.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c197a8db 18-Aug-2008 Greg Kroah-Hartman <gregkh@suse.de>

USB: remove info() macro from usb/serial drivers

USB should not be having it's own printk macros, so remove info() and
use the system-wide standard of dev_info() wherever possible.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 68265043 10-Sep-2008 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>

USB: ftdi_sio: fix 'product' parameter description

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c3d36c45 03-Oct-2008 Vladimir Vukicevic <vladimir@pobox.com>

USB: Add Oceanic product ID to ftdi_sio

Add Oceanic PID to ftdi_sio driver

Oceanic dive computers (such as the VT3 --
http://www.oceanicworldwide.com/p_computers_vt3.html) all use an onboard
FTDI serial converter, with the FTDI vid and a PID of 0xf460. The
attached patch adds that pid to ftdi_sio; driver connects to my VT3
after that.

Signed-off-by: Vladimir Vukicevic <vladimir@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 4a90f09b 13-Oct-2008 Alan Cox <alan@redhat.com>

tty: usb-serial krefs

Use kref in the USB serial drivers so that we don't free tty structures
from under the URB receive handlers as has historically been the case if
you were unlucky. This also gives us a framework for general tty drivers to
use tty_port objects and refcount.

Contains two err->dev_err changes merged together to fix clashes in the
-next tree.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 43b11d33 13-Oct-2008 Alan Cox <alan@redhat.com>

ftdi: A few errors are err() that should be debug which causes much spewage

Fixes #10783

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 96285cb8 22-Sep-2008 Gaetan Carlier <gcpatch@gmail.com>

usb: ftdi_sio: add support for Domintell devices

Support for Domintell devices (FTDI FT232BM based) : DGQG and DUSB01
module. PIDs were missing.

Signed-off-by: Gaetan Carlier <gcpatch@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a18f80b4 16-Sep-2008 Jaroslav Kysela <perex@perex.cz>

USB: ftdi_sio: Add 0x5050/0x0900 USB IDs (Papouch Quido USB 4/4)

USB: ftdi_sio: Add 0x5050/0x0900 USB IDs (Papouch Quido USB 4/4)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a5f62399 06-Aug-2008 Lex Ross <lross@mail.ru>

USB: ftdi_sio: add support for PHI Fisco data cable (FT232BM based, VID/PID 0403:e40b)

Support for PHI Fisco USB to Serial data cable (FTDI FT232BM based).
PHI Fisco cable is supplied for connecting Philips Xenium 9@9++ mobile phones.
PIDs were missing.

Tested successfully with PHI Fisco Data Cable (VID/PID 0403:e40b)

Signed-off-by: Lex V. Ross <lross@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# a00c3cad 30-Jul-2008 Frederik Kriewitz <frederik@kriewitz.eu>

USB: ftdi_sio: add support for Luminance Stellaris Evaluation/Development Kits

The Patch adds support for Luminance Stellaris Evaluation/Development
Kits (FTDI 2232C based).
The PIDs were missing.

Successfully tested with a Stellaris LM3S8962 Evaluation kit.

Signed-off-by: Frederik Kriewitz <frederik@kriewitz.eu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# b5894a50 28-Jul-2008 André Schenk <andre@melior.s.bawue.de>

USB: ftdi_sio: Add USB Product Id for ELV HS485

USB product id registration for the ELV HS485 USB adapter (www.elv.de) to
their home automation bus system. Applies to 2.6.26.

Signed-off-by: Andre Schenk <andre@melior.s.bawue.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 464cbb24 22-Jul-2008 Alan Cox <alan@redhat.com>

ftdi_sio: 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>


# 95da310e 22-Jul-2008 Alan Cox <alan@redhat.com>

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>


# 2542335c 24-Jun-2008 Jon K Hellan <hellan@acm.org>

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>


# ebb3770c 21-May-2008 Ray Molenkamp <rmolenkamp@matrixorbital.ca>

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>


# 26ab7053 16-May-2008 Atsushi Nemoto <anemo@mba.ocn.ne.jp>

usb-serial: Use ftdi_sio driver for RATOC REX-USB60F

This patch reverts 57833ea6b95a3995149f1f6d1a8d8862ab7a0ba2
("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>


# 6e1ab3ed 22-Apr-2008 Peter Mack <Peter.Mack@scs-ptc.com>

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>


# fd05e720 28-Apr-2008 Al Viro <viro@ftp.linux.org.uk>

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>


# cdc97792 24-Feb-2008 Ming Lei <tom.leiming@gmail.com>

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>


# 441b62c1 03-Mar-2008 Harvey Harrison <harvey.harrison@gmail.com>

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>


# 0ba4034e 16-Apr-2008 Greg Kroah-Hartman <gregkh@suse.de>

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>


# dfa5ec79 04-Mar-2008 Julia Lawall <julia@diku.dk>

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>


# 9b0f2582 20-Feb-2008 Alan Cox <alan@lxorguk.ukuu.org.uk>

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>


# 11171d1b 10-Mar-2008 Mirko Bordignon <mirko.bordignon@ieee.org>

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>


# 4ae897df 04-Mar-2008 Sven Andersen <s.andersen@cryonet.de>

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>


# 546d7eec 01-Mar-2008 Kevin Vance <kvance@kvance.com>

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>


# bbc5d276 06-Feb-2008 Roel Kluin <12o3l@tiscali.nl>

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>


# 95bef012 22-Jan-2008 Oliver Neukum <oliver@neukum.org>

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>


# 504b55cc 09-Apr-2002 Greg Kroah-Hartman <gregkh@suse.de>

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>


# 20734345 01-Jan-2008 Harald Welte <laforge@gnumonks.org>

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>


# 4bb0ef19 17-Jan-2008 Ed Beroset <beroset@mindspring.com>

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>


# 34910434 25-Dec-2007 Franco Lanza <nextime@nexlab.it>

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>


# 42f8aa94 25-Dec-2007 Peter Stark <Peter.Stark@t-online.de>

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>


# bd5e47cc 18-Oct-2007 Andrew Morton <akpm@linux-foundation.org>

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>


# 669a6db1 18-Oct-2007 Alan Cox <alan@lxorguk.ukuu.org.uk>

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>


# 96de0e25 19-Oct-2007 Jan Engelhardt <jengelh@gmx.de>

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>


# 898eb71c 18-Oct-2007 Joe Perches <joe@perches.com>

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>


# ed6e5282 21-Aug-2007 Andrew M. Bishop <amb@gedanken.demon.co.uk>

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>


# d7fde2d6 06-Sep-2007 Pierre Castella <pp.castella@gmail.com>

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>


# c1f8ea7d 08-Aug-2007 Søren Hauberg <hauberg@gmail.com>

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


# 0ffbbe25 09-Jul-2007 Oliver Neukum <oliver@neukum.org>

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>


# 0fb0aa18 15-Jun-2007 Greg Kroah-Hartman <gregkh@suse.de>

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>


# 97cd49eb 09-May-2007 Stepan Moskovchenko <stevenm86@gmail.com>

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>


# d099321b 21-Jun-2007 Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>

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>


# fa91d43b 04-May-2007 Tony Lindgren <tony@atomide.com>

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>


# 2adb80e9 08-May-2007 Guido Scholz <guido.scholz@bayernline.de>

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>


# 762e92fa 25-Apr-2007 Neil \"Superna\" ARMSTRONG <superna@na-prod.com>

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>


# 868e440d 25-Mar-2007 Jelle Foks <jelle@foks.8m.com>

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>


# 62127a58 23-Mar-2007 Oliver Neukum <oneukum@suse.de>

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>


# 3b009c63 23-Mar-2007 David Brownell <david-b@pacbell.net>

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>


# d8b21606 04-Mar-2007 Gard Spreemann <spreeman@stud.ntnu.no>

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>


# 12bdbe03 28-Feb-2007 Jim Radford <radford@blackbean.org>

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>


# 4eaf60e0 28-Feb-2007 Thomas Schleusener <thomas@be-schl.de>

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>


# ef31fec0 26-Feb-2007 Michael Olberg <michael.olberg@chalmers.se>

USB: add QL355P power supply ids to fdti_sio


# 822c7ef4 04-Feb-2007 Micke Prag <micke.prag@telldus.se>

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>


# 210b1975 25-Jan-2007 Greg Kroah-Hartman <gregkh@suse.de>

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>


# d9b1b787 17-Dec-2006 Johannes Hölzl <johannes.hoelzl@gmx.de>

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>


# ec434e9b 28-Nov-2006 Jan Capek <jan@ccsinfo.com>

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>


# 606d099c 08-Dec-2006 Alan Cox <alan@lxorguk.ukuu.org.uk>

[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>


# 794c944e 08-Nov-2006 Mariusz Kozlowski <m.kozlowski@tuxland.pl>

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>


# c4028958 22-Nov-2006 David Howells <dhowells@redhat.com>

WorkStruct: make allyesconfig

Fix up for make allyesconfig.

Signed-Off-By: David Howells <dhowells@redhat.com>


# fad14a0d 20-Oct-2006 Frank Sievertsen <frank@sievertsen.de>

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>


# 40c36092 22-Oct-2006 Kjell Myksvoll <kmyksvo@gmail.com>

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>


# 5c09d144 13-Oct-2006 David Brownell <david-b@pacbell.net>

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>


# 7d12e780 05-Oct-2006 David Howells <dhowells@redhat.com>

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)


# a1484827 24-Sep-2006 Justin Carlson <justinca@qatar.cmu.edu>

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>


# 9978f9e1 25-Sep-2006 Ian Abbott <abbotti@mev.co.uk>

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>


# 13f4db9e 28-Aug-2006 Greg Kroah-Hartman <gregkh@suse.de>

USB: fix __must_check warnings in drivers/usb/serial/

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# eaede2cb 05-Sep-2006 Ralf Schlatterbeck <rsc@runtux.com>

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>


# 2011e924 09-Aug-2006 Jonathan Davies <jjd27@cam.ac.uk>

USB: ftdi_sio driver - new PIDs

Signed-off-by: Jonathan Davies <jjd27@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 274a4bbc 18-Jul-2006 Dave Platt <dplatt@radagast.org>

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>


# a969888c 11-Jul-2006 Greg Kroah-Hartman <gregkh@suse.de>

[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>


# e1979fef 11-Jul-2006 Colin Leroy <colin@colino.net>

[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>


# 22465400 25-Jun-2006 Ian Abbott <abbotti@mev.co.uk>

[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>


# c0f8d561 23-Jun-2006 Christophe Mariac <cmariac@starting-point-systems.com>

[PATCH] USB: new device ids for ftdi_sio driver

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 48437486 17-Jun-2006 D. Peter Siddons <siddons@bnl.gov>

[PATCH] USB: new device id for Thorlabs motor driver

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 6ab3d562 30-Jun-2006 Jörn Engel <joern@wohnheim.fh-wedel.de>

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>


# eb79b4fd 29-May-2006 Ian Abbott <abbotti@mev.co.uk>

[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>


# cf2c7481 22-May-2006 Pete Zaitcev <zaitcev@redhat.com>

[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>


# 57845bd1 13-Apr-2006 Guennadi Liakhovetski <g.liakhovetski@gmx.de>

[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>


# 72a9f958 04-May-2006 Razvan Gavril <razvan.g@plutohome.com>

[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>


# 20a0f47e 04-May-2006 Ian Abbott <abbotti@mev.co.uk>

[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>


# 7e0258fd 12-Apr-2006 Ian Abbott <abbotti@mev.co.uk>

[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>


# 69737dfa 11-Apr-2006 Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>

[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>


# cdd3b156 09-Apr-2006 Nathan Bronson <ndb@sns-usa.com>

[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>


# 62a13db3 28-Mar-2006 Folkert van Heusden <folkert@vanheusden.com>

[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>


# 7e1c0b86 21-Mar-2006 Ian Abbott <abbotti@mev.co.uk>

[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>


# bf58fbd5 14-Mar-2006 A. Maitland Bottoms <bottoms@debian.org>

[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>


# 80b6ca48 27-Feb-2006 Eric Sesterhenn <snakebyte@gmx.de>

[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>


# 34d1a8aa 27-Feb-2006 Ian Abbott <abbotti@mev.co.uk>

[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>


# 09c280a2 09-Jan-2006 Rui Santos <rsantos@grupopie.com>

[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>


# ce40d290 03-Jan-2006 Wouter Paesen <wouter@kangaroot.net>

[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>


# a94b52ac 09-Jan-2006 Ian Abbott <abbotti@mev.co.uk>

[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>


# 641adaae 05-Jan-2006 Louis Nyffenegger <louis.nyffenegger@gmail.com>

[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>


# 33f0f88f 09-Jan-2006 Alan Cox <alan@lxorguk.ukuu.org.uk>

[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>


# 740a4282 13-Dec-2005 Ian Abbott <abbotti@mev.co.uk>

[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>


# effac8be 08-Dec-2005 Pavel Fedin <sonic_amiga@rambler.ru>

[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>


# 4c4c9432 29-Nov-2005 Arjan van de Ven <arjan@infradead.org>

[PATCH] USB: mark various usb tables const

patch below marks various USB tables and variables as const so that they
end up in .rodata section and don't cacheline share with things that get
written to. For the non-array variables it also allows gcc to optimize
more.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ba9dc657 16-Nov-2005 Greg Kroah-Hartman <gregkh@suse.de>

[PATCH] USB: allow usb drivers to disable dynamic ids

This lets drivers, like the usb-serial ones, disable the ability to add
ids from sysfs.

The usb-serial drivers are "odd" in that they are really usb-serial bus
drivers, not usb bus drivers, so the dynamic id logic will have to go
into the usb-serial bus core for those drivers to get that ability.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# b4723ae3 23-Nov-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB: ftdi_sio: new IDs for KOBIL devices

This patch adds two new devices to the ftdi_sio driver's device ID
table. The device IDs were supplied by Stefan Nies of KOBIL Systems for
two of their devices using the FTDI chip.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# bde62185 26-Oct-2005 Martin Hagelin <martin@hagelin.dyndns.org>

[PATCH] USB: add new device id to ftdi_sio module

This is a patch to get the ELV FHZ1000 Home Automation control device to
work with Linux. The patch adds a new device ID to the ftdi_sio driver.
It is for kernel version 2.6.13.4.

Signed-off-by: Martin Hagelin <martin.hagelin@home.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 269bda1c 20-Jun-2005 Greg Kroah-Hartman <gregkh@suse.de>

[PATCH] USB Serial: move name to driver structure

This fixes up a lot of problems in sysfs with some of the usb serial
drivers, they had incorrect driver names. Also saves a tiny ammount
of memory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 18fcac35 20-Jun-2005 Greg Kroah-Hartman <gregkh@suse.de>

[PATCH] USB Serial: get rid of the .owner field in usb_serial_driver

Don't duplicate something that's already in struct driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# ea65370d 20-Jun-2005 Greg Kroah-Hartman <gregkh@suse.de>

[PATCH] USB Serial: rename usb_serial_device_type to usb_serial_driver

I'm tired of trying to explain why a "device_type" is really a driver.
This better describes exactly what this structure is.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 207c47e1 29-Sep-2005 Thomas Riewe <thomasr@pyramid.de>

[PATCH] drivers/usb/serial/ftdi_sio: add PID/VID

We would like to add a PID for the Pyramid Appliance Display, which works
on USB via FTDI_SIO.

Signed-off-by: Thomas Riewe <thomasr@pyramid.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

drivers/usb/serial/ftdi_sio.c | 1 +
drivers/usb/serial/ftdi_sio.h | 3 +++
2 files changed, 4 insertions(+)


# c9c7746d 23-Sep-2005 Rui Santos <rsantos@grupopie.com>

[PATCH] USB: ftdi: Artemis and ATIK based USB astronomical CCD cameras

This patch enables direct kernel support for the Artemis
and ATIK astronomical based USB CCD cameras.
Since all communications with this camera are done via an
FTDI 245BM chip, it was only needed to specify the
ProductID and VendorID of all three devices.
In what tests are concerned, data was transfered from and
to the FTDI at the chips Top speed (360KB/s).

Signed-off-by: Rui Santos <rsantos@grupopie.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

drivers/usb/serial/ftdi_sio.c | 3 +++
drivers/usb/serial/ftdi_sio.h | 13 +++++++++++++
2 files changed, 16 insertions(+)


# 72a755fc 22-Sep-2005 Peter Favrholdt <pfavr@how.dk>

[PATCH] USB: ftdi_sio: allow baud rate to be changed without raising RTS and DTR

I'm using a 2 port USB RS232 dongle to connect to a serial-IR cradle for
a bar code reader). Detecting the baudrate of the serial-IR involves
keeping DTR low while changing baudrate.

This works using normal 16550A serial ports as well as the FTDI driver
version 1.4.0 (Linux 2.6.8) but stopped working with the change to
"ensure RTS and DTR are raised when changing baudrate" introduced in
version 1.4.1 (Linux 2.6.9).

The attached patch fixes this, so RTS and DTR is only raised when
changing baudrate iff the previous baudrate was B0.

Signed-off-by: Peter Favrholdt <pfavr@how.dk>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# f5e09b7c 11-Sep-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB: ftdi_sio: custom baud rate fix

ftdi_sio: I messed up the baud_base for custom baud rate support in
2.6.13. The attached one-liner patch fixes it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# e6ac4a40 02-Aug-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB ftdi_sio: New IDs for ELV, Xsens and Falcom products

This patch for the ftdi_sio driver adds a bunch of new devices and fixes
an incorrect PID:

o Fix PID for ELV UO100 (the PID was in fact for ELV UR100).
o Add PID ELV UR100 (see above) and ELV ALC 8500 Expert.
o Add a whole bunch of other PIDs for ELV USB devices, commented out for
now as they may be used by other drivers eventually. (Christian Abt
of ELV.de submitted a full list of devices including an indication of
which set of drivers are used by default in the MS Windows world. We
decided to comment out the devices that use FTDI's D2XX Windows
drivers by default.)
o Add PIDs for eight devices from Xsens Technologies BV (submitted in a
patch against 2.6.12.2 by Patrick Riphagen).
o Add PID for Falcom Samba GPRS modem (submitted by Sebastian Schubert).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# fdcb0a0f 28-Jul-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB ftdi_sio: user specified VID/PID

ftdi_sio: Support one user specified vendor and product ID via a couple
of new module parameters.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 279e1545 29-Jul-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB: ftdi_sio: fix a couple of timeouts

ftdi_sio: Fix timeouts in a couple of usb_control_msg() calls due to
change of units from jiffies to milliseconds in 2.6.12.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 74ede0ff 29-Jul-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB: ftdi_sio: Update RTS and DTR simultaneously

ftdi_sio: Update RTS and DTR simultaneously, using a single control URB
instead of separate control URBs for RTS and DTR. Reinhard Bergmann
observed time differences of up to 680 ms with his application on a
2.4.22 kernel when RTS and DTR were updated using separate control
URBs, which is unacceptable.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 9b1513d9 29-Jul-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB: ftdi_sio: new microHAM and Evolution Robotics devices

The attached patch adds the following new devices to the ftdi_sio driver:

* microHAM USB-Y6 and USB-Y8 devices submitted by Justin Burket (KL1RL).
* Evolution Robotics ER1 Control Module submitted by Shawn M. Lavelle.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 16966f2a 29-Jun-2005 Greg Kroah-Hartman <gregkh@suse.de>

[PATCH] USB: fix ftdi_sio compiler warnings

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 7e33ae67 20-Jun-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB ftdi_sio: remove redundant TIOCMBIS and TIOCMBIC code

ftdi_sio: Remove redundant handling of TIOCMBIS and TIOCMBIC ioctls
as they are handled in the tty layer and never reach this driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 8f977e42 20-Jun-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB ftdi_sio: reduce device id table clutter

ftdi_sio: Use a single usb_device_id table and detect the type of chip
programatically. The table also flags devices requiring special
initialization. The patch makes the driver about 10K smaller and makes
it easier to add new device IDs.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 060b8845 17-May-2005 Yani Ioannou <yani.ioannou@gmail.com>

[PATCH] Driver Core: drivers/usb/input/aiptek.c - drivers/zorro/zorro-sysfs.c: update device attribute callbacks

Signed-off-by: Yani Ioannou <yani.ioannou@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 76854cea 02-Jun-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB: ftdi_sio: avoid losing received data in tty-ldisc

ftdi_sio: Avoid losing bytes at tty-ldisc.

This patch was originally developed by Daniel Smertnig. I
(Ian Abbott) made a few changes. It has been tested by both
Daniel and I, at least for raw, non-canonical receive data
processing.

Here is Daniel's original description of the patch:

===
During a project in which I was using a FTDI 232BM to
transmit data at relative high speeds (625kBit/s), I
noticed a problem where data was lost even if flow
control was enabled: The FTDI-Driver receives 512 Bytes
of data over USB at a time, which consists of 8 64-Byte
packets. Subtracting the 2 bytes of status information
included in each packet this gives 496 "real" data
bytes per read.

This data is passed (indirectly, via the flip buffers)
to the tty line discipline which takes care of
throttling when there the free buffer space reaches
TTY_THRESHOLD_THROTTLE (128). Because the FTDI driver
processes up to 496 bytes at a time, throttling won't
happen in time and the line discipline will discard the
remaining bytes.

To avoid this the patch passes data in 62-byte blocks
to the tty layer and checks the available space in the
ldisc-buffers. If there isn't enough free space,
processing the rest of the data is delayed using a
workqueue.

Note: The original problem should be easily
reproducible with a userspace program which does slow &
small reads.
===

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Daniel Smertnig <daniel.smertnig@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 47900743 17-May-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB: ftdi_sio: new PID for ELV UM100

ftdi_sio: Add PID for "ELV USB Module UM100".
PID sent by Armin Laugher.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 093cf723 03-May-2005 Steven Cole <elenstev@mesatop.com>

[PATCH] USB: Spelling fixes for drivers/usb.

Here are some spelling corrections for drivers/usb.

cancelation -> cancellation
succesful -> successful
cancelation -> cancellation
decriptor -> descriptor
Initalize -> Initialize
wierd -> weird
Protocoll -> Protocol
occured -> occurred
successfull -> successful
Procesing -> Processing
devide -> divide
Isochronuous -> Isochronous
noticable -> noticeable
Basicly -> Basically
transfering -> transferring
intialize -> initialize
Incomming -> Incoming
additionnal -> additional
asume -> assume
Unfortunatly -> Unfortunately
retreive -> retrieve
tranceiver -> transceiver
Compatiblity -> Compatibility
Incorprated -> Incorporated
existance -> existence
Ununsual -> Unusual

Signed-off-by: Steven Cole <elenstev@mesatop.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 5e54f91d 29-Apr-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB: ftdi_sio redundant macro removal

[ftdi_sio] Replaced redundant INTERFACE_A and INTERFACE_B macros with
the equivalent PIT_SIOA and PIT_SIOB macros.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 6f92872c 29-Apr-2005 Ian Abbott <abbotti@mev.co.uk>

[PATCH] USB: VID/PID updates for ftdi_sio driver

Some VID/PID updates for the ftdi_sio driver:

* The "Gude Analog- und Digitalsysteme GmbH" entries were missing from
the "combined" table.
* Replaced FTDI_8U232AM_ALT_ALT_PID with 3 PIDs for devices from
4n-galaxy.de.
* Removed redundant FTDI_RM_VID and renamed FTDI_RMCANVIEW_PID to
FTDI_RM_CANVIEW_PID.
* Added VID/PID for serial converter in Mobility Electronics EasiDock
USB 200 (mentioned by Gregory Schmitt).
* Added PID for Active Robots USB comms board (mentioned by John Koch).

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

diff -ur a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c


# 1bc3c9e1 18-Apr-2005 Jesper Juhl <juhl-lkml@dif.dk>

[PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL

Get rid of a bunch of redundant NULL pointer checks in drivers/usb/*,
there's no need to check a pointer for NULL before calling kfree() on it.

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


Index: gregkh-2.6/drivers/usb/class/audio.c
===================================================================


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!