aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-03-02tty: Fix various bogus WARN checks in the usb serial layerAlan Cox
We are now refcounted and all the port.count checking is no longer valid and in fact produces false warnings. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: cp210x: Add 81E8 (Zephyr Bioharness)Alan Cox
As reported in http://bugzilla.kernel.org/show_bug.cgi?id=10980 Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: Extend and neaten dbg macrosJoe Perches
Add format/argument validation for #ifndef DEBUG dbg macro Neaten dbg macro definitions Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: Convert concatenated __FILE__ to %s, __FILE__Joe Perches
Reduces string space a bit Neaten a macro redefine of dbg Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: serial: Remove unnecessary \n's from dbg usesJoe Perches
#define dbg adds the newline, messages shouldn't. Converted dbg("%s", "some string") to dbg("some string") Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: ehci-dbgp: split PID register updates for IN and OUT pipesJason Wessel
This patch addresses two problems: 1) Bulk reads should always use the DATA0 for the pid, and the write PID should toggle between DATA0 and DATA1. The fix is using dbgp_pid_write_update() and dbgp_pid_read_update(). 2) The delay loop for waiting for a transaction was not long enough to always complete the initial handshake inside dbgp_wait_until_done(). After the initial handshake the maximum delay length is never reached. The combined result of these two changes allows for the removal of the forced resynchronization where a bulk write was issued with a dummy data payload only to get the device to start accepting data writes again. CC: Eric Biederman <ebiederm@xmission.com> CC: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: serial: Add support for ViVOtech ViVOpay devices.Forest Bond
Add support for USB serial interface provided by ViVOtech ViVOpay devices via new driver vivopay-serial. Currently only the ViVOpay 8800 device is supported, but support for similar devices can be added by adding the appropriate device IDs to the driver. Signed-off-by: Forest Bond <forest.bond@outpostembedded.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: atmel uaba: Adding invert vbus_pinEirik Aanonsen
Adding vbus_pin_inverted so that the usb detect pin can be active high or low depending on HW implementation also replaced the gpio_get_value(udc->vbus_pin); with a call to vbus_is_present(udc); This allows the driver to be loaded and save about 0,15W on the consumption. Signed-off-by: Eirik Aanonsen <eaa@wprmedical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: Remove unsupported usb gadget driversChristoph Egger
A bunch of USB gadget drivers where never ported from the linux 2.4 series to 2.6 kernels. However there's some code still in the tree for them which isn't used and is probably untested for ages. As the chance of these drivers being forward ported is probably quite small now it might be time to get rid of them. Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: f_mass_storage: fix crash on bind() errorPeter Korsgaard
init_completion() hasn't been called yet and the thread isn't created if we end up here, so don't call complete() on thread_notifier. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Acked-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: cdc-acm: fix possible deadlock with multiple openersOliver Neukum
The lock must be dropped before usb_autopm_interface_put() is called Signed-off-by: Oliver Neukum <oliver@neukum.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: g_mass_storage: min(...) warning fixedMichal Nazarewicz
This patch fixes warning caused by calling min() macro with arguments of different types: drivers/usb/gadget/f_mass_storage.c:623: warning: \ comparison of distinct pointer types lacks a cast Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Cc: Marek Szyprowski <m.nazarewicz@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: musb: test always evaluates to falseRoel Kluin
The removed part always evaluates to false. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2010-03-02USB: isp1760: Flush the D-cache for the pipe-in transfer buffersCatalin Marinas
When the HDC driver writes the data to the transfer buffers it pollutes the D-cache (unlike DMA drivers where the device writes the data). If the corresponding pages get mapped into user space, there are no additional cache flushing operations performed and this causes random user space faults on architectures with separate I and D caches (Harvard) or those with aliasing D-cache. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Matthew Dharm <mdharm-kernel@one-eyed-alien.net> Cc: Greg KH <greg@kroah.com> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: add new ftdi_sio device idsMitchell Solomon
PID patch for my products Signed-off-by: Mitchell Solomon <mitchjs@rush2112.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: ftdi_sio: Replace BKL with a mutexAlessio Igor Bogani
As Alan Cox have pinpointed the driver still required protection against parallels calls to the config ioctl(). If lock is still necessary the use of BKL is abused here. So replace BKL with a more convenient mutex. Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: Johan Hovold <jhovold@gmail.com> Cc: Alan Cox <alan@linux.intel.com> Cc: Daniel Mack <daniel@caiaq.de> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02usb: gadgetfs: Convert semaphore to mutexThomas Gleixner
The semaphore data->lock is semantically a mutex. Convert it to a real mutex. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: g_mass_storage: superfluous and missing packets fixedMichal Nazarewicz
The mass storage function responded needlessly to a set configuration packet. This was a leftover from converting gadget (file storage gadget) into a composite function. Moreover, it has failed to respond to get max LUN request. Adding request queueing made the function work better. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: mass_storage: eject LUNs on thread exitMichal Nazarewicz
Adds a fallback which forces all LUNs ejection (including non-removable and with prevent_medium_removal flag) when mass storage function (MSF) worker thread exits and gadget fails to handle the situation. Previously, if thread_exits was not specified mass storage function (MSF) did nothing when exiting thread as it's unclear for *function* what to do when it's thread terminates so responsibility of handling this situation was left to the *gadget* using the function. The g_mass_storage handled the situation by unregistering itself (the same thing that file storage gadget does). However, g_multi did nothing and so MSF did not eject LUNs which prevented file system unmounting. Signed-off-by: Michal Nazarewicz <m.nazarewicz@samsung.com> Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: musb: disable double buffering for older RTL versionsCliff Cai
Trying to use double buffer modes in RTL versions <2.0 may result in infinite hangs or data corruption. So avoid them with older versions. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: musb: set version of Blackfin versionCliff Cai
All current Blackfin parts are using RTL v1.9, but they don't expose the hardware registers to probe this dynamically. So hardcode the version to v1.9 for now. Need to move the local hwvers related defines higher up in the header so that sub-musb headers may utilize them. Signed-off-by: Cliff Cai <cliff.cai@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: pxa27x_udc: Fix deadlocks on request queueingRobert Jarzmik
As reported by Antonio, there are cases where the ep->lock can be taken twice, triggering a deadlock. The typical sequence is : irq_handler \ -> gadget.complete() \ -> pxa27x_udc.pxa_ep_queue() : ep->lock is taken \ -> gadget.complete() \ -> pxa27x_udc.pxa_ep_queue() : ep->lock is taken ==> *deadlock* The patch fixes this by : - releasing the lock each time gadget.complete() is called - adding a check in handle_ep() to detect a recursive call, in which case the function becomes on no-op. The patch is still not good enough for ep0. For this unique endpoint, another well thought over patch will be needed. Reported-by: Antonio Ospite <ospite@studenti.unina.it> Tested-by: Antonio Ospite <ospite@studenti.unina.it> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Eric Miao <eric.y.miao@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: serial: add support for serial port on the moschip 7715Mike Dunn
Add support for the serial port on devices based on the MosChip 7715, which provides a serial and parallel port on a single usb interface. This is added to the existing driver for the Moschip 7720 dual serial port device. The 7715 is very similiar to the 7720, requiring only the addition of a calc_num_ports() function, a separate interrupt-in endpoint callback, and some manipulation of the port pointers added to the attach() function to correct the fact that the usbserial core erroneously assigns the first bulk in/out endpoint pair to the serial port (the 7715 uses these for its parallel port). There is no support for the 7715's parallel port yet. Signed-off-by: Mike Dunn <mikedunn@newsguy.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: io_edgeport: eliminate get_string()Dan Carpenter
Johan Hovold points out that get_string() is basically just a re-implimentation of usb_string(). It is also buggy. It does DMA on the stack and it doesn't handle negative returns from usb_get_descriptor(). Plus unicode_to_ascii() is a rubbish function and moving to usb_string() avoids using it. Let's eliminate get_string() entirely. Reported-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: s3c-hsotg: replace deprecated dma_sync_single()FUJITA Tomonori
This replaces deprecated dma_sync_single() with dma_sync_single_for_cpu(). There is no functional change because dma_sync_single() simply calls dma_sync_single_for_cpu(): static inline void __deprecated dma_sync_single(struct device *dev, dma_addr_t addr, size_t size, enum dma_data_direction dir) { dma_sync_single_for_cpu(dev, addr, size, dir); } This fixes the following compile warnings: drivers/usb/gadget/s3c-hsotg.c: In function 's3c_hsotg_unmap_dma': drivers/usb/gadget/s3c-hsotg.c:376: warning: 'dma_sync_single' is deprecated (declared at /home/fujita/git/linux-2.6/include/linux/dma-mapping.h:109) drivers/usb/gadget/s3c-hsotg.c: In function 's3c_hsotg_map_dma': drivers/usb/gadget/s3c-hsotg.c:758: warning: 'dma_sync_single' is deprecated (declared at /home/fujita/git/linux-2.6/include/linux/dma-mapping.h:109) Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Ben Dooks <ben@simtec.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: musb: only print info message if probe() is successfulFelipe Balbi
we were printing the info about musb probe too early where it was still possible for things to go wrong. Move the down right before the return 0 statement. While at that also convert pr_info to dev_info. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: musb: unmap base if we can't probeFelipe Balbi
when probe() fails, we should iounmap() the mapped address. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: musb: tusb6010: use resource_sizeFelipe Balbi
Trivial patch, no functional changes. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: musb: deprecate what we don't useFelipe Balbi
after 2.6.34, those fields will be removed from struct musb_hdrc_platform_data, it's expected that other architectures are fixed by then. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: musb: we already tested for dyn_fifoFelipe Balbi
... and even added a flag to struct musb, so let's use that. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: musb: get rid of omap_readl/writelFelipe Balbi
we have those addresses already ioremaped, so let's use our __raw_readl/writel wrappers. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02usb: musb: Add context save and restore supportAjay Kumar Gupta
Adding support for MUSB register save and restore during system suspend and resume. Changes: - Added musb_save/restore_context() functions - Added platform specific musb_platform_save/restore_context() to handle platform specific jobs. - Maintaining BlackFin compatibility by adding read/write functions for registers which are not available in BlackFin Tested system suspend and resume on OMAP3EVM board. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: remove obsolete config in kernel source (USB_HCD_DMA)Christoph Egger
The configuration Option USB_HCD_DMA is not reachable in KConfig so this piece of Code is effectively dead and useless. Remove it to avoid confusion. Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: usbfs_snoop: add data logging back inChris Frey
Uses the new snoop function from commit 4c6e8971cbe0148085, but includes the buffer data where appropriate, as before. Signed-off-by: Chris Frey <cdfrey@foursquare.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: s3c-hsotg: Staticise non-exported functionsMark Brown
Keeps sparse happy if nothing else. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: trivial: missing newline in usb core warning messageThadeu Lima de Souza Cascardo
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: ftdi_sio: correct spelling in implementation fileAndreas Mohr
- correct spelling - correct non-tabbed .tiocmget/.tiocmset entries Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: ftdi_sio: correct spelling in header filesAndreas Mohr
- correct spelling/whitespace in ftdi_sio.h and ftdi_sio_ids.h Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: serial: Eliminate useless codeJulia Lawall
The variables priv and portdata are initialized twice to the same (side effect-free) expressions. Drop one initialization in each case. A simplified version of the semantic match that finds this problem is: (http://coccinelle.lip6.fr/) // <smpl> @forall@ idexpression *x; identifier f!=ERR_PTR; @@ x = f(...) ... when != x ( x = f(...,<+...x...+>,...) | * x = f(...) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: gadget: Add DEVTYPE support for Ethernet functionsMarcel Holtmann
The problem with Ethernet based networking devices is to clearly identify what's their usage. Special interfaces like bridges, WiFi, Bluetooth, WiMAX or WWAN are already using DEVTYPE identification. This patch marks the Ethernet functions of gadgets from the device type "gadget". Automatic setup of these interfaces can now happen from userspace without the need of hardcoding the network interface name. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: remove the berry_charge driverGreg Kroah-Hartman
The Barry project's userspace program, bcharge, can better handle this device and functionality, and it also works with the latest phones, which this driver does not support. So remove it, as the userspace code should be used instead. Cc: Chris Frey <cdfrey@foursquare.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: BKL removal from ioctl path of usbfsOliver Neukum
Total removal from the ioctl code path except for the outcall to external modules. Locking is ensured by the normal locks of usbfs. Signed-off-by: Oliver Neukum <oliver@neukum.org> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: BKL removal: frontierOliver Neukum
BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: BKL removal: vstusbOliver Neukum
BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: BKL removal: legousbtowerOliver Neukum
BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: BKL removal: ldusbOliver Neukum
BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: BKL removal: ftdi-elanOliver Neukum
BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: BKL removal: adutuxOliver Neukum
BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: BKL removal: idmouseOliver Neukum
BKL was not needed at all. Removed without replacement. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-02USB: BKL removal: rio500Oliver Neukum
This driver had used BKL to guard against disconnect but was incorrectly converted leaving an SMP race. BKL was added to disconnect() to fix this race BKL was removed from ioctl() as the mutex is sufficient on its own. Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>