summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* USB: gadget: section mismatch warning fixedMichal Nazarewicz2010-08-1013-22/+22
| | | | | | | | | | | | | In may gadgets bind and bind like functions were in a init section as they were only run during initialisation. However, being callback functions they were referenced from structures in “normal” sections. Changing the tag from “__init” to “__ref” fixes the warnings. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: f_mass_storage: added eject callbackMichal Nazarewicz2010-08-102-40/+74
| | | | | | | | | | | | | | | | | | | Added pre_eject() and post_eject() callbacks which are called before and after removable logical unit is ejected. The first can prevent logical unit from being ejected. This commit also changes the way callbacks are passed to the function from gadget. A fsg_operations structure has been created which lists all callbacks -- this is passed to the fsg_config. This is important because it changes the way thread_exits() callback is passed. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: composite: added disconnect callbackMichal Nazarewicz2010-08-102-0/+4
| | | | | | | | | | | | Added a disconnect() callback to composite devices which is called by composite glue when its disconnect callback is called by gadget. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: g_multi: added documentation and INF filesMichal Nazarewicz2010-08-103-5/+155
| | | | | | | | | | A short documentation of the g_multi driver along with INF files for Windows XP SP3 are provided. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: g_serial: INF file updatedMichal Nazarewicz2010-08-102-77/+117
| | | | | | | | | | Updated the INF file for g_serial gadget. It should work with most recent Windows systems now. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: g_ether: updated INF fileMichal Nazarewicz2010-08-101-181/+47
| | | | | | | | | | Updated the INF file for the g_ether gadget. It should work with most recent Windows systems now. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: g_multi: code clean up and refactoringMichal Nazarewicz2010-08-102-116/+147
| | | | | | | | | | | | | | | The Multifunction Composite Gadget have been cleaned up and refactored so hopefully it looks prettier and works at least as good as before changes. A Kconfig has also been fixed to make it impossible to build FunctionFS gadget with no configurations. With this patch, if RNDIS is not chosen by the user CDC is force-selected. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: f_mass_storage: dead code removedMichal Nazarewicz2010-08-101-3/+0
| | | | | | | | | | | The ep0req_name was never used in f_mass_storage hence it may be safely removed from the code. It was a leftover from File Storage Gadget which used it for debug messages. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: f_fs: use usb_string_ids_n()Michal Nazarewicz2010-08-101-18/+12
| | | | | | | | | | Use usb_string_ids_n() function to simplify string ids registeration. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: composite: usb_string_ids_*() functions addedMichal Nazarewicz2010-08-102-4/+71
| | | | | | | | | | | | | | | | | usb_string_ids_tab() and usb_string_ids_n() functions added to the composite framework. The first accepts an array of usb_string object and for each registeres a string id and the second registeres a given number of ids and returns the first. This may simplify string ids registration since gadgets and composite functions won't have to call usb_string_id() several times and each time check for errer status -- all this will be done with a single call. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: f_fs: functionfs_add() renamed to functionfs_bind_config()Michal Nazarewicz2010-08-103-7/+7
| | | | | | | | | | | FunctionFS had a bit unique name for function used to add it to USB configuration. Renamed as to match naming convention of other functions. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: f_mass_storage: fsg_add() renamed to fsg_bind_config()Michal Nazarewicz2010-08-103-6/+13
| | | | | | | | | | | Mass Storage Function had a bit unique name for function used to add it to USB configuration. Renamed as to match naming convention of other functions. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: g_mass_storage: static data instead of dynamic allocationMichal Nazarewicz2010-08-101-6/+9
| | | | | | | | | | | This patch changes msg_do_config() function so that it uses a static object for a fsg_common structure instead of dynamically allocated. This is a micro-optimisation. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: mon: kill BKL usageArnd Bergmann2010-08-101-20/+2
| | | | | | | | | | | | | | | | compat_ioctl does not use the BKL, so I assume that the native function does not need it either. The open function is already protected by the driver's mutex, the BKL is probably not needed here either. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: gadget: Do not take BKL for gadget->ops->ioctlArnd Bergmann2010-08-102-6/+2
| | | | | | | | | | | | | There is no gadget driver in the tree that actually implements the ioctl operation, so obviously it is not necessary to hold the BKL around the call. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Michał Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB-BKL: Remove BKL use in uhci-debugAndi Kleen2010-08-101-13/+7
| | | | | | | | | | | | | | BKL was not really needed, just came from earlier push downs. The only part that's a bit dodgy is the lseek function. Would need another lock or atomic access to fpos on 32bit? Better to have a libfs lseek Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB-BKL: Remove BKL use for usb serial driver probingAndi Kleen2010-08-101-16/+14
| | | | | | | | | | | | | | | | | | | | | | The usb serial driver initialization tried to use the BKL to stop driver modules from unloading, but that didn't work anyways. There was already some code to do proper try_module_get, but it was conditional on having a new probe interface. I checked all the low level drivers and they all have proper .owner = THIS_MODULE, so it's ok to always use. The other problem was the usb_serial_driver_list needing protection by a lock. This was broken anyways because unregister did not necessarily have the BKL. I extended the extending table_lock mutex to protect this case too. With these changes the BKL can be removed here. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB-BKL: Convert usb_driver ioctl to unlocked_ioctlAndi Kleen2010-08-104-8/+7
| | | | | | | | | | | | And audit all the users. None needed the BKL. That was easy because there was only very few around. Tested with allmodconfig build on x86-64 Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> From: Andi Kleen <ak@linux.intel.com>
* USB-BKL: Remove lock_kernel in usbfs update_sb()Andi Kleen2010-08-101-4/+0
| | | | | | | | | | | | | The code this is attempting to lock against does not use the BKL, so it's not needed. Most likely this code is still broken/racy (Al Viro also thinks so), but removing the BKL should not make it worse than before. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: atm: fixed spacing and indentation coding style issuesNicolas Kaiser2010-08-102-16/+16
| | | | | | | | Fixed spacing and indentation coding style issues. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Add a serial number parameter to g_file_storage moduleYann Cantin2010-08-101-11/+58
| | | | | | | | | | | | This patch add a serial number parameter to the g_file_storage module. There's validity checks against the string passed to comply with the specs. Signed-off-by: Yann Cantin <yann.cantin@laposte.net> Cc: Michał Nazarewicz <m.nazarewicz@samsung.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: conexant: fixed spacing and brace coding style issuesNicolas Kaiser2010-08-101-6/+5
| | | | | | | | Fixed spacing and brace coding style issues. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: langwell_udc.c: printk needs a (unsigned long long) cast for a ↵Joe Perches2010-08-101-3/+3
| | | | | | | | dma_t Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Revert "USB: Adding support for HTC Smartphones to ipaq"Leann Ogasawara2010-08-101-1/+0
| | | | | | | | | | | | | | | ipaq already had this device id defined: { USB_DEVICE(0x0BB4, 0x00CF) }, /* HTC USB Modem */ Revert the commit which adds the duplicate entry. This reverts commit 04cab1329336d4577d6638360c905e360934b425. Originally-by: Ben Collins <ben.collins@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: option: Remove duplicate AMOI_VENDOR_IDLeann Ogasawara2010-08-101-4/+0
| | | | | | | | | | | AMOI_VENDOR_ID is defined twice. Remove the duplicate entry and move the AMOI_PRODUCT_9508 definition to be grouped with the other AMOI product definitions. Originally-by: Ben Collins <ben.collins@ubuntu.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: EHCI: EHCI 1.1 addendum: Enable Per-port change detect bitsAlek Du2010-08-103-2/+27
| | | | | | | | | | | This patch will enable Per-port event feature defined in EHCI 1.1 addendum. This feature addresses an issue where HCD is currently required to read and parse PORTSC for all enabled root hub ports. With this patch, the overhead will be reduced. Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: EHCI: EHCI 1.1 addendum: Basic LPM feature supportAlek Du2010-08-107-2/+134
| | | | | | | | | | | With this patch, the LPM capable EHCI host controller can put device into L1 sleep state which is a mode that can enter/exit quickly, and reduce power consumption. Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: EHCI: EHCI 1.1 addendum: preparationAlek Du2010-08-104-7/+162
| | | | | | | | | | | | | | | | | | EHCI 1.1 addendum introduced several energy efficiency extensions for EHCI USB host controllers: 1. LPM (link power management) 2. Per-port change 3. Shorter periodic frame list 4. Hardware prefetching This patch is intended to define the HW bits and debug interface for EHCI 1.1 addendum. The LPM and Per-port change patches will be sent out after this patch. Signed-off-by: Jacob Pan <jacob.jun.pan@intel.com> Signed-off-by: Alek Du <alek.du@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: throw away custom hex digit methodsAndy Shevchenko2010-08-102-15/+5
| | | | | | | | | Recent kernel has common method to convert hex digit to its value. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: isd200.c: Remove unnecessary kmalloc castJoe Perches2010-08-101-2/+1
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: host: Eliminate NULL dereferenceJulia Lawall2010-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test above allows std to be NULL, so check that std is not NULL before doing the dereference. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r exists@ expression E,E1; identifier f; statement S1,S2,S3; @@ if ((E == NULL && ...) || ...) { ... when != if (...) S1 else S2 when != E = E1 * E->f ... when any } else S3 // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: otg.h: Fix the mixup in parameters order.Igor Grinberg2010-08-101-2/+2
| | | | | | | | | otg_io_write() function does not follow the declaration of struct otg_io_access_ops. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: core endpoint: Fix Coding Stylescsanchez@neurowork.net2010-08-101-2/+7
| | | | | | | | | Fixed coding styles in the core usb endpoint. Signed-off-by: Carlos Sánchez Acosta <csanchez@neurowork.net> Signed-off-by: Alejandro Sánchez Acosta <asanchez@neurowork.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: core driver: Fix Coding Stylescsanchez@neurowork.net2010-08-101-4/+3
| | | | | | | | | Fixed coding styles in the core usb driver. Signed-off-by: Carlos Sánchez Acosta <csanchez@neurowork.net> Signed-off-by: Alejandro Sánchez Acosta <asanchez@neurowork.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Documentation/usb/linux.inf: Checkpatch cleanupAndrea Gelmini2010-08-101-15/+15
| | | | | | | | | | | | | | | | | | | | | | Documentation/usb/linux.inf:66: ERROR: trailing whitespace Documentation/usb/linux.inf:67: ERROR: trailing whitespace Documentation/usb/linux.inf:98: ERROR: trailing whitespace Documentation/usb/linux.inf:99: ERROR: trailing whitespace Documentation/usb/linux.inf:115: ERROR: trailing whitespace Documentation/usb/linux.inf:116: ERROR: trailing whitespace Documentation/usb/linux.inf:120: ERROR: trailing whitespace Documentation/usb/linux.inf:121: ERROR: trailing whitespace Documentation/usb/linux.inf:122: ERROR: trailing whitespace Documentation/usb/linux.inf:123: ERROR: trailing whitespace Documentation/usb/linux.inf:144: ERROR: trailing whitespace Documentation/usb/linux.inf:145: ERROR: trailing whitespace Documentation/usb/linux.inf:146: ERROR: trailing whitespace Documentation/usb/linux.inf:147: ERROR: trailing whitespace Documentation/usb/linux.inf:158: ERROR: trailing whitespace Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Documentation/usb/hotplug.txt: Checkpatch cleanupAndrea Gelmini2010-08-101-2/+2
| | | | | | | | | Documentation/usb/hotplug.txt:13: ERROR: trailing whitespace Documentation/usb/hotplug.txt:87: ERROR: trailing whitespace Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Documentation/usb/ehci.txt: Checkpatch cleanupAndrea Gelmini2010-08-101-1/+1
| | | | | | | | Documentation/usb/ehci.txt:12: ERROR: trailing whitespace Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: gadget: Use memdup_userJulia Lawall2010-08-101-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use memdup_user when user data is immediately copied into the allocated region. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression from,to,size,flag; position p; identifier l1,l2; @@ - to = \(kmalloc@p\|kzalloc@p\)(size,flag); + to = memdup_user(from,size); if ( - to==NULL + IS_ERR(to) || ...) { <+... when != goto l1; - -ENOMEM + PTR_ERR(to) ...+> } - if (copy_from_user(to, from, size) != 0) { - <+... when != goto l2; - -EFAULT - ...+> - } // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: EHCI: make CONFIG_USB_EHCI_TT_NEWSCHED default to YAlan Stern2010-08-101-4/+7
| | | | | | | | | | | | | | | | | | | This patch (as1382) changes the USB_EHCI_TT_NEWSCHED Kconfig option to be non-experimental and to default to Y. This option has existed for a long time, and I have not heard any complaints concerning it. By contrast, several people have reported that their devices could be made to work only by enabling the option. The point of changing the default is to cause the option to be enabled by distros that simply use the default settings for esoteric things like this. This change was motivated by Bugzilla #15649. 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: iuu_phoenix: Add support for different baud rates.James Courtier-Dutton2010-08-101-13/+41
| | | | | | Signed-off-by: James Courtier-Dutton <James@superbug.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: xhci: Remove obsolete debugging printk.Sarah Sharp2010-08-101-1/+0
| | | | | | | | | | | When code to manipulate the command register was refactored from xhci_run() to xhci_start(), a debugging statement was left behind that no longer applies. Remove that statement. Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Reported-by: Sergei Shtylyov <sshtylyov@mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: speedtouch: fixed more brace and spacing coding style issuesNicolas Kaiser2010-08-102-11/+11
| | | | | | | | Fixed spacing coding style issues. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: speedtouch: fixed brace and spacing coding style issuesNicolas Kaiser2010-08-102-7/+6
| | | | | | | Fixed brace coding style issues. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: UHCI: acquire spinlock before calling start_rh()Alan Stern2010-08-102-2/+4
| | | | | | | | | | | | | | | | | | This patch (as1392) fixes a bug in uhci-hcd: The start_rh() routine is supposed to be called with the private spinlock held. If an IRQ comes in at just the wrong time, the driver will think the controller has died when in fact it simply hasn't start yet. The patch also addresses some issues that may prevent an URB from being unlinked after the controller has stopped. This is an abnormal occurrence (ordinarily the controller stops only when the entire bus is suspended and hence there are no active URBs), so the pathways haven't gotten much testing. These two changes may be a little more than is strictly necessary, but clearly they won't hurt. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add check to detect host controller hardware removalAlan Stern2010-08-101-0/+8
| | | | | | | | | | | | | | | | | This patch (as1391) fixes a problem that can occur when USB host controller hardware is hot-unplugged. If no interrupts are generated by the unplug then the HCD may not realize that the controller is gone, and the subsequent unbind may hang waiting for interrupts that never arrive. The solution (for PCI-based controllers) is to call the HCD's interrupt handler at the start of usb_hcd_pci_remove(). If the hardware is gone, the handler will realize this when it tries to read the controller's status register. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: don't stop root-hub status polls too soonAlan Stern2010-08-102-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch (as1390) fixes a problem that crops up when a UHCI host controller is unbound from uhci-hcd while there are still some active URBs. The URBs have to be unlinked when the root hub is unregistered, and uhci-hcd relies upon root-hub status polls as part of its unlinking procedure. But usb_hcd_poll_rh_status() won't make those status calls if hcd->rh_registered is clear, and the flag is cleared _before_ the unregistration takes place. Since hcd->rh_registered is used for other things and needs to be cleared early, the solution is to add a new flag (rh_pollable) and use it instead. It gets cleared _after_ the root hub is unregistered. Now that the status polls don't end too soon, we have to make sure they also don't occur too late -- after the root hub's usb_device structure or the HCD's private structures are deallocated. Therefore the patch adds usb_get_device() and usb_put_device() calls to protect the root hub structure, and it adds an extra del_timer_sync() to prevent the root-hub timer from causing an unexpected status poll. This additional complexity would not be needed if the HCD framework had provided separate stop() and release() callbacks instead of just stop(). This lack could be fixed at some future time (although it would require changes to every host controller driver); when that happens this patch won't be needed any more. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: fix failure path in usb_add_hcd()Alan Stern2010-08-101-2/+16
| | | | | | | | | | | | | | This patch (as1389) fixes some errors in the failure pathway of usb_add_hcd(). The actions it takes ought to be exactly the same as those taken by usb_remove_hcd(), but they aren't. In one case (removal of the usb_bus_attr_group), the two routines are brought into agreement by changing usb_remove_hcd(). All the other discrepancies are fixed by changing usb_add_hcd(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge branch 'writable_limits' of git://decibel.fi.muni.cz/~xslaby/linuxLinus Torvalds2010-08-1015-75/+207
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'writable_limits' of git://decibel.fi.muni.cz/~xslaby/linux: unistd: add __NR_prlimit64 syscall numbers rlimits: implement prlimit64 syscall rlimits: switch more rlimit syscalls to do_prlimit rlimits: redo do_setrlimit to more generic do_prlimit rlimits: add rlimit64 structure rlimits: do security check under task_lock rlimits: allow setrlimit to non-current tasks rlimits: split sys_setrlimit rlimits: selinux, do rlimits changes under task_lock rlimits: make sure ->rlim_max never grows in sys_setrlimit rlimits: add task_struct to update_rlimit_cpu rlimits: security, add task_struct to setrlimit Fix up various system call number conflicts. We not only added fanotify system calls in the meantime, but asm-generic/unistd.h added a wait4 along with a range of reserved per-architecture system calls.
| * unistd: add __NR_prlimit64 syscall numbersJiri Slaby2010-07-165-2/+9
| | | | | | | | | | | | | | | | | | | | Add __NR_prlimit64 syscall numbers to asm-generic. Add them also to asm-x86, both 32 and 64-bit. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com>
| * rlimits: implement prlimit64 syscallJiri Slaby2010-07-162-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the code to support the sys_prlimit64 syscall which modifies-and-returns the rlim values of a selected process atomically. The first parameter, pid, being 0 means current process. Unlike the current implementation, it is a generic interface, architecture indepentent so that we needn't handle compat stuff anymore. In the future, after glibc start to use this we can deprecate sys_setrlimit and sys_getrlimit in favor to clean up the code finally. It also adds a possibility of changing limits of other processes. We check the user's permissions to do that and if it succeeds, the new limits are propagated online. This is good for large scale applications such as SAP or databases where administrators need to change limits time by time (e.g. on crashes increase core size). And it is unacceptable to restart the service. For safety, all rlim users now either use accessors or doesn't need them due to - locking - the fact a process was just forked and nobody else knows about it yet (and nobody can't thus read/write limits) hence it is safe to modify limits now. The limitation is that we currently stay at ulong internal representation. So the rlim64_is_infinity check is used where value is compared against ULONG_MAX on 32-bit which is the maximum value there. And since internally the limits are held in struct rlimit, converters which are used before and after do_prlimit call in sys_prlimit64 are introduced. Signed-off-by: Jiri Slaby <jslaby@suse.cz>
OpenPOWER on IntegriCloud