aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-02-01usb: dma bounce buffer supportMagnus Damm
usb: dma bounce buffer support V4 This patch adds dma bounce buffer support to the usb core. These buffers can be enabled with the HCD_LOCAL_MEM flag, and they make sure that all data passed to the host controller is allocated using dma_alloc_coherent(). Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: last abuses of intfdata in close for usb-serial driversOliver Neukum
these drivers abused intfdata in close() as flags for binding. That races with reprobing of those devices. This patch fixes that by using the flag and the locks introduced with the patch against mos7720. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: kl5kusb105 don't flush to logically disconnected devicesOliver Neukum
If disconnect() is called for a logical disconnect, no more IO must be done after disconnect() returns, or the old and new drivers may conflict. This patch avoids this by using the flag and lock introduced by the earlier patch for the mos7720 driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: oti6858: cleanupAlan Cox
- Rename the copied buffer functions from pl2303 to oti6858 to avodi confusion - Initialise speeds properly - Use modern baud rate handling - Remove GSERIAL/SSERIAL ioctl hacks that reference termios unlocked Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: more serial drivers writing after disconnectOliver Neukum
this covers the rest of the obvious cases by using the flags and locks to guard against disconnect which were introduced in the earlier patch against mos7720. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: make sure usb serial drivers don't flush to logically disconnected devicesOliver Neukum
If disconnect() is called for a logical disconnect, no more IO must be done after disconnect() returns, or the old and new drivers may conflict. This patch avoids this by using the flag and lock introduced by the earlier patch for the mos7720 driver. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: fix memleak in ark3116 serial driverOliver Neukum
in an error case memory already allocated must be freed again. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: stop abuse of intfdata in cypress_m8Oliver Neukum
this driver uses usb_get_intfdata() == NULL as a test for disconnect(). You must not do that as this races with probe(). By the time you test your erstwhile interface may already be somebody else's interface. This fixes the close() method of cypress_m8 to use the recently introduced flag and use locking against disconnect() where required in close(). Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: constify function pointer tablesJan Engelhardt
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: stop io performed by mos7720 upon close()Oliver Neukum
This fixes a problem where the mos7720 driver will make io to a device from which it has been logically disconnected. It does so by introducing a flag by which the generic usb serial code can signal the subdrivers their disconnection and appropriate locking. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: add support for SuperH OHCIYoshihiro Shimoda
add support for SuperH OHCI. supported CPU are: - SH7720 - SH7721 - SH7763 Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: ftdi_sio: remove very old changelog entries from the file.Greg Kroah-Hartman
People keep trying to add entries to this section of the driver for things. That's what the Changelog is supposed to be for, not the .c file. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: usbserial: provide ezusb functions for an external module.Paul Chavent
When building an external module, the ezusb_* functions are not defined if we haven't loaded any built'in module that use them (whiteheat, keyspan, ...). This patch allow to build those functions even if we only have selected the usbserial generic driver. Signed-off-by: Paul Chavent <paul.chavent@fnac.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: EHCI: add a short delay to the bus_suspend routineAlan Stern
This patch (as1031) adds a short delay to the bus-suspend routine in ehci-hcd. Without it some devices disconnect when they should suspend. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: EHCI: move del_timer_sync calls outside spinlocked regionAlan Stern
This patch (as1030b) moves a del_timer_sync() call outside the scope of a spinlock, where it could cause a deadlock, and adds a new del_timer_sync() call for the new IAA watchdog timer (it was omitted by mistake). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: usbfs: struct async is a fixed size structurePete Zaitcev
The ISO descriptors are allocated separately in proc_submiturb for a fetch from user mode, then tucked at the end of URB. This seems like a dead code. Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: ehci completes high speed ISO URBs soonerDavid Brownell
This has some bugfixes for the EHCI driver's ISO transfer scanning logic. It was leaving ITDs and SITDs on the schedule too long, for a few different reasons, which caused trouble. (a) Look at all microframes for high speed transfers, not just the ones we expect to have finished. This way transfers ending mid-frame will complete without needing another IRQ. This also minimizes bogus scheduling underruns (e.g. EL2NSYNC). (b) When we encounter an ISO transfer (either speed, but this hits mostly at full speed) that's not yet been completed, immediately stop scanning; we've caught up to the hardware, no matter what other indications might say. (c) Always clean up ITDs (for high speed transfers) when the HC is no longer running. I'm not sure whether the last one has been observed before, but both the others have been reported with "real world" audio and video code. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: ehci: minor ISO updates, always support split ISODavid Brownell
Small updates to the EHCI driver's ISO support: - Get rid of the Kconfig option for full speed ISO. It may not be perfect yet, but it hasn't appeared to be dangerous and pretty much every configuration wants it. - Instead of two places to disable an empty periodic schedule after an ISO transfer completes, just have one. - After the periodic schedule is disabled, we can short-circuit the schedule scan ... it can't possibly have more work to do. Assuming a typical config with split iso enabled, the only change in behavior should be almost unobservable: quicker termination of periodic scans when the schedule gets emptied. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: ehci saves some memory in ISO transfer descriptorsKarsten Wiese
In the EHCI driver, itd->usecs[8] is used in periodic_usecs(), indexed by uframe. For an ITD's unused uframes it is 0, else it contains the same value as itd->stream->usecs. To check if an ITD's uframe is used, we can instead test itd->hw_transaction[uframe]: if used, it will be nonzero no matter what endianess is used. This patch replaces those two uses, eliminates itd->usecs[], and saves eight bytes from each ITD. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: add ehci-ixp bus glueVladimir Barinov
EHCI Glue driver for Intel IXP4XX EHCI USB controller Signed-off-by: Vladimir Barinov <vbarinov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: misc: legousbtower: semaphore to mutexDaniel Walker
The dev->sem conforms to mutex style usage. This patch converts it to use the struct mutex type, and new API. There is also a small style fix around this comment, /* unlock here as tower_delete frees dev */ Where I broke the line up to meet the 80 char limit. Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: add ehci-ppc-of bus glue (device-tree aware)Valentine Barshak
This adds device-tree-aware ehci-ppc-of driver. The code is based on the ehci-ppc-soc driver by Stefan Roese <sr@denx.de>. Signed-off-by: Valentine Barshak <vbarshak@ru.mvista.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Stefan Roese <sr@denx.de> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: pxa2xx_udc: use debugfs not procfsDmitry Baryshkov
Use debugfs instead of /proc/driver/udc Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: at91_udc uses generic GPIO calls; minor cleanupDavid Brownell
Various small at91_udc cleanups: - Use generic GPIO calls, not older platform-specific ones - Use gpio_request()/gpio_free() - Use VERBOSE_DEBUG convention, not older VERBOSE - Fix sparse complaint about parameter type (changed to gfp_t) - Add missing newline to some rarely-seen debug messages - Fix some old cleanup bugs on probe() fault paths Also add a mechanism whereby rm9200 gpios can drive the D+ pullup through an inverting transistor, based on a patch from Steve Birtles. Most UDC drivers supporting a GPIO based pullup should probably have such an option, but testing it requries such a board in hand! Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Steve Birtles <arm_kernel_development@micromark.net.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: ohci-at91 uses generic GPIO callsDavid Brownell
Update the ohci-at91 bus glue to start understanding about the per-port power switch GPIOs it's given (on the sam9263-ek and potentially other boards). For the moment this just claims them and forces them active (assuming active-low power enables) whenever the HCD is loaded. The assumption is still that board setup configures the GPIOs. Using gpio_request() tracks actual usage and guards against conflict. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: Add documentation for USB suspend statistics.Sarah Sharp
This documents two newly created files: /sys/bus/usb/device/.../power/connected_duration /sys/bus/usb/device/.../power/active_duration Documentation was placed in Documentation/ABI/testing, since that's where the documentation is for the other USB sysfs power files. Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: Export suspend statisticsSarah Sharp
This patch exports two statistics to userspace: /sys/bus/usb/device/.../power/connected_duration /sys/bus/usb/device/.../power/active_duration connected_duration is the total time (in msec) that the device has been connected. active_duration is the total time the device has not been suspended. With these two statistics, tools like PowerTOP can calculate the percentage time that a device is active, i.e. not suspended or auto-suspended. Users can also use the active_duration to check if a device is actually autosuspended. Currently, they can set power/level to auto and power/autosuspend to a positive timeout, but there's no way to know from userspace if a device was actually autosuspended without looking at the dmesg output. These statistics will be useful in creating an automated userspace script to test autosuspend for USB devices. Signed-off-by: Sarah Sharp <sarah.a.sharp@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: sierra driver - add update dtr logicKevin Lloyd
The following improvements were made: - Fixed control line issue where asserting DTR on ep5 would close ep2 - Added support for calc_num_ports (will help support future composite devices) Signed-off-by: Kevin Lloyd <linux@sierrawireless.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: ftdi_sio: Support for more JTAG adaptorsHarald Welte
[PATCH] ftdi_sio: add support for more FTDI based JTAG adaptors There are more devices similar to the Olimex JTAG adaptor, in that the first port of the FT2232C is used for JTAG, and only the second port is available as UART. I have thus renamed ftdi_olimex_{probe,quirk} to ftdi_jtag_{probe,quirk} and added vendor/product ID's for the OpenMoko Neo1973 Debug Board as well as the OOCDlink device. I've also updated the KERN_INFO message sent to userspace to remove the word 'olimex' and an extra '\n' that was causing an empty line in dmesg. Signed-off-by: Harald Welte <laforge@openmoko.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: io_ti: clean up termios handlingAlan Cox
Don't pass NULL into termios functions when calling them internally Remove all the crap which then checks for NULL which can't occur now Clear CMSPAR as it is not supported Report the baud rate back to the caller properly (See FIXME someone with the docs) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: ti_usb: termios cleanupsAlan Cox
Remove internal NULL passing in termios code Remove all the if checks it causes Encode the baud rate back properly Clear CMSPAR as it is not supported Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: mos7720: clean up termiosAlan Cox
Remove lots of NULL checks that can no longer occur Encode the baud rate back into the termios (again someone with docs see FIXME to improve this further) Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: tosa_udc_use_gpio_vbus.patchDmitry Baryshkov
Use gpio_vbus instead of udc_is_connected for udc on tosa. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: fix HCD Kconfig goofageDavid Brownell
Add a missing dependency which goofs up the xconfig display. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: gadget: at91_udc minor fix (there is no number six)David Brownell
Fix a small glitch noted by Yannick Cote. There is no endpoint number six, so if a (broken) host wrongly tried to change or read status of that endpoint, the driver could access reserved register space. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Cc: Yannick Cote <yanick@yanos.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: fix NULL pointer dereference on drivers/usb/serial/whiteheat.cOliver Neukum
Am Sonntag, 16. Dezember 2007 05:23:47 schrieb Andrew Morton: > On Sat, 15 Dec 2007 07:08:52 -0800 (PST) bugme-daemon@bugzilla.kernel.org wrote: > > > http://bugzilla.kernel.org/show_bug.cgi?id=9573 > > There's a null pointer dereference on drivers/usb/serial/whiteheat.c as > > follows: > > > > (1) line 613: the test "if (port->tty)" implies that null is a legal value > > for "port->tty" at that point > > > > (2) neither firm_open nor firm_purge initialize "port->tty" drivers/usb/serial/usb-serial::serial_open() sets port->tty The check for NULL is bogus. This patch removes the check. Signed-off-by: Oliver Neukum <oneukum@suse.de> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: gadget: ethernet error path potential oops fixDavid Brownell
Fix potential (never-observed) oops on rare error path, bugzilla #9594. Fix uses the same test as used earlier. Also make the adjacent "else" block look like an "else" block instead of hiding like a bug. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: ehci potential oops fix on ARC/TDI coresDavid Brownell
Kernel bugzilla entry #9569 reports a potential OOPS in some code supporting the integrated root hub TT support used on ARC/TDI derived cores. (This seems to have been a longstanding issue.) This patch cleans up usage of urb->dev->tt to avoid that potential oops and also fixes some overly long lines. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: add Marvell Orion USB host supportTzachi Perelstein
Some glue bits for the on-chip USB host controller in the Marvell Orion family of ARM SoCs, which is basically EHCI compatible. Signed-off-by: Tzachi Perelstein <tzachi@marvell.com> Reviewed-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: ehci-hcd: fix sparse warning about shadowing 'status' symbolMarcin Slusarz
fix warning: drivers/usb/host/ehci-hcd.c:832:8: warning: symbol 'status' shadows an earlier one drivers/usb/host/ehci-hcd.c:790:71: originally declared here Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: usbdevfs_urb: __user annotationMarcin Slusarz
fix warning: drivers/usb/core/devio.c:1226:20: warning: incorrect type in assignment (different address spaces) drivers/usb/core/devio.c:1226:20: expected void *usercontext drivers/usb/core/devio.c:1226:20: got void [noderef] <asn:1>* Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: usb/storage/initializers.c: fix signedness differenceMarcin Slusarz
fix warnings: drivers/usb/storage/initializers.c:83:26: warning: incorrect type in argument 5 (different signedness) drivers/usb/storage/initializers.c:83:26: expected unsigned int *act_len drivers/usb/storage/initializers.c:83:26: got int *<noident> drivers/usb/storage/initializers.c:89:26: warning: incorrect type in argument 5 (different signedness) drivers/usb/storage/initializers.c:89:26: expected unsigned int *act_len drivers/usb/storage/initializers.c:89:26: got int *<noident> Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: PS3: Fix EHCI ISO transfer bugDavid Brownell
This adds a workaround for an issue reported with ISO transfers on some EHCI controllers, most recently with VIA KT800 and PS3 EHCI silicon. The issue is that the silicon doesn't necessarily seem to be done using ISO DMA descriptors (itd, sitd) when it marks them inactive. (One theory is that the ill-defined mechanism where hardware caches periodic transfer descriptors isn't invalidating their state...) With such silicon, quick re-use of those descriptors makes trouble. Waiting until the next frame seems to be a sufficient workaround. This patch ensures that the relevant descriptors aren't available for immediate re-use. It does so by not recycling them until after issuing the completion callback which would reuse them by enqueueing an URB and thus (re)allocating ISO DMA descriptors. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Cc: Masashi Kimoto <Masashi_Kimoto@hq.scei.sony.co.jp> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: Spelling fixesJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: gadget: pxa2xx_udc supports inverted vbusDmitry Baryshkov
Some boards (like e.g. Tosa) invert the VBUS-detection signal: it's low when a host is supplying VBUS, and high otherwise. Allow specifying whether gpio_vbus value is inverted. Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: testing driver: don't free a locked mutexAndrew Morton
Dopey thing to do and lockdep will (or should) warn. Spotted by Daniel Walker. Cc: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Cc: Daniel Walker <dwalker@mvista.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: testing driver: convert dev->sem to mutexMatthias Kaehlcke
USB testing driver: convert semaphore dev->sem to the mutex API Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: mon nopageNick Piggin
Convert USB mon driver from nopage to fault. Signed-off-by: Nick Piggin <npiggin@suse.de> Acked-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: mct232: speed, new termios and compliance cleanupsAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Cc: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-01USB: keyspan_pda: clean up speed handlingAlan Cox
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>