6 years agoasoc: alc5640: Mic noise gate
Scott Peterson [Wed, 6 Mar 2013 23:53:03 +0000]
asoc: alc5640: Mic noise gate

Enabled noise gate and high pass wind filter
to improve recording performance.

Bug 1234255

Change-Id: I57f4580b979356ec800500d1879e825655058a20
Signed-off-by: Scott Peterson <speterson@nvidia.com>
Reviewed-on: http://git-master/r/206858
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rahul Mittal <rmittal@nvidia.com>
Tested-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-by: Niranjan Wartikar <nwartikar@nvidia.com>
Reviewed-by: Vijay Mali <vmali@nvidia.com>

6 years agoasoc: alc5640 Heaphone gain boost
Scott Peterson [Mon, 25 Feb 2013 22:24:16 +0000]
asoc: alc5640 Heaphone gain boost

Modified rt5640.c to enable greater output swing
by enabling dynamic control of charge pump as well
as adding headphone DC calibration and power
management changes.

bug 1211589

Change-Id: Icc3a6253c1456d8d66da9c8a04e05a54ae211391
Signed-off-by: Scott Peterson <speterson@nvidia.com>
Reviewed-on: http://git-master/r/206851
GVS: Gerrit_Virtual_Submit
Reviewed-by: Rahul Mittal <rmittal@nvidia.com>
Tested-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-by: Vijay Mali <vmali@nvidia.com>

6 years agoRevert "mmc: core: Support packed command for eMMC4.5 device"
Naveen Kumar Arepalli [Mon, 4 Mar 2013 10:48:00 +0000]
Revert "mmc: core: Support packed command for eMMC4.5 device"

Packed command implementation is available in Upstream.
Use Upstream Packed comamnd code.

Bug 1242730

This reverts commit fa3a748000b65ad4854a95761b6067f89f1c4c61.

Change-Id: I807d6911aa20e9fe1664686bf43811bec7d274f5
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/206215
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agovideo: tegra: host: Debug dump to use trylock
Terje Bergstrom [Tue, 19 Feb 2013 08:34:34 +0000]
video: tegra: host: Debug dump to use trylock

Use mutex_trylock() instead of mutex_lock() in debug dump. Debug dump
is not safety critical, so it's ok to sometimes dump state of a
channel that has been torn down.

This fixes a deadlock when channel close waits on queue to clear up
with reflock acquired, submit in queue times out, and timeout code
tries to acquire reflock at debug dump.

Bug 1240952

Change-Id: Ice9bd3c617808d0b3178912358d7c90f30765be4
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/201974
(cherry picked from commit 886f8fd9372f3f612ab8c1a9fc6eb3cc118c1732)
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/206162
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoARM: tegra: Roth: Set SD clock to 156 MHZ
Naveen Kumar Arepalli [Thu, 28 Feb 2013 11:27:12 +0000]
ARM: tegra: Roth: Set SD clock to 156 MHZ

1. Adding vdd_core regulators for sdmmc3 to be used for
setting core voltage constraints during frequency tuning.

2. Pass nominal core voltage value through mmc platform data to be used
for setting core voltage constraints during tuning.

3. Setting SD clock to 156MHz in SDR104 mode.

Change-Id: Ie48df23c051b0251f037dd4ba942cec570eefd90
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/205101
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoARM: tegra: Pluto: Set SD clock to 156 MHZ
Naveen Kumar Arepalli [Thu, 28 Feb 2013 11:10:20 +0000]
ARM: tegra: Pluto: Set SD clock to 156 MHZ

1. Adding vdd_core regulators for sdmmc3 to be used for
setting core voltage constraints during frequency tuning.

2. Pass nominal core voltage value through mmc platform data to be used
for setting core voltage constraints during tuning.

3. Setting SD clock to 156MHz in SDR104 mode.

Change-Id: I5d1dcb8df95da3ef848414ab723dd8a39fabc32b
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/205097
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agowatchdog: tegra: fix reboot reason
Xin Xie [Wed, 20 Feb 2013 21:52:59 +0000]
watchdog: tegra: fix reboot reason

bug 1239765

Change-Id: Ia2c5c83c0489b21d3fb5dcc005a9b7c07fb9b98c
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/202662
(cherry picked from commit 81ca50a9905bd2740b905d3861d0bc6b078c68b1)
Reviewed-on: http://git-master/r/205286
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoarm: tegra: pluto: add CPU watchdog device
Xin Xie [Tue, 19 Feb 2013 20:43:33 +0000]
arm: tegra: pluto: add CPU watchdog device

bug 1239979

Change-Id: I0920f645f34bb22e3c8e4925a294252b1774605b
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/202151
(cherry picked from commit dc82319dbbfb7a7a2ae6a9026b9cb3180588bed0)
Reviewed-on: http://git-master/r/205285
Reviewed-by: Riham Haidar <rhaidar@nvidia.com>
Tested-by: Riham Haidar <rhaidar@nvidia.com>

6 years agowatchdog: tegra: add tegra11x support
Xin Xie [Tue, 19 Feb 2013 19:21:37 +0000]
watchdog: tegra: add tegra11x support

bug 1239979

Change-Id: I4ca7e4682bf2b27254024f9e8236c7e8868b4e73
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/202740
(cherry picked from commit ddeeb47d676652dacfba7edf79fb423e48513a31)
Reviewed-on: http://git-master/r/205284
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agommc: tegra: move postreset code to reset exit
Naveen Kumar Arepalli [Thu, 7 Mar 2013 09:01:19 +0000]
mmc: tegra: move postreset code to reset exit

move postreset code to reset exit.

Bug 1239457

Change-Id: Icb5f2f3f0dbf8c7d89c3eca7e7df13b71d2db1ce
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/207014
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoARM: tegra: macallan:Enable vbus detect through PMU
Rakesh Bodla [Thu, 7 Mar 2013 07:22:13 +0000]
ARM: tegra: macallan:Enable vbus detect through PMU

Enable vbus detect through PMU on macallan.

Bug 1242710

Change-Id: I998e5976d7e1baa861b596fd195a8150430d68fa
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/206994
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Harry Hong <hhong@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agoARM: tegra: usb_phy: add vbus detect through PMU
Rakesh Bodla [Thu, 7 Mar 2013 07:20:53 +0000]
ARM: tegra: usb_phy: add vbus detect through PMU

Adding the support to detect usb device cable
using PMU.

Bug 1242710

Change-Id: Iba7aee329c1e1e714dd4eb71d655c8307e7626c4
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/206993
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Harry Hong <hhong@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agousb: udc: tegra: add vbus detect through PMU
Rakesh Bodla [Thu, 7 Mar 2013 07:19:14 +0000]
usb: udc: tegra: add vbus detect through PMU

Adding the support to detect usb device cable
using PMU.

Bug 1242710

Change-Id: I02b21df4e03d15e032a1c5b467fa1bfbd0ac68ac
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/206992
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Harry Hong <hhong@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agovideo: tegra: dc fix bw overflow issue
Jihoon Bang [Thu, 7 Mar 2013 02:17:23 +0000]
video: tegra: dc fix bw overflow issue

There is a corner case where bw is larger than ULONG_MAX,
but freq is smaller than ULONG_MAX.
Apply clipping condition to frequency instead of bandwidth.

Bug 1248607

Change-Id: I936d1de3152738cf33f2dfddfc818c394cb82612
Signed-off-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-on: http://git-master/r/206904
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agoasoc: tegra: aic326x: Add support for BT voice call recording
Rahul Mittal [Wed, 6 Mar 2013 14:27:29 +0000]
asoc: tegra: aic326x: Add support for BT voice call recording

Added BT voice call recording support
Call recording works fine on BT and normal call switching

Bug 1247059

Change-Id: Ide4e0ed0b69485dd9d7f0a2877970b3fe04b1f38
Signed-off-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-on: http://git-master/r/206692
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoarm: tegra: macallan: update power sequence for camera
Kerwin Wan [Wed, 6 Mar 2013 05:16:25 +0000]
arm: tegra: macallan: update power sequence for camera

Add vdd_af_cam1 regulator control to avoid the i2c bus
to be hooked up

Bug 1241115
Bug 1241085

Change-Id: Ie908ff3d8883af5563c294d787c01e15f0c6d9b9
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/206593
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Charlie Huang <chahuang@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoARM: tegra11: clock: Don't report PLLC2/C3 lock timeout
Alex Frid [Tue, 5 Mar 2013 00:32:02 +0000]
ARM: tegra11: clock: Don't report PLLC2/C3 lock timeout

- Since PLLC2/C3 lock bits may fluctuate after pll is locked, don't
report timeout in this case.
- Expanded lock timeout message with the state of lock register

Bug 1057353
Bug 1213649
Bug 1232950

Change-Id: I33666bccba098733f29b01ffb3518e79603e3abf
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/206173
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoarm: tegra: Turn on hw phase in for PRISM on Macallan
Mitch Luban [Mon, 4 Mar 2013 18:20:57 +0000]
arm: tegra: Turn on hw phase in for PRISM on Macallan

HW phase in is needed for extreme cases where flicker is
observed.

Bug 1246154

Change-Id: Ia8b37495ea2be9aa88c11ebdec5cb2523dc505f6
Signed-off-by: Mitch Luban <mluban@nvidia.com>
Reviewed-on: http://git-master/r/205970
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agoinput: touch: raydium: update touch response
David Jung [Wed, 27 Feb 2013 02:22:43 +0000]
input: touch: raydium: update touch response

Nvidia updates to allow touch to work
after resume.

Bug 1241633

Change-Id: If07272550b9c7892e5c02c3e242f219b0a2f68e9
Signed-off-by: David Jung <djung@nvidia.com>
Reviewed-on: http://git-master/r/204809
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Robert Collins <rcollins@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agousb: otg: tegra: add vbus detect through PMU
Rakesh Bodla [Thu, 7 Mar 2013 07:18:16 +0000]
usb: otg: tegra: add vbus detect through PMU

Adding the support to detect usb device cable
using PMU.

Bug 1242710

Change-Id: Icfb185db094809dfe7f06e1aeddd60245793332b
Signed-off-by: Rakesh Bodla <rbodla@nvidia.com>
Reviewed-on: http://git-master/r/204592
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Harry Hong <hhong@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

6 years agommc: host: Add support for EDP
rrajk [Wed, 20 Feb 2013 15:27:25 +0000]
mmc: host: Add support for EDP

Added EDP support for eMMC/micro SD
Bug 1160688

Change-Id: Ia333cfb59b555526344bf884c14797f899d02558
Signed-off-by: rrajk <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/202566
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoarm: tegra: sdhci: Add EDP support platform data
rrajk [Wed, 20 Feb 2013 14:54:30 +0000]
arm: tegra: sdhci: Add EDP support platform data

Added platform data for eMMC/microSD to support EDP
Bug 1160688

Change-Id: I77c92da13941ef4966d9b7fa390d6ba9fa1df3c1
Signed-off-by: rrajk <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/202559
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agodrivers: misc: publish fps, cpu load, thread count
Ilan Aelion [Fri, 26 Oct 2012 16:44:58 +0000]
drivers: misc: publish fps, cpu load, thread count

adapted cpufreq_interactive load estimation and averaging of the
number of runnable threads to a misc device that will write the
current cpu id, load and nr_runnable_threads for each cpu to a sysfs
node at /sys/devices/system/cpu/cpufreq/cpuload/cpu_load. Intended to
provide an accurate cpu load reading to user space scaling
controllers. In addition the momentary frame rate is written to /d/fps.

Bug 1161410
Bug 1164121

Change-Id: I041e230463fa7d4a3c83e4a2ab2ce199f9a5d8ba
Signed-off-by: Ilan Aelion <iaelion@nvidia.com>
Reviewed-on: http://git-master/r/#change,165089
(cherry picked from commit 66d64ab41904d2c5ec6167bd067d8e4c7170d125)
Reviewed-on: http://git-master/r/199921
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoarm: tegra: usb_phy: add delay on wait loop of ack
Shawn Joo [Thu, 27 Dec 2012 11:09:03 +0000]
arm: tegra: usb_phy: add delay on wait loop of ack

There is no delay while reading gpio of modem ack.
it will be a bad influence on system.
put 1ms delay on the loop.

Bug 1191026

Change-Id: I1b3fa50cabbe002cd6a0ec4c66099dc694a5a6e5
Signed-off-by: Shawn Joo <sjoo@nvidia.com>
Reviewed-on: http://git-master/r/174469
(cherry picked from commit 85a0380eccd1ab1dbad49b42df4049fdadc7df05)
Reviewed-on: http://git-master/r/199080
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Steve Lin <stlin@nvidia.com>

6 years agoarm: tegra: pinmux: pluto pinmux usb_vbus_en0
Jay Cheng [Tue, 5 Feb 2013 00:17:53 +0000]
arm: tegra: pinmux: pluto pinmux usb_vbus_en0

USB_VBUS_EN0 is used as GPIO OUTPUT pin, OD (open drain) need to be disabled,
otherwise GPIO can't drive it HIGH/LOW.

bug 1228172

Change-Id: I099e1ac8e26fdc474a3ec2bbef48a7d9e83a6bef
Signed-off-by: Jay Cheng <jacheng@nvidia.com>
Reviewed-on: http://git-master/r/197201
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoARM: tegra: roth/pluto: Validate GPIO before using
Harshavardhan Nalajala [Mon, 4 Feb 2013 05:53:05 +0000]
ARM: tegra: roth/pluto: Validate GPIO before using

Check the return values of gpio apis and return if
encountered with errors.

bug  1222992

Change-Id: I42fc671ccb8d8c0fe6ad2ff28c223130926e0228
Signed-off-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Reviewed-on: http://git-master/r/196845
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoMerge remote-tracking branch 'remotes/origin/dev/snikam/merge-k3.4.35-to-rel-17'...
Mandar Padmawar [Thu, 7 Mar 2013 06:30:19 +0000]
Merge remote-tracking branch 'remotes/origin/dev/snikam/merge-k3.4.35-to-rel-17' into promotion_build

merging Sachin Nikam's dev branch "remotes/origin/dev/snikam/merge-k3.4.35-to-rel-17" to kernel repo of rel-17

6 years agoMerge branch 'linux-3.4.35' into rel-17
Sachin Nikam [Wed, 6 Mar 2013 13:42:15 +0000]
Merge branch 'linux-3.4.35' into rel-17

Bug 1243631

Change-Id: I915826047b2e20f0ad0a7d75df295c6cbf6e5b0a

6 years agoedp: tegra: adding gain factor debug knob
Sivaram Nair [Mon, 4 Mar 2013 23:57:52 +0000]
edp: tegra: adding gain factor debug knob

Added a gain factor debugfs node to scale the EDP budget that is
allocated to the core client.

Change-Id: Ic8cf6c50b66d8876b23845fcc76bdde3e4305518
Signed-off-by: Sivaram Nair <sivaramn@nvidia.com>
Reviewed-on: http://git-master/r/206097
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>

6 years agoARM: tegra: pluto: Change orientation vector for compass
Xiaohui Tao [Fri, 22 Feb 2013 19:56:11 +0000]
ARM: tegra: pluto: Change orientation vector for compass

Set the correct compass orientation

Change-Id: I26c171107baeee4229fc9fe1e91beefa0620cea5
Signed-off-by: Xiaohui Tao <xtao@nvidia.com>
Reviewed-on: http://git-master/r/205218
(cherry picked from commit 48a0b8fe54f76cded44f33044598fb1d052263bf)
Reviewed-on: http://git-master/r/205984
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>

6 years agoARM: tegra: dalmore: Change orientation vector for compass
Xiaohui Tao [Mon, 25 Feb 2013 18:55:13 +0000]
ARM: tegra: dalmore: Change orientation vector for compass

Set the correct compass orientation

Change-Id: I986c3d3cb4bf69b456232f1438f3394cd7e847b9
Signed-off-by: Xiaohui Tao <xtao@nvidia.com>
Reviewed-on: http://git-master/r/205217
(cherry picked from commit ee5fbce58dd28d6867fd0ccc67eb42f77c36e44c)
Reviewed-on: http://git-master/r/205983
Reviewed-by: Robert Collins <rcollins@nvidia.com>
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>

6 years agoarm: tegra: soctherm: correct programming of tsample register
Diwakar Tundlam [Mon, 4 Mar 2013 19:23:34 +0000]
arm: tegra: soctherm: correct programming of tsample register

Bug 1243563

Change-Id: Id2328c5be5889fed19726afef90e178523b09570
Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-on: http://git-master/r/205982
GVS: Gerrit_Virtual_Submit

6 years agoARM: tegra: macallan: Unset sd_detect_in_suspend
Naveen Kumar Arepalli [Mon, 4 Mar 2013 08:16:48 +0000]
ARM: tegra: macallan: Unset sd_detect_in_suspend

Unset sd_detect_in_suspend flag for SDMMC3

Bug 1243695

Change-Id: I3e519446f6300bd7abb6bd1eecbb0def8aed1755
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/205844
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Prajakta Gudadhe <pgudadhe@nvidia.com>

6 years agoARM: tegra: dalmore: Unset sd_detect_in_suspend
Naveen Kumar Arepalli [Mon, 4 Mar 2013 07:04:23 +0000]
ARM: tegra: dalmore: Unset sd_detect_in_suspend

Unset sd_detect_in_suspend flag for SDMMC3

Bug 1243695

Change-Id: I7913ce4af0e231b8b749fb5c9cac3fc15879a6d1
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/205841
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agoARM: tegra: change wakeup irq to gpio
Naveen Kumar Arepalli [Mon, 4 Mar 2013 06:57:11 +0000]
ARM: tegra: change wakeup irq to gpio

Change sdmmc3 cd wakeup irq to gpio instead of sdmmc3 interrupt

Bug 1243695

Change-Id: I6958472b375d23c7cbca4b26c10a420e963b8e96
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Reviewed-on: http://git-master/r/205838
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agoarm: tegra: macallan: Update macallan DVFS table.
Hayden Du [Mon, 4 Mar 2013 04:35:40 +0000]
arm: tegra: macallan: Update macallan DVFS table.

Macallan copy Dalmore's DVFS table, and Macallan don't have
h5tc4g63afr_rda, remove h5tc4g63afr_rda from Macallan.

Change-Id: I744d65ec8fafb99bbd417f7424cb9953fa72aef2
Signed-off-by: Hayden Du <haydend@nvidia.com>
Reviewed-on: http://git-master/r/205813
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agoARM: tegra11: clock: Move duplicate clocks initialization
Alex Frid [Sun, 3 Mar 2013 05:47:30 +0000]
ARM: tegra11: clock: Move duplicate clocks initialization

Moved duplicate clocks initialization after specially handled clocks:
audio, external, and xusb clocks - so that these special clocks can
be duplicated if necessary.

Bug 1243423

Change-Id: Id57318837cdf3c12dfb1b7d671668b2368109ccf
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/205786
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoARM: tegra11: dvfs: Update GPU and media bus dvfs tables
Alex Frid [Sun, 3 Mar 2013 05:12:51 +0000]
ARM: tegra11: dvfs: Update GPU and media bus dvfs tables

Bug 116126

Change-Id: I0acc2520494ad753918412427696b68a71a548ae
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/205784
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agovideo: tegra: camera: enable sclk in camera
Jihoon Bang [Fri, 1 Mar 2013 17:53:54 +0000]
video: tegra: camera: enable sclk in camera

Enable sclk in camera and set 80MHz when
camera is opened. It helps boost KPI.

Bug 1234580

Change-Id: Id4bcddb31bcbad68f9bd8956124cfd4325b6cfc1
Signed-off-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-on: http://git-master/r/205603
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agovideo: tegra: dsi: set dsib PLLD_CSI_OUT_ENB only in T3x platforms
Hunk Lin [Mon, 4 Mar 2013 09:50:47 +0000]
video: tegra: dsi: set dsib PLLD_CSI_OUT_ENB only in T3x platforms

Only set dsib PLLD_CSI_OUT_ENB in T3x platform because from T11x dsib and
csi pads are no more shared.
Set PLLD_DSI_OUT_ENB for both dsia and dsib from T11x.

Bug 1237618

Change-Id: Id2402a4a280ecaea71f30068d729caf857cd64d6
Signed-off-by: Hunk Lin <hulin@nvidia.com>
Reviewed-on: http://git-master/r/205407
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agoarm: tegra: dalmore: Increase display wakeup time
Vineel Kumar Reddy Kovvuri [Thu, 28 Feb 2013 10:28:14 +0000]
arm: tegra: dalmore: Increase display wakeup time

Fixes the issue of display failing to wakeup from LP0

Change-Id: Idf2fb149076500acb5e8b0ceda43adc2b61ded1d
Signed-off-by: Vineel Kumar Reddy Kovvuri <vineelkumarr@nvidia.com>
Reviewed-on: http://git-master/r/205081
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agonet: wireless: bcmdhd: wifi edp registration check
Harshavardhan Nalajala [Wed, 27 Feb 2013 14:23:29 +0000]
net: wireless: bcmdhd: wifi edp registration check

Check if bcmdhd driver is registered to edp manager
before calling edp state update request.

Bug 1160685

Change-Id: Ic7f4526275f026419ec460940c33c8a3118c7cff
Signed-off-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Reviewed-on: http://git-master/r/204643
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoasoc: tegra: aic326x: Fix DAM allocation for BT voice call
Rahul Mittal [Wed, 27 Feb 2013 09:55:30 +0000]
asoc: tegra: aic326x: Fix DAM allocation for BT voice call

Added a check to not allocate call record DAMs if it is a BT call
BT call requires 2 DAMs, and since we have only 3 DAMs,
we can't allocate the 2 DAMs that are needed for call recording

Fixed system sound mixing during BT call

Bug 1242683

Change-Id: I515ac5627c9221ada5a6d4491d6a37ad38c3196f
Signed-off-by: Rahul Mittal <rmittal@nvidia.com>
Reviewed-on: http://git-master/r/204524
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Vijay Mali <vmali@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Scott Peterson <speterson@nvidia.com>

6 years agoextcon: palmas: add support for ID pin detection
Laxman Dewangan [Wed, 27 Feb 2013 09:05:00 +0000]
extcon: palmas: add support for ID pin detection

Add support for the ID pin detection through interrupt and
notification through extcon framework.

bug 1242273

Change-Id: I6f35fc6812dc316909152598598dbf9e2fbe427e
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/204502

6 years agoARM: tegra: clock: Check if parent is allowed
Alex Frid [Wed, 27 Feb 2013 05:19:42 +0000]
ARM: tegra: clock: Check if parent is allowed

Checked if parent is allowed when listing possible parents in debugfs.

Change-Id: Ie7ea8e5c0eeb895526bacf96798f49a96f4a6b83
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/204416
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoARM: tegra11: clock: Don't allow PLLM/C as super clock source
Alex Frid [Wed, 27 Feb 2013 04:16:10 +0000]
ARM: tegra11: clock: Don't allow PLLM/C as super clock source

Updated parent selection policy to prevent PLLM and PLLC from being
selected as super clock sources (explicit check just to enforce policy
already in place).

Change-Id: If27c813b071081c93dd511b2bb3e54bc600819f4
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/204414
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoARM: tegra: power: Rename CPU idle rate control APIs
Alex Frid [Fri, 22 Feb 2013 06:27:44 +0000]
ARM: tegra: power: Rename CPU idle rate control APIs

Change-Id: Id9bc9deabf8573a0743c5aafd1dc42f654b6f842
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/204413
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agodalmore: Cancel the init of GMI_AD13
Shaoming Feng [Wed, 27 Feb 2013 02:45:56 +0000]
dalmore: Cancel the init of GMI_AD13

Cancel the initialization of GMI_AD13 which puts it into
non-tristate mode. The corresponding rail is TS_SHDN which
is never been used. The non-tristate caused power regression.

Bug 1238555

Change-Id: I5bc782887f3c1aff796cc2addb6264b3c0311636
Signed-off-by: Shaoming Feng <shaomingf@nvidia.com>
Reviewed-on: http://git-master/r/204387
Reviewed-by: Wen Yi <wyi@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>

6 years agoCHROMIUM: tcp: Avoid merging segments on the OOO queue into a cloned SKB
Steve Lin [Tue, 4 Dec 2012 19:53:47 +0000]
CHROMIUM: tcp: Avoid merging segments on the OOO queue into a cloned SKB

TCP tries to merge socket buffers in the out-of-order queue when they
are sequential. This is generally a good thing to save memory and speed
up processing, but can lead to problems when it expands a buffer that
has previously been cloned.

We have encountered a bug with a confused/broken receive queue, that we
think might have been caused by this problem, as the smsc95xx driver
uses cloned buffers in its receive path. Thanks to edumazet for
pointing that out and suggesting this fix.

This patch makes sure that this code path only expands socket buffers
that have not been cloned and just enqueues them normally in the other
case. In upstream kernels starting with 3.5, the affected code has been
refactored into tcp_try_coalesce with commit 1402d36, which has later
been patched to fix this issue in commit 923dd34. The fix has not been
backported into the upstream 3.4 kernel.

BUG=chromium-os:35827
TEST=None

Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-author: Julius Werner

Bug 1206597
Bug 1232607

Change-Id: I08fdf47b42d903b5079ad0985edd491b421ac7ca
Signed-off-by: Steve Lin <stlin@nvidia.com>
Reviewed-on: http://git-master/r/203898
Reviewed-by: Brandon Casey <bcasey@nvidia.com>
Reviewed-by: Mark Kuo <mkuo@nvidia.com>
GVS: Gerrit_Virtual_Submit

6 years agoARM: tegra11: clock: Update PLLE spread spectrum setting
Alex Frid [Sat, 23 Feb 2013 04:42:41 +0000]
ARM: tegra11: clock: Update PLLE spread spectrum setting

Bug 1167739

Change-Id: Ica7632fc4dafffad5004c9c76b68a325f18cef49
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/203567
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoARM: tegra11: pm: disable overriding pinmux
Harry Hong [Thu, 21 Feb 2013 07:29:12 +0000]
ARM: tegra11: pm: disable overriding pinmux

By POR, sys_clk_req pad is enabled to override
pinmux setting. this pin can be set to gpio.
to avoid overriding for gpio usage, adding
sysclkreq_gpio flag. Overriding pinmux will not
 works if this flag is set to true.

bug 1236315

Change-Id: If6f30a8bfbfc272a4e303d26e2d9553e2b353bd7
Signed-off-by: Harry Hong <hhong@nvidia.com>
Reviewed-on: http://git-master/r/202855
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoRevert "ARM: tegra11: dvfs: Update DFLL minimum voltage"
Alex Frid [Tue, 19 Feb 2013 20:14:50 +0000]
Revert "ARM: tegra11: dvfs: Update DFLL minimum voltage"

This reverts commit bc6088418f78a1bf9eda10d49081fcbc0bed5e54.

Bug 1161126

Change-Id: Ib079fad0decfb9a1ff4f70deb2449b64b4abe85b
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/202124
Reviewed-by: Bo Yan <byan@nvidia.com>

6 years agoARM: tegra: clock: Update CPU cluster switch clock control
Alex Frid [Wed, 13 Feb 2013 23:55:56 +0000]
ARM: tegra: clock: Update CPU cluster switch clock control

Updated clock control when cluster round trip changes CPU clock
source from PLL to DFLL: G CPU (PLL) => LP CPU (PLL) => G CPU (DFLL).

- made sure that PLL used as G CPU clock source during the last
residency is enabled across LP-to-G switch
- made sure that initial G CPU voltage is preset before cluster
switch to maximum of voltage levels required for G CPU running on
last residency PLL and next residency DFLL
- changed G CPU rail control from s/w dvfs to h/w cl-dvfs after the
switch to G CPU is completed

Change-Id: I7720cda544ef16a4691534b52315e9128b2b27c3
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/201830
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoThermal: pid_thermal_gov: Add max_dout
Jinyoung Park [Mon, 18 Feb 2013 12:05:27 +0000]
Thermal: pid_thermal_gov: Add max_dout

Added max_dout to limit derivative output to avoid extreme response
if delta temperature gets too large and added its sysfs node.
The max_dout is percentage of max_err.

Bug 1200111

Change-Id: I2a5a984a4dbfe430e2ec9edbb32e036dcfa23b53
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/201770
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Edward Riegelsberger <eriegels@nvidia.com>

6 years agopower: max17048: Removing compiler warning
Darbha Sriharsha [Tue, 12 Feb 2013 06:14:03 +0000]
power: max17048: Removing compiler warning

This change is intended to add an else block so
that certain compiler warnings cease from occuring

Bug 1234460

Change-Id: I144355575d4d92a9775814557b46c95107341c2a
Signed-off-by: Darbha Sriharsha <dsriharsha@nvidia.com>
Reviewed-on: http://git-master/r/199872
Reviewed-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoARM: tegra11: clock: add camera to sclk
Jihoon Bang [Fri, 1 Mar 2013 17:49:53 +0000]
ARM: tegra11: clock: add camera to sclk

Add camera to sclk as a client.
Increasing sclk freq helps camera KPI.

Bug 1234580

Change-Id: Ia7e5f2572de18a197c7e614882fd2d8fcdd975c1
Signed-off-by: Jihoon Bang <jbang@nvidia.com>
Reviewed-on: http://git-master/r/205602
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Jon Mayo <jmayo@nvidia.com>

6 years agoARM: tegra: pluto: set dsia's default parent
Hunk Lin [Fri, 1 Mar 2013 05:04:51 +0000]
ARM: tegra: pluto: set dsia's default parent

Set dsia's parent to pll_d2 by default to avoid the power consumption in dsia
when it is unused but connected to pll_d. It's parent will be change to pll_d
in dsi driver if needed.

Bug 1237618

Change-Id: I6eb4f39e9342e1ff3bd4dd01416d5cbf47ee9642
Signed-off-by: Hunk Lin <hulin@nvidia.com>
Reviewed-on: http://git-master/r/205389
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoARM: tegra: dvfs: Check I2C pending flag for CL-DVFS tuning
Alex Frid [Fri, 1 Mar 2013 04:13:35 +0000]
ARM: tegra: dvfs: Check I2C pending flag for CL-DVFS tuning

In CL-DVFS tuning timer callback ignored last I2C data, and re-start
timer, if I2C pending flag is set.

Change-Id: Ifb609ff66498f30e20f0d9a0a5a56901ed707808
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/205382
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoarm: tegra: pluto: Fix panic when using RMC modem
Raj Jayaraman [Thu, 28 Feb 2013 22:25:02 +0000]
arm: tegra: pluto: Fix panic when using RMC modem

Bug 1243687

Change-Id: I4d4076a68848bb9388ff3372b09707a203d98a82
Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com>
Reviewed-on: http://git-master/r/205276
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agoARM: tegra: support modem EDP request/threshold updates
Neil Patel [Thu, 21 Feb 2013 19:16:07 +0000]
ARM: tegra: support modem EDP request/threshold updates

The modem client unregisters and re-registers during crash recovery.
Since permissions are set at init we need use sysfs files for request
and threshold updates that are present at boot.

Bug 1242282

Change-Id: I5023eb39f78224a7022dafd9af2ab753b1449952
Signed-off-by: Neil Patel <neilp@nvidia.com>
Reviewed-on: http://git-master/r/203017
(cherry picked from commit f54588acb2c3436c698d401f8fa709e44fe85b27)
Reviewed-on: http://git-master/r/204811
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Steve Lin <stlin@nvidia.com>

6 years agoARM: tegra: dvfs: Calibrate DFLL minimum rate
Alex Frid [Sat, 16 Feb 2013 09:12:23 +0000]
ARM: tegra: dvfs: Calibrate DFLL minimum rate

Implemented calibration of DVCO minimum rate for DFLL operations
under CL-DVFS control. DVCO minimum rate setting is dynamically
adjusted based on CL-DVFS monitor frequency measurements so that
CL-DVFS is able to converge to minimum rate at minimum voltage.

Change-Id: Ibd2604d5eddc26391bd5c7569db8a05189536715
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/203586
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agomisc: ti-st: fix memory leak and wakelock handle
Rakesh Goyal [Thu, 28 Feb 2013 14:13:03 +0000]
misc: ti-st: fix memory leak and wakelock handle

1) Release memory in error case
2) release wake lock in error case

Bug 1179655

Change-Id: Ie4ae6fccd31f664aae92101df4e21653c4c10eef
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-on: http://git-master/r/205138
Reviewed-by: Rakesh Kumar <krakesh@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agousb: xhci: tegra: update fuse programming from usb_calib0
Ajay Gupta [Tue, 19 Feb 2013 18:51:32 +0000]
usb: xhci: tegra: update fuse programming from usb_calib0

usb_calib0 fuse description has changed and so driver needs
to program correct value of hs_curr_level for
XUSB_PADCTL_USB2_OTG_PAD1_CTL_0_0

Also reviewed and cleaned up the pad programming both in
Dalmore and Pluto.

Bug 1237038
Bug 1172686

Change-Id: Ib47f20d6aea724d1acdea0241e5598d19dbc4dee
Signed-off-by: Ajay Gupta <ajayg@nvidia.com>
Reviewed-on: http://git-master/r/204775
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agonet: wireless: bcmdhd: fix bcm43341 fw_path for softap
Om Prakash Singh [Wed, 27 Feb 2013 12:31:29 +0000]
net: wireless: bcmdhd: fix bcm43341 fw_path for softap

Bug 1239409

Change-Id: I78e07aaf9665bd19838d1e46ee7b343dc9d347bf
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/204600
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

6 years agoarm: tegra: macallan: set cpu_lp2_min_residency to 1000
Kerwin Wan [Wed, 27 Feb 2013 10:46:37 +0000]
arm: tegra: macallan: set cpu_lp2_min_residency to 1000

Bug 1216668

Change-Id: I65972a1c3f0654326ba5004d5827c6761a7114ba
Signed-off-by: Kerwin Wan <kerwinw@nvidia.com>
Reviewed-on: http://git-master/r/204534
Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com>
Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>

6 years agommc: host: sdhci: Add data/cmd error prints
rrajk [Tue, 26 Feb 2013 09:51:23 +0000]
mmc: host: sdhci: Add data/cmd error prints

Added data and cmd error prints to debug the system.

Change-Id: Ia98abecc51373cfe1674b074db413187e460786e
Signed-off-by: rrajk <rrajk@nvidia.com>
Reviewed-on: http://git-master/r/204140
GVS: Gerrit_Virtual_Submit
Reviewed-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agoARM: tegra: pluto: reduce power on VDDIO_GMI_AP
Eric Miao [Wed, 20 Feb 2013 11:58:07 +0000]
ARM: tegra: pluto: reduce power on VDDIO_GMI_AP

PULL_{UP/DOWN} for GMI pins will consume more power during LP0,
change to NORMAL reduces power consumption during LP0 from 0.3mW
to 0.03mW.

Bug 1239392

Change-Id: I476a4cefe3b798fd8ab492298cc1013b5e964d3b
Signed-off-by: Eric Miao <emiao@nvidia.com>
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/202506
Reviewed-by: Hunk Lin <hulin@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

6 years agoARM: tegra: pluto: BCMDHD Wifi EDP support
Harshavardhan Nalajala [Wed, 20 Feb 2013 10:11:14 +0000]
ARM: tegra: pluto: BCMDHD Wifi EDP support

Wifi EDP support for BCMDHD

Bug 1160685

Change-Id: I59bb065159739643a610ca7835b55169e566a15a
Signed-off-by: Harshavardhan Nalajala <hnalajala@nvidia.com>
Reviewed-on: http://git-master/r/202459
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User

6 years agonet: wireless: bcm4335: power off card when not in use
Om Prakash Singh [Thu, 14 Feb 2013 04:24:52 +0000]
net: wireless: bcm4335: power off card when not in use

Power off the card when wifi is off and power up only when wifi
is turned on

Bug 1011349

Change-Id: I018c3757280c81c9077dd07949422bf572fc3a0d
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/200667
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>

6 years agoLinux 3.4.35
Greg Kroah-Hartman [Sun, 3 Mar 2013 22:07:21 +0000]
Linux 3.4.35

6 years agousb hid quirks for Masterkit MA901 usb radio
Alexey Klimov [Mon, 12 Nov 2012 05:57:03 +0000]
usb hid quirks for Masterkit MA901 usb radio

commit 0322bd3980b3ebf7dde8474e22614cb443d6479a upstream.

Don't let Masterkit MA901 USB radio be handled by usb hid drivers.
This device will be handled by radio-ma901.c driver.

Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoata_piix: Add Device IDs for Intel Wellsburg PCH
James Ralston [Sat, 9 Feb 2013 01:24:12 +0000]
ata_piix: Add Device IDs for Intel Wellsburg PCH

commit 3aee8bc52c415aba8148f144e5e5359b0fd75dd1 upstream.

This patch adds the IDE-mode SATA Device IDs for the Intel Wellsburg PCH

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoata_piix: IDE-mode SATA patch for Intel Avoton DeviceIDs
Seth Heasley [Fri, 25 Jan 2013 19:57:05 +0000]
ata_piix: IDE-mode SATA patch for Intel Avoton DeviceIDs

commit aaa515277db9585eeb4fdeb4637b9f9df50a1dd9 upstream.

This patch adds the IDE-mode SATA DeviceIDs for the Intel Avoton SOC.

Signed-off-by: Seth Heasley <seth.heasley@intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoperf tools: Fix build with bison 2.3 and older.
Vinson Lee [Wed, 27 Feb 2013 02:30:30 +0000]
perf tools: Fix build with bison 2.3 and older.

commit 85df3b3769222894e9692b383c7af124b7721086 upstream.

The %name-prefix "prefix" syntax is not available on bison 2.3 and
older. Substitute with the -p "prefix" command-line option for
compatibility with older versions of bison.

This patch fixes this build error with older versions of bison.

CC util/sysfs.o
    BISON util/pmu-bison.c
util/pmu.y:2.14-24: syntax error, unexpected string, expecting =
make: *** [util/pmu-bison.c] Error 1

Signed-off-by: Vinson Lee <vlee@twitter.com>
Tested-by: Li Zefan <lizefan@huawei.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Pekka Enberg <penberg@kernel.org>
Link: http://lkml.kernel.org/r/1360792138-29186-1-git-send-email-vlee@twitter.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agostaging: comedi: check s->async for poll(), read() and write()
Ian Abbott [Wed, 27 Feb 2013 10:56:19 +0000]
staging: comedi: check s->async for poll(), read() and write()

commit cc400e185c07c15a42d2635995f422de5b94b696 upstream.

Some low-level comedi drivers (incorrectly) point `dev->read_subdev` or
`dev->write_subdev` to a subdevice that does not support asynchronous
commands.  Comedi's poll(), read() and write() file operation handlers
assume these subdevices do support asynchronous commands.  In
particular, they assume `s->async` is valid (where `s` points to the
read or write subdevice), which it won't be if it has been set
incorrectly.  This can lead to a NULL pointer dereference.

Check `s->async` is non-NULL in `comedi_poll()`, `comedi_read()` and
`comedi_write()` to avoid the bug.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agostaging: comedi: ni_labpc: set up command4 register *after* command3
Ian Abbott [Wed, 27 Feb 2013 12:52:46 +0000]
staging: comedi: ni_labpc: set up command4 register *after* command3

Commit 22056e2b46246d97ff0f7c6e21a77b8daa07f02c upstream.

Tuomas <tvainikk _at_ gmail _dot_ com> reported problems getting
meaningful output from a Lab-PC+ in differential mode for AI cmds, but
AI insn reads gave correct readings.  He tracked it down to two
problems, one of which is addressed by this patch.

It seems that writing to the command3 register after writing to the
command4 register in `labpc_ai_cmd()` messes up the differential
reference bit setting in the command4 register.  Set up the command4
register after the command3 register (as in `labpc_ai_rinsn()`) to avoid
the problem.

Thanks to Tuomas for suggesting the fix.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agostaging: comedi: ni_labpc: correct differential channel sequence for AI commands
Ian Abbott [Wed, 27 Feb 2013 12:52:45 +0000]
staging: comedi: ni_labpc: correct differential channel sequence for AI commands

Commit 4c4bc25d0fa6beaf054c0b4c3b324487f266c820 upstream.

Tuomas <tvainikk _at_ gmail _dot_ com> reported problems getting
meaningful output from a Lab-PC+ in differential mode for AI cmds, but
AI insn reads gave correct readings.  He tracked it down to two
problems, one of which is addressed by this patch.

It seems the setting of the channel bits for particular scanning modes
was incorrect for differential mode.  (Only half the number of channels
are available in differential mode; comedi refers to them as channels 0,
1, 2 and 3, but the hardware documentation refers to them as channels 0,
2, 4 and 6.)  In differential mode, the setting of the channel enable
bits in the command1 register should depend on whether the scan enable
bit is set.  Effectively, we need to double the comedi channel number
when the scan enable bit is not set in differential mode.  The scan
enable bit gets set when the AI scan mode is `MODE_MULT_CHAN_UP` or
`MODE_MULT_CHAN_DOWN`, and gets cleared when the AI scan mode is
`MODE_SINGLE_CHAN` or `MODE_SINGLE_CHAN_INTERVAL`.  The existing test
for whether the comedi channel number needs to be doubled in
differential mode is incorrect in `labpc_ai_cmd()`.  This patch corrects
the test.

Thanks to Tuomas for suggesting the fix.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoACPI: Add DMI entry for Sony VGN-FW41E_H
Joseph Salisbury [Tue, 5 Feb 2013 00:16:29 +0000]
ACPI: Add DMI entry for Sony VGN-FW41E_H

commit 66f2fda93b67fa744d406e6dcf443f67bac204b6 upstream.

This patch adds a quirk to allow the Sony VGN-FW41E_H to suspend/resume
properly.

References: http://bugs.launchpad.net/bugs/1113547
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoab8500_btemp: Demote initcall sequence
Rajanikanth H.V [Wed, 23 Jan 2013 04:26:45 +0000]
ab8500_btemp: Demote initcall sequence

commit eeb0751c99522a4d1bbcc7b6bc1460cd07d07488 upstream.

Power supply subsystem creates thermal zone device for the property
'POWER_SUPPLY_PROP_TEMP' which requires thermal subsystem to be ready
before 'ab8500 battery temperature monitor' driver is initialized. ab8500
btemp driver is initialized with subsys_initcall whereas thermal subsystem
is initialized with fs_initcall which causes
thermal_zone_device_register(...) to crash since the required structure
'thermal_class' is not initialized yet:

Unable to handle kernel NULL pointer dereference at virtual address 000000a4
pgd = c0004000
[000000a4] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0    Tainted: G        W     (3.8.0-rc4-00001-g632fda8-dirty #1)
PC is at _raw_spin_lock+0x18/0x54
LR is at get_device_parent+0x50/0x1b8
pc : [<c02f1dd0>]    lr : [<c01cb248>]    psr: 60000013
sp : ef04bdc8  ip : 00000000  fp : c0446180
r10: ef216e38  r9 : c03af5d0  r8 : ef275c18
r7 : 00000000  r6 : c0476c14  r5 : ef275c18  r4 : ef095840
r3 : ef04a000  r2 : 00000001  r1 : 00000000  r0 : 000000a4
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5787d  Table: 0000404a  DAC: 00000015
Process swapper/0 (pid: 1, stack limit = 0xef04a238)
Stack: (0xef04bdc8 to 0xef04c000)
[...]
[<c02f1dd0>] (_raw_spin_lock+0x18/0x54) from [<c01cb248>] (get_device_parent+0x50/0x1b8)
[<c01cb248>] (get_device_parent+0x50/0x1b8) from [<c01cb8d8>] (device_add+0xa4/0x574)
[<c01cb8d8>] (device_add+0xa4/0x574) from [<c020b91c>] (thermal_zone_device_register+0x118/0x938)
[<c020b91c>] (thermal_zone_device_register+0x118/0x938) from [<c0202030>] (power_supply_register+0x170/0x1f8)
[<c0202030>] (power_supply_register+0x170/0x1f8) from [<c02055ec>] (ab8500_btemp_probe+0x208/0x47c)
[<c02055ec>] (ab8500_btemp_probe+0x208/0x47c) from [<c01cf0dc>] (platform_drv_probe+0x14/0x18)
[<c01cf0dc>] (platform_drv_probe+0x14/0x18) from [<c01cde70>] (driver_probe_device+0x74/0x20c)
[<c01cde70>] (driver_probe_device+0x74/0x20c) from [<c01ce094>] (__driver_attach+0x8c/0x90)
[<c01ce094>] (__driver_attach+0x8c/0x90) from [<c01cc640>] (bus_for_each_dev+0x4c/0x80)
[<c01cc640>] (bus_for_each_dev+0x4c/0x80) from [<c01cd6b4>] (bus_add_driver+0x16c/0x23c)
[<c01cd6b4>] (bus_add_driver+0x16c/0x23c) from [<c01ce54c>] (driver_register+0x78/0x14c)
[<c01ce54c>] (driver_register+0x78/0x14c) from [<c00086ac>] (do_one_initcall+0xfc/0x164)
[<c00086ac>] (do_one_initcall+0xfc/0x164) from [<c02e89c8>] (kernel_init+0x120/0x2b8)
[<c02e89c8>] (kernel_init+0x120/0x2b8) from [<c000e358>] (ret_from_fork+0x14/0x3c)
Code: e3c3303f e5932004 e2822001 e5832004 (e1903f9f)
---[ end trace ed9df72941b5bada ]---

Signed-off-by: Rajanikanth H.V <rajanikanth.hv@stericsson.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoab8500-chargalg: Only root should have write permission on sysfs file
Lee Jones [Thu, 17 Jan 2013 14:21:53 +0000]
ab8500-chargalg: Only root should have write permission on sysfs file

commit e3455002d04276c256a531f7175dce0f7d1cb78a upstream.

Only root should have write permission on sysfs file ab8500_chargalg/chargalg.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agocgroup: fix exit() vs rmdir() race
Li Zefan [Thu, 24 Jan 2013 06:43:28 +0000]
cgroup: fix exit() vs rmdir() race

commit 71b5707e119653039e6e95213f00479668c79b75 upstream.

In cgroup_exit() put_css_set_taskexit() is called without any lock,
which might lead to accessing a freed cgroup:

thread1                           thread2
---------------------------------------------
exit()
  cgroup_exit()
    put_css_set_taskexit()
      atomic_dec(cgrp->count);
                                   rmdir();
      /* not safe !! */
      check_for_release(cgrp);

rcu_read_lock() can be used to make sure the cgroup is alive.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agocpuset: fix cpuset_print_task_mems_allowed() vs rename() race
Li Zefan [Fri, 25 Jan 2013 08:08:01 +0000]
cpuset: fix cpuset_print_task_mems_allowed() vs rename() race

commit 63f43f55c9bbc14f76b582644019b8a07dc8219a upstream.

rename() will change dentry->d_name. The result of this race can
be worse than seeing partially rewritten name, but we might access
a stale pointer because rename() will re-allocate memory to hold
a longer name.

It's safe in the protection of dentry->d_lock.

v2: check NULL dentry before acquiring dentry lock.

Signed-off-by: Li Zefan <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agopstore: Avoid deadlock in panic and emergency-restart path
Seiji Aguchi [Fri, 11 Jan 2013 18:09:41 +0000]
pstore: Avoid deadlock in panic and emergency-restart path

commit 9f244e9cfd70c7c0f82d3c92ce772ab2a92d9f64 upstream.

[Issue]

When pstore is in panic and emergency-restart paths, it may be blocked
in those paths because it simply takes spin_lock.

This is an example scenario which pstore may hang up in a panic path:

 - cpuA grabs psinfo->buf_lock
 - cpuB panics and calls smp_send_stop
 - smp_send_stop sends IRQ to cpuA
 - after 1 second, cpuB gives up on cpuA and sends an NMI instead
 - cpuA is now in an NMI handler while still holding buf_lock
 - cpuB is deadlocked

This case may happen if a firmware has a bug and
cpuA is stuck talking with it more than one second.

Also, this is a similar scenario in an emergency-restart path:

 - cpuA grabs psinfo->buf_lock and stucks in a firmware
 - cpuB kicks emergency-restart via either sysrq-b or hangcheck timer.
   And then, cpuB is deadlocked by taking psinfo->buf_lock again.

[Solution]

This patch avoids the deadlocking issues in both panic and emergency_restart
paths by introducing a function, is_non_blocking_path(), to check if a cpu
can be blocked in current path.

With this patch, pstore is not blocked even if another cpu has
taken a spin_lock, in those paths by changing from spin_lock_irqsave
to spin_trylock_irqsave.

In addition, according to a comment of emergency_restart() in kernel/sys.c,
spin_lock shouldn't be taken in an emergency_restart path to avoid
deadlock. This patch fits the comment below.

<snip>
/**
 *      emergency_restart - reboot the system
 *
 *      Without shutting down any hardware or taking any locks
 *      reboot the system.  This is called when we know we are in
 *      trouble so this is our best effort to reboot.  This is
 *      safe to call in interrupt context.
 */
void emergency_restart(void)
<snip>

Signed-off-by: Seiji Aguchi <seiji.aguchi@hds.com>
Acked-by: Don Zickus <dzickus@redhat.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Cc: CAI Qian <caiqian@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoath9k_hw: fix calibration issues on chainmask that don't include chain 0
Felix Fietkau [Sun, 20 Jan 2013 20:55:20 +0000]
ath9k_hw: fix calibration issues on chainmask that don't include chain 0

commit 4a8f199508d79ff8a7d1e22f47b912baaf225336 upstream.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: CAI Qian <caiqian@redhat.com>
Reviewed-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agounbreak automounter support on 64-bit kernel with 32-bit userspace (v2)
Helge Deller [Mon, 4 Feb 2013 19:39:52 +0000]
unbreak automounter support on 64-bit kernel with 32-bit userspace (v2)

commit 4f4ffc3a5398ef9bdbb32db04756d7d34e356fcf upstream.

automount-support is broken on the parisc architecture, because the existing
#if list does not include a check for defined(__hppa__). The HPPA (parisc)
architecture is similiar to other 64bit Linux targets where we have to define
autofs_wqt_t (which is passed back and forth to user space) as int type which
has a size of 32bit across 32 and 64bit kernels.

During the discussion on the mailing list, H. Peter Anvin suggested to invert
the #if list since only specific platforms (specifically those who do not have
a 32bit userspace, like IA64 and Alpha) should have autofs_wqt_t as unsigned
long type.

This suggestion is probably the best way to go, since Arm64 (and maybe others?)
seems to have a non-working automounter. So in the long run even for other new
upcoming architectures this inverted check seem to be the best solution, since
it will not require them to change this #if again (unless they are 64bit only).

Signed-off-by: Helge Deller <deller@gmx.de>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Ian Kent <raven@themaw.net>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
CC: James Bottomley <James.Bottomley@HansenPartnership.com>
CC: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agofuse: don't WARN when nlink is zero
Miklos Szeredi [Mon, 4 Feb 2013 14:57:42 +0000]
fuse: don't WARN when nlink is zero

commit dfca7cebc2679f3d129f8e680a8f199a7ad16e38 upstream.

drop_nlink() warns if nlink is already zero.  This is triggerable by a buggy
userspace filesystem.  The cure, I think, is worse than the disease so disable
the warning.

Reported-by: Tero Roponen <tero.roponen@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agovhost: fix length for cross region descriptor
Michael S. Tsirkin [Mon, 26 Nov 2012 05:57:27 +0000]
vhost: fix length for cross region descriptor

commit bd97120fc3d1a11f3124c7c9ba1d91f51829eb85 upstream.

If a single descriptor crosses a region, the
second chunk length should be decremented
by size translated so far, instead it includes
the full descriptor length.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agosvcrpc: make svc_age_temp_xprts enqueue under sv_lock
J. Bruce Fields [Sun, 10 Feb 2013 16:33:48 +0000]
svcrpc: make svc_age_temp_xprts enqueue under sv_lock

commit e75bafbff2270993926abcc31358361db74a9bc2 upstream.

svc_age_temp_xprts expires xprts in a two-step process: first it takes
the sv_lock and moves the xprts to expire off their server-wide list
(sv_tempsocks or sv_permsocks) to a local list.  Then it drops the
sv_lock and enqueues and puts each one.

I see no reason for this: svc_xprt_enqueue() will take sp_lock, but the
sv_lock and sp_lock are not otherwise nested anywhere (and documentation
at the top of this file claims it's correct to nest these with sp_lock
inside.)

Tested-by: Jason Tibbitts <tibbs@math.uh.edu>
Tested-by: PaweĊ‚ Sikora <pawel.sikora@agmk.net>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agonfsd: Fix memleak
majianpeng [Tue, 29 Jan 2013 05:16:06 +0000]
nfsd: Fix memleak

commit 2d32b29a1c2830f7c42caa8258c714acd983961f upstream.

When free nfs-client, it must free the ->cl_stateids.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoext4: fix free clusters calculation in bigalloc filesystem
Lukas Czerner [Fri, 22 Feb 2013 20:27:52 +0000]
ext4: fix free clusters calculation in bigalloc filesystem

commit 304e220f0879198b1f5309ad6f0be862b4009491 upstream.

ext4_has_free_clusters() should tell us whether there is enough free
clusters to allocate, however number of free clusters in the file system
is converted to blocks using EXT4_C2B() which is not only wrong use of
the macro (we should have used EXT4_NUM_B2C) but it's also completely
wrong concept since everything else is in cluster units.

Moreover when calculating number of root clusters we should be using
macro EXT4_NUM_B2C() instead of EXT4_B2C() otherwise the result might be
off by one. However r_blocks_count should always be a multiple of the
cluster ratio so doing a plain bit shift should be enough here. We
avoid using EXT4_B2C() because it's confusing.

As a result of the first problem number of free clusters is much bigger
than it should have been and ext4_has_free_clusters() would return 1 even
if there is really not enough free clusters available.

Fix this by removing the EXT4_C2B() conversion of free clusters and
using bit shift when calculating number of root clusters. This bug
affects number of xfstests tests covering file system ENOSPC situation
handling. With this patch most of the ENOSPC problems with bigalloc file
system disappear, especially the errors caused by delayed allocation not
having enough space when the actual allocation is finally requested.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoext4: fix xattr block allocation/release with bigalloc
Lukas Czerner [Mon, 18 Feb 2013 17:12:07 +0000]
ext4: fix xattr block allocation/release with bigalloc

commit 1231b3a1eb5740192aeebf5344dd6d6da000febf upstream.

Currently when new xattr block is created or released we we would call
dquot_free_block() or dquot_alloc_block() respectively, among the else
decrementing or incrementing the number of blocks assigned to the
inode by one block.

This however does not work for bigalloc file system because we always
allocate/free the whole cluster so we have to count with that in
dquot_free_block() and dquot_alloc_block() as well.

Use the clusters-to-blocks conversion EXT4_C2B() when passing number of
blocks to the dquot_alloc/free functions to fix the problem.

The problem has been revealed by xfstests #117 (and possibly others).

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoext4: fix race in ext4_mb_add_n_trim()
Niu Yawei [Sat, 2 Feb 2013 02:31:27 +0000]
ext4: fix race in ext4_mb_add_n_trim()

commit f1167009711032b0d747ec89a632a626c901a1ad upstream.

In ext4_mb_add_n_trim(), lg_prealloc_lock should be taken when
changing the lg_prealloc_list.

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoext4: check bh in ext4_read_block_bitmap()
Eryu Guan [Sat, 12 Jan 2013 21:33:25 +0000]
ext4: check bh in ext4_read_block_bitmap()

commit 15b49132fc972c63894592f218ea5a9a61b1a18f upstream.

Validate the bh pointer before using it, since
ext4_read_block_bitmap_nowait() might return NULL.

I've seen this in fsfuzz testing.

 EXT4-fs error (device loop0): ext4_read_block_bitmap_nowait:385: comm touch: Cannot get buffer for block bitmap - block_group = 0, block_bitmap = 3925999616
 BUG: unable to handle kernel NULL pointer dereference at           (null)
 IP: [<ffffffff8121de25>] ext4_wait_block_bitmap+0x25/0xe0
 ...
 Call Trace:
  [<ffffffff8121e1e5>] ext4_read_block_bitmap+0x35/0x60
  [<ffffffff8125e9c6>] ext4_free_blocks+0x236/0xb80
  [<ffffffff811d0d36>] ? __getblk+0x36/0x70
  [<ffffffff811d0a5f>] ? __find_get_block+0x8f/0x210
  [<ffffffff81191ef3>] ? kmem_cache_free+0x33/0x140
  [<ffffffff812678e5>] ext4_xattr_release_block+0x1b5/0x1d0
  [<ffffffff812679be>] ext4_xattr_delete_inode+0xbe/0x100
  [<ffffffff81222a7c>] ext4_free_inode+0x7c/0x4d0
  [<ffffffff812277b8>] ? ext4_mark_inode_dirty+0x88/0x230
  [<ffffffff8122993c>] ext4_evict_inode+0x32c/0x490
  [<ffffffff811b8cd7>] evict+0xa7/0x1c0
  [<ffffffff811b8ed3>] iput_final+0xe3/0x170
  [<ffffffff811b8f9e>] iput+0x3e/0x50
  [<ffffffff812316fd>] ext4_add_nondir+0x4d/0x90
  [<ffffffff81231d0b>] ext4_create+0xeb/0x170
  [<ffffffff811aae9c>] vfs_create+0xac/0xd0
  [<ffffffff811ac845>] lookup_open+0x185/0x1c0
  [<ffffffff8129e3b9>] ? selinux_inode_permission+0xa9/0x170
  [<ffffffff811acb54>] do_last+0x2d4/0x7a0
  [<ffffffff811af743>] path_openat+0xb3/0x480
  [<ffffffff8116a8a1>] ? handle_mm_fault+0x251/0x3b0
  [<ffffffff811afc49>] do_filp_open+0x49/0xa0
  [<ffffffff811bbaad>] ? __alloc_fd+0xdd/0x150
  [<ffffffff8119da28>] do_sys_open+0x108/0x1f0
  [<ffffffff8119db51>] sys_open+0x21/0x30
  [<ffffffff81618959>] system_call_fastpath+0x16/0x1b

Also fix comment for ext4_read_block_bitmap_nowait()

Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agomedia: rc: unlock on error in show_protocols()
Dan Carpenter [Tue, 27 Nov 2012 16:35:09 +0000]
media: rc: unlock on error in show_protocols()

commit 30ebc5e44d057a1619ad63fe32c8c1670c37c4b8 upstream.

We recently introduced a new return -ENODEV in this function but we need
to unlock before returning.

[mchehab@redhat.com: found two patches with the same fix. Merged SOB's/acks into one patch]
Acked-by: Herton R. Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agofs: Fix possible use-after-free with AIO
Jan Kara [Tue, 29 Jan 2013 23:28:01 +0000]
fs: Fix possible use-after-free with AIO

commit 54c807e71d5ac59dee56c685f2b66e27cd54c475 upstream.

Running AIO is pinning inode in memory using file reference. Once AIO
is completed using aio_complete(), file reference is put and inode can
be freed from memory. So we have to be sure that calling aio_complete()
is the last thing we do with the inode.

Acked-by: Jeff Moyer <jmoyer@redhat.com>
CC: Christoph Hellwig <hch@infradead.org>
CC: Jens Axboe <axboe@kernel.dk>
CC: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agosysctl: fix null checking in bin_dn_node_address()
Xi Wang [Thu, 28 Feb 2013 01:05:21 +0000]
sysctl: fix null checking in bin_dn_node_address()

commit df1778be1a33edffa51d094eeda87c858ded6560 upstream.

The null check of `strchr() + 1' is broken, which is always non-null,
leading to OOB read.  Instead, check the result of strchr().

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agofirewire: add minor number range check to fw_device_init()
Tejun Heo [Thu, 28 Feb 2013 01:04:04 +0000]
firewire: add minor number range check to fw_device_init()

commit 3bec60d511179853138836ae6e1b61fe34d9235f upstream.

fw_device_init() didn't check whether the allocated minor number isn't
too large.  Fail if it goes overflows MINORBITS.

Signed-off-by: Tejun Heo <tj@kernel.org>
Suggested-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoblock: fix synchronization and limit check in blk_alloc_devt()
Tejun Heo [Thu, 28 Feb 2013 01:03:56 +0000]
block: fix synchronization and limit check in blk_alloc_devt()

commit ce23bba842aee98092225d9576dba47c82352521 upstream.

idr allocation in blk_alloc_devt() wasn't synchronized against lookup
and removal, and its limit check was off by one - 1 << MINORBITS is
the number of minors allowed, not the maximum allowed minor.

Add locking and rename MAX_EXT_DEVT to NR_EXT_DEVT and fix limit
checking.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoidr: fix a subtle bug in idr_get_next()
Tejun Heo [Thu, 28 Feb 2013 01:03:34 +0000]
idr: fix a subtle bug in idr_get_next()

commit 6cdae7416a1c45c2ce105a78187d9b7e8feb9e24 upstream.

The iteration logic of idr_get_next() is borrowed mostly verbatim from
idr_for_each().  It walks down the tree looking for the slot matching
the current ID.  If the matching slot is not found, the ID is
incremented by the distance of single slot at the given level and
repeats.

The implementation assumes that during the whole iteration id is aligned
to the layer boundaries of the level closest to the leaf, which is true
for all iterations starting from zero or an existing element and thus is
fine for idr_for_each().

However, idr_get_next() may be given any point and if the starting id
hits in the middle of a non-existent layer, increment to the next layer
will end up skipping the same offset into it.  For example, an IDR with
IDs filled between [64, 127] would look like the following.

          [  0  64 ... ]
       /----/   |
       |        |
      NULL    [ 64 ... 127 ]

If idr_get_next() is called with 63 as the starting point, it will try
to follow down the pointer from 0.  As it is NULL, it will then try to
proceed to the next slot in the same level by adding the slot distance
at that level which is 64 - making the next try 127.  It goes around the
loop and finds and returns 127 skipping [64, 126].

Note that this bug also triggers in idr_for_each_entry() loop which
deletes during iteration as deletions can make layers go away leaving
the iteration with unaligned ID into missing layers.

Fix it by ensuring proceeding to the next slot doesn't carry over the
unaligned offset - ie.  use round_up(id + 1, slot_distance) instead of
id += slot_distance.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: David Teigland <teigland@redhat.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

6 years agoxen/blkback: Don't trust the handle from the frontend.
Konrad Rzeszutek Wilk [Wed, 16 Jan 2013 16:36:23 +0000]
xen/blkback: Don't trust the handle from the frontend.

commit 01c681d4c70d64cb72142a2823f27c4146a02e63 upstream.

The 'handle' is the device that the request is from. For the life-time
of the ring we copy it from a request to a response so that the frontend
is not surprised by it. But we do not need it - when we start processing
I/Os we have our own 'struct phys_req' which has only most essential
information about the request. In fact the 'vbd_translate' ends up
over-writing the preq.dev with a value from the backend.

This assignment of preq.dev with the 'handle' value is superfluous
so lets not do it.

Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>