summaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2010-04-06Enclose autosuspend_disabled in CONFIG_PM switchJustin Waters
2010-03-25ENGR00118363 Fix SATA drive failure on Ubuntu 9.10Dinh Nguyen
Fix SATA drive failure on Ubuntu 9.10 BugLink: https://bugs.launchpad.net/bugs/431963 Signed-off-by: Dinh Nguyen <r00091@freescale.com>
2010-03-25ENGR00119024 USB OTG nobody cared IRQ when add gadget driver.Jun Li
When add usb gadget driver in OTG mode, cause nobody cared irq, this pach disable usbintr in udc driver probe. Signed-off-by: Li Jun <r65092@freescale.com>
2010-03-25ENGR00117147-2 USB clock gating and PHY low power mode.Jun Li
1. If there is no usb devices connectted or all connectted usb devices are in suspend state, usb host can suspend its whole bus, then put the PHY into low power mode and close all usb clocks. 2. close all usb clocks for usb device low power mode. (The patch is splitted 2 patches, this is FSL specific driver part.) Signed-off-by: Li Jun <r65092@freescale.com>
2010-03-25ENGR00117147-1 USB clock gating and PHY low power mode.Jun Li
If there is no usb devices connectted or all connectted usb devices are in suspend state, usb host can suspend its whole bus, then put the PHY into low power mode and close all usb clocks. (The patch is splitted 2 patches, this is common code part.) Signed-off-by: Li Jun <r65092@freescale.com>
2010-03-25ENGR00118888-1 Fix iMX23 mfg firmware usb segment faultFrank Li
Miss some configuration and wrong use put_unaligned_be32 Signed-off-by: Frank Li <Frank.Li@freescale.com>
2010-03-25ENGR00109408 mx25 usb remote wakeupAlbert Chen
Add remote wakeup feature for host mode. Signed-off-by: Albert Chen <r65187@freescale.com>
2010-03-25ENGR00117937 USB pin detct is broken on 2.6.31 branchJun Li
When register platform driver in 2.6.31 kernal, suspend and resume are not set for device driver. The patch fix this issue by using platform driver's suspend/resume rountine directly in otg driver. Signed-off-by: Li Jun <r65092@freescale.com>
2010-03-25ENGR00116558: MX233: USB pin detectRob Herring
MX233: Restructure the STMP378xxx USB Host and Gadget device structures to be similar to MXC structures. Enable fsl_otg_arc driver to work on MX233 platform. Remove FSL_USB2_DONT_REMAP requirement. Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com> Conflicts: arch/arm/mach-stmp3xxx/Kconfig arch/arm/mach-stmp3xxx/Makefile arch/arm/mach-stmp3xxx/devices.c arch/arm/mach-stmp3xxx/include/mach/stmp3xxx.h arch/arm/mach-stmp3xxx/stmp378x_devb.c
2010-03-25ENGR00115875 add USB gadget low power mode feature.Albert Chen
USB will enter low power mode if no vbus power supply. Only finished this feature in Mx37. 1. When enter low power mode, driver will close usb related clocks as possible as could. set usb IP to stop. Set PHY to low power suspend by setting PHCD bit of portsc. 2. This patch doesn't support low power mode in OTG mode yet. Signed-off-by: Albert Chen <r65187@freescale.com>
2010-03-25ENGR00117389 Port 5.0.0 release to 2.6.31Rob Herring
This is i.MX BSP 5.0.0 release ported to 2.6.31 Signed-off-by: Rob Herring <r.herring@freescale.com> Signed-off-by: Alan Tull <r80115@freescale.com> Signed-off-by: Xinyu Chen <xinyu.chen@freescale.com>
2010-03-25gadget: add stmp uut support to file storageFrank Li
This is gadget file storage changes needed for STMP universal updater tool (manufacturing flashing tool). Signed-off-by: Frank Li <Frank.Li@freescale.com>
2010-03-25usb: Add arc ehci driver to ehci core driverRob Herring
Signed-off-by: Rob Herring <r.herring@freescale.com>
2010-03-25usb: imx usb buffers in iram work-aroundDinh Nguyen
Some i.MX parts (MX31, MX37) need to have usb host queue descriptors and/or buffers in on-chip IRAM in cases of heavily loaded memory system (i.e. large LCDs). Signed-off-by: Dinh Nguyen <r00091@freescale.com>
2010-03-25usb: stmp3xxx host hackRob Herring
the USBPHY of STMP3xxx SoC has bug. The usb port power is never enabled during standard ehci reset procedure if the external device once passed plug/unplug procedure. This work- around resets and reinitiates USBPHY before the ehci port reset sequence started. Signed-off-by: Rob Herring <r.herring@freescale.com>
2010-03-25usb: add ehci otg supportDinh Nguyen
Add OTG support to ehci host controllers Signed-off-by: Dinh Nguyen <r00091@freescale.com>
2010-03-25ENGR00114795 fix usb OTG co-work with remote wakeup issue.Jun Li
This patch fix OTG pin-detect failure issue. via sysfs set power/wakeup, i.MX51 can: Put usb phy into low power mode when system enters stop or standby mode; Enable usb device remote wakeup system by Vbus and usb host remote wakeup system by device connection or disconnection. Signed-off-by: Li Jun <r65092@freescale.com>
2010-03-25gadget: gadgetfs changes for MTP supportRob Herring
MTP protocol support using gadgetfs requires the ability to cancel I/O transactions. Signed-off-by: Jun Li <r65092@freescale.com>
2009-08-07USB: fix oops on disconnect in cdc-acmOliver Neukum
This patch fixes an oops caused when during an unplug a device's table of endpoints is zeroed before the driver is notified. A pointer to the endpoint must be cached. this fixes a regression caused by commit 5186ffee2320942c3dc9745f7930e0eb15329ca6 Therefore it should go into 2.6.31 Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07USB: storage: include Prolific Technology USB drive in unusual_devs listRogerio Brito
Add a quirk entry for the Leading Driver UD-11 usb flash drive. As Alan Stern told me, the device doesn't deal correctly with the locking media feature of the device, and this patch incorporates it. Compiled, tested, working. Signed-off-by: Rogerio Brito <rbrito@ime.usp.br> Cc: Phil Dibowitz <phil@ipom.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Robert Hancock <hancockrwd@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07USB: ftdi_sio: add product_id for Marvell OpenRD Base, ClientDhaval Vasa
reference: http://www.open-rd.org Signed-off-by: Dhaval Vasa <dhaval.vasa@einfochips.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07USB: ftdi_sio: add vendor and product id for Bayer glucose meter serial ↵Marko Hänninen
converter cable Attached patch adds USB vendor and product IDs for Bayer's USB to serial converter cable used by Bayer blood glucose meters. It seems to be a FT232RL based device and works without any problem with ftdi_sio driver when this patch is applied. See: http://winglucofacts.com/cables/ Signed-off-by: Marko Hänninen <bugitus@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07USB: EHCI: fix counting of transaction error retriesAlan Stern
This patch (as1274) simplifies the counting of transaction-error retries. Now we will count up from 0 to QH_XACTERR_MAX instead of down from QH_XACTERR_MAX to 0. The patch also fixes a small bug: qh->xacterr was not getting initialized for interrupt endpoints. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Matthijs Kooijman <matthijs@stdin.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07USB: EHCI: fix two new bugs related to Clear-TT-BufferAlan Stern
This patch (as1273) fixes two(!) bugs introduced by the new Clear-TT-Buffer implementation in ehci-hcd. It is now possible for an idle QH to have some URBs on its queue -- this will happen if a Clear-TT-Buffer is pending for the QH's endpoint. Consequently we should not issue a warning when someone tries to unlink an URB from an idle QH; instead we should process the request immediately. The refcounts for QHs could get messed up, because submit_async() would increment the refcount when calling qh_link_async() and qh_link_async() would then refuse to link the QH into the schedule if a Clear-TT-Buffer was pending. Instead we should increment the refcount only when the QH actually is added to the schedule. The current code tries to be clever by leaving the refcount alone if an unlink is immediately followed by a relink; the patch changes this to an unconditional decrement and increment (although they occur in the opposite order). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> Tested-by: Manuel Lauss <manuel.lauss@gmail.com> Tested-by: Matthijs Kooijman <matthijs@stdin.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07USB: usbfs: fix -ENOENT error code to be -ENODEVAlan Stern
This patch (as1272) changes the error code returned when an open call for a USB device node fails to locate the corresponding device. The appropriate error code is -ENODEV, not -ENOENT. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Kay Sievers <kay.sievers@vrfy.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07USB: musb: fix the nop registration for OMAP3EVMGupta, Ajay Kumar
OMAP3EVM uses ISP1504 phy which doesn't require any programming and thus has to use NOP otg transceiver. Cleanups being done: - Remove unwanted code in usb-musb.c file - Register NOP in OMAP3EVM board file using usb_nop_xceiv_register(). - Select NOP_USB_XCEIV for OMAP3EVM boards. - Don't enable TWL4030_USB in omap3_evm_defconfig Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Eino-Ville Talvala <talvala@stanford.edu> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07USB: devio: Properly do access_ok() checksMichael Buesch
access_ok() checks must be done on every part of the userspace structure that is accessed. If access_ok() on one part of the struct succeeded, it does not imply it will succeed on other parts of the struct. (Does depend on the architecture implementation of access_ok()). This changes the __get_user() users to first check access_ok() on the data structure. Signed-off-by: Michael Buesch <mb@bu3sch.de> Cc: stable <stable@kernel.org> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-08-07USB: pl2303: New vendor and product idKhanh-Dang Nguyen Thu Lam
I am submitting a patch for the pl2303 driver. This patch adds support for the "Sony QN-3USB" cable (vendor=0x054c, product=0x0437). This USB cable is a so-called data cable used to connect a Sony mobile phone to a computer. Supported models are Sony CMD-J5, J6, J7, J16, J26, J70 and Z7. I have used this patch with my Sony CMD-J70 for several days and I haven't encountered any kernel/hardware issue. From: Khanh-Dang Nguyen Thu Lam <kdntl@yahoo.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Stall handling bug fixes.Sarah Sharp
Correct the xHCI code to handle stalls on USB endpoints. We need to move the endpoint ring's dequeue pointer past the stalled transfer, or the HW will try to restart the transfer the next time the doorbell is rung. Don't attempt to clear a halt on an endpoint if we haven't seen a stalled transfer for it. The USB core will attempt to clear a halt on all endpoints when it selects a new configuration. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Support for 64-byte contextsJohn Youn
Adds support for controllers that use 64-byte contexts. The following context data structures are affected by this: Device, Input, Input Control, Endpoint, and Slot. To accommodate the use of either 32 or 64-byte contexts, a Device or Input context can only be accessed through functions which look-up and return pointers to their contained contexts. Signed-off-by: John Youn <johnyoun@synopsys.com> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Always align output device contexts to 64 bytes.Sarah Sharp
Make sure the xHCI output device context is 64-byte aligned. Previous code was using the same structure for both the output device context and the input control context. Since the structure had 32 bytes of flags before the device context, the output device context wouldn't be 64-byte aligned. Define a new structure to use for the output device context and clean up the debugging for these two structures. The copy of the device context in the input control context does *not* need to be 64-byte aligned. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Scratchpad buffer allocationJohn Youn
Allocates and initializes the scratchpad buffer array (XHCI 4.20). This is an array of 64-bit DMA addresses to scratch pages that the controller may use during operation. The number of pages is specified in the "Max Scratchpad Buffers" field of HCSPARAMS2. The DMA address of this array is written into slot 0 of the DCBAA. Signed-off-by: John Youn <johnyoun@synopsys.com> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: Fix parsing of SuperSpeed Endpoint Companion descriptor.Sarah Sharp
usb_parse_ss_endpoint_companion() was supposed to allocate a structure to hold the SuperSpeed Endpoint Companion descriptor, and either copy the values the device returned, or fill in default values if the device descriptor did not include the companion descriptor. However, the previous code would miss the last endpoint in a configuration with no descriptors after it. Make usb_parse_endpoint() allocate the SS endpoint companion descriptor and fill it with default values, even if we've run out of buffer space in this configuration descriptor. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Fail gracefully if there's no SS ep companion descriptor.Sarah Sharp
This is a work around for a bug in the SuperSpeed Endpoint Companion Descriptor parsing code. It fails in some corner cases, which means ep->ss_ep_comp may be NULL. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Handle babble errors on transfers.Sarah Sharp
Pass back a babble error when this error code is seen in the transfer event TRB. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Setup HW retries correctly.Sarah Sharp
The xHCI host controller can be programmed to retry a transfer a certain number of times per endpoint before it passes back an error condition to the host controller driver. The xHC will return an error code when the error count transitions from 1 to 0. Programming an error count of 3 means the xHC tries the transfer 3 times, programming it with a 1 means it tries to transfer once, and programming it with 0 means the HW tries the transfer infinitely. We want isochronous transfers to only be tried once, so set the error count to one. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Check if the host controller died in IRQ handler.Sarah Sharp
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Don't oops if the host doesn't halt.Sarah Sharp
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Make debugging more verbose.Sarah Sharp
Add more debugging to the irq handler, slot context initialization, ring operations, URB cancellation, and MMIO writes. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Correct Event Handler Busy flag usage.Sarah Sharp
The Event Handler Busy bit in the event ring dequeue pointer is write 1 to clear. Fix the interrupt service routine to clear that bit after the event handler has run. xhci_set_hc_event_deq() is designed to update the event ring dequeue pointer without changing any of the four reserved bits in the lower nibble. The event handler busy (EHB) bit is write one to clear, so the new value must always contain a zero in that bit in order to preserve the EHB value. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Handle short control packets correctly.Sarah Sharp
When there is a short packet on a control transfer, the xHCI host controller hardware will generate two events. The first event will be for the data stage TD with a completion code for a short packet. The second event will be for the status stage with a successful completion code. Before this patch, the xHCI driver would giveback the short control URB when it received the event for the data stage TD. Then it would become confused when it saw a status stage event for the endpoint for an URB it had already finished processing. Change the xHCI host controller driver to wait for the status stage event when it receives a short transfer completion code for a data stage TD. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Represent 64-bit addresses with one u64.Sarah Sharp
There are several xHCI data structures that use two 32-bit fields to represent a 64-bit address. Since some architectures don't support 64-bit PCI writes, the fields need to be written in two 32-bit writes. The xHCI specification says that if a platform is incapable of generating 64-bit writes, software must write the low 32-bits first, then the high 32-bits. Hardware that supports 64-bit addressing will wait for the high 32-bit write before reading the revised value, and hardware that only supports 32-bit writes will ignore the high 32-bit write. Previous xHCI code represented 64-bit addresses with two u32 values. This lead to buggy code that would write the 32-bits in the wrong order, or forget to write the upper 32-bits. Change the two u32s to one u64 and create a function call to write all 64-bit addresses in the proper order. This new function could be modified in the future if all platforms support 64-bit writes. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Use GFP_ATOMIC while holding spinlocks.Sarah Sharp
The xHCI functions to queue an URB onto the hardware rings must be called with the xhci spinlock held. Those functions will allocate memory, and take a gfp_t memory flags argument. We must pass them the GFP_ATOMIC flag, since we don't want the memory allocation to attempt to sleep while waiting for more memory to become available. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Deal with stalled endpoints.Sarah Sharp
When an endpoint on a device under an xHCI host controller stalls, the host controller driver must let the hardware know that the USB core has successfully cleared the halt condition. The HCD submits a Reset Endpoint Command, which will clear the toggle bit for USB 2.0 devices, and set the sequence number to zero for USB 3.0 devices. The xHCI urb_enqueue will accept new URBs while the endpoint is halted, and will queue them to the hardware rings. However, the endpoint doorbell will not be rung until the Reset Endpoint Command completes. Don't queue a reset endpoint command for root hubs. khubd clears halt conditions on the roothub during the initialization process, but the roothub isn't a real device, so the xHCI host controller doesn't need to know about the cleared halt. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: Set TD size in transfer TRB.Sarah Sharp
The 0.95 xHCI specification requires software to set the "TD size" field in each transaction request block (TRB). This field gives the host controller an indication of how much data is remaining in the TD (including the buffer in the current TRB). Set this field in bulk TRBs and data stage TRBs for control transfers. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: xhci: fix less- and greater than confusionRoel Kluin
Without this change the loops won't start Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: usbtest: no need for USB_DEVICEFSAlan Stern
THis patch (as1270) allows the usbtest module to be built even when USB_DEVICEFS isn't configured. Tests can be performed without USB_DEVICEFS, using the /dev/bus/usb/*/* device files. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: musb: fix CONFIGDATA register read issueAjay Kumar Gupta
INDEX register has to be set to '0' before reading CONFIGDATA register which is only present in TI musb platforms. Currently the default register access mode is set to FLAT_MODE thus INDEX register is not getting set properly with musb_ep_select() which is just a nop operation in FLAT_MODE.This invalid register read is causing module reinset failure. Fixing the issue by moving INDEX register write part to musb_read_configdata() function itself. Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: musb: Refer to musb_otg_timer_func under correct #ifdefAmit Kucheria
musb_otg_timer_func() is defined under #ifdef CONFIG_USB_MUSB_OTG. Make sure any reference to it is also under the same #ifdef. Without this fix, the driver failes to compile when USB_OTG is defined but USB_MUSB_OTG isn't. Signed-off-by: Amit Kucheria <amit.kucheria@canonical.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-07-28USB: musb_gadget_ep0: fix typo in service_zero_data_request()Sergei Shtylyov
This function uses wrong bit mask to prevent clearing RXCSR status bits when halting an endpoint -- which results in clearing SentStall and RxPktRdy bits (that the code actually tries to avoid); must be a result of cut-and-paste... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>