summaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2010-02-17tegra usb:Fix suspend/resume failure in OTG mode.Venkat Moganty
In OTG mode during suspend/resume functionalities both device driver and host driver are accessing the USB1 controller registers with out checking the operation mode. Host driver is reading wrong status values from the registers causing the stack dump. This is fixed by checking the OTG state and guarding the hardware to access by only one driver(host or device), which is currently in operation. Bug 651253 : [Whistler] : USB gadget and/or EHCI bus suspend/resume API causes crash 1st after suspend/resume Tested on : Android/whistler with suspend/resume framework enabled. Suspend/resume sequence work fine with OTG enabled.
2010-02-15Merge "f_mass_storage: allow platform to set bulk buffer size" into ↵Gary King
android-tegra-2.6.29
2010-02-12f_mass_storage: allow platform to set bulk buffer sizeGary King
add a field to the android_usb_platform_data structure to allow platforms to specify the size of the bulk transfer buffer; if unspecified, default to the BULK_BUFFER_SIZE defined by f_mass_storage.c (previously defined as 4KiB). on harmony (tegra 2), performance of a class 10 SD card mounted as USB mass storage through this gadget has been measured to increase from ~7MB/sec read to ~17MB/sec read by increasing the buffer size from 4KiB to 16KiB. Change-Id: I0da025f1317506cbd3257fe697a9297b0516d9e9
2010-02-11tegra usbh: whistler suspend/resume failure fixBitan Biswas
With OTG disabled on whistler the suspend/resume code was hanging. The reason is because register reads hang when clocks are disabled. This fix tries to skip the suspend calls when device is already in suspend state. This avoids attempts to read register with clocks disabled. Bug 651253 : [Whistler] : USB gadget and/or EHCI bus suspend/resume API causes crash 1st after suspend/resume Reviewed by: vmoganty Tested on : whistler with suspend/resume framework enabled. Suspend/resume sequence seems to work fine on whistler and harmony with OTG disabled in kernel and odm_query. Change-Id: Iedc096648deab5c3b80350446c4ee67f625df27e
2010-02-03tegra pm: usb host suspend/resume supportBitan Biswas
suspend/resume APIs defined for tegra usb host Bug 635299 Tested on : harmony. suspend/resume calls success. Change-Id: I5dad8bc2cc524de74c2fd3260b014de4764c604c
2010-02-01tegra pm: usb gadget suspend/resume supportBitan Biswas
suspend/resume APIs defined for tegra usb gadget Bug 635299 Tested on : harmony. suspend/resume calls success. Change-Id: I564fdd5539d15d04762e3b7dede3e1267d5bd44b
2010-01-25fsl_udc_core: Fix USB chapter9 compliance tests.Venkat Moganty
In udc driver ch9getstatus() function is not mapping the status buffer's virtual address to hardware for transfering the status data over dma. On USB bus get status information is not going properly to the host. Hence, few chapter9 tests are failing. Fixed this by maping the status buffer address to the dmable address. With this fix USB chapter9 (usb command verifier) tests are passing. Bug 633510: Chapter 9 USB Compliance tests are failed. Tested on whistler/android/usb1 port in device mode. Change-Id: Id4ab22950d2e3a75690aa8bafd8d21619190aecb
2010-01-19tegra usb: fix build break when OTG not configuredGary King
commit 98968646e2f ("Adding USB OTG feature") causes the build to break due to dependencies on otg_get_transceiver if OTG isn't enabled for the platform. Change-Id: I97af1bb032297f922932a30fa4ef7e4607133592
2010-01-19TEGRA - Adding USB OTG featureVenkat Moganty
Enabling support for the OTG in NVIDIA Tegra SoCs by providing simple transceiver interface for detecting the Host or Device based on the USBID and VBUS sensors. Bug 629098 USB OTG problem Tested on Whistler with Android USB OTG is tested on whistler USB port1, by setting the USB mode type as "NvOdmUsbModeType_OTG" in the ODM usb property of arch/arm/mach-tegra/odm_kit/query/whistler/nvodm_query.c Tested OTG-HOST by connecting USB keyboard and OTG-device by connecting adb. Change-Id: I860e1f4be5f7c96765c2ce1ca320fdf212164811
2010-01-13tegra usb host: stubbing out ehci_bus suspend/resumeMayuresh Kulkarni
This is needed as ehci_bus_suspend() gets called during bootup which causes the boot process to hang when tegra suspend ops is registered with kernel. Change-Id: Ic6976ee8c04e284d3fb89a8f69cb662f5dbeffa6
2009-12-21tegra: fix typos in / remove various debug printsGary King
removes some unnecessary status prints in tegra_udc.c and sdhci-tegra.c fixes the type in the tegra driver name in fsl_udc_core.c
2009-12-21ehci: enable clocks on tegra during shutdownGary King
tegra dynamically clocks access to the controller, so if no peripherals are attached the controller clocks will be disabled to conserve power since shutdown accesses the controller registers, the controller must have its clocks enabled, regardless of the presence of peripherals Change-Id: Ia95859fda514001cb8ad58260c3e58b4f470080c
2009-12-16tegra: reduce power of USB phy and USB pllGary King
use VBUS_WAKEUP_EVENT rather than A_SESSION_VALID for cable detection. disable OTG_BIAS circuitry when no cable connected set UTMIP to reset when device is suspended reduces measured idle USB power from 36mW to 3mW
2009-12-15udc: include tegra_devices.h in tegra_udc.c to get NV_DEBUG definitionGary King
Change-Id: I962aa72e0c2ad0448ea052512a35bf60b7e902cc
2009-12-15ehci: controller_resets_phy was missing a semicolon, simple fixGary King
Change-Id: I2ed267fc2e68dc9455b396b8d2b39e681abb7ff1
2009-12-15fsl_udc_core: fix glue of _UDC_NAME macro onto function prefixesGary King
copy __glue / ___glue from the ARM include files if they aren't already defined Change-Id: I9ca516b42ee5cb0d774ffc4ba7b2f091aed99c72
2009-12-15usb: fix typo in Tegra gadget dependenciesGary King
USB_TEGRA was incorrectly dependent on USB_GADGET_TAGRA, should have been USB_GADGET_TEGRA Change-Id: I0f04140ab1237bf85c1b254259fb49d535801fb5
2009-12-09tegra: add USB clock and PHY programming interface for USB deviceGary King
Change-Id: I37fea0ee06525d9894020d6a161a615c07c4e8e8
2009-12-09ehci: add EHCI-compliant HCD driver for NVIDIA Tegra SoCsGary King
Change-Id: Ibcbc2a5d8ebe5d346d008019571ab9a659b7479d
2009-12-09fsl_udc_core: add support for Tegra UDC controllerGary King
The USB device controller in Tegra SoCs shares a lot in common with the Freescale USB device controller, so it makes sense to share the implementation Aside from some functional quirks in the Tegra controller, the most noteworthy difference is that queue heads are stored in an internal RAM on Tegra, rather than in DMA-allocated memory on Freescale. Change-Id: I7c4f897f7e554624ba136bb8d15e6f3887c3610a
2009-12-08USB: fsl_udc_core: add platform adaptation interface for clock managementGary King
adds an architecture-controlled naming convention similar to what is used for ARM TLB and cache maintenance functions to fsl_udc_core
2009-12-08USB: add compile-time selection for max supported FSL device endpointsGary King
adds a new kernel configuration option to select the maximum number of device endpoints which will be supported by the controller driver
2009-12-08gadget: check for NULL before dereferencing cdev->configGary King
don't attempt to dereference a function before it has been registered
2009-12-08ehci-hcd: add controller_resets_phy quirkGary King
only reset the controller when doing so won't also reset the phy (Tegra quirk)
2009-12-08USB: fsl_udc_core: Fix kernel oops on module removalAnton Vorontsov
fsl_udc_release() calls dma_free_coherent() with an inappropriate device passed to it, and since the device has no dma_ops, the following oops pops up: Kernel BUG at d103ce9c [verbose debug info unavailable] Oops: Exception in kernel mode, sig: 5 [#1] ... NIP [d103ce9c] fsl_udc_release+0x50/0x80 [fsl_usb2_udc] LR [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc] Call Trace: [cfbc7dc0] [d103ce74] fsl_udc_release+0x28/0x80 [fsl_usb2_udc] [cfbc7dd0] [c01a35c4] device_release+0x2c/0x90 [cfbc7de0] [c016b480] kobject_cleanup+0x58/0x98 [cfbc7e00] [c016c52c] kref_put+0x54/0x6c [cfbc7e10] [c016b360] kobject_put+0x34/0x64 [cfbc7e20] [c01a1d0c] put_device+0x1c/0x2c [cfbc7e30] [d103dbfc] fsl_udc_remove+0xc0/0x1e4 [fsl_usb2_udc] ... This patch fixes the issue by passing dev->parent, which points to a correct device. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Cc: Li Yang <leoli@freescale.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-08USB: gadget: Add i.MX3x support to the fsl_usb2_udc driverGuennadi Liakhovetski
This patch adds support for i.MX3x (only tested with i.MX31 so far) ARM SoCs to the fsl_usb2_udc driver. It also moves PHY configuration before controller reset, because otherwise an ULPI PHY doesn't get a reset and doesn't function after a reboot. The problem with longer control transfers is still not fixed. The patch renames the fsl_usb2_udc.c file to fsl_udc_core.c to preserve the same module name for user-space backwards compatibility. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-07Call flush_dcache_page in usb_stor_access_xfer_bufCatalin Marinas
Transferring buffers using memcpy dirties the D-cache but there is no corresponding flush_dcache_page call which leads to data corruption in user-space. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2009-12-07Merge commit 'arm/2.6.28-arm' into android-tegra-2.6.29Gary King
Conflicts: MAINTAINERS arch/arm/Kconfig arch/arm/Makefile arch/arm/boot/compressed/head.S arch/arm/common/Makefile arch/arm/configs/realview-smp_defconfig arch/arm/configs/realview_defconfig arch/arm/configs/versatile_defconfig arch/arm/include/asm/elf.h arch/arm/include/asm/uaccess.h arch/arm/kernel/module.c arch/arm/kernel/signal.c arch/arm/mach-realview/Kconfig arch/arm/mach-realview/Makefile arch/arm/mach-realview/core.c arch/arm/mach-realview/core.h arch/arm/mach-realview/include/mach/board-pba8.h arch/arm/mach-realview/include/mach/debug-macro.S arch/arm/mach-realview/include/mach/hardware.h arch/arm/mach-realview/include/mach/irqs.h arch/arm/mach-realview/include/mach/memory.h arch/arm/mach-realview/include/mach/uncompress.h arch/arm/mach-realview/localtimer.c arch/arm/mach-realview/platsmp.c arch/arm/mach-realview/realview_eb.c arch/arm/mach-realview/realview_pb1176.c arch/arm/mach-realview/realview_pb11mp.c arch/arm/mach-realview/realview_pba8.c arch/arm/mm/Kconfig arch/arm/mm/copypage-v6.c arch/arm/mm/dma-mapping.c arch/arm/mm/proc-v7.S arch/arm/oprofile/op_model_mpcore.c arch/arm/tools/mach-types arch/arm/vfp/vfpmodule.c drivers/mtd/maps/integrator-flash.c drivers/net/smsc911x.c drivers/net/smsc911x.h
2009-09-08usb: gadget: f_mass_storage: Clean up wakelocks on error pathsRebecca Schultz Zavin
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-08usb: gadget: f_mass_storage: Handle setup request correctlyJames Luan
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-28usb: gadget: mass_storage: Fix Mass Storage Panic during PC rebootJared Suttles
Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com> Signed-off-by: Jared Suttles <jared.suttles@motorola.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-21drivers: usb: gadget: Use usb_mass_storage platform device as parent for lunMike Lockwood
If a platform device is specified for the f_mass_storage function, use it as the parent driver for the lun files in sysfs. This allows a platform independent file path for controlling USB mass storage from user space. Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-21drivers: usb: gadget: Add "usb_mass_storage" platform driver.Jared Suttles
This will be used for configuring vendor, product and release from board file. Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com> Signed-off-by: Jared Suttles <jared.suttles@motorola.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-12USB: gadget: android: Fix USB WHQL Certification IssuesJared Suttles
Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com> Signed-off-by: Jared Suttles <jared.suttles@motorola.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-12USB: composite: Fix USB WHQL Certification IssuesJared Suttles
Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com> Signed-off-by: Jared Suttles <jared.suttles@motorola.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-07drivers: usb: gadget: Add helper function for installing ACM gadget function.Joe Swantek
Submitted on behalf of James Luan <James.Luan@motorola.com> Signed-off-by: Joe Swantek <joseph.swantek@motorola.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-07usb: gadget: android: Add dependency on switch driver.Mike Lockwood
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-07drivers: usb: gadget: call switch_dev_unregister in mass storage unbind callbackNinja Tekkaman
This fixes a problem unloading the android gadget driver when built as a module Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-07drivers: usb: gadget: handle NULL descriptors in composite config_bufJared Suttles
This fixes a problem in enumeration after a gadget function is removed. Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com> Signed-off-by: Jared Suttles <jared.suttles@motorola.com> Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-21usb gadget: android: Add helper function for usb_gadget_connect and disconnect.Mike Lockwood
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-06-02usb: gadget: android: Allow usb charging to draw up to 500mA instead of 250.Ken Kessler
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-04-07android_usb: Composite USB gadget driver for android.Mike Lockwood
Signed-off-by: Mike Lockwood <lockwood@android.com> USB: android gadget: add remote wakeup attribute to android function Add remote wakeup attribute to configuration descriptor of android function to advertise remote wakeup capability to host Acked-by: Allam, Suresh Reddy <sallam@qualcomm.com> Signed-off-by: Mike Lockwood <lockwood@android.com> usb gadget: link fixes for android composite gadget Signed-off-by: Mike Lockwood <lockwood@android.com> usb gadget: Fix null pointer errors in android composite driver Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-03-17USB: storage: Unusual USB device Prolific 2507 variation addedThomas Bartosik
The "c-enter" USB to Toshiba 1.8" IDE enclosure needs special treatment to work flawlessly. This patch is absolutely trivial, as the integrated USB-IDE bridge is already identified to be an "unusual" device, only the bcdDevice is different (lower) to the bcdDeviceMin already included in the kernel. It is a Prolific 2507 bridge. T: Bus=02 Lev=01 Prnt=01 Port=02 Cnt=01 Dev#= 4 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=067b ProdID=2507 Rev= 0.01 S: Manufacturer=Prolific Technology Inc. S: Product=ATAPI-6 Bridge Controller S: SerialNumber=00000272 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=100mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms Signed-off-by: Thomas Bartosik <tbartdev@gmx-topmail.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: Add device id for Option GTM380 to option driverAchilleas Kotsis
Option GTM380 in Modem mode uses Product ID 0x7201. This has been tested and works on production systems for over 6 months. Signed-off-by: Achilleas Kotsis <akots@exponent.gr> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: Add Vendor/Product ID for new CDMA U727 to option driverDirk Hohndel
* newer versions of the Novatel Wireless U727 CDMA 3G USB stick have a different Product ID (0x5010); adding this ID makes them work just fine with the option driver Signed-off-by: Dirk Hohndel <hohndel@infradead.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: Updated unusual-devs entry for USB mass storage on Nokia 6233Moritz Muehlenhoff
Current firmware revision 5.60 still behaves the same, so update the quirk up a (non-existing) 99.99 revision. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=493415 Signed-off-by: Moritz Muehlenhoff <jmm@debian.org> Tested-by: Jan Heitkoetter <devnull@heitkoetter.net> Cc: stable <stable@kernel.org> Signed-off-by: Phil Dibowitz <phil@ipom.com>
2009-03-17USB: Option: let cdc-acm handle Sony Ericsson F3507g / Dell 5530Dan Williams
The generic cdc-acm driver is now the best one to handle Sony Ericsson F3507g-based devices (which the Dell 5530 is a rebrand of), now that all the pieces are in place (ie, cac477e8f1038c41b6f29d3161ce351462ef3df7). Removing the IDs from option allows cdc-acm to handle the device. Signed-off-by: Dan Williams <dcbw@redhat.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: EHCI: expedite unlinks when the root hub is suspendedAlan Stern
This patch (as1225) fixes a bug in ehci-hcd. The condition for whether unlinked QHs can become IDLE should not be that the controller is halted, but rather that the controller isn't running. In other words when the root hub is suspended, the hardware doesn't own any QHs. This fixes a problem that can show up during hibernation: If a QH is only partially unlinked when the root hub is frozen, then when the root hub is thawed the QH won't be in the IDLE state. As a result it can't be used properly for new URB submissions. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Brandon Philips <brandon@ifup.org> Tested-by: Brandon Philips <brandon@ifup.org> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: EHCI: Fix isochronous URB leakKarsten Wiese
ehci-hcd uses usb_get_urb() and usb_put_urb() in an unbalanced way causing isochronous URB's kref.counts incrementing once per usb_submit_urb() call. The culprit is *usb being set to NULL when usb_put_urb() is called after URB is given back. Due to other fixes there is no need for ehci-hcd to deal with usb_get_urb() nor usb_put_urb() anymore, so patch removes their usages in ehci-hcd. Patch also makes ehci_to_hcd(ehci)->self.bandwidth_allocated adjust, if a stream finishes. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: David Brownell <david-b@pacbell.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-17USB: option.c: add ZTE 622 modem deviceAlbert Pauw
Please consider this small patch for the usb option-card driver. This patch adds the ZTE 622 usb modem device. Signed-off-by: Albert Pauw <albert.pauw@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>