summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'usb-next' of ↵Linus Torvalds2011-05-2319-298/+2107
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-1/+1
| | | | | | | | | | | | | | | | 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-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-1/+1
| | | | | | | | | | | | | | | | | | 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-131-1/+1
| | | | | | | | | | | | | | 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-131-4/+3
| | | | | | | | | | | | | | | | | | | | 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-131-1/+1
| | | | | | | | | | | | | | | | | | | | 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-131-2/+2
| | | | | | | | | | | | | | 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-104-0/+1375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | 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-101-1/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-031-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-031-6/+14
| | | | | | | | | | | | | | | | 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-031-1/+7
| | | | | | | | | | | | | | | | | | 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-031-1/+1
| | | | | | | | | | 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-031-1/+1
| | | | | | | | | | 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-031-1/+1
| | | | | | | | | | 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-021-0/+3
| | | | | | | | | | | | | | 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-021-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-021-31/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-021-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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-021-38/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-021-5/+2
| | | | | | | | | | | | | | | | | | | | 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-022-15/+134
| | | | | | | | | | | | 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-022-31/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-022-25/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-1/+2
| | | | | | | | | | | | | | | | | | 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-291-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-291-0/+2
| | | | | | | | | | | | | | | | | | 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-291-2/+2
| | | | | | | | | | | | | | | | 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-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | 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-291-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-196-91/+66
| |\ | | | | | | | | | | | | | | | | | | 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-143-10/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * usb: fix a typo in a commentWeiping Pan(潘卫平)2011-04-131-1/+1
| | | | | | | | | | | | | | | | | | | | | replace tranmitted with transmitted. Signed-off-by: Weiping Pan(潘卫平) <panweiping3@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * usb: gadget: f_mass_storage: If 'ro'/'cdrom' specified, open file as read-onlyRoger Quadros2011-04-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we don't need Write access then attempt to open backing file in Read Only mode instead of bailing out too soon. 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: f_mass_storage: Fix Bulk-only RESET handlingRoger Quadros2011-04-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ep0 request tag was not recorded thus resulting in phase problems while sending status/response in handle_execption() handler. This was resulting in MSC compliance test failures with USBCV tool. With this patch, the Bulk-Only Mass storage RESET request is handled correctly and the MSC compliance tests pass. 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: g_file_storage: don't send padding when stall=nAlan Stern2011-04-132-84/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1455) removes the extra padding sent by g_file_storage and g_mass_storage when the gadget wants to send less data than requested by the host and isn't allowed to halt the bulk-IN endpoint. Although the Bulk-Only Transport specification requires the padding to be present, it isn't truly needed since the transfer will be terminated by a short packet anyway. Furthermore, many existing devices don't bother to send any padding. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-By: Michal Nazarewicz <mina86@mina86.com> CC: Roger Quadros <roger.quadros@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| | * usb: usb_storage: do not align length of request for CBW to maxp sizeMian Yousaf Kaukab2011-04-133-49/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mass-storage and file-storage gadgets align the length to maximum-packet-size when preparing the request to receive CBW. This is unnecessary and prevents the controller driver from knowing that a short-packet is expected. It is incorrect to set short_not_ok when preparing the request to receive CBW. CBW will be a short-packet so short_not_ok must not be set. This makes bh->bulk_out_intended_length unnecessary so it is also removed. Signed-off-by: Mian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.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: renesas_usbhs: Add Renesas USBHS GadgetKuninori Morimoto2011-04-132-0/+27
| | | | | | | | | | | | | | | | | | | | | This patch add usb gadget code to SuperH USBHS. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | Merge branch 'for-linus' of ↵Linus Torvalds2011-05-231-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) b43: fix comment typo reqest -> request Haavard Skinnemoen has left Atmel cris: typo in mach-fs Makefile Kconfig: fix copy/paste-ism for dell-wmi-aio driver doc: timers-howto: fix a typo ("unsgined") perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course'). treewide: fix a few typos in comments regulator: change debug statement be consistent with the style of the rest Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations" audit: acquire creds selectively to reduce atomic op overhead rtlwifi: don't touch with treewide double semicolon removal treewide: cleanup continuations and remove logging message whitespace ath9k_hw: don't touch with treewide double semicolon removal include/linux/leds-regulator.h: fix syntax in example code tty: fix typo in descripton of tty_termios_encode_baud_rate xtensa: remove obsolete BKL kernel option from defconfig m68k: fix comment typo 'occcured' arch:Kconfig.locks Remove unused config option. treewide: remove extra semicolons ...
| * | | Haavard Skinnemoen has left AtmelJean Delvare2011-05-181-1/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | Haavard's e-mail address at Atmel is no longer valid. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Havard Skinnemoen <hskinnemoen@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | | sanitize <linux/prefetch.h> usageLinus Torvalds2011-05-205-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e66eed651fd1 ("list: remove prefetching from regular list iterators") removed the include of prefetch.h from list.h, which uncovered several cases that had apparently relied on that rather obscure header file dependency. So this fixes things up a bit, using grep -L linux/prefetch.h $(git grep -l '[^a-z_]prefetchw*(' -- '*.[ch]') grep -L 'prefetchw*(' $(git grep -l 'linux/prefetch.h' -- '*.[ch]') to guide us in finding files that either need <linux/prefetch.h> inclusion, or have it despite not needing it. There are more of them around (mostly network drivers), but this gets many core ones. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | | drivercore: revert addition of of_match to struct deviceGrant Likely2011-05-181-2/+5
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit b826291c, "drivercore/dt: add a match table pointer to struct device" added an of_match pointer to struct device to cache the of_match_table entry discovered at driver match time. This was unsafe because matching is not an atomic operation with probing a driver. If two or more drivers are attempted to be matched to a driver at the same time, then the cached matching entry pointer could get overwritten. This patch reverts the of_match cache pointer and reworks all users to call of_match_device() directly instead. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* | USB: fsl_qe_udc: send ZLP when zero flag and length % maxpacket == 0Valentin Longchamp2011-04-131-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver did not take the zero flag in the USB request. If the request length is the same as the endpoint's maxpacket, an additional ZLP with no data has to be transmitted. The method used here is inspired to what is done in fsl_udc_core.c (and pxa27x_udc.c and at91_udc.c) where this is supported. There already was a discussion about this topic with people from Keymile, and I propose here a better implementation: http://thread.gmane.org/gmane.linux.usb.general/38951 Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | usb: pch_udc: unlock on allocation failureDan Carpenter2011-04-131-3/+5
| | | | | | | | | | | | | | | | | | | | | | There was an unlock missing on the error path. Also I did a small cleanup by changing ep->dev->lock for just dev->lock. They're the same lock, but dev->lock is shorter and that's how it is used for the spin_unlock_irqrestore() call. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud