aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-04-27usbmon: bus zeroPete Zaitcev
Add the "bus zero" feature to the usbmon. If a user process specifies bus with number zero, it receives events from all buses. This is useful when we wish to see initial enumeration when a bus is created, typically after a modprobe. Until now, an application had to loop until a new bus could be open, then start capturing on it. This procedure was cumbersome and could lose initial events. Also, often it's too bothersome to find exactly to which bus a specific device is attached. Paolo Albeni provided the original concept implementation. I added the handling of "bus->monitored" flag and generally fixed it up. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: Allow transfer_buffer with transfer_dmaTony Lindgren
Some host controller drivers may need a PIO fallback when a DMA channel is temporarily unavailable. This patch provides an address that such drivers can use for PIO in those cases, and nulls that field out when no such address is available (highmem) which should help usbmon. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: cleanup ofd adutuxOliver Neukum
this driver does - ignore errors during open - submit a running urb - use down_interruptible not handling signals - GFP_KERNEL with a spinlock held Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: add "last_busy" field for use in autosuspendAlan Stern
This patch (as877) adds a "last_busy" field to struct usb_device, for use by the autosuspend framework. Now if an autosuspend call comes at a time when the device isn't busy but hasn't yet been idle for long enough, the timer can be set to exactly the desired value. And we will be ready to handle things like HID drivers, which can't maintain a useful usage count and must rely on the time-of-last-use to decide when to autosuspend. The patch also makes some related minor improvements: Move the calls to the autosuspend condition-checking routine into usb_suspend_both(), which is the only place where it really matters. If the autosuspend timer is already running, don't stop and restart it. Replace immediate returns with gotos so that the optional debugging ouput won't be bypassed. If autoresume is disabled but the device is already awake, don't return an error for an autoresume call. Don't try to autoresume a device if it isn't suspended. (Yes, this undercuts the previous change -- so sue me.) Don't duplicate existing code in the autosuspend work routine. Fix the kerneldoc in usb_autopm_put_interface(): If an autoresume call fails, the usage counter is left unchanged. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: whiteheat: Convert to generic booleanRichard Knutsson
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Acked-by: Stuart MacDonald <stuartm@connecttech.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix omninet write vs. close raceOliver Neukum
omninet kills all URBs in close. However write() returns as soon as the URB has been submitted. Killing the last URB means a race that can lose that date written in the last call to write(). As a fix this is moved to shutdown(). Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix error handling for mct_u232Oliver Neukum
we report errors to the caller. THis patch adds error handling to the driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix error handling in kl5kusbOliver Neukum
- report errors - cleanup in error case - use of endianness macros Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix catc error handlingOliver Neukum
this driver ignores errors while starting the transmit queue. It will never be reported stopped as the completion handler won't run and it will never be started again as it will be considered started. This patch adds error handling. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: cypress_cy7c63: race disconnect/sysfs read-write leading to following ↵Oliver Neukum
NULL pointer this driver sets intfdata to NULL while it still can be read and happily followed. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix ark3116 memory leakOliver Neukum
this driver has a memory leak in an error case. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: ftdi_sio: Add USB ID of ADSTech USBX-707Jelle Foks
This patch adds the USB ID of the ADS Tech USBX-707 USB IR blaster (that comes with the ADS Tech PTV-305 grabber card), which has a ftdi232bm inside hooked up to a pic. With this it should be fairly straightforward to make at least lirc receiving work with this device. I will submit a patch to lirc for that as soon as I have one ready, I'm getting data with minicom with this patch, but need to figure out some more details such as best/correct baudrate. Signed-off-by: Jelle Foks <jelle@foks.8m.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix race in ftdio_writeOliver Neukum
this has the same race as the visor driver. The counter must be incremented under the lock it is checked under. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix race in visor_writeOliver Neukum
this fixes a small race in visor_write. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: aircable cleanupOliver Neukum
- proper endianness macros - scheduling in interrupt in error case Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Naranjo Manuel Francisco <naranjo.manuel@gmail.com>
2007-04-27USB: make usbdevices export their device nodes instead of using a separate classKay Sievers
o The "real" usb-devices export now a device node which can populate /dev/bus/usb. o The usb_device class is optional now and can be disabled in the kernel config. Major/minor of the "real" devices and class devices are the same. o The environment of the usb-device event contains DEVNUM and BUSNUM to help udev and get rid of the ugly udev rule we need for the class devices. o The usb-devices and usb-interfaces share the same bus, so I used the new "struct device_type" to let these devices identify themselves. This also removes the current logic of using a magic platform-pointer. The name of the device_type is also added to the environment which makes it easier to distinguish the different kinds of devices on the same subsystem. It looks like this: add@/devices/pci0000:00/0000:00:1d.1/usb2/2-1 ACTION=add DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb2/2-1 SUBSYSTEM=usb SEQNUM=1533 MAJOR=189 MINOR=131 DEVTYPE=usb_device PRODUCT=46d/c03e/2000 TYPE=0/0/0 BUSNUM=002 DEVNUM=004 This udev rule works as a replacement for usb_device class devices: SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" Updated patch, which needs the device_type patches in Greg's tree. I also got a bugzilla assigned for this. :) https://bugzilla.novell.com/show_bug.cgi?id=250659 Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: gadget-storage needs BLOCKRandy Dunlap
With CONFIG_BLOCK=n, this build error happens: WARNING: "bdev_read_only" [drivers/usb/gadget/g_file_storage.ko] undefined! Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: add power/level sysfs attributeAlan Stern
This patch (as874) adds another piece to the user-visible part of the USB autosuspend interface. The new power/level sysfs attribute allows users to force the device on (with autosuspend off), force the device to sleep (with autoresume off), or return to normal automatic operation. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: ati_remote2: Add channel supportPeter Stokes
Add logical channel support for ATI Remote Wonder II The ATI Remote Wonder II can be configured with one of 16 unique logical channels. Allowing up to 16 remotes to be used independently within range of each other. This change adds functionality to configure the receiver and filter the input data to respond or exclude remotes configured with different logical channels. Signed-off-by: Peter Stokes <linux@dadeos.freeserve.co.uk> Acked-by: Ville Syrjala <syrjala@sci.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: sierra close raceOliver Neukum
the sierra driver does not directly use usb_kill_urb(). It uses a wrapper. This wrapper means that callbacks which are running are not killed during close, resubmitting and illicitly pushing data into the tty layer. The whole purpose of usb_kill_urb() is subverted. The wrapper must be removed. The same problem as the option driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: option close raceOliver Neukum
the option driver does not directly use usb_kill_urb(). It uses a wrapper. This wrapper means that callbacks which are running are not killed during close, resubmitting and illicitly pushing data into the tty layer. The whole purpose of usb_kill_urb() is subverted. The wrapper must be removed. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Matthias Urlichs <smurf@smurf.noris.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: omninet memory leak in error caseOliver Neukum
memory allocated must be freed in the error case. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27UHCI: Add some WARN_ON()sAlan Stern
This patch (as872) adds some WARN_ON()s to various error checks which are never supposed to fail. Unsettlingly, one of them has shown up in a user's log! Maybe making the warning more visible and having the call-stack information available will help pinpoint the source of the problem. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix endianness in mos7720Oliver Neukum
there's code unclean w.r.t. endianness in the mos7720 driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: gtco.c: fix a use-before-checkAdrian Bunk
NULL checks should be before the first dereference. Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: iowarrior.c: fix NULL dereferenceOliver Neukum
Am Montag, 19. 2007 10:25 schrieb Adrian Bunk: > The Coverity checker spotted the following NULL dereference: And this fixes an oops upon allocation failures. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: dm9601: fix sparse NULL warningsRandy Dunlap
Fix sparse NULL warnings: drivers/usb/net/dm9601.c:88:23: warning: Using plain integer as NULL pointer drivers/usb/net/dm9601.c:174:22: warning: Using plain integer as NULL pointer Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: io_edgeport: Convert to generic booleanRichard Knutsson
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: overhaul of mos7840 driverOliver Neukum
This fixes: - breaking DMA rules about buffers - usage of _global_ variables to save a single device's attributes - racy access to urb->status - smp monotonity issue with statistics - use of one buffer for many simultaneous URBs - error handling introduced - several instances of following NULL pointers - use after free - unnecessary GFP_ATOMIC - GFP_KERNEL in interrupt - various cleanups - write room granularity issue that bit cdc-acm - race in shutdown Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: io_edgeport race condition in countersOliver Neukum
io_edgeport is using a global variable without locking. This is _the_ classical race condition. This patch switches to atomic_t. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27EHCI: add delay to bus_resume before accessing portsAlan Stern
This patch (as870) adds a delay to ehci-hcd's bus_resume routine. Apparently there are controllers and/or BIOSes out there which need such a delay to get the ports back into their correct state. This fixes Bugzilla #8190. 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>
2007-04-27USB: Allow autosuspend delay to equal 0Alan Stern
This patch (as867) adds an entry for the new power/autosuspend attribute in Documentation/ABI/testing, and it changes the behavior of the delay value. Now a delay of 0 means to autosuspend as soon as possible, and negative values will prevent autosuspend. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: separate autosuspend from external suspendAlan Stern
This patch (as866) adds new entry points for external USB device suspend and resume requests, as opposed to internally-generated autosuspend or autoresume. It also changes the existing remote-wakeup code paths to use the new routines, since remote wakeup is not the same as autoresume. As part of the change, it turns out to be necessary to do remote wakeup of root hubs from a workqueue. We had been using khubd, but it does autoresume rather than an external resume. Using the ksuspend_usb_wq workqueue for this purpose seemed a logical choice. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: help text for mos 7720 driverOliver Neukum
this driver's help text incorrectly claims to support only single port devices. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27mos7720 updateOliver Neukum
this driver has an interesting way of handling ENOMEM: complain and ignore. If you decide to live with allocation failures, you must 1. guard against URBs without corresponding buffers 2. complete allocation failures 3. always test entries for NULL before you follow the pointers This patch does so. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27ehci-fsl: change SI_CTRL, PRI_CTRL register offsets according to errataChristian Engelmayer
Correct the offsets of the SI_CTRL, PRI_CTRL registers according to the Reference Manual errata sheet in order to prevent unwanted settings regarding burst transactions and priority states. Signed-off-by: Christian Engelmayer <Christian.Engelmayer@frequentis.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix race in HCD removalAlan Stern
This patch (as865) fixes a race in the HCD removal code discovered by Milan Plzik. Arrival of an interrupt after the root hub was unregistered could cause the root-hub status timer to start up, even after it was supposed to have been shut down. The problem is fixed by moving the del_timer_sync() call to after the HCD's stop() method, at which time IRQ generation should be disabled. Cc: Milan Plzik <milan.plzik@gmail.com> Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: MAINTAINERS: cxacruSimon Arlott
I've acquired a second device for testing and plan to make some changes in the near future to export all the device stats to sysfs (based on my proposed patch to add them to the proc file ~2007-01-30). Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: cxacru: export detailed device info through sysfsSimon Arlott
When the device is polled for status there is a lot of useful status information available that is ignored. This patch stores the device info array when the status is polled and adds sysfs files to the usb device to allow userspace to query it. Since the device updates its status internally once a second the poll time is changed to this, and round_jiffies_relative is used to avoid waking the cpu unnecessarily. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: Duncan Sands <duncan.sands@free.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27usbatm: create sysfs link "device" from atm class device to usb interfaceSimon Arlott
There is currently no path from the ATM device in /sys to the USB device's interface that the driver is using; this patch creates a "device" symlink. It is then possible to get to the cxacru ADSL statistics (http://lkml.org/lkml/2007/2/23/328): /sys/class/atm/cxacru0/device $ ls *_rate *_margin *_attenuation downstream_attenuation downstream_snr_margin upstream_rate downstream_rate upstream_attenuation upstream_snr_margin If this link is not appropriate I'd have to create device files in /sys/class/atm/cxacru0 instead - which seems less appropriate since the ADSL statistics are for the USB device not ATM (which is running over the ADSL). [akpm@linux-foundation.org: cleanups] Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Cc: Duncan Sands <duncan.sands@math.u-psud.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: unnecessary GFP_ATOMIC in mos7720 driverOliver Neukum
GFP_KERNEL will do. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27usbcore: move usb_autosuspend_workAlan Stern
This patch (as864) moves the work routine for USB autosuspend from one source file to another. This permits the removal of one whole global symbol (!) and should smooth the way for more changes in the future. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27libusual: change block scope variable to function scopePete Zaitcev
Someone changed the code to kthread and used his style instead of mine. The problem with the block variables is that they provoke shadowing, which is actually exactly what has happened in my other tree which has the class patch. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27ub: Bind to first endpoint, not to lastPete Zaitcev
The usb-storage switched to binding to first endpoint recently. Apparently, there are devices out there with extra endpoints. It is perfectly legal. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: cdc-acm: export parsed capabilities through sysfsOliver Neukum
this patch exports the attributes cdc-acm knows about a device through sysfs. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: additional structure from cdc specOliver Neukum
this adds another structure for CDC devices to cdc.h. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27usbmon: Extended text APIPete Zaitcev
This patch adds a new text API, codenamed '1u', which captures more URB fields than old '1t' interface did. Also the '1u' text API is compatible with the future "bus zero" extension. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: kill BKL in usblcdOliver Neukum
this patch removes usage of BKL from usblcd, which got it from the old skeleton driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: kill BKL in skeleton driverOliver Neukum
Iet's kill BKL where we can. This is relative to the last patch to the skeleton driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix skeleton driverOliver Neukum
compilation of the skeleton driver is currently broken. It doesn't compile. So while I am it: - fix typo - add comments to answer common questions - actually allow autosuspend in the driver struct - increase paralellism by restricting code under locks Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>