summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
Commit message (Collapse)AuthorAgeFilesLines
* TTY: convert more flipping functionsJiri Slaby2013-01-159-10/+10
| | | | | | | | | | | | | | | | 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>
* TTY: switch tty_buffer_request_room to tty_portJiri Slaby2013-01-151-2/+2
| | | | | | | | | | | | 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. Here we start with tty_buffer_request_room. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'usb-3.8-rc1' of ↵Linus Torvalds2012-12-1137-464/+251
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB patches from Greg Kroah-Hartman: "Here's the big set of USB patches for 3.8-rc1. Lots of USB host driver cleanups in here, and a bit of a reorg of the EHCI driver to make it easier for the different EHCI platform drivers to all work together nicer, which was a reduction in overall code. We also deleted some unused firmware files, and got rid of the very old file_storage usb gadget driver that had been broken for a long time. This means we ended up removing way more code than added, always a nice thing to see: 310 files changed, 3028 insertions(+), 10754 deletions(-) Other than that, the usual set of new device ids, driver fixes, gadget driver and controller updates and the like. All of these have been in the linux-next tree for a number of weeks. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'usb-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (228 commits) USB: mark uas driver as BROKEN xhci: Add Lynx Point LP to list of Intel switchable hosts uwb: fix uwb_dev_unlock() missed at an error path in uwb_rc_cmd_async() USB: ftdi_sio: Add support for Newport AGILIS motor drivers MAINTAINERS: remove drivers/block/ub.c USB: chipidea: fix use after free bug ezusb: add dependency to USB usb: ftdi_sio: fixup BeagleBone A5+ quirk USB: cp210x: add Virtenio Preon32 device id usb: storage: remove redundant memset() in usb_probe_stor1() USB: option: blacklist network interface on Huawei E173 USB: OHCI: workaround for hardware bug: retired TDs not added to the Done Queue USB: add new zte 3g-dongle's pid to option.c USB: opticon: switch to generic read implementation USB: opticon: refactor reab-urb processing USB: opticon: use usb-serial bulk-in urb USB: opticon: increase bulk-in size USB: opticon: use port as urb context USB: opticon: pass port to get_serial_info USB: opticon: make private data port specific ...
| * USB: ftdi_sio: Add support for Newport AGILIS motor driversMartin Teichmann2012-11-262-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * usb: ftdi_sio: fixup BeagleBone A5+ quirkPeter Korsgaard2012-11-261-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 <jacmet@sunsite.dk> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: cp210x: add Virtenio Preon32 device idMarkus Becker2012-11-261-0/+1
| | | | | | | | | | | | Cc: stable <stable@vger.kernel.org> Signed-off-by: Markus Becker <mab@comnets.uni-bremen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: option: blacklist network interface on Huawei E173Bjørn Mork2012-11-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Huawei E173 will normally appear as 12d1:1436 in Linux. But the modem has another mode with different device ID and a slightly different set of descriptors. This is the mode used by Windows like this: 3Modem: USB\VID_12D1&PID_140C&MI_00\6&3A1D2012&0&0000 Networkcard: USB\VID_12D1&PID_140C&MI_01\6&3A1D2012&0&0001 Appli.Inter: USB\VID_12D1&PID_140C&MI_02\6&3A1D2012&0&0002 PC UI Inter: USB\VID_12D1&PID_140C&MI_03\6&3A1D2012&0&0003 All interfaces have the same ff/ff/ff class codes in this mode. Blacklisting the network interface to allow it to be picked up by the network driver. Cc: stable <stable@vger.kernel.org> Reported-by: Thomas Schäfer <tschaefer@t-online.de> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: add new zte 3g-dongle's pid to option.cli.rui27@zte.com.cn2012-11-211-0/+22
| | | | | | | | | | | | Cc: stable <stable@vger.kernel.org> Signed-off-by: Rui li <li.rui27@zte.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: switch to generic read implementationJohan Hovold2012-11-211-130/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Switch to the more efficient generic read implementation. Note that the generic implementation is not required to hold the tty port mutex during resume due to the read-urb free mask and write start flag. Note also that the generic resume implementation will call generic write start if there is a bulk-out end-point, but that nothing will be submitted as the write fifo is not used and is empty. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: refactor reab-urb processingJohan Hovold2012-11-211-46/+59
| | | | | | | | | | | | | | Refactor and clean up read-urb processing. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: use usb-serial bulk-in urbJohan Hovold2012-11-211-29/+2
| | | | | | | | | | | | | | | | Use the bulk-in urb provided by usb-serial core rather than allocating a private one. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: increase bulk-in sizeJohan Hovold2012-11-211-1/+2
| | | | | | | | | | | | | | Use 256 byte bulk-in buffers rather than double end-point sized ones. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: use port as urb contextJohan Hovold2012-11-211-10/+8
| | | | | | | | | | | | | | | | Use port rather than private data as urb context, as the latter may be accessed as port data, and remove the port field from the private data. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: pass port to get_serial_infoJohan Hovold2012-11-211-4/+3
| | | | | | | | | | | | | | | | Pass port rather then private data to get_serial_info, which only used the private data to access the port. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: make private data port specificJohan Hovold2012-11-211-32/+37
| | | | | | | | | | | | | | | | Make private data port specific and move allocation and deallocation to port_probe and port_remove. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: remove disconnectJohan Hovold2012-11-211-8/+0
| | | | | | | | | | | | | | | | Remove disconnect and its redundant read-urb kill which is already taken care of in close. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: move read-urb deallocation to releaseJohan Hovold2012-11-211-1/+1
| | | | | | | | | | | | | | Move read-urb deallocation from disconnect to release. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: simplify bulk-in discovery in attachJohan Hovold2012-11-211-33/+16
| | | | | | | | | | | | | | | | | | | | Remove custom end-point iteration which has already been taken care of by usb-serial core. The first bulk-in endpoint found will be associated with the first port. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: remove private usb-serial dataJohan Hovold2012-11-211-3/+1
| | | | | | | | | | | | | | Remove redundant usb-serial field from private data. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: remove redundant initialisationJohan Hovold2012-11-211-1/+0
| | | | | | | | | | | | | | | | Remove redundant zero-initialisation of outstanding-urbs field in kzalloced struct. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: remove private serial-device dataJohan Hovold2012-11-211-6/+4
| | | | | | | | | | | | | | | | Remove usb-serial-device field from private data as it can be accessed from the usb-serial-port structure. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: use port device for error and debugJohan Hovold2012-11-211-5/+6
| | | | | | | | | | | | | | | | Use port rather than interface device to report port related errors and debug information. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: move private urb initialisation to attachJohan Hovold2012-11-211-7/+6
| | | | | | | | | | | | | | There no need to reinitialise the private urb at every open. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: opticon: remove redundant bulk urb fillJohan Hovold2012-11-211-5/+0
| | | | | | | | | | | | | | | | The private bulk in urb is set up at open and does not need to be reinitialised at every resubmit. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb-core: remove CONFIG_HOTPLUG ifdefsBill Pemberton2012-11-211-10/+0
| | | | | | | | | | | | | | | | Remove conditional code based on CONFIG_HOTPLUG being false. It's always on now in preparation of it going away as an option. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Merge 3.7-rc6 into usb-next.Greg Kroah-Hartman2012-11-163-7/+15
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | This resolves a conflict with these files: drivers/usb/early/ehci-dbgp.c drivers/usb/host/ehci-ls1x.c drivers/usb/host/ohci-xls.c drivers/usb/musb/ux500.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: option: idVendor and idProduct are __le16Bjørn Mork2012-10-311-3/+3
| | | | | | | | | | | | | | | | | | | | | The exception is needed on big endian systems too. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: option: replace vendor probe rule with match flagsBjørn Mork2012-10-311-38/+33
| | | | | | | | | | | | | | | | | | | | | | | | No need for a vendor specific probe exception just to match on the interface class. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: option: never bind to a usb-storage interfaceBjørn Mork2012-10-311-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are many modems in addition to the D-Link DWM 652 exposing the CD interface in modem mode, and some expose an integrated card reader as well. Always ignore these interfaces. Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: serial: remove driver version informationJohan Hovold2012-10-3132-119/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove all MODULE_VERSION macros and driver-version information (except for garmin_gps which uses it in a status reply). It is the kernel version that matters and not some private version scheme which rarely even gets updated. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ftdi_sio: use ftdi_get_modem_status in chars_in_bufferJohan Hovold2012-10-301-41/+11
| | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: ftdi_sio: optimise chars_in_bufferJohan Hovold2012-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: ftdi_sio: use generic chars_in_bufferJohan Hovold2012-10-301-6/+1
| | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: serial: export usb_serial_generic_chars_in_bufferJohan Hovold2012-10-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Export generic chars_in_buffer implementation so it can be used in subdrivers in combination with checks of any hardware buffers. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ftdi_sio: refactor modem-control status retrievalJohan Hovold2012-10-301-3/+35
| | | | | | | | | | | | | | | | | | | | | Refactor modem-control status retrieval. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ftdi_sio: fix tiocmget and tiocmset return valuesJohan Hovold2012-10-301-1/+4
| | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: ftdi_sio: fix tiocmget indentationJohan Hovold2012-10-301-4/+4
| | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: ftdi_sio: remove unused private port-dataJohan Hovold2012-10-301-2/+0
| | | | | | | | | | | | | | | | | | | | | 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>
| * | USB: ftdi_sio: remove unnecessary memsetJohan Hovold2012-10-301-1/+0
| | | | | | | | | | | | | | | | | | | | | No need to memset a kzalloced struct. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: cp210x: fix whitespace issuesJohan Hovold2012-10-301-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix missing and superfluous whitespace. Fix misplaced brackets. Fix indentation. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: iuu_phoenix: replace strict_strtoul() with kstrtoul()Jingoo Han2012-10-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The usage of strict_strtoul() is not preferred, because strict_strtoul() is obsolete. Thus, kstrtoul() should be used. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | Merge 3.7-rc3 into usb-next.Greg Kroah-Hartman2012-10-2918-830/+744
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pulls in all of the USB changes in 3.7-rc3 into usb-next and resolves the merge issue with: drivers/usb/misc/ezusb.c Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | usb: serial: ftdi_sio: Add missing chars_in_buffer functionJarkko Huijts2012-10-251-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 <jarkko.huijts@gmail.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | | Merge 3.7-rc6 into tty-nextGreg Kroah-Hartman2012-11-163-7/+15
|\ \ \ \ | | |_|/ | |/| |
| * | | USB: option: add Alcatel X220/X500D USB IDsDan Williams2012-11-131-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | USB: option: add Novatel E362 and Dell Wireless 5800 USB IDsDan Williams2012-11-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Dell 5800 appears to be a simple rebrand of the Novatel E362. Signed-off-by: Dan Williams <dcbw@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | USB: keyspan: fix typo causing GPF on openBjørn Mork2012-11-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit f79b2d0f (USB: keyspan: fix NULL-pointer dereferences and memory leaks) had a small typo which made the driver use wrong offsets when mapping serial port private data. This results in in a GPF when the port is opened. Reported-by: Richard <richjunk@pacbell.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Bjørn Mork <bjorn@mork.no> Acked-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | | USB: usb_wwan: fix bulk-urb allocationJohan Hovold2012-10-301-5/+5
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we do not allocate urbs if we do not have a bulk endpoint. Legacy code used incorrect assumption to test for bulk endpoints. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* / | TTY: call tty_port_destroy in the rest of driversJiri Slaby2012-11-151-0/+1
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit "TTY: move tty buffers to tty_port", the tty buffers are not freed in some drivers. This is because tty_port_destructor is not called whenever a tty_port is freed. This was an assumption I counted with but was unfortunately untrue. So fix the drivers to fulfil this assumption. To be sure, the TTY buffers (and later some stuff) are gone along with the tty_port, we have to call tty_port_destroy at tear-down places. This is mostly where the structure containing a tty_port is freed. This patch does exactly that -- put tty_port_destroy at those places. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | USB: mos7840: fix port_probe flowJohan Hovold2012-10-251-183/+166
| | | | | | | | | | | | | | | | | | | | Remove temporary do-while(0) loop used to keep changes minimal. Fixup indentation, remove some line breaks, and replace break with goto to maintain flow. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>