summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
Commit message (Collapse)AuthorAgeFilesLines
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-308-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* backlight: Allow properties to be passed at registrationMatthew Garrett2010-03-161-3/+4
| | | | | | | | | | Values such as max_brightness should be set before backlights are registered, but the current API doesn't allow that. Add a parameter to backlight_device_register and update drivers to ensure that they set this correctly. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* USB: backlight, appledisplay: fix incomplete registration failure handlingBruno Prémont2010-03-021-1/+2
| | | | | | | | | | On error while registering backlight, return it to caller instead of returning 0. Mark struct backlight_ops as const. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: sisusbvga: no unnecessary GFP_ATOMICOliver Neukum2010-03-021-2/+2
| | | | | | | | If a driver can wait on an event, it can also use GFP_KERNEL. Signed-off-by: Oliver Neukum <neukum@b1-systems.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: vstusb.c: removal of driver for Vernier Software & Technology, Inc., ↵Dennis O'Brien2010-03-023-798/+0
| | | | | | | | | | | | | devices and spectrometers This patch removes the vstusb driver and support from the Linux tree. This driver provided support for Vernier Software & Technology devices and spectrometers (Ocean Optics). This driver is being replaced by a user space - libusb - implementation. Signed-off-by: Jim Collar <jim.collar@eqware.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Convert concatenated __FILE__ to %s, __FILE__Joe Perches2010-03-023-8/+11
| | | | | | | | | Reduces string space a bit Neaten a macro redefine of dbg Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove the berry_charge driverGreg Kroah-Hartman2010-03-023-195/+0
| | | | | | | | | | | The Barry project's userspace program, bcharge, can better handle this device and functionality, and it also works with the latest phones, which this driver does not support. So remove it, as the userspace code should be used instead. Cc: Chris Frey <cdfrey@foursquare.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: BKL removal: vstusbOliver Neukum2010-03-021-8/+1
| | | | | | | | BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: BKL removal: legousbtowerOliver Neukum2010-03-021-3/+0
| | | | | | | | BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: BKL removal: ldusbOliver Neukum2010-03-021-10/+2
| | | | | | | | BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: BKL removal: ftdi-elanOliver Neukum2010-03-021-6/+0
| | | | | | | | BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: BKL removal: adutuxOliver Neukum2010-03-021-3/+0
| | | | | | | | BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: BKL removal: idmouseOliver Neukum2010-03-021-7/+1
| | | | | | | | BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: BKL removal: rio500Oliver Neukum2010-03-021-2/+6
| | | | | | | | | | | | This driver had used BKL to guard against disconnect but was incorrectly converted leaving an SMP race. BKL was added to disconnect() to fix this race BKL was removed from ioctl() as the mutex is sufficient on its own. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: isight-firmware: declare MODULE_FIRMWAREBen Hutchings2010-03-021-0/+2
| | | | | | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Push BKL on open down into the driversOliver Neukum2010-03-0210-10/+66
| | | | | | | | | | | Straightforward push into the drivers to allow auditing individual drivers separately Signed-off-by: Oliver Neukum <oliver@neukum.org> Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB misc: make USB device id constantNémeth Márton2010-03-0222-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The id_table field of the struct usb_device_id is constant in <linux/usb.h> so it is worth to make the initialization data also constant. The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r@ disable decl_init,const_decl_init; identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl> Signed-off-by: Németh Márton <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Cc: cocci@diku.dk Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: convert to the runtime PM frameworkAlan Stern2010-03-021-4/+0
| | | | | | | | | | | | | | | | | | | | | | | This patch (as1329) converts the USB stack over to the PM core's runtime PM framework. This involves numerous changes throughout usbcore, especially to hub.c and driver.c. Perhaps the most notable change is that CONFIG_USB_SUSPEND now depends on CONFIG_PM_RUNTIME instead of CONFIG_PM. Several fields in the usb_device and usb_interface structures are no longer needed. Some code which used to depend on CONFIG_USB_PM now depends on CONFIG_USB_SUSPEND (requiring some rearrangement of header files). The only visible change in behavior should be that following a system sleep (resume from RAM or resume from hibernation), autosuspended USB devices will be resumed just like everything else. They won't remain suspended. But if they aren't in use then they will naturally autosuspend again in a few seconds. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: SIS USB2VGA DRIVER: support KAIREN's USB VGA adaptor USB20SVGA-MB-PLUSTanaka Akira2010-02-161-0/+1
| | | | | | | | | This patch adds the USB product ID of KAIREN's USB VGA Adaptor, USB20SVGA-MB-PLUS, to sisusbvga work with it. Signed-off-by: Tanaka Akira <akr@fsij.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Fix a bug on appledisplay.c regarding signednesspancho horrillo2009-12-231-2/+2
| | | | | | | | | | | | | | | | brightness status is reported by the Apple Cinema Displays as an 'unsigned char' (u8) value, but the code used 'char' instead. Note that he driver was developed on the PowerPC architecture, where the two types are synonymous, which is not always the case. Fixed that. Otherwise the driver will interpret brightness levels > 127 as negative, and fail to load. Signed-off-by: pancho horrillo <pancho@pancho.name> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: add device ID for Apple Cinema Display 23in 2007pancho horrillo2009-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi! $ lsusb -v Bus 001 Device 008: ID 05ac:921c Apple, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x05ac Apple, Inc. idProduct 0x921c bcdDevice 1.15 iManufacturer 1 iProduct 2 iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 2mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.11 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 92 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 16 Signed-off-by: pancho horrillo <pancho@pancho.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: emi62: fix crash when trying to load EMI 6|2 firmwareClemens Ladisch2009-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | While converting emi62 to use request_firmware(), the driver was also changed to use the ihex helper functions. However, this broke the loading of the FPGA firmware because the code tries to access the addr field of the EOF record which works with a plain array that has an empty last record but not with the ihex helper functions where the end of the data is signaled with a NULL record pointer, resulting in: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<f80d248c>] emi62_load_firmware+0x33c/0x740 [emi62] This can be fixed by changing the loop condition to test the return value of ihex_next_binrec() directly (like in emi26.c). Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Reported-and-tested-by: Der Mickster <retroeffective@gmail.com> Acked-by: David Woodhouse <David.Woodhouse@intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usbtest: make module param pattern writeableVikram Pandita2009-12-111-2/+5
| | | | | | | | | | | Allow module_param to be writeable. This allows us to change the parameter if usbtest is built-in in the kernel. Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usblcd, fix memory leakJiri Slaby2009-10-091-1/+2
| | | | | | | | | | | Stanse found a memory leak in lcd_probe. Instead of returning without releasing the memory, jump to the error label which frees it. http://stanse.fi.muni.cz/ Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* const: constify remaining file_operationsAlexey Dobriyan2009-10-011-2/+1
| | | | | | | | [akpm@linux-foundation.org: fix KVM] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* headers: kref.h reduxAlexey Dobriyan2009-09-261-1/+0
| | | | | | | | | * remove asm/atomic.h inclusion from kref.h -- not needed, linux/types.h is enough for atomic_t * remove linux/kref.h inclusion from files which do not need it. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* USB: full autosuspend and power management support for usbsevsegOliver Neukum2009-09-231-6/+63
| | | | | | | | | | | | This patch adds to the usbsevseg driver: - suspend/resume support - reset_resume support - autosuspend using the display's power state to determine idleness Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Harrison Metzger <harrisonmetz@gmail.com>
* USB: full power management support for the idmouse driverOliver Neukum2009-09-231-0/+21
| | | | | | | | | | | | | usb: full runtime PM support for idmouse driver - add suspend/resume support - add reset_resume support - add support for autosuspend Signed-off-by: Oliver Neukum <oliver@neukum.org> Tested-by: Andreas Deresch <aderesch@fs.tum.de>
* USB: ldusb should signal an error in poll if the device is disconnectedOliver Neukum2009-09-231-0/+6
| | | | | | | | poll() should test for a disconnection of the device. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: legousbtower: make poll notice disconnectOliver Neukum2009-09-231-0/+6
| | | | | | | | | | poll needs to return an error if a device is disconnected - make poll check for device's presence - wake all waiters in disconnect Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: sisusbvga: drop usb_buffer_allocPete Zaitcev2009-09-232-42/+13
| | | | | | | | | | | | | | | | This patch falls out of my work to fix usbmon so it uses virtual addresses. It is not necessary, the "new" usbmon should work just fine with sisusbvga. However, it seems ridiculous that anyone would use uncached memory to transfer bulk data. Dropping the unnecessary use of usb_buffer_alloc should be beneficial here, in case anyone ever uses the dongle on anything beyond x86. I had no success in raising the author of the driver by e-mail, so the patch is not actually tested. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Driver-Core: extend devnode callbacks to provide permissionsKay Sievers2009-09-192-4/+4
| | | | | | | | | | | | | This allows subsytems to provide devtmpfs with non-default permissions for the device node. Instead of the default mode of 0600, null, zero, random, urandom, full, tty, ptmx now have a mode of 0666, which allows non-privileged processes to access standard device nodes in case no other userspace process applies the expected permissions. This also fixes a wrong assignment in pktcdvd and a checkpatch.pl complain. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usbtest: no need for USB_DEVICEFSAlan Stern2009-07-281-1/+1
| | | | | | | | | | THis patch (as1270) allows the usbtest module to be built even when USB_DEVICEFS isn't configured. Tests can be performed without USB_DEVICEFS, using the /dev/bus/usb/*/* device files. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* headers: smp_lock.h reduxAlexey Dobriyan2009-07-123-0/+3
| | | | | | | | | | | | | * Remove smp_lock.h from files which don't need it (including some headers!) * Add smp_lock.h to files which do need it * Make smp_lock.h include conditional in hardirq.h It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT This will make hardirq.h inclusion cheaper for every PREEMPT=n config (which includes allmodconfig/allyesconfig, BTW) Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds2009-06-162-15/+26
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (143 commits) USB: xhci depends on PCI. USB: xhci: Add Makefile, MAINTAINERS, and Kconfig entries. USB: xhci: Respect critical sections. USB: xHCI: Fix interrupt moderation. USB: xhci: Remove packed attribute from structures. usb; xhci: Fix TRB offset calculations. USB: xhci: replace if-elseif-else with switch-case USB: xhci: Make xhci-mem.c include linux/dmapool.h USB: xhci: drop spinlock in xhci_urb_enqueue() error path. USB: Change names of SuperSpeed ep companion descriptor structs. USB: xhci: Avoid compiler reordering in Link TRB giveback. USB: xhci: Clean up xhci_irq() function. USB: xhci: Avoid global namespace pollution. USB: xhci: Fix Link TRB handoff bit twiddling. USB: xhci: Fix register write order. USB: xhci: fix some compiler warnings in xhci.h USB: xhci: fix lots of compiler warnings. USB: xhci: use xhci_handle_event instead of handle_event USB: xhci: URB cancellation support. USB: xhci: Scatter gather list support for bulk transfers. ...
| * USB: usbtest fix endless loop in unlink tests.Martin Fuzzey2009-06-151-14/+25
| | | | | | | | | | | | | | | | | | | | | | In tests 11 and 12 if the URB completes with an error status (eg babble) the asynchrous unlink entered an endless loop trying to unlink a non resubmitted URB. Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb: misc: SiS usbvga dangle: accept MUSB_HDRC as a fast enough host controllerBryan Wu2009-06-151-1/+1
| | | | | | | | | | | | Acked-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Driver Core: usb: add nodename support for usb drivers.Kay Sievers2009-06-152-0/+12
|/ | | | | | | | | | This adds support for USB drivers to report their requested nodename to userspace. It also updates a number of USB drivers to provide the needed subdirectory and device name to be used for them. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Jan Blunck <jblunck@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove phidget drivers from kernel tree.Greg Kroah-Hartman2009-03-247-1678/+0
| | | | | | | | | | | | | These devices are better controlled with the LGPL userspace library found at: http://www.phidgets.com/downloads.php?os_id=3 and full documentation at: http://www.phidgets.com/documentation/web/cdoc/index.html Cc: Chester Fitchett <fitchett@phidgets.com> Acked-by: Sean Young <sean@mess.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: make transfer_buffer_lengths in struct urb field u32Greg Kroah-Hartman2009-03-241-3/+3
| | | | | | | | | | | | | | 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: misc/vstusb, fix lock imbalanceJiri Slaby2009-03-171-0/+1
| | | | | | | | | Make sure we don't leak locked vstdev->lock in vstusb_write. Unlock properly on one fail path. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: misc/adutux, fix lock imbalanceJiri Slaby2009-03-171-3/+3
| | | | | | | | Don't unlock adutux_mutex when not held. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove vernier labpro from ldusbsware2009-01-271-2/+0
| | | | | | | | | Labpro device is in both ldusb and vstusb device tables. Should only be a vstusb device. Signed-off-by: stephen ware <stephen.ware@eqware.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: emi26: fix oops on loadMarcin Slusarz2009-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix oops introduced by commit ae93a55bf948753de0bb8e43fa9c027f786abb05 (emi26: use request_firmware()): usb 1-1: new full speed USB device using uhci_hcd and address 2 usb 1-1: configuration #1 chosen from 1 choice emi26 - firmware loader 1-1:1.0: emi26_probe start usb 1-1: firmware: requesting emi26/loader.fw usb 1-1: firmware: requesting emi26/bitstream.fw usb 1-1: firmware: requesting emi26/firmware.fw usb 1-1: emi26_set_reset - 1 usb 1-1: emi26_set_reset - 0 BUG: unable to handle kernel NULL pointer dereference at 00000000 IP: [<f80dc487>] emi26_probe+0x2f7/0x620 [emi26] *pde = 00000000 Oops: 0000 [#1] SMP last sysfs file: /sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/firmware/1-1/loading Modules linked in: emi26(+) ipv6 cpufreq_ondemand coretemp arc4 ecb iwl3945 irtty_sir sir_dev nsc_ircc ehci_hcd uhci_hcd mac80211 irda usbcore snd_hda_intel thinkpad_acpi rfkill hwmon led_class e1000e snd_pcm cfg80211 snd_timer crc_ccitt snd snd_page_alloc aes_generic Pid: 5082, comm: modprobe Not tainted (2.6.28 #2) 17023QG EIP: 0060:[<f80dc487>] EFLAGS: 00010206 CPU: 0 EIP is at emi26_probe+0x2f7/0x620 [emi26] EAX: 0000015c EBX: 00000000 ECX: c1ffd9c0 EDX: 00000000 ESI: 0000015c EDI: f6bb215c EBP: f6bb0400 ESP: f00ebcfc DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 Process modprobe (pid: 5082, ti=f00ea000 task=f5c7c700 task.ti=f00ea000) Stack: 0000015c 000000a5 f6a67cb8 f80dc7e0 c01c6262 fbef2986 f6bb2000 00008fe0 0000015c f715f748 f715f740 f715f738 f715f748 f6a67c00 f80dd040 f80dcfc0 f6bb0400 fbacb290 f6a67c94 fbae0160 c01c70bf 00000000 f6a67c1c 00000000 Call Trace: [<c01c6262>] sysfs_add_one+0x12/0x50 [<fbacb290>] usb_probe_interface+0xa0/0x140 [usbcore] [<c01c70bf>] sysfs_create_link+0xf/0x20 [<c02dead2>] driver_probe_device+0x82/0x180 [<fbac9eeb>] usb_match_id+0x3b/0x50 [usbcore] [<c02dec4e>] __driver_attach+0x7e/0x80 [<c02de27a>] bus_for_each_dev+0x3a/0x60 [<c02de956>] driver_attach+0x16/0x20 [<c02debd0>] __driver_attach+0x0/0x80 [<c02de7b1>] bus_add_driver+0x1a1/0x220 [<c02dee4d>] driver_register+0x4d/0x120 [<c024e622>] idr_get_empty_slot+0xf2/0x290 [<fbacab71>] usb_register_driver+0x81/0x100 [usbcore] [<f806c000>] emi26_init+0x0/0x14 [emi26] [<c0101126>] do_one_initcall+0x36/0x1b0 [<c01c5e70>] sysfs_ilookup_test+0x0/0x10 [<c0197a61>] ifind+0x31/0x90 [<c01c6229>] __sysfs_add_one+0x59/0x80 [<c01c64e4>] sysfs_addrm_finish+0x14/0x1c0 [<c0175ca3>] __vunmap+0xa3/0xd0 [<c014b854>] load_module+0x1544/0x1640 [<c014b9d7>] sys_init_module+0x87/0x1b0 [<c0187f41>] sys_read+0x41/0x70 [<c01032a5>] sysenter_do_call+0x12/0x21 [<c03d0000>] wait_for_common+0x40/0x110 Code: 66 c1 e8 08 66 09 d0 75 a5 31 d2 89 e8 e8 72 fc ff ff 85 c0 0f 88 9a 02 00 00 b8 fa 00 00 00 e8 30 46 05 c8 8b 74 24 28 8b 5e 04 <8b> 03 89 44 24 1c 0f c8 89 44 24 1c 0f b7 4b 04 c7 44 24 20 00 EIP: [<f80dc487>] emi26_probe+0x2f7/0x620 [emi26] SS:ESP 0068:f00ebcfc ---[ end trace 2eefa13825431230 ]--- After the last "package" of firmware data is sent to the device, we dereference NULL pointer (on access to rec->addr). Fix it. Reported--by: David Flatz <david@upcs.at> Tested-by: David Flatz <david@upcs.at> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: stable <stable@kernel.org> [2.6.27, 2.6.28] Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: power availability check for berry_chargeOliver Neukum2009-01-071-0/+5
| | | | | | | | | this introduces a sanity check into berry_charge to give up before damage is done if we lack juice. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: clean up redundant tests on unsignedroel kluin2009-01-071-2/+0
| | | | | | | | | temp, bytes and param->{length,sglen,vary} are unsigned so these tests do nothing. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: SISUSB2VGA driver: add 0x0711, 0x0903Albert Comerma2008-11-131-0/+1
| | | | | | | | | | Signed-off-by: Albert Comerma <albert.comerma@gmail.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: David Brownell <david-b@pacbell.net> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: vstusb: fix compiler warning on x86-64Greg Kroah-Hartman2008-11-131-1/+1
| | | | | | | This fixes a reported compiler warning. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usbtest.c: length, sglen and vary are unsigned, so cannot be negativeroel kluin2008-10-221-2/+1
| | | | | | | | | | | | | | | | | | | length, sglen and vary are unsigned, so cannot be negative see vi drivers/usb/misc/usbtest.c +18 struct usbtest_param { ... unsigned iterations; unsigned length; unsigned vary; unsigned sglen; ... }; Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove err() macro from usb misc driversGreg Kroah-Hartman2008-10-175-29/+37
| | | | | | | | | USB should not be having it's own printk macros, so remove err() and use the system-wide standard of dev_err() wherever possible. In the few places that will not work out, use a basic printk(). Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud