aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/serial/ftdi_sio.c
AgeCommit message (Collapse)AuthorFilesLines
2013-03-28usb: ftdi_sio: Add support for Mitsubishi FX-USB-AW/-BDKonstantin Holoborodko1-0/+1
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 <[email protected]> Tested-by: Konstantin Holoborodko <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-25USB: serial: update copyright informationJohan Hovold1-1/+1
Update copyright information. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-25USB: ftdi_sio: switch to generic get_icount implementationJohan Hovold1-23/+1
Switch to the generic get_icount implementation. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-25USB: ftdi_sio: switch to generic TIOCMIWAIT implementationJohan Hovold1-34/+2
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-25USB: ftdi_sio: use port icountJohan Hovold1-17/+14
Use the port-data icount for interrupt counters. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-25USB: ftdi_sio: remove obsolete port data refcountingJohan Hovold1-32/+2
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-21USB: ftdi_sio: fix use-after-free in TIOCMIWAITJohan Hovold1-11/+8
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 <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-02-21Merge tag 'tty-3.9-rc1' of ↵Linus Torvalds1-14/+7
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty/serial patches from Greg Kroah-Hartman: "Here's the big tty/serial driver patches for 3.9-rc1. More tty port rework and fixes from Jiri here, as well as lots of individual serial driver updates and fixes. All of these have been in the linux-next tree for a while." * tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits) tty: mxser: improve error handling in mxser_probe() and mxser_module_init() serial: imx: fix uninitialized variable warning serial: tegra: assume CONFIG_OF TTY: do not update atime/mtime on read/write lguest: select CONFIG_TTY to build properly. ARM defconfigs: add missing inclusions of linux/platform_device.h fb/exynos: include platform_device.h ARM: sa1100/assabet: include platform_device.h directly serial: imx: Fix recursive locking bug pps: Fix build breakage from decoupling pps from tty tty: Remove ancient hardpps() pps: Additional cleanups in uart_handle_dcd_change pps: Move timestamp read into PPS code proper pps: Don't crash the machine when exiting will do pps: Fix a use-after free bug when unregistering a source. pps: Use pps_lookup_dev to reduce ldisc coupling pps: Add pps_lookup_dev() function tty: serial: uartlite: Support uartlite on big and little endian systems tty: serial: uartlite: Fix sparse and checkpatch warnings serial/arc-uart: Miscll DT related updates (Grant's review comments) ... Fix up trivial conflicts, mostly just due to the TTY config option clashing with the EXPERIMENTAL removal.
2013-02-13USB: serial: fix null-pointer dereferences on disconnectJohan Hovold1-11/+9
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-02-02USB: ftdi_sio: add Zolix FTDI PIDPetr Kubánek1-0/+1
Add support for Zolix Omni 1509 monochromator custom USB-RS232 converter. Signed-off-by: Petr Kubánek <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-02-02USB: ftdi_sio: add PID/VID entries for ELV WS 300 PC IISven Killig1-0/+1
Add PID/VID entries for ELV WS 300 PC II weather station Signed-off-by: Sven Killig <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-25Merge 3.8-rc5 into tty-nextGreg Kroah-Hartman1-0/+2
This resolves a number of tty driver merge issues found in linux-next Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-15TTY: switch tty_flip_buffer_pushJiri Slaby1-7/+1
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-15TTY: switch tty_insert_flip_charJiri Slaby1-6/+5
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-15TTY: convert more flipping functionsJiri Slaby1-1/+1
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-13usb: ftdi_sio: Crucible Technologies COMET Caller ID - pid addedTomasz Mloduchowski1-0/+2
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-26USB: ftdi_sio: Add support for Newport AGILIS motor driversMartin Teichmann1-0/+1
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-11-26usb: ftdi_sio: fixup BeagleBone A5+ quirkPeter Korsgaard1-1/+1
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-30USB: ftdi_sio: use ftdi_get_modem_status in chars_in_bufferJohan Hovold1-41/+11
Use ftdi_get_modem_status to check hardware buffers in chars_in_buffer. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-30USB: ftdi_sio: optimise chars_in_bufferJohan Hovold1-0/+2
No need to check hardware buffers when we know that the software buffers are non-empty. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-30USB: ftdi_sio: use generic chars_in_bufferJohan Hovold1-6/+1
Use generic chars_in_buffer rather than copying it's implementation. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-30USB: ftdi_sio: refactor modem-control status retrievalJohan Hovold1-3/+35
Refactor modem-control status retrieval. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-30USB: ftdi_sio: fix tiocmget and tiocmset return valuesJohan Hovold1-1/+4
Make sure we do not return USB-internal error codes to userspace. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-30USB: ftdi_sio: fix tiocmget indentationJohan Hovold1-4/+4
Align the modem-control status operands as was originally indented. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-30USB: ftdi_sio: remove unused private port-dataJohan Hovold1-2/+0
Remove unused port field from private port data. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-30USB: ftdi_sio: remove unnecessary memsetJohan Hovold1-1/+0
No need to memset a kzalloced struct. Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-25usb: serial: ftdi_sio: Add missing chars_in_buffer functionJarkko Huijts1-0/+60
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 <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-01Merge tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usbLinus Torvalds1-74/+64
Pull USB changes from Greg Kroah-Hartman: "Here is the big USB pull request for 3.7-rc1 There are lots of gadget driver changes (including copying a bunch of files into the drivers/staging/ccg/ directory so that the other gadget drivers can be fixed up properly without breaking that driver), and we remove the old obsolete ub.c driver from the tree. There are also the usual XHCI set of updates, and other various driver changes and updates. We also are trying hard to remove the old dbg() macro, but the final bits of that removal will be coming in through the networking tree before we can delete it for good. All of these patches have been in the linux-next tree. Signed-off-by: Greg Kroah-Hartman <[email protected]>" Fix up several annoying - but fairly mindless - conflicts due to the termios structure having moved into the tty device, and often clashing with dbg -> dev_dbg conversion. * tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (339 commits) USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc USB: uas: fix gcc warning USB: uas: fix locking USB: Fix race condition when removing host controllers USB: uas: add locking USB: uas: fix abort USB: uas: remove aborted field, replace with status bit. USB: uas: fix task management USB: uas: keep track of command urbs xhci: Intel Panther Point BEI quirk. powerpc/usb: remove checking PHY_CLK_VALID for UTMI PHY USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support Revert "usb : Add sysfs files to control port power." USB: serial: remove vizzini driver usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems Increase XHCI suspend timeout to 16ms USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq USB: sierra_ms: don't keep unused variable fsl/usb: Add support for USB controller version 2.4 USB: qcaux: add Pantech vendor class match ...
2012-09-24USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) supportAntonio Ospite1-0/+2
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-18USB: serial: ftdi_sio: remove startup messageGreg Kroah-Hartman1-11/+1
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-16Merge 3.6-rc6 into usb-nextGreg Kroah-Hartman1-1/+21
This resolves the merge problems with: drivers/usb/dwc3/gadget.c drivers/usb/musb/tusb6010.c that had been seen in linux-next. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-16Merge 3.6-rc6 into tty-nextGreg Kroah-Hartman1-1/+21
This pulls in the fixes in 3.6-rc6 Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-14USB: serial: ftdi_sio.c: remove debug module parameterGreg Kroah-Hartman1-3/+0
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 <[email protected]> CC: Simon Arlott <[email protected]> CC: Andrew Worsley <[email protected]> CC: "Michał Wróbel" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-14USB: serial: ftdi_sio.c: remove dbg() usageGreg Kroah-Hartman1-59/+60
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 <[email protected]> CC: Simon Arlott <[email protected]> CC: Andrew Worsley <[email protected]> CC: "Michał Wróbel" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-10USB: ftdi_sio: do not claim CDC ACM functionBjørn Mork1-1/+3
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 <[email protected]> Reported-by: Xiaofan Chen <[email protected]> Cc: stable <[email protected]> Cc: Alan Cox <[email protected]> Cc: Bruno Thomsen <[email protected]> Signed-off-by: Bjørn Mork <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05USB: ftdi_sio: PID for NZR SEM 16+ USBHorst Schirmeier1-0/+1
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05USB: ftdi-sio: add support for more Physik Instrumente devicesÉric Piel1-0/+17
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-27Merge v3.6-rc3 into usb-nextGreg Kroah-Hartman1-0/+1
This picks up fixes that we need in this branch for testing. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-27Merge 3.6-rc3 into tty-nextGreg Kroah-Hartman1-0/+1
This picks up all of the different fixes in Linus's tree that we also need here. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-10USB: ftdi_sio: Quiet sparse noise about using plain integer was NULL pointerYing Xue1-1/+1
Pointers should not be compared to plain integers. Quiets the sparse warning: warning: Using plain integer as NULL pointer Signed-off-by: Ying Xue <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-08-10USB: ftdi_sio: Add VID/PID for Kondo Serial USBOzan Çağlayan1-0/+1
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-07-16tty: move the termios object into the ttyAlan Cox1-1/+1
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-12USB: ftdi-sio: Add support for RT Systems USB-RTS01 serial adapterEvan McNabb1-0/+1
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-08USB: serial: rework usb_serial_register/deregister_drivers()Greg Kroah-Hartman1-7/+2
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 <[email protected]> Cc: Alan Stern <[email protected]> Cc: Al Borchers <[email protected]> Cc: Aleksey Babahin <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andrew Worsley <[email protected]> Cc: Bart Hartgers <[email protected]> Cc: Bill Pemberton <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: Dan Williams <[email protected]> Cc: Donald Lee <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Gary Brubaker <[email protected]> Cc: Jesper Juhl <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Johan Hovold <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Kautuk Consul <[email protected]> Cc: Kuninori Morimoto <[email protected]> Cc: Lonnie Mendez <[email protected]> Cc: Matthias Bruestle and Harald Welte <[email protected]> Cc: Matthias Urlichs <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Michal Sroczynski <[email protected]> Cc: "Michał Wróbel" <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Peter Berger <[email protected]> Cc: Preston Fick <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Rigbert Hamisch <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Simon Arlott <[email protected]> Cc: Support Department <[email protected]> Cc: Thomas Tuttle <[email protected]> Cc: Uwe Bonnes <[email protected]> Cc: Wang YanQing <[email protected]> Cc: William Greathouse <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-07USB: ftdi-sio: add support for Physik Instrumente E-861Éric Piel1-0/+1
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-07USB: serial: remove usb_serial_disconnect call in all driversGreg Kroah-Hartman1-1/+0
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 <[email protected]> Cc: Matthias Bruestle and Harald Welte <[email protected]> Cc: Lonnie Mendez <[email protected]> Cc: Peter Berger <[email protected]> Cc: Al Borchers <[email protected]> Cc: Gary Brubaker <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Matthias Urlichs <[email protected]> Cc: Support Department <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Alan Stern <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Kautuk Consul <[email protected]> Cc: Bill Pemberton <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Bart Hartgers <[email protected]> Cc: Johan Hovold <[email protected]> Cc: Preston Fick <[email protected]> Cc: Uwe Bonnes <[email protected]> Cc: Simon Arlott <[email protected]> Cc: Andrew Worsley <[email protected]> Cc: "Michał Wróbel" <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Aleksey Babahin <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Donald Lee <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Michal Sroczynski <[email protected]> Cc: Wang YanQing <[email protected]> Cc: Dan Williams <[email protected]> Cc: Thomas Tuttle <[email protected]> Cc: Rigbert Hamisch <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Kuninori Morimoto <[email protected]> Cc: Jesper Juhl <[email protected]> Cc: Adhir Ramjiawan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-07USB: serial: remove usb_serial_probe call in all driversGreg Kroah-Hartman1-1/+0
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 <[email protected]> Cc: Matthias Bruestle and Harald Welte <[email protected]> Cc: Lonnie Mendez <[email protected]> Cc: Peter Berger <[email protected]> Cc: Al Borchers <[email protected]> Cc: Gary Brubaker <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Matthias Urlichs <[email protected]> Cc: Support Department <[email protected]> Cc: Rusty Russell <[email protected]> Cc: Alan Stern <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: Kautuk Consul <[email protected]> Cc: Bill Pemberton <[email protected]> Cc: Paul Gortmaker <[email protected]> Cc: Bart Hartgers <[email protected]> Cc: Johan Hovold <[email protected]> Cc: Preston Fick <[email protected]> Cc: Uwe Bonnes <[email protected]> Cc: Simon Arlott <[email protected]> Cc: Andrew Worsley <[email protected]> Cc: "Michał Wróbel" <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Aleksey Babahin <[email protected]> Cc: Dan Carpenter <[email protected]> Cc: Jiri Kosina <[email protected]> Cc: Donald Lee <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Michal Sroczynski <[email protected]> Cc: Wang YanQing <[email protected]> Cc: Dan Williams <[email protected]> Cc: Thomas Tuttle <[email protected]> Cc: Rigbert Hamisch <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Kuninori Morimoto <[email protected]> Cc: Jesper Juhl <[email protected]> Cc: Adhir Ramjiawan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-03USB: ftdi_sio.c: remove dbg() tracing callsGreg Kroah-Hartman1-34/+1
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 <[email protected]> CC: Simon Arlott <[email protected]> CC: Andrew Worsley <[email protected]> CC: "Michał Wróbel" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-09USB: ftdi_sio: fix race condition in TIOCMIWAIT, and abort of TIOCMIWAIT ↵Simon Arlott1-5/+7
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 <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-04-09USB: ftdi_sio: fix status line change handling for TIOCMIWAIT and TIOCGICOUNTSimon Arlott1-11/+13
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 <[email protected]> Cc: Uwe Bonnes <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>