- 11 8月, 2010 40 次提交
-
-
由 Alan Stern 提交于
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: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
Added a disconnect() callback to composite devices which is called by composite glue when its disconnect callback is called by gadget. Signed-off-by: NMichal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <m.nazarewicz@samsung.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
Use usb_string_ids_n() function to simplify string ids registeration. Signed-off-by: NMichal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Michal Nazarewicz 提交于
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: NMichal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arnd Bergmann 提交于
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: NArnd Bergmann <arnd@arndb.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arnd Bergmann 提交于
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: NArnd Bergmann <arnd@arndb.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Michał Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Andi Kleen 提交于
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: NAndi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Andi Kleen 提交于
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: NAndi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Andi Kleen 提交于
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: NAndi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> From: Andi Kleen <ak@linux.intel.com>
-
由 Andi Kleen 提交于
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: NAndi Kleen <ak@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Nicolas Kaiser 提交于
Fixed spacing and indentation coding style issues. Signed-off-by: NNicolas Kaiser <nikai@nikai.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Yann Cantin 提交于
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: NYann Cantin <yann.cantin@laposte.net> Cc: Michał Nazarewicz <m.nazarewicz@samsung.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Nicolas Kaiser 提交于
Fixed spacing and brace coding style issues. Signed-off-by: NNicolas Kaiser <nikai@nikai.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Joe Perches 提交于
Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Leann Ogasawara 提交于
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 04cab132. Originally-by: NBen Collins <ben.collins@canonical.com> Signed-off-by: NLeann Ogasawara <leann.ogasawara@canonical.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Leann Ogasawara 提交于
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: NBen Collins <ben.collins@ubuntu.com> Signed-off-by: NLeann Ogasawara <leann.ogasawara@canonical.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alek Du 提交于
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: NAlek Du <alek.du@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alek Du 提交于
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: NJacob Pan <jacob.jun.pan@intel.com> Signed-off-by: NAlek Du <alek.du@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alek Du 提交于
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: NJacob Pan <jacob.jun.pan@intel.com> Signed-off-by: NAlek Du <alek.du@intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Andy Shevchenko 提交于
Recent kernel has common method to convert hex digit to its value. Signed-off-by: NAndy Shevchenko <ext-andriy.shevchenko@nokia.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Joe Perches 提交于
Signed-off-by: NJoe Perches <joe@perches.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Julia Lawall 提交于
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: NJulia Lawall <julia@diku.dk> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 csanchez@neurowork.net 提交于
Fixed coding styles in the core usb endpoint. Signed-off-by: NCarlos Sánchez Acosta <csanchez@neurowork.net> Signed-off-by: NAlejandro Sánchez Acosta <asanchez@neurowork.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 csanchez@neurowork.net 提交于
Fixed coding styles in the core usb driver. Signed-off-by: NCarlos Sánchez Acosta <csanchez@neurowork.net> Signed-off-by: NAlejandro Sánchez Acosta <asanchez@neurowork.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Julia Lawall 提交于
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: NJulia Lawall <julia@diku.dk> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
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: NAlan Stern <stern@rowland.harvard.edu> CC: David Brownell <david-b@pacbell.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 James Courtier-Dutton 提交于
Signed-off-by: NJames Courtier-Dutton <James@superbug.co.uk> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Sarah Sharp 提交于
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: NSarah Sharp <sarah.a.sharp@linux.intel.com> Reported-by: NSergei Shtylyov <sshtylyov@mvista.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Nicolas Kaiser 提交于
Fixed spacing coding style issues. Signed-off-by: NNicolas Kaiser <nikai@nikai.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Nicolas Kaiser 提交于
Fixed brace coding style issues. Signed-off-by: NNicolas Kaiser <nikai@nikai.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
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: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
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: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
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: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-