aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
Commit message (Collapse)AuthorAge
* Merge branch 'master' into for-nextJiri Kosina2011-07-11
|\ | | | | | | | | Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
| * USB: fsl_udc_core: fix build breakage when building for ARM archAnatolij Gustschin2011-07-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 09ba0def (USB: fsl_udc_core: prepare for SoCs with BE registers and descriptors) introduced build breakage on ARM arch. Fix it by setting accessors using a static inline function which is a nop when compiling the driver for ARM arch. Commit 2ea6698 (USB: fsl_udc_core: support device mode of MPC5121E DR USB Controller) caused another breakage on ARM by using flush_dcache_range(). Don't use it, convert to the DMA API usage instead. USB2.0CV Halt Endpoint Test succeeds on PPC. Tested both on ARM i.MX31 and mpc5121 PPC, also with CONFIG_DMA_API_DEBUG enabled. Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | treewide: transciever/transceiver spelling fixesJoe Perches2011-06-24
| | | | | | | | | | | | | | Just tyops. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | treewide: Convert uses of struct resource to resource_size(ptr)Joe Perches2011-06-10
|/ | | | | | | | | | | | | | | | | | | | Several fixes as well where the +1 was missing. Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* USB: CONFIG_USB_GADGET_DUALSPEED is not user-configurableAlan Stern2011-06-07
| | | | | | | | | | | | | This patch (as1468) changes the Kconfig definition for USB_GADGET_DUALSPEED. This option is determined entirely by which device controller drivers are to be built, through Select statements; it does not need to be (and should not be) configurable by the user. Also, the "default n" line is superfluous -- everything defaults to N. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: dummy-hcd needs the has_tt flagAlan Stern2011-06-07
| | | | | | | | | | | Like with other host controllers capable of operating at both high speed and full speed, we need to indicate that the emulated controller presented by dummy-hcd has this ability. Otherwise usbcore will not accept full-speed gadgets under dummy-hcd. This patch (as1469) sets the appropriate has_tt flag. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb/s3c-hsudc: fix error pathSebastian Andrzej Siewior2011-06-06
| | | | | | | | | I doubt the clock is optional. In case it is it should not return with an error code because we leak everything. Cc: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb/pxa25x_udc: cleanup the LUBBOCK err pathSebastian Andrzej Siewior2011-06-06
| | | | | | | this is more backwords than it has to be. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb/mv_udc_core: fix compileSebastian Andrzej Siewior2011-06-06
| | | | | | | | | | | | | | | | | | |drivers/usb/gadget/mv_udc_core.c:2108: error: label `error' used but not defined This seems to be broken since the initial commit. I changed this to a simple return. The other user is the probe code which lets ->probe() fail on error here. |drivers/usb/gadget/mv_udc_core.c:2107: warning: passing argument 1 of `dev_err' from incompatible pointer type |drivers/usb/gadget/mv_udc_core.c:2118: warning: initialization from incompatible pointer type |drivers/usb/gadget/mv_udc_core.c:2119: warning: initialization from incompatible pointer type |drivers/usb/gadget/mv_udc_core.c:2130: error: initializer element is not constant |drivers/usb/gadget/mv_udc_core.c:2130: error: (near initialization for `udc_driver.driver.pm') Cc: Chao Xie <chao.xie@marvell.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: include <linux/prefetch.h> to fix compiling errorBryan Wu2011-06-06
| | | | | | | | | | | drivers/usb/gadget/at91_udc.c: In function 'write_fifo': drivers/usb/gadget/at91_udc.c:421:2: error: implicit declaration of function 'prefetch' make[3]: *** [drivers/usb/gadget/at91_udc.o] Error 1 make[2]: *** [drivers/usb/gadget] Error 2 make[2]: *** Waiting for unfinished jobs.... Signed-off-by: Bryan Wu <bryan.wu@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: s3c-hsotg: Tone down debuggingMark Brown2011-06-06
| | | | | | | | | Currently the s3c-hsotg driver is extremely chatty, producing voluminous with large register dumps even in default operation. Tone this down so we're not chatty unless DEBUG is defined. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb-gadget: unlock data->lock mutex on error path in ep_write()Alexey Khoroshilov2011-06-06
| | | | | | | | | | | | | | ep_write() acquires data->lock mutex in get_ready_ep() and releases it on all paths except for one: when usb_endpoint_xfer_isoc() failed. The patch adds mutex_unlock(&data->lock) at that path. It is similar to commit 00cc7a5 ("usb-gadget: unlock data->lock mutex on error path in ep_read()"), it was not fixed at that time by accident. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'usb-next' of ↵Linus Torvalds2011-05-23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (205 commits) USB: EHCI: Remove SPARC_LEON {read,write}_be definitions from ehci.h USB: UHCI: Support big endian GRUSBHC HC sparc: add {read,write}*_be routines USB: UHCI: Add support for big endian descriptors USB: UHCI: Use ACCESS_ONCE rather than using a full compiler barrier USB: UHCI: Add support for big endian mmio usb-storage: Correct adjust_quirks to include latest flags usb/isp1760: Fix possible unlink problems usb/isp1760: Move function isp1760_endpoint_disable() within file. USB: remove remaining usages of hcd->state from usbcore and fix regression usb: musb: ux500: add configuration and build options for ux500 dma usb: musb: ux500: add dma glue layer for ux500 usb: musb: ux500: add dma name for ux500 usb: musb: ux500: add ux500 specific code for gadget side usb: musb: fix compile error usb-storage: fix up the unusual_realtek device list USB: gadget: f_audio: Fix invalid dereference of initdata EHCI: don't rescan interrupt QHs needlessly OHCI: fix regression caused by nVidia shutdown workaround USB: OTG: msm: Free VCCCX regulator even if we can't set the voltage ...
| * USB: gadget: f_audio: Fix invalid dereference of initdataMartin Jackson2011-05-17
| | | | | | | | | | | | | | | | as_out_ep_desc contines to be used during gadget enumeration and thus should not be marked as __initdata Signed-off-by: Martin Jackson <mjackson220.list@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb: gadget: rndis: don't test against req->lengthFelipe Balbi2011-05-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | composite.c always sets req->length to zero and expects function driver's setup handlers to return the amount of bytes to be used on req->length. If we test against req->length w_length will always be greater than req->length thus making us always stall that particular SEND_ENCAPSULATED_COMMAND request. Tested against a Windows XP SP3. Signed-off-by: Felipe Balbi <balbi@ti.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb/gadget: at91sam9g20 fix end point max packet sizeJean-Christophe PLAGNIOL-VILLARD2011-05-13
| | | | | | | | | | | | | | | | | | on 9g20 they are the same as the 9260 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsotg: return proper error if clk_get failsJingoo Han2011-05-13
| | | | | | | | | | | | | | Return PTR_ERR(hsotg->clk) instead of -EINVAL if clk_get fails Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsotg: fix checkpatch warningsJingoo Han2011-05-13
| | | | | | | | | | | | | | | | | | | | This patch fixes the checkpatch warnings listed below: WARNING: braces {} are not necessary for any arm of this statement WARNING: please, no space before tabs Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsudc: fix checkpatch error and warningJingoo Han2011-05-13
| | | | | | | | | | | | | | | | | | | | This patch fixes the checkpatch error and warning listed below: ERROR: code indent should use tabs where possible WARNING: please, no spaces at the start of a line Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsudc: use IS_ERR() instead of NULL checkJingoo Han2011-05-13
| | | | | | | | | | | | | | clk_get() returns ERR_PTR() on error, not NULL. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: Gadget: Add Samsung S3C24XX USB High-Speed controller driverThomas Abraham2011-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The Samsung's S3C2416, S3C2443 and S3C2450 includes a USB High-Speed device controller module. This driver enables support for USB high-speed gadget functionality for the Samsung S3C24xx SoC's that include this controller. Signed-off-by: Thomas Abraham <thomas.ab@samsung.com> Signed-off-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Alexander Neumann <alexander@bumpern.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb: gadget: Remove the LUN checks which are always trueMaxin B John2011-05-10
| | | | | | | | | | | | | | | | | | | | | | Comparing an unsigned integer with greater than or equal to zero is always true. So, it is safe to remove similar checks from 'f_mass_storage.c' and 'file_storage.c' Signed-off-by: Maxin B. John <maxin.john@gmail.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb: gadget: f_mass_storage: Make us pass USBCV MSC Compliance testsRoger Quadros2011-05-10
| | | | | | | | | | | | | | | | | | | | | | Defer the SET_CONFIG and SET_INTERFACE control transfer's data/status stages till we are ready to process new CBW from the host. This way we ensure that we don't loose any CBW during MSC compliance tests and cause lock up. Signed-off-by: Roger Quadros <roger.quadros@nokia.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb: gadget: composite: Allow function drivers to pause control transfersRoger Quadros2011-05-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some USB function drivers (e.g. f_mass_storage.c) need to delay or defer the data/status stages of standard control requests like SET_CONFIGURATION or SET_INTERFACE till they are done with their bookkeeping and are actually ready for accepting new commands to their interface. They can now achieve this functionality by returning USB_GADGET_DELAYED_STATUS in their setup handlers (e.g. set_alt()). The composite framework will then defer completion of the control transfer by not completing the data/status stages. This ensures that the host does not send new packets to the interface till the function driver is ready to take them. When the function driver that requested for USB_GADGET_DELAYED_STATUS is done with its bookkeeping, it should signal the composite framework to continue with the data/status stages of the control transfer. It can do so by invoking the new API usb_composite_setup_continue(). This is where the control transfer's data/status stages are completed and host can initiate new transfers. The DELAYED_STATUS mechanism is currently only supported if the expected data phase is 0 bytes (i.e. w_length == 0). Since SET_CONFIGURATION and SET_INTERFACE are the only cases that will use this mechanism, this is not a limitation. Signed-off-by: Roger Quadros <roger.quadros@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: OTG: msm: Implement charger detectionPavankumar Kondeti2011-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement good battery algorithm defined in the battery charging V1.2 spec for detecting different charging ports. USB hardware is put into low power mode when connected to a dedicated charging port. vbus_draw and set_power methods are implemented for determining the allowed current from Host in different states (un-configured/suspend/configured). The charger block is implemented using vendor specific registers and the PHY used in MSM8960(28nm PHY) different from older targets like MSM8x60 and MSM7x30(45nm PHY). The PHY vendor and product id registers are not implemented in the above chipsets. Hence PHY type is passed via platform data. Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * fsl/usb: Unused endpoint failure for USB gadgetRamneek Mehresh2011-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Though USB controller works without this most of the time, an issue was faced where USB was configured as printer device and it was dropping first packet(64 bytes) in full speed mode due to DATA PID mismatch. The problem gets resolved once unused endpoints are configured as bulk. As per P1020 RM (Table17-31, bits 19-18, bits 3-2) "When only one endpoint (RX or TX, but not both) of an endpoint pair is used, the unused endpoint should be configured as a bulk type endpoint." So according to the RM, this patch is initializing TX and RX endpoints as bulk type Signed-off-by: Suchit Lepcha <Suchit.Lepcha@freescale.com> Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: gadget: Initialize ep0 once while registering gadget in ci13xxx_udcAnji jonnala2011-05-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the simulators may cache the ep0 maxpacket size to zero if the ep0 dQh is not setup before enabling the pullup. Hence Setup ep0 and initialize the dQh fields once while registering the gadget(before enabling the pullup). HSUSB Chipidea link controller spec says ep0 is enabled always in the HW. Hence disabling and enabling the ep0 as a part of reset interrupt is unneccesary. Remove the disable/enable ep0 logic from reset interrupt handling. Signed-off-by: Anji jonnala <anjir@codeaurora.org> Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: gadget: Use ep0out for control OUT data phase in ci13xxx_udcPavankumar Kondeti2011-05-03
| | | | | | | | | | | | | | | | The current code queue the control OUT data request to ep0in instead of ep0out. Check ep0_dir and use the correct control endpoint. Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: gadget: Fix bug in endpoint feature request processing in ci13xxx_udcPavankumar Kondeti2011-05-03
| | | | | | | | | | | | | | | | | | The OUT endpoints are stored in 0 - hw_ep_max/2 and IN endpoints are stored from hw_ep_max/2 - hw_ep_max in ci13xxx_ep array. Retrieve the IN endpoint correctly while processing endpoint feature requests. Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: gadget: Fix unused variable warning in ci13xxx_udcPavankumar Kondeti2011-05-03
| | | | | | | | | | Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: gadget: Use bitwise AND operator to test flags in ci13xxx_udcPavankumar Kondeti2011-05-03
| | | | | | | | | | Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: gadget: Fix typo (s/EBUSY/-EBUSY) in ci13xxx_udcPavankumar Kondeti2011-05-03
| | | | | | | | | | Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsotg: Add copyright stringAnton Tikhomirov2011-05-02
| | | | | | | | | | | | | | Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsotg: Fix hang up after resetAnton Tikhomirov2011-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | When File Storage gadget receives SET CONFIGURATION request it tries to cancel all pending transfers. If some request is in progress, gadget waits for its completion. This commit allows gadget to dequeue invalid requests in progress left after reset. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsotg: Fix stall condition processingAnton Tikhomirov2011-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following should be done for requests after endpoint stall condition is cleared: 1) 'in progress' request (if any) should be completed since Tx FIFO was flushed; 2) next request from queue (if any) should be started. This commit does that. Additionally set/clear stall condition code is fixed. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsotg: Fix control request processingAnton Tikhomirov2011-05-02
| | | | | | | | | | | | | | | | | | | | | | | | UDC driver does not need to generate reply to host if request is delivered to gadget. This is gadget's responsibility. This commit fixes that. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsotg: Fix interrupt cleaning codeAnton Tikhomirov2011-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does the following: 1) clears all pending interrupts before unmasking; 2) clears interrupts as soon as possible to avoid missing next coming that may occur during handling; 3) removes ineffective interrupt cleaning code. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: s3c-hsotg: Fix core resetAnton Tikhomirov2011-05-02
| | | | | | | | | | | | | | | | | | | | This patch fixes code responsible for core reset. Signed-off-by: Anton Tikhomirov <av.tikhomirov@samsung.com> Reviewed-by: Kyoungil Kim<ki0351.kim@samsung.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: extend ehci-fsl and fsl_udc_core driver for OTG operationAnatolij Gustschin2011-05-02
| | | | | | | | | | | | Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: fsl_udc_core: support device mode of MPC5121E DR USB ControllerAnatolij Gustschin2011-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the FSL UDC driver to support MPC5121E DR USB Controller operation in device mode. Add MPC5121E specific init/uninit at probe and remove and isolate system interface register accesses when running on MPC5121E SoC, as these registers are not available on this platform. This patch relies on previous patch for supporting big endian registers and descriptors access in the FSL UDC driver. Additionally support endpoint FIFO status operation by providing appropriate callback in endpoint ops structure. Also flush cache for the req buffer used for GetStatus reply. Without this, the correct reply to an endpoint GetStatus is written to 'req', but doesn't make it out to the USB bus since the buffer hasn't been flushed. This would cause the USBCV Halt Endpoint test to fail (according to changelog in Freescale LTIB driver code). Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: fsl_udc_core: prepare for SoCs with BE registers and descriptorsAnatolij Gustschin2011-05-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some SoCs, the USB controller registers and descriptors can be big or little endian, depending on the version of the chip. In order to be able to run the same kernel binary on different versions of an SoC, the BE/LE decision must be made at run time. Provide appropriate register and descriptor accessors which are configurable at run time using the configuration flags from fsl_usb2_platform_data data structure. This is in preparation for adding support for MPC5121E DR USB2 Controller to the FSL UDC driver. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb: gadget: storage_common: use kstrto*() [bug fix]Michal Nazarewicz2011-04-29
| | | | | | | | | | | | | | | | | | This commit fixes an embarrassing bug in the "storage_common: use kstrto*()" patch which caused fsg_store_ro() to return zero instead of the length of the consumed buffer. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb/dummy_hcd: don't probe for udc if hcd failedSebastian Andrzej Siewior2011-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | the_controller is allocated in dummy_hcd_probe() and is NULL if the allocation failed. The probe function of the udc driver is dereferencing this pointer and fault. Alan Stern suggested to abort the dummy_hcd driver probing so the module is not loaded. The is abort-on-error has been also added to the udc driver. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: g_printer required set interface requestJonas Andersson2011-04-29
| | | | | | | | | | | | | | | | | | g_printer reqiured "set interface" request from host. Not all hosts send this request. This patch enable the interface when it get "set configuration" request from host. Signed-off-by: Jonas Andersson <jonas@microbit.se> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: dbpg gadget: dont mask out direction bitSven Schnelle2011-04-29
| | | | | | | | | | | | | | | | Stripping the direction bit off will produce an invalid descriptor. Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: dbgp gadget: set MaxpacketSize0Sven Schnelle2011-04-29
| | | | | | | | | | | | | | | | | | | | | | The current code doesn't set it, so linux complains about it when connected, and ignores the device: [104611.068082] usb 1-5: new high speed USB device using ehci_hcd and address 127 [104611.088368] usb 1-5: Invalid ep0 maxpacket: 0 Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: dbgp gadget: fix return value of dbgp_setupSven Schnelle2011-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code returns 0 even if it can't handle the request. This leads to timeouts when an unhandled request is sent: Bus 001 Device 003: ID 0525:c0de Netchip Technology, Inc. Device Descriptor: [..] can't get device qualifier: Connection timed out [..] change the code to return EOPNOTSUPP in such cases. Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Merge 2.6.39-rc4 into usb-nextGreg Kroah-Hartman2011-04-19
| |\ | | | | | | | | | | | | | | | | | | This is needed to help resolve some xhci issues and other minor differences. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * Revert "usb: usb_storage: do not align length of request for CBW to maxp size"Greg Kroah-Hartman2011-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 806e8f8fcc27e1753947bd9f059ba2316cf8f92a. To quote Alan Stern: The necessity for this patch has been under discussion. It turns out the UDC that Mian has been working on and Felipe's UDC have contradictory requirements. Mian's UDC driver wants a bulk-OUT transfer length to be shorter than the maxpacket size if a short packet is expected, whereas Felipe's UDC hardware always needs bulk-OUT transfer lengths to be evenly divisible by the maxpacket size. Mian has agreed to go back over the driver to resolve this conflict. This means we probably will not want this patch after all. (In fact, we may ultimately decide to change the gadget framework to require that bulk-OUT transfer lengths _always_ be divisible by the maxpacket size -- only the g_file_storage and g_mass_storage gadgets would need to be changed.) Cc: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * usb: gadget: storage_common: use kstrto*()Michal Nazarewicz2011-04-13
| | | | | | | | | | | | | | | | | | | | | | | | This commit replaces the usage of strict_strtoul() (which became deprecated after commit 33ee3b2e) with kstrtouint(). Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>