aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2007-07-20Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (44 commits) USB: drivers/usb/storage/dpcm.c whitespace cleanup USB: r8a66597-hcd: fixes some problem USB: change name of spinlock in hcd.c USB: move routines in hcd.c USB: misc: uss720: clean up urb->status usage USB: misc: usbtest: clean up urb->status usage USB: misc: usblcd: clean up urb->status usage USB: misc: phidgetmotorcontrol: clean up urb->status usage USB: misc: phidgetkit: clean up urb->status usage USB: misc: legousbtower: clean up urb->status usage USB: misc: ldusb: clean up urb->status usage USB: misc: iowarrior: clean up urb->status usage USB: misc: ftdi-elan: clean up urb->status usage USB: misc: auerswald: clean up urb->status usage USB: misc: appledisplay: clean up urb->status usage USB: misc: adtux: clean up urb->status usage USB: core: message: clean up urb->status usage USB: image: microtek: clean up urb->status usage USB: image: mdc800: clean up urb->status usage USB: storage: onetouch: clean up urb->status usage ...
2007-07-20mm: Remove slab destructors from kmem_cache_create().Paul Mundt
Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-19USB: drivers/usb/storage/dpcm.c whitespace cleanupS.Caglar Onur
Following trivial patch converts smarttabs/whitespaces into real tabs. Signed-off-by: S.Caglar Onur <caglar@pardus.org.tr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: r8a66597-hcd: fixes some problemYoshihiro Shimoda
This patch incorporates some updates. Updates include: - Fix the problem that control transfer might fail - Change from GFP_KERNEL to GFP_ATOMIC - Clean up some coding style issue Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: change name of spinlock in hcd.cAlan Stern
This patch (as940 renames hcd_data_lock in hcd.c to hcd_urb_list_lock, which is more descriptive of the lock's job. It also introduces a convenient inline routine for testing whether a particular USB device is a root hub. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: move routines in hcd.cAlan Stern
This patch (as939) moves a couple of routine in hcd.c around. The purpose is to put all the general URB- and endpoint-related routines (submit, unlink, giveback, and disable) together in one spot. There are no functional changes. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: uss720: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: usbtest: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: usblcd: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: phidgetmotorcontrol: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: phidgetkit: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: legousbtower: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: ldusb: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: iowarrior: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: ftdi-elan: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: auerswald: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: appledisplay: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: misc: adtux: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: core: message: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: image: microtek: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: image: mdc800: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: storage: onetouch: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: class: usblp: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: class: cdc-acm: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: atm: usbatm: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: atm: ueagle-atm: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: atm: speedtch: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: atm: cxacru: clean up urb->status usageGreg Kroah-Hartman
This done in anticipation of removal of urb->status, which will make that patch easier to review and apply in the future. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: m66592-udc: fixes some problemsYoshihiro Shimoda
This patch incorporates some updates from the review of the Renesas m66592-udc driver. Updates include: - Fix some locking bugs; and add a few sparse annotations - Don't #define __iomem ! - Lots of whitespace fixes (most of the patch by volume) - Some #include file trimmage - Other checkpatch.pl and sparse updates - Alphabetized and slightly-more-informative Kconfig - Don't use the ID which was assigned to the amd5536udc driver. - Remove pointless suspend/resume methods updating obsolete field. - Some section fixups - Fix some leak bugs - Fix byteswapping Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: usb-storage: unusual_devs entry for Nikon D100Alan Stern
This patch (as938) adds an unusual_devs entry for the Nikon DSC D100. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: Remove pointless conditional in drivers/usb/serial/io_ti.c::edge_shutdown()Jesper Juhl
Coverity scan found (CID: 1708) this in drivers/usb/serial/io_ti.c::edge_shutdown() : ... 2797 for (i=0; i < serial->num_ports; ++i) { 2798 edge_port = usb_get_serial_port_data(serial->port[i]); 2799 edge_remove_sysfs_attrs(edge_port->port); 2800 if (edge_port) { 2801 edge_buf_free(edge_port->ep_out_buf); 2802 kfree(edge_port); 2803 } 2804 usb_set_serial_port_data(serial->port[i], NULL); 2805 } ... It's complaining that we dereference 'edge_port' in line 2799 which makes the test of that pointer against NULL in 2800 pointless, since if edge_port was actually NULL we'd have crashed already before reaching line 2800. Reading the edge_open() function it seems to me that the pointer returned by usb_get_serial_port_data(serial->port[i]) and stored in 'edge_port' can never actually be NULL here, so the test is entirely superfluous (even if it could be NULL it would be pointless here, ignoring the then possible crash in that case, since both edge_buf_free() and kfree() can handle being passed NULL pointers. This patch removes the pointless conditional (and also makes a few tiny style corrections now that I was in the area anyway). Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: amd5536 UDC driver (in GEODE southbridge)Thomas Dahlmann
Driver for the AMD5536 UDC, as found in the AMD Geode CS5536 (southbridge). This is a high speed DMA-capable controller, which can also be used in OTG configurations (which are not supported by this patch). Acked-by: Jordan Crouse <jordan.crouse@amd.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: documentation update for usb_unlink_urbAlan Stern
This patch (as936) updates the kerneldoc for usb_unlink_urb. The explanation of how endpoint queues are meant to work is now clearer and in better agreement with reality. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19UHCI: short control URBs get a status stageAlan Stern
It has recently been pointed out that short control transfers should have a status stage, even if they generate an error because URB_SHORT_NOT_OK was set. This patch (as935) changes uhci-hcd to enable the status stage when this happens. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: mos7720, mos7840: remove redundant urb checkFlorin Malita
Coverity (1709, 1710, 1711, 1712, 1713) actually flagged these as REVERSE_INULLs (NULL check performed after dereference). But looking at the other drivers I can't see any similar tests and the USB core already makes sure urb is non-null - so might as well get rid of the checks. Signed-off-by: Florin Malita <fmalita@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: fix warning caused by autosuspend counter going negativeAlan Stern
This patch (as937) fixes a minor bug in the autosuspend usage-counting code. Each hub's usage counter keeps track of the number of unsuspended children. However the current driver increments the counter after registering a new child, by which time the child may already have been suspended and caused the counter to go negative. The obvious solution is to increment the counter before registering the child. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: add "descriptors" binary sysfs attributeAlan Stern
This patch (as934) adds a new readonly binary sysfs attribute file called "descriptors" for each USB device. The attribute contains the device descriptor followed by the raw descriptor entry (config plug subsidiary descriptors) for the current configuration. Having this information available in fixed-format binary makes life a lot easier for user programs by avoiding the need to open, read, and parse multiple sysfs text files. The information in this attribute file is much like that in usbfs's device file, but there are some significant differences: The 2-byte fields in the device descriptor are left in little-endian byte order, as they appear on the bus and in the kernel. Only one raw descriptor set is presented, that of the current configuration. Opening this file will not cause a suspended device to be autoresumed. The last item in particular should be a big selling point for libusb, which currently forces all USB devices to be resumed as it scans the device tree. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Dave Mielke <dave@mielke.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19isp116x-hcd: prepare for urb->statusAlan Stern
This patch (as931b), adapted from a patch by Olav Kongas, makes a small set of conservative changes to the isp116x-hcd driver in preparation for the removal of urb->status. finish_request() is moved up in the source and is called as soon as the URB is known to have completed, rather than after all the active endpoints have been scanned. The status of a completed URB is kept in a local variable and copied to urb->status only when the URB is about to be given back. -EREMOTEIO error status for control transfers is set after the status stage rather than when the short packet arrives. Some unnecessary uses of urb->lock are removed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Olav Kongas <ok@artecdesign.ee> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: usblp: "Big cleanup" breaks O_NONBLOCKPete Zaitcev
I found the first regresson in the rewritten ("all dynamic" and "no races") driver. If application uses O_NONBLOCK, I return -EAGAIN despite the URB being submitted successfuly. This causes the application to resubmit the same data erroneously. The fix is to pretend that the transfer has succeeded even if URB was merely queued. It is the same behaviour as with the old version. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: sierra: Add new devicesKevin Lloyd
This patch adds new devices to the Sierra Wireless driver. This is being resubmitted because the dependent patch (patch 01/02) needed to be resubmitted. Signed-off-by: Kevin Lloyd <linux@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: sierra: Add TRU-Install (c) SupportKevin Lloyd
This patch adds compatibility with Sierra Wireless' new TRU-Install feature. Future devices that use this feature will not work unless this patch has been applied. Signed-off-by: Kevin Lloyd <linux@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: use mutex instead of semaphore in the FTDI ELAN driverMatthias Kaehlcke
The FTDI ELAN driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: use mutex instead of semaphore in the Adutux driverMatthias Kaehlcke
The Adutux driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: use mutex instead of semaphore in the ELAN U132 adapter driverMatthias Kaehlcke
The ELAN U132 adapter driver uses the semaphore u132_module_lock as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19USB: use mutex instead of semaphore in the USB gadget serial driverMatthias Kaehlcke
The USB gadget serial driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-19some kmalloc/memset ->kzalloc (tree wide)Yoann Padioleau
Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc). Here is a short excerpt of the semantic patch performing this transformation: @@ type T2; expression x; identifier f,fld; expression E; expression E1,E2; expression e1,e2,e3,y; statement S; @@ x = - kmalloc + kzalloc (E1,E2) ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\) - memset((T2)x,0,E1); @@ expression E1,E2,E3; @@ - kzalloc(E1 * E2,E3) + kcalloc(E1,E2,E3) [akpm@linux-foundation.org: get kcalloc args the right way around] Signed-off-by: Yoann Padioleau <padator@wanadoo.fr> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Bryan Wu <bryan.wu@analog.com> Acked-by: Jiri Slaby <jirislaby@gmail.com> Cc: Dave Airlie <airlied@linux.ie> Acked-by: Roland Dreier <rolandd@cisco.com> Cc: Jiri Kosina <jkosina@suse.cz> Acked-by: Dmitry Torokhov <dtor@mail.ru> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Acked-by: Pierre Ossman <drzeus-list@drzeus.cx> Cc: Jeff Garzik <jeff@garzik.org> Cc: "David S. Miller" <davem@davemloft.net> Acked-by: Greg KH <greg@kroah.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-18dev_vdbg(), available with -DVERBOSE_DEBUGDavid Brownell
This defines a dev_vdbg() call, which is enabled with -DVERBOSE_DEBUG. When enabled, dev_vdbg() acts just like dev_dbg(). When disabled, it is a NOP ... just like dev_dbg() without -DDEBUG. The specific code was moved out of a USB patch, but lots of drivers have similar support. That is, code can now be written to use an additional level of debug output, selected at compile time. Many driver authors have found this idiom to be very useful. A typical usage model is for "normal" debug messages to focus on fault paths and not be very "chatty", so that those messages can be left on during normal operation without much of a performance or syslog load. On the other hand "verbose" messages would be noisy enough that they wouldn't normally be enabled; they might even affect timings enough to change system or driver behavior. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-07-17drivers/*: mark variables with uninitialized_var()Jeff Garzik
Mark variables in drivers/* with uninitialized_var() if such a warning appears, and analysis proves that the var is initialized properly on all paths it is used. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-17drivers/usb/misc/auerswald: fix status check, remove redundant checkJeff Garzik
1) We should only set 'actual_length' output variable if usb length is known to be good. 2) No need to check actual_length for NULL. The only caller always passes non-NULL value. Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-07-17no USB on M32RAl Viro
Won't build due to lack of dma-mapping. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>