aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
AgeCommit message (Collapse)Author
2008-11-19s3c2410_udc-2440_dual_packet-workaround.patchmokopatches
This is a patch that seems to make the USB hangs on the S3C2440 go away. At least a good amount of ping torture didn't make them come back so far. The issue is that, if there are several back-to-back packets, sometimes no interrupt is generated for one of them. This seems to be caused by the mysterious dual packet mode, which the USB hardware enters automatically if the endpoint size is half that of the FIFO. (On the 2440, this is the normal situation for bulk data endpoints.) There is also a timing factor in this. I think what happens is that the USB hardware automatically sends an acknowledgement if there is only one packet in the FIFO (the FIFO has space for two). If another packet arrives before the host has retrieved and acknowledged the previous one, no interrupt is generated for that second one. However, there may be an indication. There is one undocumented bit (none of the 244x manuals document it), OUT_CRS1_REG[1], that seems to be set suspiciously often when this condition occurs. There is also CLR_DATA_TOGGLE, OUT_CRS1_REG[7], which may have a function related to this. (The Samsung manual is rather terse on that, as usual.) This needs to be examined further. For now, the patch seems to do the trick. Note that this is not a clean solution by any means, because we might potentially get stuck in that interrupt for quite a while.
2008-11-19g_ether-vendor_product.patchmokopatches
Use FIC's own USB Vendor ID rather than NetChip's Yes, we could solve this by some modprobe.conf parameters, but I'd like to rather not rely on this.
2008-11-19g_ether-highpower.patchmokopatches
2008-11-03Merge branch 'master' of ↵Ben Dooks
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into s3c64xx
2008-11-01saner FASYNC handling on file closeAl Viro
As it is, all instances of ->release() for files that have ->fasync() need to remember to evict file from fasync lists; forgetting that creates a hole and we actually have a bunch that *does* forget. So let's keep our lives simple - let __fput() check FASYNC in file->f_flags and call ->fasync() there if it's been set. And lose that crap in ->release() instances - leaving it there is still valid, but we don't have to bother anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-30[ARM] S3C24XX: Movev udc headers to arch/arm/plat-s3c24xx/include/platBen Dooks
Move the udc headers to the proper home in arch/arm/plat-s3c24xx/include/plat ready to clean out the old include directories. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
2008-10-22USB: Fix unneeded endpoint check in pxa27x_udcRobert Jarzmik
The request allocation code doesn't need to check if the endpoint is not NULL, as the only caller in include/linux/usb/gadget.h, usb_ep_alloc_request() needs the endpoint pointer to have a correct value to trigger the allocation code. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22usb/gadget: fix kernel-doc warningRandy Dunlap
Fix kernel-doc warning, wrong parameter name listed: Warning(lin2627-g3-kdocfixes//drivers/usb/gadget/config.c:183): No description found for parameter 'match' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22USB: Fix debugfs_create_file's error checking method for usb/gadget/s3c2410_udcZhaolei
debugfs_create_file() returns NULL if an error occurs, returns -ENODEV when debugfs is not enabled in the kernel. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb/fsl_qe_udc: clear data toggle on clear halt requestLi Yang
Fix to comply with USB spec. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb/fsl_qe_udc: fix response to get status requestLi Yang
The original code didn't respond correctly to get status request on device and endpoint. Although normal operations can work without the fix. It is not compliant with USB spec chapter9 and fails USBCV ch9 tests. The patch fix this and a few style/typo problems. Signed-off-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Fix oops on probe failure.Will Newton
In some circumstances when fsl_udc_probe fails udc_controller is freed but the pointer remains non-NULL. fsl_udc_remove will then try and teardown the partly initialized and freed controller structure resulting in an oops. This patch ensures udc_controller is either NULL or fully initialized after fsl_udc_probe. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Add a wmb before priming endpoint.Will Newton
Add a wmb to fsl_queue_td before priming the endpoint. This ensures that the modifications to the QH are seen by the hardware. Added comment as suggested by Felipe Balbi. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Make fsl_queue_td return type void.Will Newton
fsl_queue_td always returns 0. Make it void and remove checks for non-zero return in callers. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Uninline udc_reset_ep_queue.Will Newton
Uninline udc_reset_ep_queue and remove it's unused return value. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Rename the arguments of the fsl_writel macro.Will Newton
Rename the arguments of the fsl_writel macro to match their use. Remove a couple of unnecessary prototypes. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Initialize spinlock earlier.Will Newton
Move spinlock initialization earlier so we can turn shared irq handler debugging on safely. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Clean up whitespace in /proc debugging output.Will Newton
Missing spaces were causing the /proc debugging output to be rather unreadable. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Clean up whitespace in errors and warnings.Will Newton
VDBG always outputs a trailing \n. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Fix some sparse warnings and remove redundant code.Will Newton
Fix some sparse "integer used as NULL pointer" warnings. Remove some unnecessary volatiles and static initialization. Remove some unused struct members and reorder to improve packing. Remove a few unneeded includes. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Remove check for udc == NULL in dr_controller_setup.Will Newton
Remove check for udc == NULL in dr_controller_setup. All callers of this function have already dereferenced udc at some point. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17fsl_usb2_udc: Make dr_ep_setup function static.Will Newton
Make dr_ep_setup function static as it's never used outside this file. Signed-off-by: Will Newton <will.newton@gmail.com> Acked-by: Li Yang <leoli@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb gadget: cdc ethernet notification bugfixDavid Brownell
Bugfix for the new CDC Ethernet code: as part of activating the network interface's USB link, make sure its link management code knows whether the interface is open or not. Without this fix, the link won't work right when it's brought up before the link is active ... because the initial notification it sends will have the wrong link state (down, not up). Makes it hard to bridge these links (on the host side), among other things. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: stable <stable@kernel.org> [2.6.27] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17USB: omap_udc: sync with OMAP treeTony Lindgren
Sync up USB parts of the omap_udc support in mainline with the OMAP tree. This patch addresses some OMAP2 differences ... there's another, with respect to the double-buffering issue with PIO-IN in omap_ep_setup() (which is now out of sync with the comments), but it's not clear right now how to address that. From: Tony Lindgren <tony@atomide.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17USB: Fix s3c2410_udc usb speed handlingYauhen Kharuzhy
The new composite framework revealed a weakness in the s3c2410_udc driver gadget register function. Instead of checking if speed asked for was USB_LOW_SPEED upon usb_gadget_register() to deny service, it checked only for USB_FULL_SPEED, thus denying service to usb high speed capable gadgets (like g_ether). Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Cc: stable <stable@kernel.org> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb gadget: USB_GADGET_VBUS_DRAW Kconfig optionDavid Brownell
Offer a "how much VBUS power to request" configuration option for USB gadgets that aren't using board-specific customization of their gadget or (composite) configuration drivers. Also remove a couple pointless "depends on USB_GADGET" bits from the Kconfig text; booleans inside an "if USB_GADGET" will already have that dependency. Based on a patch from Justin Clacherty. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Justin Clacherty <justin@redfish-group.com> Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb: gadget: workaround storage command size issuesFelipe Balbi
Try to workaround issues with bad SCSI implementations by ignoring the command size error. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17USB: g_printer: fix handling zero-length packetSangSu Park
g_printer doesn't have to check whether the data size is a multiple of MaxPacketSize, because device controller driver already make that check. Signed-off-by: SangSu Park<sangsu@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb: add Freescale QE/CPM USB peripheral controller driverLi Yang
Some of Freescale SoC chips have a QE or CPM co-processor which supports full speed USB. The driver adds device mode support of both QE and CPM USB controller to Linux USB gadget. The driver is tested with MPC8360 and MPC8272, and should work with other models having QE/CPM given minor tweaks. Signed-off-by: Xie Xiaobo <X.Xie@freescale.com> Signed-off-by: Li Yang <leoli@freescale.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17USB: remove unused #include <version.h>Huang Weiyi
The driver(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION. drivers/usb/gadget/pxa27x_udc.c This patch removes the said #include <version.h>. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb gadget: defer obex enumerationDavid Brownell
Some USB peripheral controller drivers support software control over the data pullup. Use those controls to prevent the OBEX function from enumerating until the userspace server has opened the /dev/ttyGS* node it will use to implement protocol chitchat with the USB host. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb gadget: cdc obex glueFelipe Balbi
The following patch introduces a new f_obex.c function driver. It allows userspace obex servers to use usb as transport layer for their messages. [ dbrownell@users.sourceforge.net: various fixes and cleanups ] Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb gadget: function activation/deactivationDavid Brownell
Add a new mechanism to the composite gadget framework, letting functions deactivate (and reactivate) themselves. Think of it as a refcounted wrapper for the software pullup control. A key example of why to use this mechanism involves functions that require a userspace daemon. Those functions shuld use this new mechanism to prevent the gadget from enumerating until those daemons are activated. Without this mechanism, hosts would see devices that malfunction until the relevant daemons start. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17USB: gadget: net2280: implement set_wedgeAlan Stern
This patch (as1132) implements the set_wedge() method for net2280. This method is necessary for strict USBCV compliance in g_file_storage. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17USB: gadget: dummy_hcd: implement set_wedgeAlan Stern
This patch (as1131) implements the set_wedge() method for dummy_hcd. This method is necessary for strict USBCV compliance in g_file_storage. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-17usb: gadget Kconfig cleanupDavid Brownell
This reorders the list of USB peripheral controller drivers so it's more common for the initial (default) value to be relevant: put the SOC integrated silicon up front, discrete stuff last. Alphabetize. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16usb gadget: link fixes for network gadgetDavid Brownell
Change how the Ethernet/RNDIS gadget driver builds: don't use separate compilation, since it works poorly when key parts are library code (with init sections etc). Instead be as close as we can to "gcc --combine ...". This is a bit more complicated than most of the others because it had to resolve a few symbol collisions. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16usb gadget: link fixes for cdc composite gadgetDavid Brownell
Change how the CDC Composite gadget driver builds: don't use separate compilation, since it works poorly when key parts are library code (with init sections etc). Instead be as close as we can to "gcc --combine ...". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16usb gadget: link fixes for storage gadgetDavid Brownell
Change how the file storage gadget driver builds: don't use separate compilation, since it works poorly when key parts are library code (with init sections etc). Instead be as close as we can to "gcc --combine ...". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16usb gadget: link fixes for printer gadgetDavid Brownell
Change how the printer gadget driver builds: don't use separate compilation, since it works poorly when key parts are library code (with init sections etc). Instead be as close as we can to "gcc --combine ...". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16usb gadget: link fixes for MIDI gadgetDavid Brownell
Change how the MIDI gadget driver builds: don't use separate compilation, since it works poorly when key parts are library code (with init sections etc). Instead be as close as we can to "gcc --combine ...". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16usb gadget: link fixes for gadget zeroDavid Brownell
Change how the Gadget Zero driver builds: don't use separate compilation, since it works poorly when key parts are library code (with init sections etc). Instead be as close as we can to "gcc --combine ...". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16usb gadget: link fixes for serial gadgetDavid Brownell
Change how the serial gadget driver builds: don't use separate compilation, since it works poorly when key parts are library code (with init sections etc). Instead be as close as we can to "gcc --combine ...". Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-16device create: usb: convert device_create_drvdata to device_createGreg Kroah-Hartman
Now that device_create() has been audited, rename things back to the original call to be sane. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-09-23USB: fsl_usb2_udc: fix VDBG() format stringPeter Korsgaard
Fixes: drivers/usb/gadget/fsl_usb2_udc.c: In function 'dr_controller_setup': drivers/usb/gadget/fsl_usb2_udc.c:229: warning: format '%p' expects type 'void *', but argument 3 has type 'int' Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-09-23usb gadget: fix omap_udc DMA regressionDavid Brownell
This resolves another regression caused by the "use omap_read/write instead of __REG" patch: the hardware address used for DMA to/from the UDC became wrong. Bug noted by Russell King. Reported-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Russell King <rmk@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-23removed unused #include <linux/version.h>'sAdrian Bunk
This patch lets the files using linux/version.h match the files that #include it. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-08-21USB: Fix pxa27x_udc usb speed handling.Robert Jarzmik
The new composite framework revealed a weakness in the pxa27x_udc driver gadget register function. Instead of checking if speed asked for was USB_LOW_SPEED upon usb_gadget_register() to deny service, it checked only for USB_FULL_SPEED, thus denying service to usb high speed capable gadgets (like g_ether). Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-13USB: Add MUSB and TUSB supportFelipe Balbi
This patch adds support for MUSB and TUSB controllers integrated into omap2430 and davinci. It also adds support for external tusb6010 controller. Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-08-13USB: omap_udc: fix compilation with debug enabledDmitry Baryshkov
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>