Linus Torvalds [Wed, 3 Mar 2010 15:33:17 +0000 (07:33 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (48 commits)
IB/srp: Clean up error path in srp_create_target_ib()
IB/srp: Split send and recieve CQs to reduce number of interrupts
RDMA/nes: Add support for KR device id 0x0110
IB/uverbs: Use anon_inodes instead of private infinibandeventfs
IB/core: Fix and clean up ib_ud_header_init()
RDMA/cxgb3: Mark RDMA device with CXIO_ERROR_FATAL when removing
RDMA/cxgb3: Don't allocate the SW queue for user mode CQs
RDMA/cxgb3: Increase the max CQ depth
RDMA/cxgb3: Doorbell overflow avoidance and recovery
IB/core: Pack struct ib_device a little tighter
IB/ucm: Clean whitespace errors
IB/ucm: Increase maximum devices supported
IB/ucm: Use stack variable 'base' in ib_ucm_add_one
IB/ucm: Use stack variable 'devnum' in ib_ucm_add_one
IB/umad: Clean whitespace
IB/umad: Increase maximum devices supported
IB/umad: Use stack variable 'base' in ib_umad_init_port
IB/umad: Use stack variable 'devnum' in ib_umad_init_port
IB/umad: Remove port_table[]
IB/umad: Convert *cdev to cdev in struct ib_umad_port
...
* git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
[CIFS] pSesInfo->sesSem is used as mutex. Rename it to session_mutex and
[CIFS] Use unsigned ea length for clarity
cifs: set server_eof in cifs_fattr_to_inode
[CIFS] Minor cleanup to EA patch
cifs: merge CIFSSMBQueryEA with CIFSSMBQAllEAs
cifs: verify lengths of QueryAllEAs reply
cifs: increase maximum buffer size in CIFSSMBQAllEAs
cifs: rename name_len to list_len in CIFSSMBQAllEAs
cifs: clean up indentation in CIFSSMBQAllEAs
cifs: add parens around smb_var in BCC macros
Dmitry Torokhov [Thu, 25 Feb 2010 09:55:37 +0000 (01:55 -0800)]
Regulators: wm8400 - cleanup platform driver data handling
On Wed, Feb 24, 2010 at 08:40:56PM +0000, Mark Brown wrote:
> On Wed, Feb 24, 2010 at 11:21:26AM -0800, Dmitry Torokhov wrote:
> > On Wed, Feb 24, 2010 at 07:14:03PM +0000, Mark Brown wrote:
>
> > > This doesn't help unless you also provide a way for users to obtain a
> > > struct wm8400.
>
> > Why would they need it? Only code that creates instances of wm8400 needs
> > to know the definition of the sturcture, the rest can simply pass the
> > pointer around.
>
> > I guess there is disconnect between us and I do not see any users of
> > wm8400_register_regulator() in linux-next... Is there another tree I
> > could peek at?
>
> There are no users in mainline. This would be called by board specific
> code from the init callback of the wm8400 - you'd need to pass that
> callback the struct wm8400.
>
> In any case, this is clearly an unrelated change to whatever else you
> were doing to the driver so should be split off into a separate patch,
> but if this is being changed at all then it'd be much more sensible to
> change it to use a more modern pattern which completely removes the
> wm8400_register_regulator() function and just uses platform data.
Fair enough, I removed the offending part, updated patch below.
--
Dmitry
regulator: wm8400 - cleanup platform driver data handling
Driver data set by platform_set_drvdata() is for private use of
the driver currently bound to teh device and not for use by parent,
subsystem and anyone else.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Dmitry Torokhov [Wed, 24 Feb 2010 07:38:17 +0000 (23:38 -0800)]
Regulators: lp3971 - fail if platform data was not supplied
There is no point in completing probe if platform data is missing so
let's abort loading early.
Also, use kcalloc when allocating several instances of the same data
structure and mark setup_regulators() as __devinit since it is only
called from lp3971_i2c_probe() which is __devinit.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Dmitry Torokhov [Wed, 24 Feb 2010 07:37:55 +0000 (23:37 -0800)]
Regulators: fixed - annotate probe and remove methods
Add __devinit/__devexit markings to probe and remove methids of the
driver, change types of variables containing boolean data to boolean,
set up driver's owner field so we have proper sysfs link between
driver and the module.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Dmitry Torokhov [Wed, 24 Feb 2010 07:37:50 +0000 (23:37 -0800)]
Regulators: ab3100 - fix probe and remove annotations
Probe and remove methods should not be marked as __init/__exit but
rather __devinit/__devexit so that the needed sections stay in memory
in presence of CONFIG_HOTPLUG. This is needed even on non hotpluggable
buses.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Dmitry Torokhov [Wed, 24 Feb 2010 07:37:44 +0000 (23:37 -0800)]
Regulators: virtual - use sysfs attribute groups
Instead of open-coding sysfs attribute group use canned solution.
Also add __devinit/__devexit markups for probe and remove methods
and use 'bool' where it makes sense.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Rajendra Nayak [Wed, 17 Feb 2010 15:24:15 +0000 (20:54 +0530)]
twl6030: regulator: Configure STATE register instead of REMAP
This is no REMAP register on twl6030, instead there is a STATE register
to drive a resource to a given state.
The state register can be used to specify what state the resource should
enter when its associated with a GRP.
Register Bit field description is as below. The patch programmes the
corresponding STATE registers for all LDO's to turn ON when assocaited
with GRP_P1.
State can be specified as below
00: OFF
01: ON
10: OFF
11: SLEEP
Signed-off-by: Rajendra Nayak <rnayak@ti.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Cc: Samuel Ortiz <sameo@linux.intel.com> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Fri, 12 Feb 2010 10:18:08 +0000 (10:18 +0000)]
regulator: Provide optional dummy regulator for consumers
In order to ease transitions with drivers are boards start using regulators
provide an option to cause all regulator_get() calls to succeed, with a
dummy always on regulator being supplied where one has not been configured.
A warning is printed whenever the dummy regulator is used to aid system
development.
This regulator does not implement any regulator operations but will allow
simple consumers which only do enable() and disable() calls to run. It
is kept separate from the fixed voltage regulator to avoid Kconfig
confusion on the part of users when it is extended to allow boards to
explicitly use the dummy regulator to simplify cases where the majority
of supplies are from fixed regulators without software control.
This option is currently only effective for systems which do not specify
full constriants. If required an override could also be provided to allow
these systems to use the dummy regulator, though it is likely that
unconfigured supplies on such systems will lead to error due to
regulators being powered down more aggressively when not in use.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Thu, 11 Feb 2010 17:22:45 +0000 (17:22 +0000)]
regulator: Assume regulators are enabled if they don't report anything
If a regulator driver does not provide a way to query if the driver is
enabled then assume that it is enabled. This is very likely to reflect
the actual state is more useful for callers than reporting an error.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Mon, 25 Jan 2010 19:41:57 +0000 (19:41 +0000)]
regulator: Add WM8994 regulator support
The WM8994 contains two LDOs with mixed hardware/software control to
minimise the number of external supplies required while delivering
optimal voltages to minimise power consumption.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Alex Chiang [Tue, 26 Jan 2010 04:14:37 +0000 (21:14 -0700)]
regulator: trivial: fix typos in user-visible Kconfig text
Fix Kconfig text for some Wolfson Micro devices.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Alex Chiang <achiang@hp.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Alberto Panizzo [Tue, 19 Jan 2010 11:48:54 +0000 (12:48 +0100)]
regulator: mc13783: consider Power Gates as digital regulators.
GPO regulators are digital outputs that can be enabled or disabled by a
dedicated bit in mc13783 POWERMISC register.
In this family can be count in also Power Gates (PWGT1 and 2): enabled by
a dedicated pin a Power Gate is an hardware driven supply where the output
(PWGTnDRV) follow this law:
Bit PWGTxSPIEN | Pin PWGTxEN | PWGTxDRV | Read Back
0 = default | | | PWGTxSPIEN
---------------+-------------+----------+------------
1 | x | Low | 0
0 | 0 | High | 1
0 | 1 | Low | 0
As read back value of control bit reflects the PWGTxDRV state (not the
control value previously written) and mc13783 POWERMISC register contain
only regulator related bits, a dedicated function to manage these bits is
created here with the aim of tracing the real value of PWGTxSPIEN bits
and reproduce it on next writes.
All POWERMISC users _must_ use the new function to not accidentally
disable Power Gates supplies.
v2 changes:
-Better utilization of abstraction layers.
-Voltage query support. GPO's and PWGTxDRV are fixed voltage regulator
with voltage value of 3.1V and 5.5V respectively.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Adrian Hunter [Tue, 12 Jan 2010 10:25:13 +0000 (12:25 +0200)]
regulator: Add 'start-up time' to fixed voltage regulators
Add a field to specify a delay for the start-up time of
a fixed voltage regulator.
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Mon, 21 Dec 2009 12:21:52 +0000 (12:21 +0000)]
regulator: Allow regulators to specify the time taken to ramp on enable
Regulators may sometimes take longer to enable than the control operation
used to do so, either because the regulator has ramp rate control used to
limit inrush current or because the control operation is very fast (GPIO
being the most common example of this). In order to ensure that consumers
do not rely on the regulator before it is enabled provide an enable_time()
operation and have the core delay for that time before returning to the
caller.
This is implemented as a function since the ramp rate may be specified in
voltage per unit time and therefore the time depend on the configuration.
In future it would be desirable to allow the bulk operations to run the
delays for multiple enables in parallel but this is not currently supported.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown [Tue, 1 Dec 2009 21:12:27 +0000 (21:12 +0000)]
regulator: Add notifier event on regulator disable
The intended use case is for drivers which disable regulators to save
power but need to do some work to restore the hardware state when
restarting. If the supplies are not actually disabled due to board
limits or sharing with other active devices this notifier allows the
driver to avoid unneeded reinitialisation, particularly when used with
runtime PM.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Alberto Panizzo [Mon, 14 Dec 2009 17:26:38 +0000 (18:26 +0100)]
regulator: add voltage selection capability to mc13783 regulators v2 .
This patch, complete the mc13783 regulator subsystem driver with
voltage selecting capability.
Main Switches (SW1AB, SW2AB) are not supported yet.
version 2 diffs:
- delete the "Switchers PLL" enable and multiplication factor value
selecting capability because it is not a voltage or current regulator.
This will be a part of Main switcher supporting task.
- Correct many coding style problems pointed me out.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
pcmcia: disable pcmcia ioctl for !ARM, prepare for removal
The PCMCIA ioctl -- deprecated for years -- suffers from insufficient
locking. As it already has been deprecated for years, with its removal
long overdue, limit it to !SMP and !PREEMPT.
Furthermore, the last legitimate use of the ioctl to be reported
relates to the ARM architecture in 2008.[1] Attempts to resolve
this issue turned out unsuccessful so far.[2] Other usages have only
been reported as hear-say. If there are any legitiate and necessary
use-cases remaining, please speak out before the end of the grace
period until 2.6.3{5,6}(-rc1).
[1] http://lists.infradead.org/pipermail/linux-pcmcia/2008-April/005440.html
see also: http://lkml.org/lkml/2008/2/27/291
[2] http://lists.infradead.org/pipermail/linux-pcmcia/2008-April/005450.html
http://lists.infradead.org/pipermail/linux-pcmcia/2010-January/006740.html
see also: http://lists.infradead.org/pipermail/linux-pcmcia/2008-April/005453.html
CC: Russell King <rmk+kernel@arm.linux.org.uk> CC: Alan Cox <alan@lxorguk.ukuu.org.uk> CC: Robert P. J. Day <rpjday@crashcourse.ca> CC: Jaswinder Singh Rajput <jaswinder@kernel.org> CC: linux-kernel@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Fix most of the remaining CodingStyle issues in drivers/pcmcia , which
related to wrong indent -- PCMCIA historically used 4 spaces. Also, remove
a custom min() implementation with the generic one.
Dave Airlie [Tue, 2 Mar 2010 23:26:35 +0000 (09:26 +1000)]
vga_switcheroo: disable default y by new rules.
Another undocumented rule of kernel folklore, no default y
config options anymore, apparantly hinting to distros they might
want something isn't preferred anymore.
Johan Hovold [Thu, 25 Feb 2010 19:19:10 +0000 (20:19 +0100)]
USB: ftdi_sio: remove obsolete check in unthrottle
No need to check ASYNCB_INITIALIZED anymore as commit e1108a63e10d344284011cccc06328b2cd3e5da3 (usb_serial: Use the shutdown()
operation) make sure that there is no longer any call to unthrottle
after device specific close (in which the read urb is killed).
Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Williams [Thu, 25 Feb 2010 18:39:20 +0000 (10:39 -0800)]
USB: qcaux: driver for auxiliary serial ports on Qualcomm devices
qcaux: add driver for QCDM-capable ports on various devices
Many Qualcomm-based devices provide a CDC-ACM port which accepts
normal AT commands and PPP connections. But they only provide one
which makes status or signal strength requests impossible while
PPP is active. They also provide secondary USB interfaces that
talk the Qualcomm Diagnostic Monitor (QCDM) protocol which can be
used for status and strength. Make those QCDM ports accessible.
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
John Tsiombikas [Thu, 25 Feb 2010 15:09:08 +0000 (17:09 +0200)]
USB: pl2303: initial TIOCGSERIAL support
I've got a trivial patch for the pl2303 driver, that's what I needed to
make the wacom serial tablet driver work properly. It uses the
TIOCGSERIAL ioctl to determine if it's talking to a serial device or
not, which I gather is rather common, but the pl2303 driver didn't
implement that ioctl.
Here's a patch, I'm not sure it's absolutely correct, I mostly looked at
other similar usbserial drivers to see what I must do, but it works for
me.
Signed-off-by: John Tsiombikas <nuclear@member.fsf.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Williams [Wed, 17 Feb 2010 02:43:29 +0000 (18:43 -0800)]
USB: option: add Longcheer/Longsung vendor ID
Longcheer is a Chinese company that manufactures the devices which a
bunch of different companies like Alcatel, 4G Systems, and Mobidata
rebrand. While I can't find Longcheer's USB ID registered anywhere,
it's pretty clear the ID is theirs.
Signed-off-by: Dan Williams <dcbw@redhat.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pete Zaitcev [Sat, 20 Feb 2010 06:55:57 +0000 (23:55 -0700)]
USB: usbmon: mask seconds properly in text API
The code does not implement the comment, so timestamps for long traces
become confusing instead of wrapping neatly as expected. This was actually
observed. Fortunately for API being in debugfs, we can just fix this instead
of staying bug-for-bug compatible. Double fortunately, the stable binary
API is not affected.
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Wed, 17 Feb 2010 15:05:47 +0000 (10:05 -0500)]
USB: remove references to port->port.count from the serial drivers
This patch (as1344) removes references to port->port.count from the
USB serial drivers. Now that serial ports are properly reference
counted, port.count checking is unnecessary and incorrect. Drivers
should assume that the port is in use from the time the open method
runs until the close method is called.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Cox [Thu, 18 Feb 2010 16:44:01 +0000 (16:44 +0000)]
USB: tty: Prune uses of tty_request_room in the USB layer
We have lots of callers that do not need to do this in the first place.
Remove the calls as they both cost CPU and for big buffers can mess up the
multi-page allocation avoidance.
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roel Kluin [Thu, 18 Feb 2010 01:36:23 +0000 (02:36 +0100)]
USB: don't read past config->interface[] if usb_control_msg() fails in usb_reset_configuration()
While looping over the interfaces, if usb_hcd_alloc_bandwidth() fails it calls
hcd->driver->reset_bandwidth(), so there was no need to reinstate the interface
again.
If no break occurred, the index equals config->desc.bNumInterfaces. A
subsequent usb_control_msg() failure resulted in a read from
config->interface[config->desc.bNumInterfaces] at label reset_old_alts.
In either case the last interface should be skipped.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Acked-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roel Kluin [Wed, 17 Feb 2010 10:50:26 +0000 (11:50 +0100)]
USB: storage: fix misplaced parenthesis
Due to a misplaced parenthesis the usbat_write_block() return value was not
stored, but a boolean. USB_STOR_TRANSPORT_NO_SENSE and USB_STOR_TRANSPORT_ERROR
were returned as USB_STOR_TRANSPORT_FAILED.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Joe Perches <joe@perches.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dennis O'Brien [Mon, 15 Feb 2010 16:50:38 +0000 (08:50 -0800)]
USB: vstusb.c: removal of driver for Vernier Software & Technology, Inc., devices and spectrometers
This patch removes the vstusb driver and support from the Linux tree.
This driver provided support for Vernier Software & Technology devices
and spectrometers (Ocean Optics). This driver is being replaced by a
user space - libusb - implementation.
Signed-off-by: Jim Collar <jim.collar@eqware.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Fri, 26 Feb 2010 16:49:39 +0000 (11:49 -0500)]
usb-storage: use max_hw_sectors instead of max_sectors
This patch (as1347) makes some adjustments to the way usb-storage
handles the request-queue parameters.
USB host controllers are able to handle arbitrarily long
scatter-gather lists, since they are limited only by main memory and
not by the controller hardware. Hence the sg_tablesize field in the
host template can be increased to the maximum value.
Drivers like usb-storage aren't supposed to touch the queue's
max_sectors parameter; instead they are supposed to use the
max_hw_sectors value. Accordingly, the patch replaces calls of
queue_max_sectors() with calls of queue_max_hw_sectors(). Oddly
enough, the blk_queue_max_sectors() routine is nevertheless still
appropriate.
The existing code imposes a limit of SCSI_DEFAULT_MAX_SECTORS (1024)
on the values accepted by the max_sectors attribute file. There's no
reason not to accept larger values, so the limit is removed. (It
would be nice to change the file's name to max_hw_sectors, but the old
name is already a well-established API.)
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 12 Feb 2010 19:52:34 +0000 (23:52 +0400)]
USB: OHCI: DA8xx/OMAP-L1x glue layer
Texas Instruments DA8xx/OMAP-L1x OHCI glue layer.
This OHCI implementation is not without quirks: there's only one physical port
despite the root hub reporting two; the port's power control and over-current
status bits are not connected to any pins, however, at least on the DA830 EVM
board, those signals are connected via GPIO, thus the provision was made for
overriding the OHCI port power and over-current bits at the board level...
Anand Gadiyar [Fri, 12 Feb 2010 12:18:59 +0000 (17:48 +0530)]
USB: ehci: omap: use default interrupt threshold
The current driver reduces the interrupt threshold to 1 microframe.
This was an accidental change and is not really required.
The default of 8 microframes will do just fine. So change it back.
Anand Gadiyar [Fri, 12 Feb 2010 12:24:59 +0000 (17:54 +0530)]
USB: omap: ehci: kill 2 compile warnings
Kill these compile warnings:
CC [M] drivers/usb/host/ehci-hcd.o
drivers/usb/host/ehci-dbg.c:45: warning: 'dbg_hcs_params' defined but not used
drivers/usb/host/ehci-dbg.c:89: warning: 'dbg_hcc_params' defined but not used
Elina Pasheva [Mon, 15 Feb 2010 22:50:14 +0000 (14:50 -0800)]
USB: serial: sierra driver indat_callback fix
A crash has been reported with sierra driver on disconnect with
Ubuntu/Lucid distribution based on kernel-2.6.32.
The cause of the crash was determined as "NULL tty pointer was being
referenced" and the NULL pointer was passed by sierra_indat_callback().
This patch modifies sierra_indat_callback() function to check for NULL
tty structure pointer. This modification prevents a crash from happening
when the device is disconnected.
This patch fixes the bug reported in Launchpad:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/511157
Elina Pasheva [Fri, 12 Feb 2010 02:37:40 +0000 (18:37 -0800)]
USB: serial: sierra driver adding reset_resume function
This patch adds a new function to the sierra.c driver, sierra_reset_resume().
This new function completes the suite of Dynamic Power Management commands
in the sierra.c driver.
According "5.3.6 Capability Parameters (HCCPARAMS)" of xHCI rev0.96 spec,
value of xECP register indicates a relative offset, in 32-bit words,
from Base to the beginning of the first extended capability.
The wrong calculation will cause BIOS handoff fail (not handoff from BIOS)
in some platform with BIOS USB legacy sup support.
Signed-off-by: Edward Shao <laface.tw@gmail.com> Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jason Wessel [Fri, 5 Feb 2010 17:49:05 +0000 (11:49 -0600)]
USB: ehci-dbgp: split PID register updates for IN and OUT pipes
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>
Forest Bond [Fri, 5 Feb 2010 16:30:28 +0000 (11:30 -0500)]
USB: serial: Add support for ViVOtech ViVOpay devices.
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>
Eirik Aanonsen [Fri, 5 Feb 2010 08:49:25 +0000 (09:49 +0100)]
USB: atmel uaba: Adding invert vbus_pin
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.
Christoph Egger [Fri, 5 Feb 2010 12:24:12 +0000 (13:24 +0100)]
USB: Remove unsupported usb gadget drivers
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>
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>
Catalin Marinas [Tue, 2 Feb 2010 15:31:02 +0000 (15:31 +0000)]
USB: isp1760: Flush the D-cache for the pipe-in transfer buffers
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>
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>
USB: g_mass_storage: superfluous and missing packets fixed
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>
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>
Cliff Cai [Fri, 29 Jan 2010 01:43:44 +0000 (20:43 -0500)]
USB: musb: set version of Blackfin version
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>
Robert Jarzmik [Wed, 27 Jan 2010 17:38:03 +0000 (18:38 +0100)]
USB: pxa27x_udc: Fix deadlocks on request queueing
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>
Mike Dunn [Tue, 26 Jan 2010 17:12:12 +0000 (12:12 -0500)]
USB: serial: add support for serial port on the moschip 7715
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>
Dan Carpenter [Mon, 25 Jan 2010 11:53:33 +0000 (14:53 +0300)]
USB: io_edgeport: eliminate get_string()
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>
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)
Felipe Balbi [Thu, 21 Jan 2010 13:33:58 +0000 (15:33 +0200)]
USB: musb: only print info message if probe() is successful
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>