aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/storage/onetouch.c
AgeCommit message (Collapse)AuthorFilesLines
2019-09-10usb-storage: export symbols in USB_STORAGE namespaceMatthias Maennich1-0/+1
Modules using these symbols are required to explicitly import the namespace. This patch was generated with the following steps and serves as a reference to use the symbol namespace feature: 1) Define DEFAULT_SYMBOL_NAMESPACE in the corresponding Makefile 2) make (see warnings during modpost about missing imports) 3) make nsdeps Instead of a DEFAULT_SYMBOL_NAMESPACE definition, the EXPORT_SYMBOL_NS variants can be used to explicitly specify the namespace. The advantage of the method used here is that newly added symbols are automatically exported and existing ones are exported without touching their respective EXPORT_SYMBOL macro expansion. Reviewed-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Matthias Maennich <[email protected]> Signed-off-by: Jessica Yu <[email protected]>
2017-11-04USB: storage: Remove redundant license textGreg Kroah-Hartman1-18/+0
Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <[email protected]> Cc: Kate Stewart <[email protected]> Cc: Philippe Ombredanne <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Acked-by: Felipe Balbi <[email protected]> Acked-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-05-10usb: storage: fix module reference for scsi hostAkinobu Mita1-3/+9
While accessing a unusual usb storage (ums-alauda, ums-cypress, ...), the module reference count is not incremented. Because these drivers allocate scsi hosts with usb_stor_host_template defined in usb-storage module. So these drivers always can be unloaded. This fixes it by preparing scsi host template which is initialized at module_init() for each ums-* driver. In order to minimize the difference in ums-* drivers, introduce module_usb_stor_driver() helper macro which is same as module_usb_driver() except that it also initializes scsi host template. Signed-off-by: Akinobu Mita <[email protected]> Cc: Vinayak Holikatti <[email protected]> Cc: Dolev Raviv <[email protected]> Cc: Sujit Reddy Thumma <[email protected]> Cc: Subhash Jadavani <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: "James E.J. Bottomley" <[email protected]> Cc: Matthew Dharm <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-01-08usb: delete non-required instances of include <linux/init.h>Paul Gortmaker1-1/+0
None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-15usb: storage: onetouch: tighten a range checkDan Carpenter1-2/+2
Smatch complains because we only allocate ONETOUCH_PKT_LEN (2) bytes but later when we call usb_fill_int_urb() we assume maxp can be up to 8 bytes. I talked to the maintainer and maxp should be capped at ONETOUCH_PKT_LEN. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-05usb: remove libusualSebastian Andrzej Siewior1-1/+1
The "Low Performance USB Block driver" has been removed which a user of libusual. Now we have only the usb-storage driver as the only driver in tree. This makes libusual needless. This patch removes libusal, fixes up all users. The usual-table is now linked into usb-storage. usb_usual.h remains in public include directory because some staging users seem to need it. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-01-24usb: Disable dynamic id of USB storage subdriversHuajun Li1-0/+1
Storage subdrivers, like alauda, datafab and others, don't support dynamic id currently, and it needs lots of work but with very little gain to enable the feature, so disable them in the patch. Signed-off-by: Huajun Li <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-01-09Merge branch 'usb-next' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (232 commits) USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c xhci: Clean up 32-bit build warnings. USB: update documentation for usbmon usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops drivers/usb/class/cdc-acm.c: clear dangling pointer drivers/usb/dwc3/dwc3-pci.c: introduce missing kfree drivers/usb/host/isp1760-if.c: introduce missing kfree usb: option: add ZD Incorporated HSPA modem usb: ch9: fix up MaxStreams helper USB: usb-skeleton.c: cleanup open_count USB: usb-skeleton.c: fix open/disconnect race xhci: Properly handle COMP_2ND_BW_ERR USB: remove dead code from suspend/resume path USB: add quirk for another camera drivers: usb: wusbcore: Fix dependency for USB_WUSB xhci: Better debugging for critical host errors. xhci: Be less verbose during URB cancellation. xhci: Remove debugging about ring structure allocation. xhci: Remove debugging about toggling cycle bits. xhci: Remove debugging for individual transfers. ...
2011-11-18USB: convert drivers/usb/* to use module_usb_driver()Greg Kroah-Hartman1-12/+1
This converts the drivers in drivers/usb/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Simon Arlott <[email protected]> Cc: Duncan Sands <[email protected]> Cc: Matthieu CASTET <[email protected]> Cc: Stanislaw Gruszka <[email protected]> Cc: Pete Zaitcev <[email protected]> Cc: Oliver Neukum <[email protected]> Cc: Juergen Stuber <[email protected]> Cc: Cesar Miquel <[email protected]> Cc: Matthew Dharm <[email protected]> Cc: Matthew Wilcox <[email protected]> Cc: Sarah Sharp <[email protected]> Cc: Kuninori Morimoto <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Lucas De Marchi <[email protected]> Cc: Michael Hund <[email protected]> Cc: Zack Parsons <[email protected]> Cc: Melchior FRANZ <[email protected]> Cc: Tomoki Sekiyama <[email protected]> Cc: Dan Carpenter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-11-15usb: storage: onetouch: fix sparse warningFelipe Balbi1-1/+1
Fix the following sparse warning: | drivers/usb/storage/onetouch.c:72:22: warning: symbol | 'onetouch_usb_ids' was not declared. Should it | be static? Signed-off-by: Felipe Balbi <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: rename usb_buffer_alloc() and usb_buffer_free() usersDaniel Mack1-6/+6
For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <[email protected]> Cc: Alan Stern <[email protected]> Cc: Pedro Ribeiro <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-03-02USB: storage: onetouch: unnecessary GFP_ATOMICOliver Neukum1-1/+1
No need to use GFP_ATOMIC to allocate buffers. Signed-off-by: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-09-23USB: storage: fix a resume path GFP_NOIO must be usedOliver Neukum1-1/+1
In the resume path of a block driver GFP_NOIO must be used to avoid a possible deadlock. The onetouch subdriver of storage violates the requirement. Signed-off-by: Oliver Neukum <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-03-24USB: usb-storage: added missing MODULE_LICENSE("GPL") for usb-storage ums-* ↵Maciej Grela1-0/+4
modules The lack of a MODULE_LICENSE macro in ums-* subdrivers prevented them from loading. Needs to be applied after Alan Stern's usb-storage subdriver separation patchset. Also added missing MODULE_DESCRIPTION and MODULE_AUTHOR entries. Signed-off-by: Maciej Grela <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: Matthew Dharm <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-03-24usb-storage: make onetouch a separate moduleAlan Stern1-2/+88
This patch (as1217) converts usb-storage's onetouch subdriver into a separate module. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2008-10-17USB: remove err() macro from more usb driversGreg Kroah-Hartman1-4/+5
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 <[email protected]>
2008-05-02USB: storage/onetouch.c: make a function staticAdrian Bunk1-2/+2
This patch makes the needlessly global onetouch_release_input() static. Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2007-07-19USB: storage: onetouch: clean up urb->status usageGreg Kroah-Hartman1-6/+7
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 <[email protected]>
2007-05-22USB: Onetouch - switch to using input_dev->dev.parentDmitry Torokhov1-4/+5
In preparation for struct class_device -> struct device input core conversion, switch to using input_dev->dev.parent when specifying device position in sysfs tree. Also, do not access input_dev->private directly, use helpers. Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Matthew Dharm <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2007-02-07USB: <linux/usb_ch9.h> becomes <linux/usb/ch9.h>David Brownell1-1/+0
This moves <linux/usb_ch9.h> to <linux/usb/ch9.h> to reduce some of the clutter of usb header files. Signed-off-by: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-12-07[PATCH] slab: remove SLAB_ATOMICChristoph Lameter1-2/+2
SLAB_ATOMIC is an alias of GFP_ATOMIC Signed-off-by: Christoph Lameter <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2006-12-01USB: onetouch: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-4/+1
Signed-off-by: Luiz Fernando N. Capitulino <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells1-2/+1
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <[email protected]> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-09-27USB: onetouch - handle errors from input_register_device()Dmitry Torokhov1-2/+6
Onetouch: handle errors from input_register_device() Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <[email protected]> Signed-off-by: Adrian Bunk <[email protected]>
2006-06-21[PATCH] USB: move <linux/usb_input.h> to <linux/usb/input.h>David Brownell1-2/+1
Move <linux/usb_input.h> to <linux/usb/input.h> and remove some redundant includes. Signed-off-by: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2006-01-04[PATCH] USB Storage: make OneTouch PM-awareMatthew Dharm1-0/+27
The OneTouch subdriver submits its own interrupt URB for notifications about button presses. Consequently it needs to know about suspend and resume events, so it can cancel or restart the URB. This patch (as593) adds a hook to struct us_data, to be used for notifying subdrivers about Power Management events, and it implements the hook in the OneTouch driver. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Nick Sillik <[email protected]> Signed-off-by: Matthew Dharm <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2005-10-28[PATCH] Input: convert onetouch to dynamic input_dev allocationDmitry Torokhov1-49/+50
Input: convert onetouch to dynamic input_dev allocation This is required for input_dev sysfs integration Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2005-09-08[PATCH] USB Storage: code cleanups for onetouch.cNick Sillik1-12/+17
As sugested by Alan Stern here are a few code cleanups for onetouch.c: -Check number of endpoints before directly referencing intf->endpoint[2] -Use defined constants instead of magic numbers -Revmove the non-ascii characters from copyright notice -Make registration and deregistration messages more similar Signed-off-by: Nick Sillik <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2005-09-08[PATCH] USB Storage: add support for Maxtor One-Touch buttonMatthew Dharm1-0/+205
This patch is originally from Nick Sillik, and has been rediffed against the latest tree. This patch adds usability to the OneTouch Button on Maxtor External USB Hard Drives. Using an unusual device entry it declares an extra init function which claims the interrupt endpoint associated with this button. The button is connected to the input system. Signed-off-by: Nick Sillik <[email protected]> Signed-off-by: Matthew Dharm <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>