summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'usb-3.10-rc1' of ↵Linus Torvalds2013-04-29275-9748/+9995
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB patches from Greg Kroah-Hartman: "Here's the big USB pull request for 3.10-rc1. Lots of USB patches here, the majority being USB gadget changes and USB-serial driver cleanups, the rest being ARM build fixes / cleanups, and individual driver updates. We also finally got some chipidea fixes, which have been delayed for a number of kernel releases, as the maintainer has now reappeared. All of these have been in linux-next for a while" * tag 'usb-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (568 commits) USB: ehci-msm: USB_MSM_OTG needs USB_PHY USB: OHCI: avoid conflicting platform drivers USB: OMAP: ISP1301 needs USB_PHY USB: lpc32xx: ISP1301 needs USB_PHY USB: ftdi_sio: enable two UART ports on ST Microconnect Lite usb: phy: tegra: don't call into tegra-ehci directly usb: phy: phy core cannot yet be a module USB: Fix initconst in ehci driver usb-storage: CY7C68300A chips do not support Cypress ATACB USB: serial: option: Added support Olivetti Olicard 145 USB: ftdi_sio: correct ST Micro Connect Lite PIDs ARM: mxs_defconfig: add CONFIG_USB_PHY ARM: imx_v6_v7_defconfig: add CONFIG_USB_PHY usb: phy: remove exported function from __init section usb: gadget: zero: put function instances on unbind usb: gadget: f_sourcesink.c: correct a copy-paste misnomer usb: gadget: cdc2: fix error return code in cdc_do_config() usb: gadget: multi: fix error return code in rndis_do_config() usb: gadget: f_obex: fix error return code in obex_bind() USB: storage: convert to use module_usb_driver() ...
| * USB: ehci-msm: USB_MSM_OTG needs USB_PHYArnd Bergmann2013-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Kconfig entry for USB_EHCI_MSM unconditionally selects USB_MSM_OTG, which is now only visible when USB_PHY is also enabled. This adds an appropriate dependency and enables USB_PHY in the msm defconfig, avoiding the Kbuild warning: warning: (USB_EHCI_MSM) selects USB_MSM_OTG which has unmet direct dependencies (USB_SUPPORT && USB_PHY && (USB || USB_GADGET) && ARCH_MSM) Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Felipe Balbi <balbi@ti.com> Cc: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: OHCI: avoid conflicting platform driversArnd Bergmann2013-04-251-18/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like the EHCI driver, OHCI supports a large number of different platform glue drivers by directly including them, which causes problems with conflicting macro definitions in some cases. As more ARM architecture specific back-ends are required to coexist in a single build, we should split those out into separate drivers. Unfortunately, the infrastructure for that is still under development, so to give us more time, this uses a separate *_PLATFORM_DRIVER macro for each ARM specific OHCI backend, just like we already do on PowerPC and some of the other ARM platforms. In linux-3.10, only the SPEAr and CNS3xxx back-ends would actually conflict without this patch, but over time we would get more of them, so this is a way to avoid having to patch the driver every time it breaks. We should still split out all back-ends into separate loadable modules, but that work is only needed to improve code size and cleanliness after this patch, not for correctness. While we're here, this fixes the incorrectly sorted error path for the OMAP1 and OMAP3 backends to ensure we always unregister the exact set of drivers that were registered before erroring out. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: OMAP: ISP1301 needs USB_PHYArnd Bergmann2013-04-252-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Kconfig entry for USB_OMAP unconditionally selects USB_ISP1301, which is now only visible when USB_PHY is also enabled. This adds an appropriate dependency and enables USB_PHY in the omap1 defconfig, avoiding these build warnings: warning: (USB_OHCI_HCD && USB_OMAP) selects ISP1301_OMAP which has unmet direct dependencies (USB_SUPPORT && USB_PHY && I2C && ARCH_OMAP_OTG) Also fix a Makefile typo while we're at it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: lpc32xx: ISP1301 needs USB_PHYArnd Bergmann2013-04-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Kconfig entry for USB_LPC32XX unconditionally selects USB_ISP1301, which is now only visible when USB_PHY is also enabled. This adds an appropriate dependency and enables USB_PHY in the msm defconfig, avoiding these build errors: warning: (USB_LPC32XX) selects USB_ISP1301 which has unmet direct dependencies (USB_SUPPORT && USB_PHY && (USB || USB_GADGET) && I2C) drivers/built-in.o: In function `usb_hcd_nxp_probe': drivers/usb/host/ohci-nxp.c:224: undefined reference to `isp1301_get_client' drivers/built-in.o: In function `lpc32xx_udc_probe': drivers/usb/gadget/lpc32xx_udc.c:3071: undefined reference to `isp1301_get_client' Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Felipe Balbi <balbi@ti.com> Cc: Roland Stigge <stigge@antcom.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: ftdi_sio: enable two UART ports on ST Microconnect LiteAdrian Thomasset2013-04-241-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | The FT4232H used in the ST Micro Connect Lite has four hi-speed UART ports. The first two ports are reserved for the JTAG interface. We enable by default ports 2 and 3 as UARTs (where port 2 is a conventional RS-232 UART) Signed-off-by: Adrian Thomasset <adrian.thomasset@st.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: phy: tegra: don't call into tegra-ehci directlyArnd Bergmann2013-04-232-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one, which does not work if one of them or both are loadable modules, resulting in an error like: drivers/built-in.o: In function `utmi_phy_clk_disable': drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd' drivers/built-in.o: In function `utmi_phy_clk_enable': drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd' drivers/built-in.o: In function `utmi_phy_power_on': drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts' This turns the interface into a one-way dependency by letting the tegra ehci driver pass two function pointers for callbacks that need to be called by the phy driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Venu Byravarasu <vbyravarasu@nvidia.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Felipe Balbi <balbi@ti.com> Cc: Stephen Warren <swarren@nvidia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb: phy: phy core cannot yet be a moduleArnd Bergmann2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of platform code calls into the usb phy core at the moment, which does not work if it is built as a loadable module. This will hopefully change when those platforms are all converted to DT based probing, but for now, the easiest solution is to change it from "tristate" to "bool". This solves at least these ARM allmodconfig build errors: arch/arm/mach-imx/built-in.o: In function `imx_otg_ulpi_create': arch/arm/mach-imx/ulpi.c:117: undefined reference to `otg_ulpi_create' arch/arm/mach-omap2/built-in.o: In function `usbhs_init_phys': arch/arm/mach-omap2/usb-host.c:652: undefined reference to `usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function `omap_2430sdp_init': arch/arm/mach-omap2/board-2430sdp.c:236: undefined reference to `usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function `omap3_beagle_init': arch/arm/mach-omap2/board-omap3beagle.c:554: undefined reference to `usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function `devkit8000_init': arch/arm/mach-omap2/board-devkit8000.c:596: undefined reference to `usb_bind_phy' arch/arm/mach-omap2/built-in.o: In function `omap_ldp_init': arch/arm/mach-omap2/board-ldp.c:379: undefined reference to `usb_bind_phy' drivers/built-in.o: In function `ab8500_charger_probe': drivers/power/ab8500_charger.c:3629: undefined reference to `usb_get_phy' drivers/power/ab8500_charger.c:3706: undefined reference to `usb_put_phy' drivers/built-in.o: In function `ab8500_charger_remove': drivers/power/ab8500_charger.c:3411: undefined reference to `usb_put_phy' Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: Fix initconst in ehci driverAndi Kleen2013-04-233-3/+3
| | | | | | | | | | | | | | | | Fix some of the initconst markings in the ehci driver(s). Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * usb-storage: CY7C68300A chips do not support Cypress ATACBTormod Volden2013-04-231-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many cards based on CY7C68300A/B/C use the USB ID 04b4:6830 but only the B and C variants (EZ-USB AT2LP) support the ATA Command Block functionality, according to the data sheets. The A variant (EZ-USB AT2) locks up if ATACB is attempted, until a typical 30 seconds timeout runs out and a USB reset is performed. https://bugs.launchpad.net/bugs/428469 It seems that one way to spot a CY7C68300A (at least where the card manufacturer left Cypress' EEPROM default vaules, against Cypress' recommendations) is to look at the USB string descriptor indices. A http://media.digikey.com/pdf/Data%20Sheets/Cypress%20PDFs/CY7C68300A.pdf B http://www.farnell.com/datasheets/43456.pdf C http://www.cypress.com/?rID=14189 Note that a CY7C68300B/C chip appears as CY7C68300A if it is running in Backward Compatibility Mode, and if ATACB would be supported in this case there is anyway no way to tell which chip it really is. For 5 years my external USB drive has been locking up for half a minute when plugged in and ata_id is run by udev, or anytime hdparm or similar is run on it. Finally looking at the /correct/ datasheet I think I found the reason. I am aware the quirk in this patch is a bit hacky, but the hardware manufacturers haven't made it easy for us. Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: serial: option: Added support Olivetti Olicard 145Filippo Turato2013-04-231-0/+2
| | | | | | | | | | | | | | | | This adds PID for Olivetti Olicard 145 in option.c Signed-off-by: Filippo Turato <nnj7585@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * USB: ftdi_sio: correct ST Micro Connect Lite PIDsAdrian Thomasset2013-04-232-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current ST Micro Connect Lite uses the FT4232H hi-speed quad USB UART FTDI chip. It is also possible to drive STM reference targets populated with an on-board JTAG debugger based on the FT2232H chip with the same STMicroelectronics tools. For this reason, the ST Micro Connect Lite PIDs should be ST_STMCLT_2232_PID: 0x3746 ST_STMCLT_4232_PID: 0x3747 Signed-off-by: Adrian Thomasset <adrian.thomasset@st.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Merge tag 'usb-for-v3.10-part2' of ↵Greg Kroah-Hartman2013-04-236-5/+12
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: urgent fixes for v3.10 merge window Here are some late urgent fixes for v3.10 merge window. All of these errors were introduced by recent commits which are in linux-next. f_obex, multi and cdc2 gadget drivers have learned to return a proper error code when something goes wrong. usb_bind_phy() was mistakenly placed into .init.text section which caused Section mismatch warnings and undefined reference compile errors. f_source_sink had a copy-paste error which is now corrected. g_zero got a memory leak plugged. Two defconfigs got fixed to enable the newly introduced CONFIG_USB_PHY.
| | * usb: phy: remove exported function from __init sectionDenis Efremov2013-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The symbol usb_bind_phy is exported and annotated __init. It looks like section mismatch. Fix by removing the __init annotation of usb_bind_phy. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Denis Efremov <yefremov.denis@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * usb: gadget: zero: put function instances on unbindAndrzej Pietrasiewicz2013-04-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | If function instances are not put on gadget's unbind, their implementation module's refcount is nonzero and it is impossible to unload them. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * usb: gadget: f_sourcesink.c: correct a copy-paste misnomerAndrzej Pietrasiewicz2013-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acm was the first function to be converted and it seems that its code served as a base for converting f_sourcesink to the new function interface. source_sink has nothing to do with acm, though. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * usb: gadget: cdc2: fix error return code in cdc_do_config()Wei Yongjun2013-04-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Introduced by commit 29a664 (usb: gadget: cdc2: use function framework for ACM) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * usb: gadget: multi: fix error return code in rndis_do_config()Wei Yongjun2013-04-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Introduced by commit 59835a (usb: gadget: multi: use function framework for ACM.) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
| | * usb: gadget: f_obex: fix error return code in obex_bind()Wei Yongjun2013-04-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix to return a negative error code from the error handling case instead of 0, as returned elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * | USB: storage: convert to use module_usb_driver()Greg Kroah-Hartman2013-04-191-29/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that Joe cleaned up the init/exit functions, we can just get rid of them entirely and use the proper macro that almost all other USB drivers now use. Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: storage: Convert US_DEBUGP to usb_stor_dbgJoe Perches2013-04-1920-834/+753
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use a more current logging style with dev_printk where possible. o Convert uses of US_DEBUGP to usb_stor_dbg o Add "struct us_data *" to usb_stor_dbg uses o usb_stor_dbg now uses struct device */dev_vprint_emit o Removed embedded function names o Coalesce formats o Remove trailing whitespace o Remove useless OOM messages o Remove useless function entry/exit logging o Convert some US_DEBUGP uses to dev_info and dev_dbg Object size is slightly reduced when debugging is enabled, slightly increased with no debugging because some initialization and removal messages are now always emitted. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ti_usb_3410_5052: kill custom closing_waitJohan Hovold2013-04-191-54/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Kill custom closing_wait implementation and let the tty-layer handle it instead. Note that the port drain-delay is set to three characters to keep the 20ms delay after wait_until_sent at low baudrates (1200 baud) during close. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ti_usb_3410_5052: remove redundant drain from break_ctlJohan Hovold2013-04-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove redundant drain, which has already been handled by the tty-layer, from break_ctl. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ti_usb_3410_5052: query hardware-buffer status in chars_in_bufferJohan Hovold2013-04-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Query hardware-buffer status in chars_in_buffer should the write fifo be empty. This is needed to make the tty layer wait for hardware buffers to drain on close. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ti_usb_3410_5052: remove lsr from port dataJohan Hovold2013-04-191-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | The line status register is only polled so let's not keep a possibly outdated value in the port data. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ti_usb_3410_5052: move write-fifo flushing to closeJohan Hovold2013-04-191-9/+8
| | | | | | | | | | | | | | | | | | | | | Move write-fifo flushing from ti_drain to close where it belongs. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: io_ti: remove redundant wait_until_sentJohan Hovold2013-04-191-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Remove redundant wait_until_sent, which has already been handled by the tty-layer, from break_ctl. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: io_ti: fix TIOCGSERIALJohan Hovold2013-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix regression introduced by commit f40d78155 ("USB: io_ti: kill custom closing_wait implementation") which made TIOCGSERIAL return the wrong value for closing_wait. Signed-off-by: Johan Hovold <jhovold@gmail.com> Cc: stable <stable@vger.kernel.org> # 3.9 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: usbtmc: remove unnecessary memory allocationMing Lei2013-04-191-22/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Inside usbtmc_ioctl_clear_out_halt()/usbtmc_ioctl_clear_in_halt(), usb_clear_halt() needn't any buffer to pass in, so remove the unnecessary memory allocation. Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usbatm: fix potential NULL pointer dereferenceWei Yongjun2013-04-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The dereference to 'instance' in the debug code should be moved below the NULL test. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: storage: Fix link errorJoe Perches2013-04-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix allmodconfig link error introduced by commit 75b9130e8a ("usb: storage: Add usb_stor_dbg, reduce object size") Export the symbol usb_stor_dbg. Add export.h Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: symbolserial: move private-data allocation to port_probeJohan Hovold2013-04-171-11/+19
| | | | | | | | | | | | | | | | | | | | | Allocate port-private data in port-probe rather than in attach. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: symbolserial: remove unused private dataJohan Hovold2013-04-171-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | Use port device for debug messages in interrupt-urb callback and remove unused private data. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: symbolserial: use port interrupt-in urbJohan Hovold2013-04-171-90/+12
| | | | | | | | | | | | | | | | | | | | | Use the port interrupt-in urb rather managing a private one. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: mct_u232: clean up read implementationJohan Hovold2013-04-171-26/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The device uses the second interrupt-in endpoint of the interface for reading. Stop abusing the port read urb and store a pointer to the second interrupt-in urb as port-private data instead. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: kobil_sct: use port interrupt-out urbJohan Hovold2013-04-171-67/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the port interrupt-out urb rather than abusing the port write_urb pointer and allocating a new urb at every open (but the first...). Note that the write_urb abuse would have led to a double free should there ever be interfaces with a bulk-out endpoint. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: kobil_sct: remove unused endpoint addressJohan Hovold2013-04-171-8/+0
| | | | | | | | | | | | | | | | | | | | | Remove unused interrupt-in endpoint address from private data. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: kobil_sct: fix broken debug codeJohan Hovold2013-04-171-18/+2
| | | | | | | | | | | | | | | | | | | | | Replace broken and commented-out debug code with usb_serial_debug_data. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: omninet: switch to generic read implementationJohan Hovold2013-04-171-40/+3
| | | | | | | | | | | | | | | | | | | | | Switch to the more efficient generic read implementation. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: omninet: refactor read-urb processingJohan Hovold2013-04-171-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | Refactor read-urb processing, and add sanity checks on header and data lengths. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: omninet: clean up protocol definesJohan Hovold2013-04-171-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove redundant data-offset define, which was really just the header length. Add payload-size define and use the bulk-out size define for the actual bulk-out size. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: omninet: clean up protocol descriptionJohan Hovold2013-04-171-7/+6
| | | | | | | | | | | | | | | | | | | | | Clean up and fix typos in protocol comment. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: omninet: use kzalloc for private dataJohan Hovold2013-04-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Make sure the port private data, which contains the write sequence number, is cleared at allocation. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ehci-omap: Improve PHY error handlingRoger Quadros2013-04-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | As the USB PHY layer never returns NULL we don't need to check for that condition. Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | USB: ehci-omap: Don't select any PHY driverRoger Quadros2013-04-171-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't select NOP_USB_XCEIV. Instead, board config must select USB_PHY and the appropriate PHY driver. Also add a hint in Kconfig so that users enabling this driver manually enable the right PHY drivers as well. Gets rid of the below warnings when USB_EHCI_HCD_OMAP is enabled. warning: (USB_EHCI_HCD_OMAP) selects NOP_USB_XCEIV which has unmet direct dependencies (USB_SUPPORT && USB_PHY) warning: (USB_EHCI_HCD_OMAP) selects NOP_USB_XCEIV which has unmet direct dependencies (USB_SUPPORT && USB_PHY) Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usbfs: Always allow ctrl requests with USB_RECIP_ENDPOINT on the ctrl epHans de Goede2013-04-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When usbfs receives a ctrl-request from userspace it calls check_ctrlrecip, which for a request with USB_RECIP_ENDPOINT tries to map this to an interface to see if this interface is claimed, except for ctrl-requests with a type of USB_TYPE_VENDOR. When trying to use this device: http://www.akaipro.com/eiepro redirected to a Windows vm running on qemu on top of Linux. The windows driver makes a ctrl-req with USB_TYPE_CLASS and USB_RECIP_ENDPOINT with index 0, and the mapping of the endpoint (0) to the interface fails since ep 0 is the ctrl endpoint and thus never is part of an interface. This patch fixes this ctrl-req failing by skipping the checkintf call for USB_RECIP_ENDPOINT ctrl-reqs on the ctrl endpoint. Reported-by: Dave Stikkolorum <d.r.stikkolorum@hhs.nl> Tested-by: Dave Stikkolorum <d.r.stikkolorum@hhs.nl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: storage: Add usb_stor_dbg, reduce object sizeJoe Perches2013-04-173-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce the size of the objects by consolidating the duplicated USB_STORAGE into a single function. Add function usb_stor_dbg to emit debugging messages. Always validate the format and arguments. Reduce the number of uses of CONFIG_USB_STORAGE_DEBUG. Reduces size of objects ~7KB when CONFIG_USB_STORAGE_DEBUG is set. $ size drivers/usb/storage/built-in.o* text data bss dec hex filename 140133 55296 70312 265741 40e0d drivers/usb/storage/built-in.o.new 147494 55248 70296 273038 42a8e drivers/usb/storage/built-in.o.old Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: remove redundant tdi_resetShengzhou Liu2013-04-171-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We remove the redundant tdi_reset in ehci_setup since there is already it in ehci_reset. It was observed that the duplicated tdi_reset was causing the PHY_CLK_VALID bit unstable. Reported-by: Michael Braun <michael-dev@fami-braun.de> Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@vger.kernel.org> # 3.6+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: exynos: do not include plat/usb-phy.hArnd Bergmann2013-04-112-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The definitions have moved to include/linux/usb/samsung-usb-phy.h, and plat/usb-phy.h is unavailable from drivers in a multiplatform configuration. Also fix up the plat/usb-phy.h header file to use the definitions from the new header instead of providing a separate copy. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | usb: ohci-exynos: skip phy setup for Exynos5440 based platformsThomas Abraham2013-04-111-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Exynos5440 does not require any explict USB phy configuration. So skip the USB phy configuration for Exynos5440 based platforms. Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>