Commit graph

322252 commits

Author SHA1 Message Date
Nicholas Bellinger 74f4cf2909 target: Fix regression bug with handling of zero-length data CDBs
This patch fixes a regression bug with the handling of zero-length
data CDBs within transport_generic_new_cmd() code.  The bug was introduced
with the following commit as part of the single task conversion work:

  commit 4101f0a89d
  Author: Christoph Hellwig <hch@infradead.org>
  Date:   Tue Apr 24 00:25:03 2012 -0400

      target: always allocate a single task

where the zero-length check for SCF_SCSI_DATA_SG_IO_CDB was incorrectly
changed to SCF_SCSI_CONTROL_SG_IO_CDB because of the seperate comment
in transport_generic_new_cmd() wrt to control CDBs zero-length handling
introduced in:

  commit 91ec1d3535
  Author: Nicholas Bellinger <nab@linux-iscsi.org>
  Date:   Fri Jan 13 12:01:34 2012 -0800

      target: Add workaround for zero-length control CDB handling

So go ahead and change transport_generic_new_cmd() to handle control+data
zero-length CDBs in the same manner for this special case.

Tested with iscsi-target + loopback fabric port LUNs on 3.6-rc0 code.

This patch will also need to be picked up for 3.5-stable.

(hch: Add proper comment in transport_generic_new_cmd)

Cc: Christoph Hellwig <hch@lst.de>
Cc: Roland Dreier <roland@purestorage.com>
Cc: Andy Grover <agrover@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2012-08-17 17:24:11 -07:00
NeilBrown e0ee778528 md/raid10: fix problem with on-stack allocation of r10bio structure.
A 'struct r10bio' has an array of per-copy information at the end.
This array is declared with size [0] and r10bio_pool_alloc allocates
enough extra space to store the per-copy information depending on the
number of copies needed.

So declaring a 'struct r10bio on the stack isn't going to work.  It
won't allocate enough space, and memory corruption will ensue.

So in the two places where this is done, declare a sufficiently large
structure and use that instead.

The two call-sites of this bug were introduced in 3.4 and 3.5
so this is suitable for both those kernels.  The patch will have to
be modified for 3.4 as it only has one bug.

Cc: stable@vger.kernel.org
Reported-by: Ivan Vasilyev <ivan.vasilyev@gmail.com>
Tested-by: Ivan Vasilyev <ivan.vasilyev@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2012-08-18 09:51:42 +10:00
Guenter Roeck af36107968 spi/coldfire-qspi: Drop extra calls to spi_master_get in suspend/resume functions
Suspend and resume functions call spi_master_get() without matching
spi_master_put(). The extra references are unnecessary and cause
subsequent module unload attempts to fail, so drop the calls.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-17 22:46:41 +01:00
Guenter Roeck a0c3652caa spi: spi-coldfire-qspi: Drop extra spi_master_put in device remove function
The call sequence spi_alloc_master/spi_register_master/spi_unregister_master is
complete; it reduces the device reference count to zero, which and results in
device memory being freed. The subsequent call to spi_master_put is unnecessary
and results in an access to free memory. Drop it.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-17 22:46:41 +01:00
Michel JAOUEN 6887237cd7 spi/pl022: fix spi-pl022 pm enable at probe
amba drivers does not need to enable pm runtime at probe.
amba_probe already enables pm runtime.

This rids this warning in the ux500 boot log:
ssp-pl022 ssp0: Unbalanced pm_runtime_enable!

Signed-off-by: Michel JAOUEN <michel.jaouen@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-17 22:46:41 +01:00
Mark Brown 28c42c2830 ASoC: wm9712: Fix inverted capture volume
The capture volume increases with the register value so it shouldn't be
flagged as inverted.

Reported-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-17 22:43:18 +01:00
Mark Brown ccf795847a ASoC: wm9712: Fix microphone source selection
Currently the microphone input source is not selectable as while there is
a DAPM widget it's not connected to anything so it won't be properly
instantiated. Add something more correct for the input structure to get
things going, even though it's not hooked into the rest of the routing
map and so won't actually achieve anything except allowing the relevant
register bits to be written.

Reported-by: Christop Fritz <chf.fritz@googlemail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@vger.kernel.org
2012-08-17 22:42:14 +01:00
Mark Brown 939d5044b1 ASoC: wm5102: Remove DRC2
It will be removed from future device revisions.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
2012-08-17 22:38:27 +01:00
Carlos Alberto Lopez Perez ad20c73b05 classmate-laptop: always call input_sync() after input_report_switch()
Due to commit cdda911c34 evdev only
becomes readable when the buffer contains an EV_SYN/SYN_REPORT event.

So in order to read the tablet sensor data as it happens we need to
ensure that we always call input_sync() after input_report_switch()

Signed-off-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:42 -04:00
Manoj Iyer a4f46bb9fa thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR
In the latest V-series bios DMI_PRODUCT_VERSION does not contain
the string Lenovo or Thinkpad, but is set to the model number, this
causes the thinkpad_acpi module to fail to load. Recognize laptop
as Lenovo using DMI_BIOS_VENDOR instead, which is set to Lenovo.

Test on V490u
=============
== After the patch ==

[ 1350.295757] thinkpad_acpi: ThinkPad ACPI Extras v0.24
[ 1350.295760] thinkpad_acpi: http://ibm-acpi.sf.net/
[ 1350.295761] thinkpad_acpi: ThinkPad BIOS H7ET21WW (1.00 ), EC unknown
[ 1350.295763] thinkpad_acpi: Lenovo LENOVO, model LV5DXXX
[ 1350.296086] thinkpad_acpi: detected a 8-level brightness capable ThinkPad
[ 1350.296694] thinkpad_acpi: radio switch found; radios are enabled
[ 1350.296703] thinkpad_acpi: possible tablet mode switch found; ThinkPad in laptop mode
[ 1350.306466] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
[ 1350.307082] Registered led device: tpacpi::thinklight
[ 1350.307215] Registered led device: tpacpi::power
[ 1350.307255] Registered led device: tpacpi::standby
[ 1350.307294] Registered led device: tpacpi::thinkvantage
[ 1350.308160] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
[ 1350.308333] thinkpad_acpi: Console audio control enabled, mode: monitor (read only)
[ 1350.312287] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input14

== Before the patch ==
sudo modprobe thinkpad_acpi
FATAL: Error inserting thinkpad_acpi (/lib/modules/3.2.0-27-generic/kernel/drivers/platform/x86/thinkpad_acpi.ko): No such device

Test on B485
=============
This patch was also test in a B485 where the thinkpad_acpi module does not
have any issues loading. But, I tested it to make sure this patch does not
break on already functioning models of Lenovo products.

[13486.746359] thinkpad_acpi: ThinkPad ACPI Extras v0.24
[13486.746364] thinkpad_acpi: http://ibm-acpi.sf.net/
[13486.746368] thinkpad_acpi: ThinkPad BIOS HJET15WW(1.01), EC unknown
[13486.746373] thinkpad_acpi: Lenovo Lenovo LB485, model 814TR01
[13486.747300] thinkpad_acpi: detected a 8-level brightness capable ThinkPad
[13486.752435] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is unblocked
[13486.752883] Registered led device: tpacpi::thinklight
[13486.752915] thinkpad_acpi: Standard ACPI backlight interface available, not loading native one
[13486.753216] thinkpad_acpi: Console audio control enabled, mode: monitor (read only)
[13486.757147] input: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input15

Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:42 -04:00
AceLan Kao a2174ba29a dell-laptop: Fixed typo in touchpad LED quirk
Fixed the typo introduced from the below commit
5f1e88f dell-laptop: Add 6 machines to touchpad led quirk

Reported-by: Carlos Alberto Lopez Perez <clopez@igalia.com>
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:42 -04:00
Seth Forshee e99eac5e4e vga_switcheroo: Don't require handler init callback
This callback is a no-op in nouveau, and the upcoming apple-gmux
switcheroo support won't require it either. Rather than forcing drivers
to stub it out, just make it optional and remove the callback from
nouveau.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:41 -04:00
Seth Forshee 36704c0c4c vga_switcheroo: Remove assumptions about registration/unregistration ordering
vga_switcheroo assumes that the handler will be registered before the
last client, otherwise switching will not be enabled. Likewise it's
assumed that the handler will not be unregistered without at least one
client also being unregistered, otherwise switching will remain enabled
despite no longer having a handler. These assumptions cannot be enforced
if the handler is in a separate driver from both clients, as with the
gmux found in Apple laptops. Remove this assumption.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:41 -04:00
Andreas Heider 76b487dd51 apple-gmux: Add display mux support
Add support for the gmux display muxing functionality and register a mux
handler with vga_switcheroo.

Signed-off-by: Andreas Heider <andreas@meetr.de>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:40 -04:00
Seth Forshee f94f0f103c apple-gmux: Fix kconfig dependencies
Fix the dependencies of apple-gmux to prevent it from being built-in
when one or more of its dependencies is built as a module. Otherwise it
can fail to build due to missing symbols.

v2: Add dependency on ACPI to fix build failure when ACPI=n

Reported-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:40 -04:00
AceLan Kao a50bd128f2 asus-wmi: record wlan status while controlled by userapp
If the user bit is set, that mean BIOS can't set and record the wlan
status, it will report the value read from id ASUS_WMI_DEVID_WLAN_LED
(0x00010012) while we query the wlan status by id ASUS_WMI_DEVID_WLAN
(0x00010011) through WMI.
So, we have to record wlan status in id ASUS_WMI_DEVID_WLAN_LED
(0x00010012) while setting the wlan status through WMI.
This is also the behavior that windows app will do.

Quote from ASUS application engineer
===
When you call WMIMethod(DSTS, 0x00010011) to get WLAN status, it may return

(1) 0x00050001 (On)
(2) 0x00050000 (Off)
(3) 0x00030001 (On)
(4) 0x00030000 (Off)
(5) 0x00000002 (Unknown)

(1), (2) means that the model has hardware GPIO for WLAN, you can call
WMIMethod(DEVS, 0x00010011, 1 or 0) to turn WLAN on/off.
(3), (4) means that the model doesn’t have hardware GPIO, you need to use
API or driver library to turn WLAN on/off, and call
WMIMethod(DEVS, 0x00010012, 1 or 0) to set WLAN LED status.
After you set WLAN LED status, you can see the WLAN status is changed with
WMIMethod(DSTS, 0x00010011). Because the status is recorded lastly
(ex: Windows), you can use it for synchronization.
(5) means that the model doesn’t have WLAN device.

WLAN is the ONLY special case with upper rule.

For other device, like Bluetooth, you just need use
WMIMethod(DSTS, 0x00010013) to get, and WMIMethod(DEVS, 0x00010013, 1 or 0)
to set.
===

Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:39 -04:00
Matthew Garrett 9f6f955ae4 apple_gmux: Fix ACPI video unregister
We were only calling acpi_video_unregister() if ACPI video support was built
in, not if it was a module.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
2012-08-17 17:34:39 -04:00
Matthew Garrett 96ff705638 apple_gmux: Add support for newer hardware
New gmux devices have a different method for accessing the registers.
Update the driver to cope. Incorporates feedback from Bernhard Froemel.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Bernhard Froemel <froemel@vmars.tuwien.ac.at>
Cc: Seth Forshee <seth.forshee@canonical.com>
2012-08-17 17:34:39 -04:00
Matthew Garrett 7e30ed6bdd gmux: Add generic write32 function
Move the special-cased backlight update function to a generic gmux_write32
function.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Seth Forshee <seth.forshee@canonical.com>
2012-08-17 17:34:38 -04:00
Linus Torvalds 846b99964a Grab bag of InfiniBand/RDMA fixes:
- IPoIB fixes for regressions introduced by path database conversion
  - mlx4 fixes for bugs with large memory systems and regressions from SR-IOV patches
  - RDMA CM fix for passing bad event up to userspace
  - Other minor fixes
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCAAGBQJQLo9cAAoJEENa44ZhAt0hPeUP/Ag1i164UE2e64sTfbVUfbEM
 7a+acsBo2ByQhVaXd65PZqm6+aYjosSwkStl0u4cb9Q3qQvYiZeLJj/qmInVV1hv
 qHuNytbnXl6W2f6vyz391TKx+X6uastlH7O4f4v0zS3zkrlkN9kCrN5dI1Fxm9ba
 5hluyggs7pVmHPX7KDGnQNZEjCsKoJF2kzB0hXwqGo1JxB2sEGq3DV/uMTHPgKKM
 HlrTJEEb7pOeHHf2Zt8MQiHMC0YBJ6MmpVIidR02TdQdCgZQcpoYnn20odmNLK5D
 HTT4jbCSsbOiHPpdAn0YkgzXzL58a2/b1Tt/pNq+Rud7VKwFVuFhNElPyAxR1/1K
 tPGUbDA6eOfosU++QbDJ0QHxDTgBTyXwh4yMkwPjmdWJ2jwTQev74iiDXgDf3QbS
 tMmWSwfC38hBxvfomNA6QTPvY1c3NNvj3uO+xq4/q6HloGqSlnIrPBL9hF0BiVQ6
 KteZ6gF+R1rHEIQraEnbNmh5Rxvi2RdgN0Xa0U9w/yr0LCowmUbFK35XoyTFyo/8
 rF7xp85s1wH5OuaA0NQeivQEKbuBxl7nvJlC2RBdRT/B9U5now+Y2XKOX0+FfRsg
 Qm0By/K8ss2XftX+lNfip+ScSmu9p+kCBME0X8Ra590VDt0IcPiJsC9ozhKyywRy
 KfSGj3iZG/nDaec6i1aN
 =hN/H
 -----END PGP SIGNATURE-----

Merge tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband

Pull infiniband/rdma fixes from Roland Dreier:
 "Grab bag of InfiniBand/RDMA fixes:
   - IPoIB fixes for regressions introduced by path database conversion
   - mlx4 fixes for bugs with large memory systems and regressions from
     SR-IOV patches
   - RDMA CM fix for passing bad event up to userspace
   - Other minor fixes"

* tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  IB/mlx4: Check iboe netdev pointer before dereferencing it
  mlx4_core: Clean up buddy bitmap allocation
  mlx4_core: Fix integer overflow issues around MTT table
  mlx4_core: Allow large mlx4_buddy bitmaps
  IB/srp: Fix a race condition
  IB/qib: Fix error return code in qib_init_7322_variables()
  IB: Fix typos in infiniband drivers
  IB/ipoib: Fix RCU pointer dereference of wrong object
  IB/ipoib: Add missing locking when CM object is deleted
  RDMA/ucma.c: Fix for events with wrong context on iWARP
  RDMA/ocrdma: Don't call vlan_dev_real_dev() for non-VLAN netdevs
  IB/mlx4: Fix possible deadlock on sm_lock spinlock
2012-08-17 11:45:58 -07:00
Linus Torvalds 225a389b31 TTY fixes for 3.6-rc3
Here are 4 tiny patches, each fixing a serial driver problem that people
 have reported.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAlAuh7MACgkQMUfUDdst+ym9lwCgyoxajRlnvg0aWD3WmThUt6dB
 qlEAn2NZCrMEqhyBF1f7XC7Z9ETE35Yo
 =m34T
 -----END PGP SIGNATURE-----

Merge tag 'tty-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull TTY fixes from Greg Kroah-Hartman:
 "Here are 4 tiny patches, each fixing a serial driver problem that
  people have reported.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'tty-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  pmac_zilog,kdb: Fix console poll hook to return instead of loop
  serial: mxs-auart: fix the wrong RTS hardware flow control
  serial: ifx6x60: fix paging fault on spi_register_driver
  serial: Change Kconfig entry for CLPS711X-target
2012-08-17 11:12:28 -07:00
Konrad Rzeszutek Wilk 3735d524da intel_idle: Check cpu_idle_get_driver() for NULL before dereferencing it.
If the machine is booted without any cpu_idle driver set
(b/c disable_cpuidle() has been called) we should follow
other users of cpu_idle API and check the return value
for NULL before using it.

Reported-and-tested-by: Mark van Dijk <mark@internecto.net>
Suggested-by: Jan Beulich <JBeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-08-17 19:37:14 +02:00
Jon Medhurst (Tixy) 5fbbb90dfd cpuidle: Prevent null pointer dereference in cpuidle_coupled_cpu_notify
When a kernel is built to support multiple hardware types it's possible
that CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is set but the hardware the
kernel is run on doesn't support cpuidle and therefore doesn't load a
driver for it. In this case, when the system is shut down,
cpuidle_coupled_cpu_notify() gets called with cpuidle_devices set to
NULL. There are quite possibly other circumstances where this
situation can also occur and we should check for it.

Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-08-17 19:37:08 +02:00
Colin Cross 63c6ba4352 cpuidle: coupled: fix sleeping while atomic in cpu notifier
The cpu hotplug notifier gets called in both atomic and non-atomic
contexts, it is not always safe to lock a mutex.  Filter out all events
except the six necessary ones, which are all sleepable, before taking
the mutex.

Signed-off-by: Colin Cross <ccross@android.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2012-08-17 19:37:01 +02:00
Rafael J. Wysocki 55d7ec4520 PM / Runtime: Check device PM QoS setting before "no callbacks" check
If __dev_pm_qos_read_value(dev) returns a negative value,
rpm_suspend() should return -EPERM for dev even if its
power.no_callbacks flag is set.  For this to happen, the device's
power.no_callbacks flag has to be checked after the PM QoS check,
so move the PM QoS check to rpm_check_suspend_allowed() (this will
make it cover idle notifications as well as runtime suspend too).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@vger.kernel.org
2012-08-17 19:36:36 +02:00
Rafael J. Wysocki 58a34de7b1 PM / Runtime: Clear power.deferred_resume on success in rpm_suspend()
The power.deferred_resume can only be set if the runtime PM status
of device is RPM_SUSPENDING and it should be cleared after its
status has been changed, regardless of whether or not the runtime
suspend has been successful.  However, it only is cleared on
suspend failure, while it may remain set on successful suspend and
is happily leaked to rpm_resume() executed in that case.

That shouldn't happen, so if power.deferred_resume is set in
rpm_suspend() after the status has been changed to RPM_SUSPENDED,
clear it before calling rpm_resume().  Then, it doesn't need to be
cleared before changing the status to RPM_SUSPENDING any more,
because it's always cleared after the status has been changed to
either RPM_SUSPENDED (on success) or RPM_ACTIVE (on failure).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@vger.kernel.org
2012-08-17 19:36:36 +02:00
Rafael J. Wysocki 7f321c26c0 PM / Runtime: Fix rpm_resume() return value for power.no_callbacks set
For devices whose power.no_callbacks flag is set, rpm_resume()
should return 1 if the device's parent is already active, so that
the callers of pm_runtime_get() don't think that they have to wait
for the device to resume (asynchronously) in that case (the core
won't queue up an asynchronous resume in that case, so there's
nothing to wait for anyway).

Modify the code accordingly (and make sure that an idle notification
will be queued up on success, even if 1 is to be returned).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable@vger.kernel.org
2012-08-17 19:36:35 +02:00
Linus Torvalds 557e2e2eef Staging fixes for 3.6-rc3
Here are some staging driver fixes (and iio driver fixes, they get lumped in
 with the staging stuff due to dependancies) for your 3.6-rc3 tree.
 
 Nothing major, just a bunch of fixes that people have reported.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAlAuezIACgkQMUfUDdst+ymuJgCeLF5xxKMN2qzkklpWqD7VrK26
 0MgAoMyQD4aPPkrgfJm6fobqfFMRl77m
 =1afu
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging fixes from Greg Kroah-Hartman:
 "Here are some staging driver fixes (and iio driver fixes, they get
  lumped in with the staging stuff due to dependancies) for your 3.6-rc3
  tree.

  Nothing major, just a bunch of fixes that people have reported.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'staging-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (26 commits)
  iio: lm3533-als: Fix build warnings
  staging:iio:ad7780: Mark channels as unsigned
  staging:iio:ad7192: Report offset and scale for temperature channel
  staging:iio:ad7192: Report channel offset
  staging:iio:ad7192: Mark channels as unsigned
  staging:iio:ad7192: Fix setting ACX
  staging:iio:ad7192: Add missing break in switch statement
  staging:iio:ad7793: Fix internal reference value
  staging:iio:ad7793: Follow new IIO naming spec
  staging:iio:ad7793: Fix temperature scale and offset
  staging:iio:ad7793: Report channel offset
  staging:iio:ad7793: Mark channels as unsigned
  staging:iio:ad7793: Add missing break in switch statement
  iio/adjd_s311: Fix potential memory leak in adjd_s311_update_scan_mode()
  iio: frequency: ADF4350: Fix potential reference div factor overflow.
  iio: staging: ad7298_ring: Fix maybe-uninitialized warning
  staging: comedi: usbduxfast: Declare MODULE_FIRMWARE usage
  staging: comedi: usbdux: Declare MODULE_FIRMWARE usage
  staging: comedi: usbduxsigma: Declare MODULE_FIRMWARE usage
  staging: csr: add INET dependancy
  ...
2012-08-17 10:17:03 -07:00
Linus Torvalds c83917976f Driver core fixes for 3.6-rc3
Here are two tiny patches, one fixing a dynamic debug problem that the printk
 rework turned up, and the other one fixing an extcon problem that people
 reported.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAlAueMIACgkQMUfUDdst+ymSRACgsoRAFYZMSG2bSCkM3LBHVpo6
 w1wAoMrN+5ooCJfnWrRftn/s0M7Tpocc
 =o7Cx
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg Kroah-Hartman:
 "Here are two tiny patches, one fixing a dynamic debug problem that the
  printk rework turned up, and the other one fixing an extcon problem
  that people reported.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'driver-core-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  extcon: extcon_gpio: Replace gpio_request_one by devm_gpio_request_one
  drivers-core: make structured logging play nice with dynamic-debug
2012-08-17 10:16:30 -07:00
Linus Torvalds d7d45fedf9 Char / Misc driver fixes for 3.6-rc3
Here are some small misc and w1 driver fixes for 3.6-rc3.  Nothing major, just
 some some bugfixes and a new device id for a w1 driver.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAlAuepoACgkQMUfUDdst+ykHxwCgubEWwHpCC/GApX+5bAxYmJzR
 keIAn0dL8oZrWujt6CrtzcV1rTxrGck8
 =8Lgu
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull Char / Misc driver fixes from Greg Kroah-Hartman:
 "Here are some small misc and w1 driver fixes for 3.6-rc3.  Nothing
  major, just some some bugfixes and a new device id for a w1 driver.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'char-misc-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
  1-Wire: Add support for the maxim ds1825 temperature sensor
  ti-st: Fix check for pdata->chip_awake function pointer
  mei: add mei_quirk_probe function
  mei: fix device stall after wd is stopped
2012-08-17 10:15:57 -07:00
Linus Torvalds 9134e7d270 USB patches for 3.6-rc3
Here are a number of small USB patches for 3.6-rc3.  The "large" one is just a
 number of device id updates to the option driver, done by the manufacturer,
 properly fixing up the device ids based on shipping devices.  Other than that,
 some gadget driver fixes, the obligitary XHCI patches, and some other device
 ids and bugs fixed.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.18 (GNU/Linux)
 
 iEYEABECAAYFAlAuedoACgkQMUfUDdst+yl2DwCgzuMNDjzik/MKCTTCYARznsJ0
 QIwAoMOGh+7xvCNYf9Cp8MMr/mmHZmF3
 =ZEBb
 -----END PGP SIGNATURE-----

Merge tag 'usb-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb

Pull USB patches from Greg Kroah-Hartman:
 "Here are a number of small USB patches for 3.6-rc3.

  The "large" one is just a number of device id updates to the option
  driver, done by the manufacturer, properly fixing up the device ids
  based on shipping devices.

  Other than that, some gadget driver fixes, the obligitary XHCI
  patches, and some other device ids and bugs fixed.

  Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>"

* tag 'usb-3.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (26 commits)
  USB: qcserial: fix port handling on Gobi 1K and 2K+
  USB: serial: Fix mos7840 timeout
  USB: option: add ZTE K5006-Z
  usb: gadget: u_ether: fix kworker 100% CPU issue with still used interfaces in eth_stop
  usb: host: tegra: fix warning messages in ehci_remove
  usb: host: mips: sead3: Update for EHCI register structure.
  usb: renesas_usbhs: fixup resume method for autonomy mode
  usb: renesas_usbhs: mod_host: add missing .bus_suspend/resume
  update MAINTAINERS for Oliver Neukum
  usb: usb_wwan: resume/suspend can be called after port is gone
  usb: serial: prevent suspend/resume from racing against probe/remove
  usb: usb_wwan: replace release and disconnect with a port_remove hook
  usb: serial: mos7840: Fixup mos7840_chars_in_buffer()
  USB: isp1362-hcd.c: usb message always saved in case of underrun
  OMAP: USB : Fix the EHCI enumeration and core retention issue
  usb: chipidea: fix and improve dependencies if usb host or gadget support is built as module
  USB: support the new interfaces of Huawei Data Card devices in option driver
  USB: ftdi_sio: Add VID/PID for Kondo Serial USB
  xhci: Switch PPT ports to EHCI on shutdown.
  xhci: Fix bug after deq ptr set to link TRB.
  ...
2012-08-17 10:14:53 -07:00
Jason Wang 0592969e73 hv: fail the probing immediately when we are not in hyperv platform
We wait for about 5 seconds for the success of the hyperv registration even if
we were not in hyperv platform. This is suboptimal, so the patch check the cpuid
in the beginning of hv_acpi_init() instead of in vmbus_bus_init() to fail the
probing immediately.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 09:51:59 -07:00
Randy Dunlap 0df7c0e3a7 scripts/kernel-doc: fix fatal script error
Fix fatal error in scripts/kernel-doc by ignoring the "__weak" attribute:

  Error(drivers/pci/pci.c:2820): cannot understand prototype: 'char * __weak pcibios_setup(char *str) '

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-08-17 09:19:07 -07:00
Linus Torvalds 0b0402d453 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull a Yama bugfix from James Morris.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security:
  Yama: access task_struct->comm directly
2012-08-17 09:17:11 -07:00
K. Y. Srinivasan 4a52c4af48 Tools: hv: Gather ipv[4,6] gateway information
Gather information on the default gateways - ipv4/ipv6.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 08:23:58 -07:00
K. Y. Srinivasan 6a60a6a8ea Tools: hv: Represent the ipv6 mask using CIDR notation
Transform ipv6 subnet information to CIDR notation.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 08:23:58 -07:00
K. Y. Srinivasan 0440578459 Tools: hv: Gather subnet information
Now, gather sub-net information for the specified interface.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 08:23:58 -07:00
K. Y. Srinivasan 0d5b6b197f Tools: hv: Gather address family information
Now, gather address family information for the specified interface.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 08:23:57 -07:00
K. Y. Srinivasan af733015c9 Tools: hv: Further refactor kvp_get_ip_address()
In preparation for making kvp_get_ip_address() more generic, factor out
the code for handling IP addresses.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 08:23:57 -07:00
K. Y. Srinivasan 0ecaa1985e Tools: hv: Prepare to expand kvp_get_ip_address() functionality
kvp_get_ip_address() implemented the functionality to retrieve IP address info.
Make this function more generic so that we could retrieve additional
per-interface information.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 08:23:57 -07:00
K. Y. Srinivasan 03db7724af Drivers: hv: kvp: Support the new IP injection messages
Implement support for the new IP injection messages in the driver code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 08:23:57 -07:00
Linus Torvalds 9d0f8140fc Enable atomic64 ops in C6X
- define L1_CACHE_SHIFT
   - select GENERIC_ATOMIC64
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABAgAGBQJQLk4dAAoJEOiN4VijXeFPPSoP/1rKoqVS46928wdHAFQbFMB2
 0bzU7W9B2NkQ7ZSVPV17qOkMA7N/TUWGYz30llkwLckkPmizQlDr4r4tRxosT38c
 a7jb90Ga8hZDbtNJBnD6GZbP6N0+2wGW/vCnJnOBc9tv5EqLSsoEXyoZrikmwcLN
 bW0/tzIo1B6S7FJPJq1fuZx42Ed6JgBAlWeieEYQvVdi5f8GAxLo4gOGP9rTwDkw
 sRipkLjniruuSPpTvP2OwI47kRmmbTjbSG+RSt9oWIniuP18EUUTE3aGU6NUcen4
 CzxRc4YpsfPoZPNs6QzOuU60abXNvqCSrYQ7AWfJqFwPpXyYzIiuOc/NolsO06cQ
 vdImlf5UUZPVfLUSMVsLtsJElosxUowYYa4912nRdiucOraVBmZlPOMRdwXNKQvU
 1PW7WH/b1VhawBENQzWzRU5w8Q4kDRu6J+xTx4UJUc0XTQ3Jhk+BU3uok5e3bMQM
 F1Pt6dWlafrFQhDTAKDaz9tX/xZRxt4ML3kIgBcB5XGFx09YrXsnmiktmEuYJd+Z
 QGa5gb+1PUgj6m6yWhOLcwT0tdL7AAeCOA53zTMC6NVEjfau7JvWtUiR/daeBiQa
 AOQVcDVGcIHwsM9BrKu2AcdSGNdW2dSD6SRwSAPAKSCcBiL05q18Q3k4bPj4/3KV
 vUrI160WeI2SwwaCTt5M
 =VtQY
 -----END PGP SIGNATURE-----

Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming

Pull C6X atomic64 support from Mark Salter:
 "Enable atomic64 ops in C6X
   - define L1_CACHE_SHIFT
   - select GENERIC_ATOMIC64"

* tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
  C6X: select GENERIC_ATOMIC64
  C6X: add Lx_CACHE_SHIFT defines
2012-08-17 08:10:12 -07:00
Linus Torvalds ef824bfba2 The following are all bug fixes and regressions. The most notable are
the ones which cause problems for ext4 on RAID --- a performance
 problem when mounting very large filesystems, and a kernel OOPS when
 doing an rm -rf on large directory hierarchies on fast devices.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQIcBAABCAAGBQJQLlVSAAoJENNvdpvBGATwhOYQAKx22YF9+SHnnVv2GtCQrsE6
 N3acE/FoDYiO1/LRa5M6NDO3ZIL4Vqi6409LYFQky/SQL8ziM5CBeLOBD9qPTE1L
 AGrzWn4vzZcjEf90ZEBN99fS5Uj1A9Axz2denxy7Hfb2HcSXfcuuVQXpdS42cFo8
 gwtlX4jxmPkbjRlAdeqYVBNuWpTZ0a+UyLc4A6v3aLcbzPSJvPYmI7mKCksiSySU
 yt0atjMDb56blAQJ2TITdAZN6rQShNzyok2pPfxaLusl5g0Gtjq8sSEPof1PQ1zq
 gDFc+kpZvUyPdwQzV3IL8+TodFFZ0x/2OhqoYCTKajROLHGjQFsdkb8EJbnNeDff
 EDxIjeVJR0kzSuSNWu+n5028lmEd9Sk7Ykr37cHeUxG8/0SADUqSDQYNhvbOPQsj
 iq5dwF79tKjuMqjJrABuWA1ZNgHBISXgyBmHLXgEk3LrgucT9UIg8Zlkhq480SYO
 JXhmkO2Ka4UwkVUShoWgRtEzRgUxhINBShs6g67zwm6slS4s2CWHnqhUn6EQe6+r
 DY/hoUA8KbdG3Cf5iJBFM2kUO68CDIXeJjocA7JvlouRgQSxmkOceIuk7DusAitM
 nHJKAtSNgC/z7yMoNi7YN0S5YYcCebmO1MEPzYSpPH07YwLJVNmh9Fk6BIfb7vi3
 vJSQMBrgGrbaXrnhBA7z
 =Zulv
 -----END PGP SIGNATURE-----

Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 bug fixes from Ted Ts'o:
 "The following are all bug fixes and regressions.  The most notable are
  the ones which cause problems for ext4 on RAID --- a performance
  problem when mounting very large filesystems, and a kernel OOPS when
  doing an rm -rf on large directory hierarchies on fast devices."

* tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: fix kernel BUG on large-scale rm -rf commands
  ext4: fix long mount times on very big file systems
  ext4: don't call ext4_error while block group is locked
  ext4: avoid kmemcheck complaint from reading uninitialized memory
  ext4: make sure the journal sb is written in ext4_clear_journal_err()
2012-08-17 08:04:47 -07:00
Ming Lei ab6dd8e5ec firmware loader: fix build failure if FW_LOADER is m
device_cache_fw_images need to iterate devices in system,
so this patch applies the introduced dpm_for_each_dev to
avoid link failure if CONFIG_FW_LOADER is m.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 07:37:35 -07:00
Ming Lei dfe3212e01 PM / Sleep: introduce dpm_for_each_dev
dpm_list and its pm lock provide a good way to iterate all
devices in system. Except this way, there is no other easy
way to iterate devices in system.

firmware loader need to cache firmware images for devices
before system sleep, so introduce the function to meet its
demand.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 07:37:35 -07:00
Ming Lei c08f67730a firmware loader: fix compile failure if !PM
'return 0' should be added to fw_pm_notify if !PM because
return value of the funcion is defined as 'int'.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-17 07:36:11 -07:00
Ian Kent d807ff838f autofs4 - fix expire check
In some cases when an autofs indirect mount is contained in a file
system that is marked as shared (such as when systemd does the
equivalent of "mount --make-rshared /" early in the boot), mounts
stop expiring.

When this happens the first expiry check on a mountpoint dentry in
autofs_expire_indirect() sees a mountpoint dentry with a higher
than minimal reference count. Consequently the dentry is condidered
busy and the actual expiry check is never done.

This particular check was originally meant as an optimisation to
detect a path walk in progress but with the addition of rcu-walk
it can be ineffective anyway.

Removing the test allows automounts to expire again since the
actual expire check doesn't rely on the dentry reference count.

Signed-off-by: Ian Kent <raven@themaw.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-08-17 06:56:39 -07:00
Theodore Ts'o 89a4e48f84 ext4: fix kernel BUG on large-scale rm -rf commands
Commit 968dee7722: "ext4: fix hole punch failure when depth is greater
than 0" introduced a regression in v3.5.1/v3.6-rc1 which caused kernel
crashes when users ran run "rm -rf" on large directory hierarchy on
ext4 filesystems on RAID devices:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000028

    Process rm (pid: 18229, threadinfo ffff8801276bc000, task ffff880123631710)
    Call Trace:
     [<ffffffff81236483>] ? __ext4_handle_dirty_metadata+0x83/0x110
     [<ffffffff812353d3>] ext4_ext_truncate+0x193/0x1d0
     [<ffffffff8120a8cf>] ? ext4_mark_inode_dirty+0x7f/0x1f0
     [<ffffffff81207e05>] ext4_truncate+0xf5/0x100
     [<ffffffff8120cd51>] ext4_evict_inode+0x461/0x490
     [<ffffffff811a1312>] evict+0xa2/0x1a0
     [<ffffffff811a1513>] iput+0x103/0x1f0
     [<ffffffff81196d84>] do_unlinkat+0x154/0x1c0
     [<ffffffff8118cc3a>] ? sys_newfstatat+0x2a/0x40
     [<ffffffff81197b0b>] sys_unlinkat+0x1b/0x50
     [<ffffffff816135e9>] system_call_fastpath+0x16/0x1b
    Code: 8b 4d 20 0f b7 41 02 48 8d 04 40 48 8d 04 81 49 89 45 18 0f b7 49 02 48 83 c1 01 49 89 4d 00 e9 ae f8 ff ff 0f 1f 00 49 8b 45 28 <48> 8b 40 28 49 89 45 20 e9 85 f8 ff ff 0f 1f 80 00 00 00

    RIP  [<ffffffff81233164>] ext4_ext_remove_space+0xa34/0xdf0

This could be reproduced as follows:

The problem in commit 968dee7722 was that caused the variable 'i' to
be left uninitialized if the truncate required more space than was
available in the journal.  This resulted in the function
ext4_ext_truncate_extend_restart() returning -EAGAIN, which caused
ext4_ext_remove_space() to restart the truncate operation after
starting a new jbd2 handle.

Reported-by: Maciej Żenczykowski <maze@google.com>
Reported-by: Marti Raudsepp <marti@juffo.org>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
2012-08-17 09:42:17 -04:00
Theodore Ts'o 0548bbb853 ext4: fix long mount times on very big file systems
Commit 8aeb00ff85a: "ext4: fix overhead calculation used by
ext4_statfs()" introduced a O(n**2) calculation which makes very large
file systems take forever to mount.  Fix this with an optimization for
non-bigalloc file systems.  (For bigalloc file systems the overhead
needs to be set in the the superblock.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
2012-08-17 09:23:00 -04:00
Theodore Ts'o 7a4c5de27e ext4: don't call ext4_error while block group is locked
While in ext4_validate_block_bitmap(), if an block allocation bitmap
is found to be invalid, we call ext4_error() while the block group is
still locked.  This causes ext4_commit_super() to call a function
which might sleep while in an atomic context.

There's no need to keep the block group locked at this point, so hoist
the ext4_error() call up to ext4_validate_block_bitmap() and release
the block group spinlock before calling ext4_error().

The reported stack trace can be found at:

	http://article.gmane.org/gmane.comp.file-systems.ext4/33731

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
2012-08-17 09:06:06 -04:00