summaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)Author
2006-08-06UHCI: Fix handling of short last packetAlan Stern
This patch (as753) fixes the way uhci-hcd handles a short packet when it is the last packet of an URB. Right now the driver handles short packets the same no matter when they occur. However, the controller stops transferring packets when the short packet is not the last one (otherwise it would be reading beyond the end of the device's data) and needs to be restarted, whereas no such need occurs when the short packet is the last one. The result of the bug is that USB endpoint queues experience intermittent hangs, a regression in 2.6.17 with respect to earlier kernels. The bug was raised in Bugzilla #6752 and this patch fixed it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-07-24USB serial ftdi_sio: Prevent userspace DoS (CVE-2006-2936)Ian Abbott
This patch limits the amount of outstanding 'write' data that can be queued up for the ftdi_sio driver, to prevent userspace DoS attacks (or simple accidents) that use up all the system memory by writing lots of data to the serial port. The original patch was by Guillaume Autran, who in turn based it on the same mechanism implemented in the 'visor' driver. I (Ian Abbott) re-targeted the patch to the latest sources, fixed a couple of errors, renamed his new structure members, and updated the implementations of the 'write_room' and 'chars_in_buffer' methods to take account of the number of outstanding 'write' bytes. It seems to work fine, though at low baud rates it is still possible to queue up an amount of data that takes an age to shift (a job for another day!). Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-06-29[PATCH] USB: Whiteheat: fix firmware spurious errorsStuart MacDonald
Attached patch fixes spurious errors during firmware load. Signed-off-by: Stuart MacDonald <stuartm@connecttech.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Chris Wright <chrisw@sous-sol.org>
2006-06-08[ARM] 3547/1: PXA-OHCI: Allow platforms to specify a power budgetRichard Purdie
Patch from Richard Purdie Add a power budget variable to the PXA OHCI platform data and add a default value for the spitz platform(s) which prevents known failures with certain USB devices. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-05-21[PATCH] HID read busywait fixMicon, David
Make a read of a HID device block until data is available. Without it, the read goes into a busy-wait loop until data is available. Cc: Greg KH <greg@kroah.com> Acked-by: Vojtech Pavlik <vojtech@suse.cz> Cc: Dmitry Torokhov <dtor_core@ameritech.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-05-12[PATCH] USB: fix omninet driver bugGreg Kroah-Hartman
I introduced this way back in 2.6.13 when adding the port lock logic. This device talks out through different "ports" all at the same time, so the lock logic was wrong, preventing any data from ever being sent properly. Thanks a lot to Bernhard Reiter <bernhard@intevation.de> for being patient and helping with debugging this. Cc: Bernhard Reiter <bernhard@intevation.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12[PATCH] USB: add ark3116 usb to serial driverGreg Kroah-Hartman
Based on Simon's original driver, with some minor code cleanups and tidying by me. Cc: Simon Schulz <simon@auctionant.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12[PATCH] usbserial: Fixes leak in serial_open() error path.Luiz Fernando Capitulino
If serial_open() fails at the port assignment or mutex_lock_interruptible() is interrupted, the 'serial' object will never be freed. We should call kref_put() when those errors happens. Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12[PATCH] usbserial: Fixes use-after-free in serial_open().Luiz Fernando Capitulino
If the device is disconnected while serial_open() is executing and either try_module_get() or the device specific open function fails, the kref_put() call in the 'bailout_kref_put' label will free the memory pointed out by 'port'. The subsequent dereferences in the 'bailout_kref_put' label will be invalid. The fix is just to assure kref_put() is called after any 'port' usage. Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12[PATCH] USB: Emagic USB firmware loading fixesMonty
It's become apparent as machines get faster that the emagic kernel firmware loaders (based on the ezusb loader) have a reset race. a 400MHz TiBook never tripped it, but a 2GHz Pentium M seems to hit it about 30% of the time. The bug is seen as a hung USB box and the kernel error: drivers/usb/misc/emi62.c: emi62_load_firmware - error loading firmware: error = -110 The patch below inserts a delay after deasserting reset to allow the box to settle before a new command is issued. This affects only device startup. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12[PATCH] USB: add an IBM USB keyboard to the HID_QUIRK_NOGET blacklistOlaf Hering
After recent changes, the USB keyboard as shipped with IBM pSeries systems does not work anymore, unless the keyboard is replugged after reboot. Adding this model to the blacklist fixes it. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-12[PATCH] USB: Add Sieraa Wireless 580 evdo card to airprime.cKen Brush
This adds the Sierra Wireless card to airprime.c. I tested this on my laptop. Signed-off-by: Ken Brush <ken@cgi101.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08[PATCH] USB: ftdi_sio: add device id for ACT Solutions HomePro ZWave interfaceRazvan Gavril
Signed-off-by: Razvan Gavril <razvan.g@plutohome.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08[PATCH] USB: ftdi_sio: Add support for HCG HF Dual ISO RFID ReaderIan Abbott
This patch adds support for ACG Identification Technologies GmbH's HF Dual ISO Reader (an RFID tag reader) to the ftdi_sio driver's device ID table. The product ID was supplied by anotonios (anton at goto10 dot org) on the ftdi-usb-sio-devel list and subsequently verified by myself (Ian Abbott). Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08[PATCH] USB: usbcore: don't check the device's power sourceAlan Stern
The choose_configuration() routine contains code the determine the device's power source, so that configurations requiring external power can be ruled out if the device is running on bus power. Unfortunately it turns out that some devices have errors in their config descriptors and other devices don't like the GET_DEVICE_STATUS request. Since that information wasn't used for anything else, this patch (as673) removes the code, leaving only a comment. It fixes bugzilla entry #6448. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08[PATCH] USB: fix OHCI PM regressionDavid Brownell
This fixes a small regression in USB controller power usage for many OHCI controllers, notably including every non-PCI version of OHCI: on those systems, the runtime autosuspend mechanism is no longer enabled. The change moves to saner defaults. All root hubs are expected to handle remote wakeup (and hence autosuspend), although drivers for buggy silicon may override that default. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08[PATCH] USB: pegasus fixes (logstorm, suspend)David Brownell
Teach "pegasus" to handle a few of the disconnect fault paths without hundreds of usless syslog messages. Handle the carrier check workqueue entry even if the driver has not been opened. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08[PATCH] USBATM: fix modinfo outputDuncan Sands
Because of the way stringify works, using an expression like 64 * 1024 for UDSL_MAX_BUF_SIZE results in 64 * 1024 turning up in the modinfo output instead of 65536. So use 65536 directly (this was the only way I found of fixing this). Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08[PATCH] USBATM: change the default speedtouch iso altsettingDuncan Sands
The maximum possible bandwidth for a speedtouch modem is about 7Mbaud. You can only get this by using isochronous urbs (enable_isoc=1) and altsetting 3. With the current default altsetting of 2, the modem maxes out at about 4Mbaud. So change the default altsetting to 3 when using isochronous urbs. It would be nice to base the altsetting on the detected line speed, but that's hard given the current design. Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-05-08[PATCH] USB: fix bug in ohci-hcd.c ohci_restart()David Brownell
A loop on a power-lost resume path used the wrong index. I suspect khubd has been working around such bugs. Noticed by Andreas Mohr <andi@rhlx01.fht-esslingen.de>. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: ftdi_sio: add support for ASK RDR 400 series card readerIan Abbott
This patch adds support for an ASK RDR 400 series contactless card reader <http://www.ask.fr/uk/products_and_services/terminals.html> to the ftdi_sio driver's device ID table. The product ID was supplied by Adriano Couto on the ftdi-usb-sio-devel list. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: ftdi_sio: Adds support for iPlus device.Luiz Fernando N. Capitulino
Adds support in ftdi_sio usbserial driver for USB modems sold by Plus GSM Company in Poland. Signed-off-by: Luiz Fernando Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: ftdi_sio vendor code for RR-CirKits LocoBuffer USBNathan Bronson
This patch adds recognition of the RR-CirKits LocoBuffer USB to the existing FTDI driver. http://www.rr-cirkits.com Signed-off-by: Nathan Bronson <ngb@sns-usa.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: Use new PCI_CLASS_SERIAL_USB_* definesJean Delvare
We could use the recently added PCI_CLASS_SERIAL_USB_UHCI, PCI_CLASS_SERIAL_USB_OHCI and PCI_CLASS_SERIAL_USB_EHCI defines in more places, for slightly shorter and clearer code. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: net2280: set driver data before it is usedAlan Stern
This patch (as671) fixes a bug in the error pathway for the net2280 probe routine. A failure during probe will cause the driver to call pci_get_drvdata before the corresponding pci_set_drvdata has been set. The patch also does a kzalloc conversion. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: net2280: check for shared IRQsAlan Stern
This patch (as670) adds a check for whether a shared IRQ was actually generated by the net2280 device. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: net2280: send 0-length packets for ep0Alan Stern
This patch (as669) fixes a bug in the net2280 driver. Now it will properly send zero-length packets on ep0 until the control status stage occurs. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: net2280: Handle STALLs for 0-length control-IN requestsAlan Stern
This patch (as668) fixes a typo in net2280. The handler for 0-length control-IN requests should check that the endpoint _isn't_ halted before sending a 0-length packet. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: storage: atmel unusual dev updateOlivier Blondeau
Originally submitted by Olivier Blondeau <zeitoun@gmail.com>, with re-diffing by me. Adds a new atmel unusual_dev entry. Signed-off-by: Phil Dibowitz <phil@ipom.com>
2006-04-27[PATCH] USB: Storage: unusual devs updatePhil Dibowitz
This patch removes the Protocol portion of the Iomega Click! device as it's not needed. Not-needed message reported by Kenneth Crudup <kenny@panix.com> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: add new iTegno usb CDMA 1x card support for pl2303Wang Jun
Add new iTegno usb CDMA 1x card (usbid '0eba:2080') support to pl2303 driver Signed-off-by: Wang Jun <wangjun1974@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-27[PATCH] USB: Resource leak fix for whiteheat driverJesper Juhl
We may return from drivers/usb/serial/whiteheat.c::whiteheat_attach() without freeing `result' if we leave via the no_firmware: label. Spotted by the coverity checker as #670 Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-26[PATCH] fix leak in activate_ep_files()Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-17[PATCH] isd200: limit to BLK_DEV_IDERandy Dunlap
Limit USB_STORAGE_ISD200 to whatever BLK_DEV_IDE and USB_STORAGE are set to (y, m) since isd200 calls ide_fix_driveid() in the BLK_DEV_IDE code. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (158 commits) commit 4f705ae3e94ffaafe8d35f71ff4d5c499bb06814 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Apr 3 17:09:22 2006 -0700 [PATCH] DMI: move dmi_scan.c from arch/i386 to drivers/firmware/ dmi_scan.c is arch-independent and is used by i386, x86_64, and ia64. Currently all three arches compile it from arch/i386, which means that ia64 and x86_64 depend on things in arch/i386 that they wouldn't otherwise care about. This is simply "mv arch/i386/kernel/dmi_scan.c drivers/firmware/" (removing trailing whitespace) and the associated Makefile changes. All three architectures already set CONFIG_DMI in their top-level Kconfig files. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Andi Kleen <ak@muc.de> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Andrey Panin <pazke@orbita1.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> ...
2006-04-14[PATCH] pm: print name of failed suspend functionAndrew Morton
Print more diagnostic info to help identify the source of power management suspend failures. Example: usb_hcd_pci_suspend(): pci_set_power_state+0x0/0x1af() returns -22 pci_device_suspend(): usb_hcd_pci_suspend+0x0/0x11b() returns -22 suspend_device(): pci_device_suspend+0x0/0x34() returns -22 Work-in-progress. It needs lots more suspend_report_result() calls sprinkled everywhere. Cc: Patrick Mochel <mochel@digitalimplant.org> Cc: Pavel Machek <pavel@ucw.cz> Cc: Nigel Cunningham <nigel@suspend2.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: add driver for funsoft usb serial deviceGreg Kroah-Hartman
Cc: David Clare <david@funsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: remove __init from usb_console_setupPaul Fulghum
This prevents an Oops if booted with "console=ttyUSB0" but without a USB-serial dongle, and plugged one in afterwards. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: pl2303: added support for OTi's DKU-5 clone cableTomasz Kazmierczak
This patch adds support for a clone of Nokia DKU-5 cable made by Ours Technology Inc for Nokia phones with PopPort (Nokia 3100 and others). The cable uses PL2303 USB-to-serial converter from Prolific Technology Inc. Signed-off-by: Tomasz Kazmierczak <tomek.fizyk@op.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: S3C2410: use clk_enable() to ensure 48MHz to OHCI coreBen Dooks
Get the "usb-bus" clock and ensure it is enabled when the OHCI core is in use. It seems that a few bootloaders do not enable the UPLL at startup, which stops the OHCI core having a 48MHz bus clock. The improvements to the clock framework for the s3c24xx now allow the USB PLL to be started and stopped when being used. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] hid-core.c: fix "input irq status -32 received" for Silvercrest USB ↵Jeffrey Vandenbroucke sign
Keyboard When not using this patch, the kernel will continuously return "input irq status -32 received", while making the keyboard unusable. This can be easely resolved using HID_QUIRK_NOGET. Vendor-ID and Device-ID should be applied to hid-core.c, and making an entry to make use of it. Signed-off-by: Jeffrey Vandenbroucke <jeffrey@wirehead.be> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Greg KH <greg@kroah.com> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: UHCI: don't track suspended portsAlan Stern
Someone recently posted a bug report where it turned out that uhci-hcd was disagreeing with the UHCI controller over whether or not a port was suspended: The driver thought it wasn't and the hardware thought it was. This patch (as665) fixes the problem and simplifies the driver by removing the internal state-tracking completely. Now the driver just asks the hardware whether a port is suspended. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: keyspan-remote bugfixMichael Downey
Signed-off-by: Michael Downey <downey@zymeta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: Rename ax8817x_func() to asix_func() and add utility functions ↵David Hollis
to reduce bloat Now that the ASIX code is supporting more than just the AX88172 devices, make the utility function names more generic: ax8817x_func -> asix_func. Functions that are chip specific now indicate as such: ax88772_func. Additionally, pull some common routines used in initialization and such into simple functions to reduce the verbosity of certain functions such as the bind() routines and to make the error handling consistent across the board. Signed-off-by: David Hollis <dhollis@davehollis.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: linux/usb/net2280.h common definitionsPete Zaitcev
Move common definitions for NET2280 to <linux/usb/net2280.h>, so that I can use them in prism54usb (it is not merged yet, but I plan to do it soon). Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: g_ether, highspeed conformance fixDavid Brownell
Be sure to record the peripheral's ep0 maxpacket size BEFORE using that to initialize the (high speed) device qualifier; that helps a lot with USBCV testing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: usbtest: scatterlist OUT data pattern testingDavid Brownell
Previously, scatterlist tests didn't write patterned data. Given how many corner cases are addresed by them, this was a significant gap in Linux-USB test coverage. Moreover, when peripherals checked for correct data patterns, false error reports would drown out the true ones. This adds the pattern on the way OUT from the host, so scatterlist tests can now be used to uncover bugs like host TX or peripheral RX paths failing for back-to-back short packets. It's easy enough to get an error there with at least one of the {DMA,PIO}{RX,TX} code paths, or run into hardware races that need to be defended against. Note this patch doesn't add checking for correct data patterns on the way IN from peripherals, just a FIXME for later. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: at91 usb driver supend/resume fixesDavid Brownell
AT91: the two USB drivers (OHCI, UDC) got out of sync with various usbcore and driver model PM updates; fix. Also minor fixes to ohci: whitespace/style, MODULE_ALIAS so coldplug works using /sys/.../modalias, and turn off _both_ clocks during suspend. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: gadget zero poisons OUT buffersDavid Brownell
Fill OUT buffers with 0x55 before RX, so that controller driver bugs that mangle data can be more readily detected during testing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14[PATCH] USB: gadgetfs highspeed bugfixDavid Brownell
This catches up to a change in the Kconfig support for highspeed modes; the change predated 2.6.10, and anyone using gadgetfs on a highspeed device would see the kernel wrongly reject the alternate descriptors. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>