aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial/ftdi_sio.c
AgeCommit message (Collapse)AuthorFilesLines
2017-01-26USB: serial: ftdi_sio: clean up ioctl handlerJohan Hovold1-12/+7
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 <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2017-01-25USB: serial: ftdi_sio: fix extreme low-latency settingJohan Hovold1-2/+0
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 <[email protected]> Fixes: 557aaa7ffab6 ("ft232: support the ASYNC_LOW_LATENCY flag") Cc: [email protected] # v2.6.31: e3e574ad85a2 Signed-off-by: Johan Hovold <[email protected]>
2017-01-16USB: serial: ftdi_sio: fix latency-timer error handlingJohan Hovold1-2/+5
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 <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2017-01-16USB: serial: ftdi_sio: fix modem-status error handlingJohan Hovold1-1/+5
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 <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2016-12-01Merge tag 'usb-serial-4.10-rc1' of ↵Greg Kroah-Hartman1-5/+0
git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.10-rc1 These updates include a new driver for Fintek F8153x devices, support for the GPIO functionality on CP2105 devices, and improved support for CH34X devices. Included are also some clean ups and fixes for various minor issues. Signed-off-by: Johan Hovold <[email protected]>
2016-11-11USB: serial: fix invalid user-pointer checksJohan Hovold1-5/+0
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 <[email protected]>
2016-11-07USB: serial: ftdi_sio: add support for TI CC3200 LaunchPadDoug Brown1-0/+2
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2016-10-17USB: serial: ftdi_sio: add support for Infineon TriBoard TC2X7Stefan Tauner1-1/+2
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2016-08-08USB: serial: ftdi_sio: add device ID for WICED USB UART dev boardSheng-Hui J. Chu1-0/+1
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2016-08-08USB: serial: ftdi_sio: add PIDs for Ivium Technologies devicesRobert Deliën1-0/+2
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2016-04-25USB: serial: ftdi_sio: constify ftdi_sio_quirk structuresJulia Lawall1-8/+8
The ftdi_sio_quirk structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2016-04-07USB: serial: ftdi_sio: Add support for ICP DAS I-756xU devicesJosh Boyer1-0/+4
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: <[email protected]> CC: stable <[email protected]> Signed-off-by: Josh Boyer <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2016-02-28USB: serial: fix compare_const_fl.cocci warningsMathieu OTHACEHE1-5/+5
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 <[email protected]> [johan: drop some chunks and fix others, amend commit message ] Signed-off-by: Johan Hovold <[email protected]>
2016-01-25USB: serial: ftdi_sio: add support for Yaesu SCU-18 cableGreg Kroah-Hartman1-0/+1
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-08-18USB: ftdi_sio: Added custom PID for CustomWare productsMatthijs Kooijman1-0/+4
CustomWare uses the FTDI VID with custom PIDs for their ShipModul MiniPlex products. Signed-off-by: Matthijs Kooijman <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-05-21USB: serial: ftdi_sio: Add support for a Motion Tracker Development BoardPatrick Riphagen1-0/+1
This adds support for new Xsens device, Motion Tracker Development Board, using Xsens' own Vendor ID Signed-off-by: Patrick Riphagen <[email protected]> Cc: [email protected] Signed-off-by: Johan Hovold <[email protected]>
2015-03-25USB: ftdi_sio: Use jtag quirk for SNAP Connect E10Doug Goldstein1-2/+6
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 <[email protected]> CC: stable <[email protected]> [johan: clean up probe logic ] Signed-off-by: Johan Hovold <[email protected]>
2015-03-16USB: ftdi_sio: Added custom PID for Synapse Wireless productDoug Goldstein1-0/+1
Synapse Wireless uses the FTDI VID with a custom PID of 0x9090 for their SNAP Stick 200 product. Signed-off-by: Doug Goldstein <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-03-03usb: ftdi_sio: Add jtag quirk support for Cyber Cortex AV boardsMax Mansfield1-0/+2
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2015-02-26USB: ftdi_sio: add PIDs for Actisense USB devicesMark Glover1-0/+17
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 <[email protected]> Cc: stable <[email protected]> [johan: edit commit message slightly ] Signed-off-by: Johan Hovold <[email protected]>
2014-11-19usb: serial: ftdi_sio: add PIDs for Matrix Orbital productsTroy Clark1-0/+33
Add PIDs for new Matrix Orbital GTT series products. Signed-off-by: Troy Clark <[email protected]> Cc: stable <[email protected]> [johan: shorten commit message ] Signed-off-by: Johan Hovold <[email protected]>
2014-10-23usb: serial: ftdi_sio: add "bricked" FTDI device PIDPerry Hung1-0/+1
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 <[email protected]> Cc: stable <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2014-10-22usb: serial: ftdi_sio: add Awinda Station and Dongle productsFrans Klaver1-0/+2
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: <[email protected]> Signed-off-by: Frans Klaver <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2014-09-08USB: ftdi_sio: Add support for GE Healthcare Nemo Tracker deviceTaylor Braun-Jones1-0/+2
Signed-off-by: Taylor Braun-Jones <[email protected]> Cc: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-09-01USB: ftdi_sio: add support for NOVITUS Bono E thermal printerJohan Hovold1-0/+1
Add device id for NOVITUS Bono E thermal printer. Reported-by: Emanuel Koczwara <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2014-08-18USB: ftdi_sio: Added PID for new ekey deviceJaša Bartelj1-0/+2
Added support to the ftdi_sio driver for ekey Converter USB which uses an FT232BM chip. Signed-off-by: Jaša Bartelj <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2014-08-18USB: ftdi_sio: add Basic Micro ATOM Nano USB2Serial PIDJohan Hovold1-0/+1
Add device id for Basic Micro ATOM Nano USB2Serial adapters. Reported-by: Nicolas Alt <[email protected]> Tested-by: Nicolas Alt <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]>
2014-08-01USB: serial: ftdi_sio: Add support for new Xsens devicesPatrick Riphagen1-0/+2
This adds support for new Xsens devices, using Xsens' own Vendor ID. Signed-off-by: Patrick Riphagen <[email protected]> Signed-off-by: Frans Klaver <[email protected]> Cc: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-16Merge tag 'usb-serial-3.17-rc1' of ↵Greg Kroah-Hartman1-59/+23
git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v3.17-rc1 Here are some minor fixes and clean-ups to the ftdi_sio, mos7840 and kl5kusb105 drivers for v3.17-rc1. Signed-off-by: Johan Hovold <[email protected]>
2014-07-11USB: serial: ftdi_sio: Add Infineon TriboardMichal Sojka1-0/+2
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 <[email protected]> Cc: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-09USB: ftdi_sio: Add extra PID.Bert Vermeulen1-1/+2
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 <[email protected]> Cc: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-07-07USB: ftdi_sio: remove redundant mtxorb quirkJohan Hovold1-39/+8
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 <[email protected]>
2014-07-07USB: ftdi_sio: clean up ftdi_set_max_packet_size()Johan Hovold1-11/+13
Code and comment style clean ups of ftdi_set_max_packet_size(). Signed-off-by: Johan Hovold <[email protected]>
2014-07-07USB: ftdi_sio: fix max-packet-size warningJohan Hovold1-3/+2
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 <[email protected]>
2014-07-07USB: ftdi_sio: make port probe less verboseJohan Hovold1-6/+0
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 <[email protected]>
2014-06-23USB: ftdi_sio: fix null deref at port probeJohan Hovold1-2/+5
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 <[email protected]> Tested-by: Mike Remski <[email protected]> Cc: <[email protected]> # 2.6.31 Signed-off-by: Johan Hovold <[email protected]>
2014-05-27USB: ftdi_sio: add NovaTech OrionLXm product IDGeorge McCollister1-0/+2
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: serial: ftdi_sio: add id for Brainboxes serial cardsMichele Baldessari1-0/+33
Custom VID/PIDs for Brainboxes cards as reported in https://bugzilla.redhat.com/show_bug.cgi?id=1071914 Signed-off-by: Michele Baldessari <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-26USB: ftdi_sio: add Cressi Leonardo PIDJoerg Dorchain1-0/+2
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-05USB: ftdi_sio: add Tagsys RFID Reader IDsUlrich Hahn1-0/+2
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 <[email protected]> Cc: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-02-04usb: ftdi_sio: add Mindstorms EV3 console adapterBjørn Mork1-0/+1
Cc: stable <[email protected]> Signed-off-by: Bjørn Mork <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-08usb: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-07USB: ftdi_sio: added CS5 quirk for broken smartcard readersColin Leitner1-2/+15
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 <[email protected]> Reported-by: Heinrich Siebmanns <[email protected]> Tested-by: Heinrich Siebmanns <[email protected]> Signed-off-by: Colin Leitner <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-03USB: serial: remove redundant OOM messagesJohan Hovold1-4/+1
Remove redundant error messages on allocation failures, which have already been logged. Cc: Joe Perches <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-03USB: serial: clean up ioctl debuggingJohan Hovold1-7/+1
Remove redundant ioctl debugging from subdrivers. The ioctl request code has already been logged by usb-serial core. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-03USB: serial: constify device-id tablesJohan Hovold1-1/+1
Declare device-id tables as const where possible. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-12-02USB: ftdi_sio: fixed handling of unsupported CSIZE settingColin Leitner1-13/+24
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 <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-11-07Merge tag 'usb-3.13-rc1' of ↵Linus Torvalds1-1/+9
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB driver update from Greg KH: "Here's the big USB driver update for 3.13-rc1. It includes the usual xhci changes, EHCI updates to get the scheduling of USB transactions working better, and a raft of gadget and musb updates as well. All of this has been in linux-next for a while with no reported issues" * tag 'usb-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (305 commits) USB: Maintainers change for usb serial drivers usb: usbtest: support container id descriptor test usb: usbtest: support superspeed device capbility descriptor test usb: usbtest: support usb2 extension descriptor test usb: chipidea: only get vbus regulator for non-peripheral mode USB: ehci-atmel: add usb_clk for transition to CCF usb: cdc-wdm: ignore speed change notifications USB: cdc-wdm: support back-to-back USB_CDC_NOTIFY_RESPONSE_AVAILABLE notifications usbatm: Fix dynamic_debug / ratelimited atm_dbg and atm_rldbg macros printk: pr_debug_ratelimited: check state first to reduce "callbacks suppressed" messages usb: usbtest: support bos descriptor test for usb 3.0 USB: phy: samsung: Support multiple PHYs of same type usb: wusbcore: change WA_SEGS_MAX to a legal value usb: wusbcore: add a quirk for Alereon HWA device isoc behavior usb: wusbcore: combine multiple isoc frames in a single transfer request. usb: wusbcore: set the RPIPE wMaxPacketSize value correctly usb: chipidea: host: more enhancement when ci->hcd is NULL usb: ohci: remove ep93xx bus glue platform driver usb: usbtest: fix checkpatch warning as sizeof code style UWB: clean up attribute use by using ATTRIBUTE_GROUPS() ...
2013-11-01USB: serial: ftdi_sio: add id for Z3X Box deviceАлексей Крамаренко1-0/+1
Custom VID/PID for Z3X Box device, popular tool for cellphone flashing. Signed-off-by: Alexey E. Kramarenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-09-26USB: serial: call handle_dcd_change in ftdi driver.Paul Chavent1-1/+9
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>