summaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2017-02-17Merge branch 'akpm-current/current'Stephen Rothwell
2017-02-17Merge remote-tracking branch 'gpio/for-next'Stephen Rothwell
2017-02-17Merge remote-tracking branch 'usb/usb-next'Stephen Rothwell
2017-02-17Merge remote-tracking branch 'tip/auto-latest'Stephen Rothwell
2017-02-17Merge remote-tracking branch 'vfs/for-next'Stephen Rothwell
2017-02-16Merge tag 'usb-serial-4.11-rc1-2' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.11-rc1 part 2 Here's one more device id for the new upd78f0730 driver and three clean-up patches that are mostly moving some code around. All have been in linux-next with no reported issues. Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-16Merge branch 'locking/core'Ingo Molnar
2017-02-15usb: cdc-wdm: remove logically dead codeGustavo A. R. Silva
Remove logically dead code. 'cntr' is always equal to zero when the following line of code is executed: rv = cntr ? cntr : -EAGAIN; Addresses-Coverity-ID: 113227 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Acked-by: Oliver Neukum <oneukum@suse.com> Reviewed-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-15USB: serial: keyspan: drop header fileJohan Hovold
Move all declarations and definitions in keyspan.h to keyspan.c, which is the only place were they are used. This specifically moves the driver device-id tables and usb-serial driver definitions to the source file where they are expected to be found. While at it, fix up some multi-line comments and minor white-space issues (spaces instead of tabs and superfluous white space). Note that the information in the comment header of the removed header file is also present in the source file. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-15USB: serial: io_edgeport: drop io-tables header fileJohan Hovold
Move the driver device-id tables and usb-serial driver definitions to the source file where they are expected to be found. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-14usb: musb: add code comment for clarificationGustavo A. R. Silva
Add code comment to make it clear that the fall-through is intentional. Read the link for more details: https://lkml.org/lkml/2017/2/9/292 Addresses-Coverity-ID: 1397608 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-14usb: misc: add USB251xB/xBi Hi-Speed Hub Controller DriverRichard Leitner
This patch adds a driver for configuration of the Microchip USB251xB/xBi USB 2.0 hub controller series with USB 2.0 upstream connectivity, SMBus configuration interface and two to four USB 2.0 downstream ports. Furthermore add myself as a maintainer for this driver. The datasheet can be found at the manufacturers website, see [1]. All device-tree exposed configuration features have been tested on a i.MX6 platform with a USB2512B hub. [1] http://ww1.microchip.com/downloads/en/DeviceDoc/00001692C.pdf Signed-off-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-14usb: misc: usbtest: remove redundant check on retval < 0Colin Ian King
The check for retval being less than zero is always true since retval equal to -EPIPE at that point. Replace the existing conditional with just return retval. Detected with CoverityScan, CID#114349 ("Logically dead code") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Peter Chen <peter.chen@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-13USB: serial: upd78f0730: sort device idsJohan Hovold
Sort the device ids by vendor id. Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-13USB: serial: upd78f0730: add ID for EVAL-ADXL362ZMaksim Salau
The adaptor on Analog Devices EVAL-ADXL362Z development board is used to flash and debug firmware of on-board Renesas RL78/G13 MCU. Also added support of the 153600 baud rate, since the stock firmware uses it. Signed-off-by: Maksim Salau <maksim.salau@gmail.com> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-10ohci-hub: fix typo in dbg_port macroJelle Martijn Kok
The "dbg_port" macro uses the "outside" parameter (="temp") instead of the parameters (="value") given in the macro. As the macro can look outside its definition this causes no direct problem. Signed-off-by: Jelle Martijn Kok <jmkok@youcom.nl> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09Merge tag 'usb-serial-4.11-rc1' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.11-rc1 These updates include - a new driver for Renesas uPD78F0730-based devices - several fixes of failures to check for short transfers, some of which could lead to minor information leaks, and in one case a loop-condition underflow - a fix of a long-standing regression in the ftdi_sio driver which resulted in excessive bulk-in interrupts - a fix for ftdi_sio line-status over-reporting which could lead to an endless stream of NULL-characters being forwarded to user space - a fix for a regression in the console driver - a fix for another mos7840 NULL-pointer dereference due to a missing endpoint sanity check Included are also some clean ups and fixes for various minor issues, as well as a couple of new device IDs that came in late. All but the final patch have been in linux-next with no reported issues. Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-09usb: musb: dsps: Manage CPPI 4.1 DMA interrupt in DSPSAlexandre Bailon
Despite the CPPI 4.1 is a generic DMA, it is tied to USB. On the DSPS, CPPI 4.1 interrupt's registers are in USBSS (the MUSB glue). Currently, to enable / disable and clear interrupts, the CPPI 4.1 driver maps and accesses to USBSS's register, which making CPPI 4.1 driver not really generic. Move the interrupt management to DSPS driver. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09usb: musb: tusb6010: Clean up tusb_omap_dma structureAlexandre Bailon
A pointer to musb is now present in the dma_controller structure. Remove the one present in tusb_omap_dma structure. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09usb: musb: cppi_dma: Clean up cppi41_dma_controller structureAlexandre Bailon
A pointer to musb is now present in the dma_controller structure. Remove the one present in cppi41_dma_controller structure. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09usb: musb: cppi_dma: Clean up cppi structureAlexandre Bailon
A pointer to musb is now present in the dma_controller structure. Remove the one present in cppi structure. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09usb: musb: cppi41: Detect aborted transfers in cppi41_dma_callback()Alexandre Bailon
Update cppi41_dma_callback() to detect an aborted transfer. This was not required before because cppi41_dma_callback() was only invoked on transfer completion. In order to make CPPI 4.1 driver more generic, cppi41_dma_callback() will be invoked after a transfer abort in order to let the MUSB driver perform some action such as acknowledge the interrupt that may be fired during a teardown. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09usb: musb: dma: Add a DMA completion platform callbackAlexandre Bailon
Currently, the CPPI 4.1 driver is not completely generic and only works on DSPS. This is because of IRQ management. Add a callback to dma_controller that could be invoked on DMA completion to acknowledge the IRQ. Signed-off-by: Alexandre Bailon <abailon@baylibre.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09drivers: usb: usbip: Add missing break statement to switchGustavo A. R. Silva
Add missing break statement to prevent the code for case USB_PORT_FEAT_C_RESET falling through to the default case. Addresses-Coverity-ID: 143155 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09usb: mtu3: remove redundant dev_err call in get_ssusb_rscs()Wei Yongjun
There is a error message within devm_ioremap_resource already, so remove the dev_err call to avoid redundant error message. Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09USB: serial: mos7840: fix another NULL-deref at openJohan Hovold
Fix another NULL-pointer dereference at open should a malicious device lack an interrupt-in endpoint. Note that the driver has a broken check for an interrupt-in endpoint which means that an interrupt URB has never even been submitted. Fixes: 3f5429746d91 ("USB: Moschip 7840 USB-Serial Driver") Cc: stable <stable@vger.kernel.org> # v2.6.19: 5c75633ef751 Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-09mm, fs: reduce fault, page_mkwrite, and pfn_mkwrite to take only vmfDave Jiang
->fault(), ->page_mkwrite(), and ->pfn_mkwrite() calls do not need to take a vma and vmf parameter when the vma already resides in vmf. Remove the vma parameter to simplify things. Link: http://lkml.kernel.org/r/148521301778.19116.10840599906674778980.stgit@djiang5-desk3.ch.intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Theodore Ts'o <tytso@mit.edu> Cc: Darrick J. Wong <darrick.wong@oracle.com> Cc: Matthew Wilcox <mawilcox@microsoft.com> Cc: Dave Hansen <dave.hansen@intel.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Jan Kara <jack@suse.com> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2017-02-08USB: serial: console: clean up sanity checksJohan Hovold
Drop two redundant NULL checks from usb_serial_console_disconnect(). The usb_serial_console_disconnect function is called from the USB-serial-device disconnect callback when a device is going away. Hence there is no need to check for the serial-device pointer being NULL. The serial-device port pointers are stored in an array that is a member of the serial struct so the address of the first member of the array (which the array name decays to) is never NULL either. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-08USB: serial: console: fix uninitialised spinlockJohan Hovold
Since commit 4a510969374a ("tty: Make tty_files_lock per-tty") a new tty_struct spin lock is taken in the tty release path, but the USB-serial-console hack was never updated hence leaving the lock of its "fake" tty uninitialised. This was eventually detected by lockdep. Make sure to initialise the new lock also for the fake tty to address this regression. Yes, this code is a mess, but cleaning it up is left for another day. Fixes: 4a510969374a ("tty: Make tty_files_lock per-tty") Cc: stable <stable@vger.kernel.org> # 4.6 Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-08USB: serial: metro-usb: drop redundant URB reinitialisationJohan Hovold
No need to reinitialise the interrupt-in URB with values that have not changed before (some) resubmissions. This also allows the interrupt-in callback to have a single path for URB resubmission. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-08USB: serial: metro-usb: drop function-tracing debuggingJohan Hovold
Drop some unnecessary debug printks. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-08USB: serial: metro-usb: drop redundant URB unlinkJohan Hovold
Drop redundant URB unlink as there's no need to unlink an URB which is about to be killed synchronously. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-08USB: serial: metro-usb: drop unused interrupt-out callbackJohan Hovold
Drop the unused interrupt-out callback. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-08usb: xhci-mtk: make the reference clock optionalChunfeng Yun
Make the reference clock optional for DTS backward compatibility and ignore the error if it does not exist. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-08usb: mtu3: make the reference clock optionalChunfeng Yun
Make the reference clock optional for DTS backward compatibility and ignore the error if it does not exist. Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-08drivers: usb-misc: sisusbvga: remove dead codeGustavo A. R. Silva
The condition modex % 16 cannot be true when modex value is equal to 640 The condition du & 0xff cannot be true when du value is equal to 0x1400 Addresses-Coverity-Id: 101163 Addresses-Coverity-Id: 744373 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-08drivers: usb: early: remove unused codeGustavo A. R. Silva
Remove this line of code because devnum is overwritten before it can be used. This could happen if line of code 609 (goto try_again;) is executed. Otherwise, devnum is never used again. Addresses-Coverity-ID: 1226870 Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-06USB: serial: sierra: fix bogus alternate-setting assumptionJohan Hovold
Interface numbers do not change when enabling alternate settings as comment and code in this driver suggested. Remove the confusing comment and redundant retrieval of the interface number in probe, while simplifying and renaming the interface-number helper. Fixes: 4db2299da213 ("sierra: driver interface blacklisting") Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-06USB: serial: ftdi_sio: fix line-status over-reportingJohan Hovold
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>
2017-02-06USB: serial: cp210x: add new IDs for GE Bx50v3 boardsKen Lin
Add new USB IDs for cp2104/5 devices on Bx50v3 boards due to the design change. Signed-off-by: Ken Lin <yungching0725@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-06Merge 4.10-rc7 into usb-nextGreg Kroah-Hartman
We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-04Merge tag 'usb-ci-v4.11-rc1' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-next Peter writes: Hi Greg, In this series, it adds qualcomm USB2 support. The review process takes more than half of year, thanks for Stephen Boyd's great work. Most of patches at linux-next more than ten days, and the last two small chipidea patches at my tree about one day, no warning is reported from autobuild robot. Thanks.
2017-02-03Merge tag 'usb-serial-4.10-rc7' of ↵Greg Kroah-Hartman
git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.10-rc7 One more device ID for pl2303. Signed-off-by: Johan Hovold <johan@kernel.org>
2017-02-03usb: musb: dsps: make dsps_musb_clear_ep_rxintr() staticWei Yongjun
Fixes the following sparse warning: drivers/usb/musb/musb_dsps.c:270:6: warning: symbol 'dsps_musb_clear_ep_rxintr' was not declared. Should it be static? Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03usb: musb: sunxi: add support for the variant in H3/V3s SoCIcenowy Zheng
Allwinner H3/V3s features a variant of MUSB controller, which lacks one endpoint. Add support for it. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> [b-liu@ti.com: added usb: to commit subject prefix] Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03usb: musb: omap2430: constify dev_pm_ops structuresBhumika Goyal
Declare dev_pm_ops structures as const as they are only stored in the pm field of a device_driver structure. This field is of type const, so dev_pm_ops structures having similar properties can be declared const too. Size details after cross compiling the .o file for arm architecture. File size before: drivers/usb/musb/omap2430.o text data bss dec hex filename 4141 400 8 4549 11c5 usb/musb/omap2430.o File size after: drivers/usb/musb/omap2430.o text data bss dec hex filename 4333 200 8 4541 11bd usb/musb/omap2430.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> [b-liu@ti.com: added omap2430 in commit subject prefix] Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03usb: musb: Add support for optional VBUS irq to dsps glue layerTony Lindgren
We can now configure the PMIC interrupt to provide us VBUS events. In that case we don't need to constantly poll the status and can make it optional. This is only wired up for the mini-B interface on beaglebone. Note that eventually we should get also the connect status for the host interface when the am335x internal PM coprocessor provides us with an IRQ chip. For now, we still need to poll for the host mode status. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03usb: musb: blackfin: fix unused warnings on suspend/resumeJérémy Lefaure
When CONFIG_PM_SLEEP is disabled, SIMPLE_DEV_PM_OPS does not use bfin_resume and bfin_suspend even if CONFIG_PM is enabled: drivers/usb/musb/blackfin.c:602:12: warning: ‘bfin_resume’ defined but not used [-Wunused-function] static int bfin_resume(struct device *dev) ^~~~~~~~~~~ drivers/usb/musb/blackfin.c:585:12: warning: ‘bfin_suspend’ defined but not used [-Wunused-function] static int bfin_suspend(struct device *dev) ^~~~~~~~~~~~ The preprocessor condition should be on CONFIG_PM_SLEEP, not on CONFIG_PM. However it is better to mark these functions as __maybe_unused. Signed-off-by: Jérémy Lefaure <jeremy.lefaure@lse.epita.fr> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03usb: musb: dsps: switch to static id for musb-hdrc platform devicesBin Liu
The dsps glue uses PLATFORM_DEVID_AUTO when creating the musb-hdrc platform devices, this causes that the id will change in each system depending on the order of driver probe, the order of the usb instances defined in device-tree, or the list of enabled devices which use also PLATFORM_DEVID_AUTO in kernel config. This id inconsistency causes trouble in shell scripting or user guide documentation. So switch it to static id, starting from 0 to the musb instance with lower MMR offset. This scheme is also aligned to the naming in the SoC. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-03usb: musb: debugfs: allow forcing host mode together with speed in testmodePali Rohár
Based on the musb ug, force_host bit is allowed to be set along with force_hs or force_fs bit. It could help to implement forced host mode via testmode on Nokia N900. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>