aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2007-04-27USB Elan FTDI: check for driver registration statusCyrill Gorcunov1-7/+11
Add checking of driver registration status and release allocated resources if it failed. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Cc: "Luiz Fernando N. Capitulino" <lcapitulino@mandriva.com.br> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: sierra: add more checks on shutdownGreg Kroah-Hartman1-0/+11
This should help with any potential NULL pointer usages as reported by a few users. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: add an ohci board-specific quirkDavid Brownell1-8/+20
Use the new ohci-pci quirk infrastructure to address the problem it was created to address: a quirk specific to the Portege 4000, in buzilla as http://bugzilla.kernel.org/show_bug.cgi?id=6723 Also fix a misuse of "__devinit" for the quirk functions. It must not be used without first ensuring that the references from the quirk tables are gone, and that the function using those quirk tables is also gone. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: usbnet reports minidriver name through ethtoolDavid Brownell2-3/+6
Update "usbnet" so that ethtool reports the name of the minidriver in use (e.g. asix, cdc_ether, dm9601, rndis_host) instead of "usbnet". This is a better match to how other network drivers work, resolving a minor open issue. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: rndis_host, various cleanupsDavid Brownell1-28/+84
Cleanups to the rndis_host code, and a tweak that helps talking to PXA hardware. Mostly from Ole André Vadla Ravnås <oleavr@gmail.com> - Prevent SET_INTERFACE requests, they give PXA hardware bad indigestion - For paranoia, null a pointer after freeing its data - Wrap up ActiveSync oddities for RNDIS_QUERY in one routine - Use that wrapper when getting the Ethernet address - Whitespace fixes Plus add a comment noting the open issues about some RNDIS clients still needing TBD kinds of browbeating to accept non-jumbogram packets. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: <linux/usb/ch9.h> minor doc updateDavid Brownell1-6/+9
Minor doc update to <linux/usb/ch9.h> ... say where USB_DT_CS_* came from and update the definitions to match how they're derived there. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27USB: fix signed jiffies issue in autosuspend logicAlan Stern1-5/+12
This patch (as897) changes the autosuspend timer code to use the standard types and macros in dealing with jiffies values. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-27usbmon: bus zeroPete Zaitcev4-84/+116
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 Lindgren1-1/+15
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 Neukum1-20/+28
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 Stern4-37/+75
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 Knutsson2-8/+4
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 Neukum1-18/+22
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 Neukum1-4/+8
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 Neukum1-8/+20
- 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 Neukum1-8/+19
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 NULL pointerOliver Neukum1-1/+3
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 Neukum1-1/+2
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 Foks2-0/+2
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 Neukum1-6/+16
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 Neukum1-6/+16
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 Neukum1-3/+4
- 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 Sievers9-115/+183
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 Dunlap1-0/+1
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 Stern5-8/+118
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 Stokes1-9/+80
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 Neukum1-10/+4
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 Neukum1-10/+4
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 Neukum1-1/+5
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 Stern1-4/+12
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 Neukum1-10/+9
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 Bunk1-4/+1
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 Neukum1-2/+4
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 Dunlap1-2/+3
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 Knutsson2-69/+63
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 Neukum1-88/+145
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 Neukum1-6/+7
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 Stern1-0/+4
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 Stern6-10/+29
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 Stern6-41/+90
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 Neukum1-3/+3
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 Neukum1-3/+10
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 Engelmayer1-2/+2
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 Stern1-3/+5
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 Arlott1-0/+5
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 Arlott1-5/+176
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 Arlott1-1/+13
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 Neukum1-1/+1
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 Stern3-30/+20
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 Zaitcev1-1/+2
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>