aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/dummy_hcd.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: gadget: dummy: fix enumeration with g_multiSebastian Andrzej Siewior2013-01-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 1d16638e3b9cc195bac18a8fcbca748f33c1bc24 upstream. If we do have endpoints named like "ep-a" then bEndpointAddress is counted internally by the gadget framework. If we do have endpoints named like "ep-1" then bEndpointAddress is assigned from the digit after "ep-". If we do have both, then it is likely that after we used up the "generic" endpoints we will use the digits and thus assign one bEndpointAddress to multiple endpoints. This theory can be proofed by using the completely enabled g_multi. Without this patch, the mass storage won't enumerate and times out because it shares endpoints with RNDIS. This patch also adds fills up the endpoints list so we have in total endpoints 1 to 15 in + out available while some of them are restricted to certain types like BULK or ISO. Without this change the nokia gadget won't load because the system does not provide enough (BULK) endpoints but it did before ep-a - ep-f were removed. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* USB: dummy-hcd needs the has_tt flagAlan Stern2011-06-071-0/+1
| | | | | | | | | | | 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/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 3.0 Hub ChangesJohn Youn2011-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update the USB core to deal with USB 3.0 hubs. These hubs have a slightly different hub descriptor than USB 2.0 hubs, with a fixed (rather than variable length) size. Change the USB core's hub descriptor to have a union for the last fields that differ. Change the host controller drivers that access those last fields (DeviceRemovable and PortPowerCtrlMask) to use the union. Translate the new version of the hub port status field into the old version that khubd understands. (Note: we need to fix it to translate the roothub's port status once we stop converting it to USB 2.0 hub status internally.) Add new code to handle link state change status. Send out new control messages that are needed for USB 3.0 hubs, like Set Hub Depth. This patch is a modified version of the original patch submitted by John Youn. It's updated to reflect the removal of the "bitmap" #define, and change the hub descriptor accesses of a couple new host controller drivers. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Cc: Tony Olech <tony.olech@elandigitalsystems.com> Cc: "Robert P. J. Day" <rpjday@crashcourse.ca> Cc: Max Vozeler <mvz@vozeler.com> Cc: Tejun Heo <tj@kernel.org> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Rodolfo Giometti <giometti@linux.it> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Anton Vorontsov <avorontsov@mvista.com> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Lothar Wassmann <LW@KARO-electronics.de> Cc: Olav Kongas <ok@artecdesign.ee> Cc: Martin Fuzzey <mfuzzey@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <dbrownell@users.sourceforge.net>
* USB: Remove bitmap #define from hcd.hSarah Sharp2011-03-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using a #define to redefine a common variable name is a bad thing, especially when the #define is in a header. include/linux/usb/hcd.h redefined bitmap to DeviceRemovable to avoid typing a long field in the hub descriptor. This has unintended side effects for files like drivers/usb/core/devio.c that include that file, since another header included after hcd.h has different variables named bitmap. Remove the bitmap #define and replace instances of it in the host controller code. Cleanup the spaces around function calls and square brackets while we're at it. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Cc: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Cc: Tony Olech <tony.olech@elandigitalsystems.com> Cc: "Robert P. J. Day" <rpjday@crashcourse.ca> Cc: Max Vozeler <mvz@vozeler.com> Cc: Tejun Heo <tj@kernel.org> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Rodolfo Giometti <giometti@linux.it> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Anton Vorontsov <avorontsov@mvista.com> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Lothar Wassmann <LW@KARO-electronics.de> Cc: Olav Kongas <ok@artecdesign.ee> Cc: Martin Fuzzey <mfuzzey@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <dbrownell@users.sourceforge.net>
* usb: dummy_hcd code simplificationTatyana Brokhman2010-11-111-116/+135
| | | | | | | | Take handling of the control requests out from dummy_timer to a different function. Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: dummy_hcd: Fix error pathRahul Ruikar2010-10-221-3/+5
| | | | | | | | | | | In function dummy_udc_probe() call put_device() when device_register() fails. also usb_get_hcd() put before device_register() after review comment from Alan Stern. Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb gadget: don't save bind callback in struct usb_gadget_driverUwe Kleine-König2010-10-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | To accomplish this the function to register a gadget driver takes the bind function as a second argument. To make things clearer rename the function to resemble platform_driver_probe. This fixes many section mismatches like WARNING: drivers/usb/gadget/g_printer.o(.data+0xc): Section mismatch in reference from the variable printer_driver to the function .init.text:printer_bind() The variable printer_driver references the function __init printer_bind() All callers are fixed. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [m.nazarewicz@samsung.com: added dbgp] Signed-off-by: Michał Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert usb_hcd bitfields into atomic flagsAlan Stern2010-08-101-3/+3
| | | | | | | | | | | | | | | | | | | This patch (as1393) converts several of the single-bit fields in struct usb_hcd to atomic flags. This is for safety's sake; not all CPUs can update bitfield values atomically, and these flags are used in multiple contexts. The flag fields that are set only during registration or removal can remain as they are, since non-atomic accesses at those times will not cause any problems. (Strictly speaking, the authorized_default flag should become atomic as well. I didn't bother with it because it gets changed only via sysfs. It can be done later, if anyone wants.) Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: make hcd.h public (drivers dependency)Eric Lescouet2010-05-201-3/+1
| | | | | | | | | | | | | The usbcore headers: hcd.h and hub.h are shared between usbcore, HCDs and a couple of other drivers (e.g. USBIP modules). So, it makes sense to move them into a more public location and to cleanup dependency of those modules on kernel internal headers. This patch moves hcd.h from drivers/usb/core into include/linux/usb/ Signed-of-by: Eric Lescouet <eric@lescouet.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: dummy-hcd: accept mismatch between wLength and transfer lengthAlan Stern2009-09-231-5/+0
| | | | | | | | | | | | | | | | | This patch (as1269) fixes a bug in the way dummy_hcd handles control URBs. Currently it returns a -EOVERFLOW error if the wLength value in the setup packet is different from the URB's transfer_buffer_length. Other host controller drivers don't do this. There's no reason the two length values have to be equal, and in fact they sometimes aren't -- a driver might set the transfer length to the maxpacket value in order to handle buggy devices that don't respect wLength. This patch simply removes the unnecessary check and error return. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: make transfer_buffer_lengths in struct urb field u32Greg Kroah-Hartman2009-03-241-1/+1
| | | | | | | | | | | | | | Roel Kluin pointed out that transfer_buffer_lengths in struct urb was declared as an 'int'. This patch changes this field to be 'u32' to prevent any potential negative conversion and comparison errors. This triggered a few compiler warning messages when these fields were being used with the min macro, so they have also been fixed up in this patch. Cc: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: replace uses of __constant_{endian}Harvey Harrison2009-03-241-1/+1
| | | | | | | | The base versions handle constant folding now. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: dummy_hcd: implement set_wedgeAlan Stern2008-10-171-6/+27
| | | | | | | | | | 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>
* USB: fix USB boot crash, ecm_do_notify(), list_add corruption. prev->next ↵David Brownell2008-08-131-2/+3
| | | | | | | | | | | | | | | | should be next (ffff88003b8f82f8) This fixes a BUG() turned up by Ingo via randconfig testing, where CONFIG_LIST_DEBUG turned up list corruption. The corruption was caused by the dummy_hcd (single-machine test harness for gadget and HCD code) trashing the request queue when driven by the new CDC composite gadget an I/O pattern that was previously uncommon. Fix suggested by Alan Stern. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Tested-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb dev_set_name() instead of dev->bus_idKay Sievers2008-07-211-1/+1
| | | | | | | | | The bus_id field is going away, use the dev_set_name() function to set it properly. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb dev_name() instead of dev->bus_idKay Sievers2008-07-211-1/+1
| | | | | | | | The bus_id field is going away, use the dev_name() function instead. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* drivers/usb annotations and fixesAl Viro2008-04-281-2/+1
| | | | | | | | | | | | * endianness annotations * endianness fixes * missing get_unaligned/put_unaligned It's pretty much all over the place, changes to different files are independent. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Serial-parts-Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* USB: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-04-241-6/+6
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: dummy-hcd: use dynamic allocation for platform_devicesAlan Stern2008-04-241-41/+29
| | | | | | | | | | | | | | | | This patch (as1075) changes dummy-hcd to dynamically allocate its platform_device structures, using the core platform_device_alloc() interface. This is what it should have done all along, because the dynamically-allocated structures have a release method in the driver core and are therefore immune to being released after the module has been unloaded. Thanks to Richard Purdie for pointing out the need for this change. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: dummy_hcd.c: fix nested switch statementsIngo van Lil2008-04-241-8/+6
| | | | | | | | | | | | | | | | | Fix a messed up combination of two nested switch statements in drivers/usb/gadget/dummy_hcd.c. According to the USB spec (section 5.8.3) the maximum packet size for bulk endpoints can be 512 for high-speed devices and 8, 16, 32 or 64 for full-speed devices. Low-speed devices must not have bulk endpoints. Signed-off-by: Ingo van Lil <inguin@gmx.de> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove dev->power.power_stateAlan Stern2008-04-241-2/+0
| | | | | | | | | | | | | | | | power.power_state is scheduled for removal. This patch (as1053) removes all uses of that field from drivers/usb. Almost all of them were write-only, the most significant exceptions being sl811-hcd.c and u132-hcd.c. Part of this patch was written by Pavel Machek. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: dummy_hcd: change the default power budgetAlan Stern2008-02-011-2/+3
| | | | | | | | | This patch (as1025) changes the default power budget for dummy-hcd to 500 mA and makes it a preprocessor parameter for easier testing. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: dummy_hcd: don't register drivers on the platform busAlan Stern2008-02-011-25/+8
| | | | | | | | | | | | | This patch (as1017) makes dummy_hcd behave more like the other USB peripheral controller drivers by no longer registering its gadget driver on the platform bus. Doing that has always been a mistake, since a usb_gadget_driver isn't a platform_driver. Instead the gadget driver is left unregistered in sysfs. 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>
* USB: move <linux/usb_gadget.h> to <linux/usb/gadget.h>David Brownell2007-10-121-1/+1
| | | | | | | | | Move <linux/usb_gadget.h> to <linux/usb/gadget.h>, reducing some of the clutter in the main include directory. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix location of statement label in dummy-hcdAlan Stern2007-10-121-1/+1
| | | | | | | | | | This patch (as984) fixes a rather elementary mistake in dummy_hcd. The new statement label should come before the spin_unlock_irqrestore, not after it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Eliminate urb->status usage!Alan Stern2007-10-121-2/+1
| | | | | | | | | | | | | | | This patch (as979) removes the last vestiges of urb->status from the host controller drivers and the root-hub emulator. Now the field doesn't get set until just before the URB's completion routine is called. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> CC: Olav Kongas <ok@artecdesign.ee> CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> CC: Tony Olech <tony.olech@elandigitalsystems.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: reorganize urb->status use in dummy-hcdAlan Stern2007-10-121-29/+24
| | | | | | | | | This patch (as973) reorganizes the way dummy-hcd sets urb->status. It now keeps the information in a local variable until the last moment. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add urb->unlinked fieldAlan Stern2007-10-121-5/+3
| | | | | | | | | | | | | | | | This patch (as970) adds a new urb->unlinked field, which is used to store the status of unlinked URBs since we can't use urb->status for that purpose any more. To help simplify the HCDs, usbcore will check urb->unlinked before calling the completion handler; if the value is set it will automatically override the status reported by the HCD. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> CC: Olav Kongas <ok@artecdesign.ee> CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> CC: Tony Olech <tony.olech@elandigitalsystems.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: centralize -EREMOTEIO handlingAlan Stern2007-10-121-7/+2
| | | | | | | | | | | | | | | | | | | This patch (as969) continues the ongoing changes to the way HCDs report URB statuses. The programming interface has been simplified by making usbcore responsible for clearing urb->hcpriv and for setting -EREMOTEIO status when an URB with the URB_SHORT_NOT_OK flag ends up as a short transfer. By moving the work out of the HCDs, this removes a fair amount of repeated code. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> CC: Olav Kongas <ok@artecdesign.ee> CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> CC: Tony Olech <tony.olech@elandigitalsystems.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: make HCDs responsible for managing endpoint queuesAlan Stern2007-10-121-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as954) implements a suggestion of David Brownell's. Now the host controller drivers are responsible for linking and unlinking URBs to/from their endpoint queues. This eliminates the possiblity of strange situations where usbcore thinks an URB is linked but the HCD thinks it isn't. It also means HCDs no longer have to check for URBs being dequeued before they were fully enqueued. In addition to the core changes, this requires changing every host controller driver and the root-hub URB handler. For the most part the required changes are fairly small; drivers have to call usb_hcd_link_urb_to_ep() in their urb_enqueue method, usb_hcd_check_unlink_urb() in their urb_dequeue method, and usb_hcd_unlink_urb_from_ep() before giving URBs back. A few HCDs make matters more complicated by the way they split up the flow of control. In addition some method interfaces get changed. The endpoint argument for urb_enqueue is now redundant so it is removed. The unlink status is required by usb_hcd_check_unlink_urb(), so it has been added to urb_dequeue. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> CC: Olav Kongas <ok@artecdesign.ee> CC: Tony Olech <tony.olech@elandigitalsystems.com> CC: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove DEBUG definition from dummy_hcdAlan Stern2007-08-221-2/+0
| | | | | | | | | This patch (as958) removes an unneeded and unwanted #define line from dummy_hcd. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb gadget stack: remove usb_ep_*_buffer(), part 2David Brownell2007-07-121-36/+0
| | | | | | | | | | | | | | | | | | | | This patch removes controller driver infrastructure which supported the now-removed usb_ep_{alloc,free}_buffer() calls. As can be seen, many of the implementations of this were broken to various degrees. Many didn't properly return dma-coherent mappings; those which did so were necessarily ugly because of bogosity in the underlying dma_free_coherent() calls ... which on many platforms can't be called from the same contexts (notably in_irq) from which their dma_alloc_coherent() sibling can be called. The main potential downside of removing this is that gadget drivers wouldn't have specific knowledge that the controller drivers have: endpoints that aren't dma-capable don't need any dma mappings at all. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Don't resume root hub if the controller is suspendedAlan Stern2007-07-121-2/+1
| | | | | | | | | | | | | | | | | | | Root hubs can't be resumed if their parent controller device is still suspended. This patch (as925) adds a check for that condition in hcd_bus_resume() and prevents it from being treated as a fatal controller failure. ehci-hcd is updated to add the corresponding test. Unnecessary debugging messages are removed from uhci-hcd and dummy-hcd. The error return code from dummy-hcd is changed to -ESHUTDOWN, the same as the others. ohci-hcd doesn't need any changes. Suspend handling in the non-PCI host drivers is somewhat hit-and-miss. This patch shouldn't have any effect on them. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* header cleaning: don't include smp_lock.h when not usedRandy Dunlap2007-05-081-1/+0
| | | | | | | | | | | | Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [PATCH] remove many unneeded #includes of sched.hTim Schmielau2007-02-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | After Al Viro (finally) succeeded in removing the sched.h #include in module.h recently, it makes sense again to remove other superfluous sched.h includes. There are quite a lot of files which include it but don't actually need anything defined in there. Presumably these includes were once needed for macros that used to live in sched.h, but moved to other header files in the course of cleaning it up. To ease the pain, this time I did not fiddle with any header files and only removed #includes from .c-files, which tend to cause less trouble. Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha, arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig, allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all configs in arch/arm/configs on arm. I also checked that no new warnings were introduced by the patch (actually, some warnings are removed that were emitted by unnecessarily included header files). Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* USB: gadget driver unbind() is optional; section fixes; miscDavid Brownell2006-12-201-3/+4
| | | | | | | | | | | | | | | | | | Allow gadget drivers to omit the unbind() method. When they're statically linked, that's an appropriate memory saving tweak. Similarly, provide consistent/simpler handling for a should-not-happen error case: removing a peripheral controller driver when a gadget driver is still loaded. Such code dates back to early versions of the first implementation of the gadget API, and has never been triggered. Includes relevant section annotation fixs for gmidi.c, file_storage.c, and serial.c; we don't yet have an "init or exit" annotation. Also some whitespace fixes in gmidi.c (space at EOL, before tabs, etc). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] misc arm pt_regs fixesAl Viro2006-10-081-1/+1
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* USB: dummy-hcd: fix "warn-unused-result" messagesAlan Stern2006-09-281-10/+23
| | | | | | | | This patch (as758) fixes the "warn-unused-result" messages in dummy-hcd. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usbcore: trim down usb_bus structureAlan Stern2006-09-271-6/+2
| | | | | | | | | | | | | | | | | | | | | | As part of the ongoing program to flatten out the HCD bus-glue layer, this patch (as771b) eliminates the hcpriv, release, and kref fields from struct usb_bus. hcpriv and release were not being used for anything worthwhile, and kref has been moved into the enclosing usb_hcd structure. Along with those changes, the patch gets rid of usb_bus_get and usb_bus_put, replacing them with usb_get_hcd and usb_put_hcd. The one interesting aspect is that the dev_set_drvdata call was removed from usb_put_hcd, where it clearly doesn't belong. This means the driver private data won't get reset to NULL. It shouldn't cause any problems, since the private data is undefined when no driver is bound. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: dummy-hcd: disable interrupts during req->completeAlan Stern2006-08-021-2/+4
| | | | | | | | | | This patch (as756) fixes a bug in dummy-hcd found by the lockdep checker. In one of the code paths, the driver did not disable interrupts before calling a request completion routine. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-301-1/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* [PATCH] USB: kzalloc() conversion in drivers/usb/gadgetEric Sesterhenn2006-03-201-2/+1
| | | | | | | | | | | | | this patch converts drivers/usb to kzalloc usage. Compile tested with allyes config. I think there was a bug in drivers/usb/gadget/inode.c because it used sizeof(*data) for the kmalloc() and sizeof(data) for the memset(), since sizeof(data) just returns the size for a pointer. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: Use ARRAY_SIZE macroTobias Klauser2006-01-041-1/+1
| | | | | | | | | | Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of ARRAY_SIZE. Some trailing whitespaces are also removed. Patch is compile-tested on i386. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB Gadget: dummy_hcd: updates to hcd->stateAlan Stern2006-01-041-12/+31
| | | | | | | | | | | | This patch (as613) moves the updates to hcd->state in the dummy_hcd driver to where they now belong. It also uses the new HC_FLAG_HW_ACCESSIBLE flag in a way that simulates a real PCI controller, and it adds checks for attempts to resume the bus while the controller is suspended or to suspend the controller while the bus is active. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: dummy_hcd: rename variablesAlan Stern2006-01-041-25/+25
| | | | | | | | | | | | | | The recent platform_device update has reintroduced into dummy_hcd.c the dreaded dev->dev syndrome. This harkens back to when an earlier version of that driver included the unforgettable line: dev->dev.dev.driver_data = dev; This patch (as602) renames the platform_device variables to "pdev", in the hope of reducing confusion. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] USB: fix build breakage in dummy_hcd.cGreg Kroah-Hartman2005-11-171-2/+2
| | | | | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge master.kernel.org:/home/rmk/linux-2.6-drvmodelLinus Torvalds2005-11-111-37/+39
|\
| * [DRIVER MODEL] Convert platform drivers to use struct platform_driverRussell King2005-11-091-37/+39
| | | | | | | | | | | | | | | | | | This allows us to eliminate the casts in the drivers, and eventually remove the use of the device_driver function pointer methods for platform device drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
* | [PATCH] changing CONFIG_LOCALVERSION rebuilds too much, for no good reasonOlaf Hering2005-11-091-1/+0
|/ | | | | | | | | | | | | | | | | | | | | This patch removes almost all inclusions of linux/version.h. The 3 #defines are unused in most of the touched files. A few drivers use the simple KERNEL_VERSION(a,b,c) macro, which is unfortunatly in linux/version.h. There are also lots of #ifdef for long obsolete kernels, this was not touched. In a few places, the linux/version.h include was move to where the LINUX_VERSION_CODE was used. quilt vi `find * -type f -name "*.[ch]"|xargs grep -El '(UTS_RELEASE|LINUX_VERSION_CODE|KERNEL_VERSION|linux/version.h)'|grep -Ev '(/(boot|coda|drm)/|~$)'` search pattern: /UTS_RELEASE\|LINUX_VERSION_CODE\|KERNEL_VERSION\|linux\/\(utsname\|version\).h Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>