cascardo/linux.git
11 years agoCHROMIUM: drm/exynos: dp: Add force_connected flag
Sean Paul [Fri, 25 Jan 2013 22:09:04 +0000 (17:09 -0500)]
CHROMIUM: drm/exynos: dp: Add force_connected flag

Add a new flag to the DisplayPort platform data to optionally force
is_connected to return true. This is useful for cases such as ours where
we don't have a proper DP monitor connected, but rather a noisy bridge
that doesn't know when it's actually ready to assert hotplug.

This will also prevent drm from assuming we're disconnected and detaching
our encoder from the connector (thus losing us forever as a result of
the interrupt scheme in the driver, which needs to be fixed).

BUG=chromium-os:38006
TEST=Tested manually using Doug's reproduction instructions in c17 on the bug

Change-Id: If2034458d9de93259e92a0f3eb8f386c340b0d7d
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/42042
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoRevert "BACKPORT: r8169: enable internal ASPM and clock request settings"
Shawn Nematbakhsh [Tue, 15 Jan 2013 17:50:29 +0000 (09:50 -0800)]
Revert "BACKPORT: r8169: enable internal ASPM and clock request settings"

This reverts commit d6a3750eef2e494e2f78160c5f8b37a7d810bff7.

The original change had the undesired side-effect of delaying link
status detection, and no acceptable solution was found.

Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
BUG=chrome-os-partner:16247.
TEST=manual. Test ethernet plug/unplug, verify no delay in link status
detect.

Change-Id: I7b7c312a47d065fd25c61949f71436cfe6cbc985
Reviewed-on: https://gerrit.chromium.org/gerrit/41287
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>

11 years agoCHROMIUM: ALSA: hda/ca0132 - Add key-click reduction feature.
Chih-Chung Chang [Wed, 16 Jan 2013 03:28:56 +0000 (11:28 +0800)]
CHROMIUM: ALSA: hda/ca0132 - Add key-click reduction feature.

This patch is provided by Creative.

BUG=chrome-os-partner:17241
TEST=check there is an additional mixer control in "alsamixer -c 0"

Signed-off-by: Chih-Chung Chang <chihchung@chromium.org>
Change-Id: Ifcb523a234d0d7ee9908911714b90dbcc4783ec1
Reviewed-on: https://gerrit.chromium.org/gerrit/41349
Reviewed-by: Dylan Reid <dgreid@chromium.org>
11 years agoUPSTREAM: /proc/pid/status: add "Seccomp" field
Kees Cook [Tue, 18 Dec 2012 00:03:14 +0000 (16:03 -0800)]
UPSTREAM: /proc/pid/status: add "Seccomp" field

It is currently impossible to examine the state of seccomp for a given
process.  While attaching with gdb and attempting "call
prctl(PR_GET_SECCOMP,...)" will work with some situations, it is not
reliable.  If the process is in seccomp mode 1, this query will kill the
process (prctl not allowed), if the process is in mode 2 with prctl not
allowed, it will similarly be killed, and in weird cases, if prctl is
filtered to return errno 0, it can look like seccomp is disabled.

When reviewing the state of running processes, there should be a way to
externally examine the seccomp mode.  ("Did this build of Chrome end up
using seccomp?" "Did my distro ship ssh with seccomp enabled?")

This adds the "Seccomp" line to /proc/$pid/status.

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: James Morris <jmorris@namei.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
BUG=None
TEST=stout build, "Seccomp" field visible in "status" file

(cherry picked from commit 2f4b3bf6b2318cfaa177ec5a802f4d8d6afbd816)
Change-Id: I9200bf8e7535055e5a849548eb6199812d69b6d8
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41959
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agochromeos: Clarify comment in smatch script
Simon Que [Fri, 25 Jan 2013 00:10:21 +0000 (16:10 -0800)]
chromeos: Clarify comment in smatch script

BUG=chromium-os:37418
TEST=None

Change-Id: I8aa198a95efbe935ec16806383be37bc52318f27
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41973
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132 - configure DMIC gain block.
Chee Kin Cheong [Wed, 23 Jan 2013 12:44:28 +0000 (04:44 -0800)]
CHROMIUM: ALSA: hda/ca0132 - configure DMIC gain block.

Configure the DMIC input gain block when switching to use DMIC.  This
provides 20dB of additional input gain when using the built-in digital
microphone.

This should be changed to export a control to user-space, but keep it
simple for the R25 release.

BUG=chrome-os-partner:16865
TEST=arecord a reference signal and check that there is now 20dB of
gain applied.  Hangout and check that the participant on the other
side can hear you.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Change-Id: I2a748f5774e50e513b1107fc3119641aa227453b
Reviewed-on: https://gerrit.chromium.org/gerrit/41816
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
11 years agoUPSTREAM: SCSI & usb-storage: add try_rc_10_first flag
Shawn Nematbakhsh [Thu, 24 Jan 2013 05:18:06 +0000 (21:18 -0800)]
UPSTREAM: SCSI & usb-storage: add try_rc_10_first flag

Several bug reports have been received recently for USB mass-storage
devices that don't handle READ CAPACITY(16) commands properly.  They
report bogus sizes, in some cases becoming unusable as a result.

The bugs were triggered by commit
09b6b51b0b6c1b9bb61815baf205e4d74c89ff04 (SCSI & usb-storage: add
flags for VPD pages and REPORT LUNS), which caused usb-storage to stop
overriding the SCSI level reported by devices.  By default, the sd
driver will try READ CAPACITY(16) first for any device whose level is
above SCSI_SPC_2.

It seems likely that any device large enough to require the use of
READ CAPACITY(16) (i.e., 2 TB or more) would be able to handle READ
CAPACITY(10) commands properly.  Indeed, I don't know of any devices
that don't handle READ CAPACITY(10) properly.

Therefore this patch (as1559) adds a new flag telling the sd driver
to try READ CAPACITY(10) before READ CAPACITY(16), and sets this flag
for every USB mass-storage device.  If a device really is larger than
2 TB, sd will fall back to READ CAPACITY(16) just as it used to.

This fixes Bugzilla #43391.

BUG=chrome-os-partner:16619
TEST=Manual. Build recovery image on previously failing USB disk, verify
recovery install on generic x86 platform.

Change-Id: I82899c04e2f2b65292a8f55505b347a2b72f8f6e
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Hans de Goede <hdegoede@redhat.com>
CC: "James E.J. Bottomley" <JBottomley@parallels.com>
CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41913

11 years agoHACK: arm: exynos: Force 0.8x instead of bypass for VDD_INT
Abhilash Kesavan [Fri, 18 Jan 2013 06:47:43 +0000 (12:17 +0530)]
HACK: arm: exynos: Force 0.8x instead of bypass for VDD_INT

Increase the INT voltage margins for all speed groups. According to
the h/w guys at Samsung this is fine except for a power increase.  At
the moment this is considered an interrim (but safe) fix while Samsung
looks for a root cause.

Side notes:
* ABB 1.0x appears to work better than bypass (which makes no sense)
  but still doesn't work as well as ABB 0.8x (this patch).
* ABB 1.2x also appears to work.  It ran 690 cycles of the test below
  before I stopped it.
* Leaving ABB off and increasing VDD_INT also appears to work to some
  extent, but not as well as this patch.

BUG=chrome-os-partner:15327
TEST=Run the following test on a device that fails 100% without
  this patch:
  1. Reboot
  2. suspend_stress_test -c5 --backup_rtc
  3. Goto step 1
  With this patch I went through 728 cycles of the above with no
  hangs at suspend.  Testing was done via an init script that is
  attached at comment #71 of the referenced bug.
TEST=Run the above test on several devices that have no problems
  without this patch.  Confirm that this patch doesn't introduce
  additional suspend/resume problems.
TEST=General stability testing should be performed.

Change-Id: I5925ace16e7bc00207f2218c4ccb4cc6453ec44a
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41711

11 years agodrm/exynos: Reset mixer when we dpms off
Sean Paul [Wed, 23 Jan 2013 18:55:05 +0000 (13:55 -0500)]
drm/exynos: Reset mixer when we dpms off

Reset the mixer when we power off, this will perform a soft reset on the
IP block and disable IRQs.

BUG=chromium-os:37797
TEST=Tested by hand with DRM_ERROR logging. Made sure IRQ no longer
fires after dpms off.

Change-Id: I35a438b07085173776257bba93ffe603d096f2be
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41835
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoHID: magicmouse: Set multi-touch keybits for Magic Mouse
Che-Liang Chiou [Wed, 16 Jan 2013 00:06:52 +0000 (16:06 -0800)]
HID: magicmouse: Set multi-touch keybits for Magic Mouse

The driver emits multi-touch events for Magic Trackpad as well as Magic
Mouse, but it does not set keybits that are related to multi-touch event
for Magic Mouse; so set these keybits.

The keybits that are not set cause trouble because user programs often
probe these keybits for self-configuration and thus they cannot operate
properly if the keybits are not set.

Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
BUG=chromium-os:36322
TEST=On Snow, connect Magic Mouse and perform 2-finger scroll.
     Check /var/log/Xorg.0.log and does not see error message of
     "Too many fingers! Max is 1, but I got 2"

Change-Id: Ie7fd4327935555f41577e2c8c6d6d78b52934f1a
Reviewed-on: https://gerrit.chromium.org/gerrit/41322
Commit-Queue: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
11 years agoCHROMIUM: chromeos_laptop : Remove cyapa device on link
Benson Leung [Tue, 22 Jan 2013 23:25:44 +0000 (15:25 -0800)]
CHROMIUM: chromeos_laptop : Remove cyapa device on link

The cyapa device is no longer being used on this platform.
Remove from chromeos_laptop so we don't throw a warning
on systems with atmel pads.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17372
TEST=Check that the touchpad works normally.
Check that the following warning doesn't appear in dmesg :
__add_probed_i2c_device failed to register device 1-67

Change-Id: Iac9adb7f42cc5836c2831b4cee8167ab482dae24
Reviewed-on: https://gerrit.chromium.org/gerrit/41782
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>

11 years agoCHROMIUM: exynos: dts: Update PS8622 bridge address
Vic Yang [Sat, 19 Jan 2013 06:39:04 +0000 (14:39 +0800)]
CHROMIUM: exynos: dts: Update PS8622 bridge address

The bridge is now at 0x8 instead of 0x48.

Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=none
TEST=See display on Spring.

Change-Id: I4903824d401c5ac46cc101ec39b5c6f01809d1db
Reviewed-on: https://gerrit.chromium.org/gerrit/41689
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
11 years agoCHROMIUM: HACK: drm/i915: Don't warn on pin_count < 0
Sean Paul [Fri, 18 Jan 2013 16:37:00 +0000 (11:37 -0500)]
CHROMIUM: HACK: drm/i915: Don't warn on pin_count < 0

We've had some warnings on resume with an external monitor connected
where the pin_count for the fb's fence register is less than zero. After
some analysis, we're unpinning it twice on resume, once via set_base on
mode_set and then again when we do an rmfb from userspace.

The warning isn't terribly interesting when pin_count is less than zero,
and the relevant code has been refactored upstream such that it's likely
not an issue any longer.

This hack avoids warning when pin count is negative.

BUG=chrome-os-partner:12670
TEST=Tested manually with link connected to DP display. Idle
suspend/resume and check the logs for WARNING.

Change-Id: Idba3e75e48d085faa5bff5f7f165eaef595829be
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41639
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts : Set power/wakeup to disabled by default.
Benson Leung [Sat, 19 Jan 2013 01:35:52 +0000 (17:35 -0800)]
CHROMIUM: Input: atmel_mxt_ts : Set power/wakeup to disabled by default.

Userspace will change it to enabled if needed.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17336
TEST=cat /sys/bus/i2c/devices/2-004a/power/wakeup
Check that it returns "disabled"
Suspend the system using powerd_suspend.
Check that the touch device 2-004a does not wake the system.

Change-Id: If5ac3b30c137d16e5592d4a2ee555fd2533b0caa
Reviewed-on: https://gerrit.chromium.org/gerrit/41679
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts : On Tpads, enable T42, disable T19 on suspend
Benson Leung [Sat, 19 Jan 2013 01:35:19 +0000 (17:35 -0800)]
CHROMIUM: Input: atmel_mxt_ts : On Tpads, enable T42, disable T19 on suspend

To work around an issue where an idle-suspended system may wake
unnecessarily when the lid is closed because the B panel comes close to
the trackpad, enable touch suppression (t42) when suspending. Also
disable T19, for the button, to allow the button to be pressed if
the case is flexed without the system waking.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17336
TEST=1. Suspend the system with powerd_suspend with lid open.
2. Touch the touchpad. Make sure the system still wakes.
3. Suspend again with powerd_suspend
4. Close the lid. Ensure the system does not wake by observing the system
status light.

Change-Id: I858af27e65ce491c8eb99f5b8db13ea91f789f3e
Reviewed-on: https://gerrit.chromium.org/gerrit/41678
Reviewed-by: Puneet Kumar <puneetster@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: chromeos: Add script to update smatch error whitelist
Simon Que [Fri, 11 Jan 2013 01:14:37 +0000 (17:14 -0800)]
CHROMIUM: chromeos: Add script to update smatch error whitelist

This script can be used to add known smatch errors for new boards to the
smatch error whitelist.  It runs the kernel build and check for each new
board and aggregates the new errors into a log file.

BUG=chromium-os:37418
TEST=Run "./update_smatch_whitelist x86-generic amd64-generic daisy"
Make sure there was a log file produced containing new errors.

Change-Id: I6912b6a0d9b9d577af296b15ef1e356e55a9f3ce
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41079
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoBACKPORT: fs: ecryptfs: initialize payload_len in keystore.c
Simon Que [Thu, 17 Jan 2013 02:04:52 +0000 (18:04 -0800)]
BACKPORT: fs: ecryptfs: initialize payload_len in keystore.c

This is meant to remove a compiler warning.  It should not make any
functional change.

payload_len should be initialized when it is passed to
write_tag_64_packet() as a pointer.  If that call fails, this function
should return early, and payload_len won't be used.

The warning is:
fs/ecryptfs/keystore.c:1168:28: warning: 'payload_len' may be used
uninitialized in this function [-Wmaybe-uninitialized]

BUG=chromium-os:5542
TEST=emerge-x86-generic chromeos-kernel, this warning should not appear.

Change-Id: Ia4fb282b3b32eadecc7d2756c6a701864480618b
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41580
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: drm/exynos: use flip_desc queue to track page flips
Mandeep Singh Baines [Tue, 18 Dec 2012 18:54:12 +0000 (10:54 -0800)]
CHROMIUM: drm/exynos: use flip_desc queue to track page flips

The data structures and code used to manage page flips are
starting to get hairy and difficult to reason about. Let's
simplify things by using a simple queue of flip descriptors.

BUG=chrome-os-partner:15241
TEST=Multiple VT switch, sign in/out, suspend, idle suspend,
     WebGL. Tested with HDMI and without.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I318a13881241406d72045b3b25428d332c63593b
Reviewed-on: https://gerrit.chromium.org/gerrit/39935
Reviewed-by: Sean Paul <seanpaul@chromium.org>
11 years agoCHROMIUM: drm/exynos: fix refcounting in hdmi (mixer) path
Mandeep Singh Baines [Fri, 7 Dec 2012 19:27:46 +0000 (11:27 -0800)]
CHROMIUM: drm/exynos: fix refcounting in hdmi (mixer) path

Previously, if two fbs were ready to be flipped during the same
vblank, the kds_callback would drop the frame which came earlier
and call apply on the later frame. This worked fine on fimd but
caused problems on hdmi (mixer). The mixer will only accept one
apply call per vblank and ignore calls after that.

Since, we already applied the earlier frame, the mixer would
ignore the later frame. So the mixer flips the earlier fb while
the refcounting code thinks we are flipping the later fb. So the
ref for the earlier fb gets dropped even though its the scanout
fb. This can cause an IOMMU page fault.

The fix is to hold the later fb in an extra slot and then flip
to it on the next vblank.

In order, to allow calling apply from finish_page_flip, I had to
re-structure mixer_irq_handler in order to avoid spinlock
recursion on reg_slock.

BUG=chrome-os-partner:15241
TEST=see below

Before:

$ DISPLAY=:0.0 xrandr --output eDP-1 --off
* crash *

After:

export DISPLAY=:0.0
for i in `seq 20`; do
  xrandr --output eDP-1 --off;
  sleep 5;
  xrandr --output eDP-1 --auto;
  sleep 5;
done

* no crash *

Change-Id: I45cdad3dea94c9018e6a5fef9f9807b225130cea
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39386
Reviewed-by: Sean Paul <seanpaul@chromium.org>
11 years agoUPSTREAM: mwifiex: correction in status codes used for association failure
Bing Zhao [Fri, 18 Jan 2013 01:58:03 +0000 (17:58 -0800)]
UPSTREAM: mwifiex: correction in status codes used for association failure

When AP responds with appropriate status code, we forward that
code correctly to cfg80211. But sometimes when there is no
response from AP, our firmware uses proprietary status codes.
We will map authentication timeout to WLAN_STATUS_AUTH_TIMEOUT
and other proprietary codes to WLAN_STATUS_UNSPECIFIED_FAILURE.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
BUG=chrome-os-partner:14966
TEST=check driver/wpa_supplicant logs and confirm that status
code 16 is informed for "status code=2 err=0xfffc a_id=0xffff"
authentication timeout and status code 1 is informed for
"status code=1 err=0xfffc a_id=0xffff" association timeout.

Change-Id: I8892b51073e41fe0f2db908a0f60046a806e1338
Reviewed-on: https://gerrit.chromium.org/gerrit/41611
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agoCHROMIUM: drm/exynos: fb: Don't take reference when mapping fb's gem objects
Daniel Kurtz [Tue, 8 Jan 2013 17:31:02 +0000 (01:31 +0800)]
CHROMIUM: drm/exynos: fb: Don't take reference when mapping fb's gem objects

The fb itself already takes a reference for all of its gem objects when
it is created, and releases them last when it is destroyed.  Taking an
additional reference when the gem objects are mapped into device memory,
which only happens when the fb is created, seems redundant.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=builds clean; sanity check on device

Change-Id: I63643e974a8cf7d04d32b96bebd5dad4cc281ba8
Reviewed-on: https://gerrit.chromium.org/gerrit/40448
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: bluetooth: initialize rfc struct in l2cap_core.c
Simon Que [Thu, 17 Jan 2013 00:19:26 +0000 (16:19 -0800)]
CHROMIUM: bluetooth: initialize rfc struct in l2cap_core.c

Removes warnings:
warning: 'rfc.max_pdu_size' may be used uninitialized in this function
warning: 'rfc.monitor_timeout' may be used uninitialized in this function
warning: 'rfc.retrans_timeout' may be used uninitialized in this function
warning: 'rfc.mode' may be used uninitialized in this function

This is based on (but not compatible with) an upstream patch:
c20f8e35ca8b0583323d310ec63a0f0d17cfdcf5

This patch can be discarded when moving to kernel-next

BUG=chromium-os:5542
TEST=emerge chromeos-kernel, make sure l2cap_core has no warnings

Change-Id: I564eca4421a6c4f8f4dcddfacd56e0d574885596
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41481
Reviewed-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoBACKPORT: hid: Fix uninitialized variable "size" in hid-wiimote-debug
Simon Que [Thu, 17 Jan 2013 19:44:47 +0000 (11:44 -0800)]
BACKPORT: hid: Fix uninitialized variable "size" in hid-wiimote-debug

This variable is initialized conditionally, based on whether a wiimote
call succeeds.  However, the logic is not obvious to the compiler so it
throws a warning.  Eliminate the warning by initializing "size" to 0.

The warning is:
files/drivers/hid/hid-wiimote-debug.c:69:18: warning: 'size' may be used
uninitialized in this function [-Wmaybe-uninitialized]

BUG=chromium-os:5542
TEST=emerge-daisy chromeos-kernel, make sure this warning doesn't appear

Change-Id: I63896a2dd9e08cfd25b25b81d447c7fe9baeae2f
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41558
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agodrm/i915: Honor i915_min_freq post resume
Sameer Nanda [Wed, 16 Jan 2013 22:27:37 +0000 (14:27 -0800)]
drm/i915: Honor i915_min_freq post resume

The i915_min_freq setting was not getting honored on the resume path.
Fixed it.

BUG=chrome-os-partner:16439
TEST="cat /sys/kernel/debug/dri/0/i915_min_freq" and remember the value
returned. Do a suspend/resume cycle. cat the i915_min_freq file again,
it must return the same value as read earlier.

Change-Id: Ie3cc8e8794a59c154b511e24e468daef94a44765
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41461

11 years agoBACKPORT: [media] uvcvideo: Fix a "ignoring return value of '__clear_user'" warning
Simon Que [Wed, 16 Jan 2013 23:05:52 +0000 (15:05 -0800)]
BACKPORT: [media] uvcvideo: Fix a "ignoring return value of '__clear_user'" warning

Pulling in commit 57fb4a4831793de9e8dbdfc8dc5eb8796026d47e from
kernel-next/upstream.

Note that the directory structure has changed upstream, so that patch
does not apply to kernel-3.4 anymore.

This removes the warning:
src/third_party/kernel/files/drivers/media/video/uvc/uvc_v4l2.c:1100:14:
warning: ignoring return value of '__clear_user', declared with
attribute warn_unused_result [-Wunused-result]

BUG=chromium-os:5542
TEST=build kernel and make sure uvc_v412.c does not have this warning.

Change-Id: If4d80dcf79a750fd9b812ffe925875be9b809ec7
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41470
Reviewed-by: David James <davidjames@chromium.org>
11 years agoCHROMIUM: sound/pci/hda: fix warnings in patch_ca0132.c
Simon Que [Wed, 16 Jan 2013 23:55:50 +0000 (15:55 -0800)]
CHROMIUM: sound/pci/hda: fix warnings in patch_ca0132.c

These problems were introduced by us and not by upstream.

In chipio_send():
  There should be a space between "KERN_ERR" and the following string.

In dspio_send_scp_message():
  int retry is never used, so remove it.

In resume_mic1():
  There is no return value.  Change to return void.

In ca0132_update_latency():
  Do not mix variable declarations and code.

idata_read() is not used, so remove it.

BUG=chromium-os:5542
TEST=emerge chromeos-kernel, make sure there are no warnings in patch_ca0132.c

Change-Id: I40a877605eb38736521b3c6335dc0801b36e883f
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41480
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoBACKPORT: iwlwifi: fix unused variable warning
Oliver Hartkopp [Sun, 25 Mar 2012 06:43:24 +0000 (08:43 +0200)]
BACKPORT: iwlwifi: fix unused variable warning

In the case of disabled CONFIG_IWLWIFI_DEBUGFS option the compiler complains
about the unused variable 'img'. Fix this by moving the 'img' definition.

Taken from kernel-next commit a855f7ee64fedbe831859d53b20650c2224afecc

BUG=chromium-os:5542
TEST=emerge chromeos-kernel, make sure no warnings in iwl-mac80211.o

Change-Id: I34bcd89a9d96a5baecf064c39ee34bc6e25c9c92
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41487
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: ALSA: ASoC: max98095 - disable analog inputs to speaker mux.
Dylan Reid [Thu, 17 Jan 2013 04:29:23 +0000 (20:29 -0800)]
CHROMIUM: ALSA: ASoC: max98095 - disable analog inputs to speaker mux.

ChromeOS only ever uses the DAC1 input, and routing the analog inputs
can be harmful (since they are actually DMIC inputs on Lucas).

BUG=chromium-os:37217
TEST=in dev mode run alsamixer and check available Speaker mux inputs.

Change-Id: I77c5b2a829e8c63035ac8006fa8eca722ed50dd0
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41510
Reviewed-by: Evan Ragsdale <evan.ragsdale@maximintegrated.com>
Reviewed-by: Doug Anderson <dianders@chromium.org>
11 years agoCHROMIUM: platform/x86: chromeos_acpi: cast sizeof(array) to u32 before use
Simon Que [Thu, 17 Jan 2013 00:37:55 +0000 (16:37 -0800)]
CHROMIUM: platform/x86: chromeos_acpi: cast sizeof(array) to u32 before use

Removes a compiler warning:
"comparison of distinct pointer types lacks a cast"

BUG=chromium-os:5542
TEST=emerge chromeos-kernel, should not see warnings in chromeos_acpi.o

Change-Id: Ia4779db9d30bd0a1206fe339d682d56411f6105b
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41483
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: cpufreq: explicit typecasts in cpufreq_interactive.c
Simon Que [Thu, 17 Jan 2013 02:25:57 +0000 (18:25 -0800)]
CHROMIUM: cpufreq: explicit typecasts in cpufreq_interactive.c

BUG=chromium-os:5542
TEST=emerge chromeos-kernel, no warnings in cpu_interactive.o

Change-Id: I3d4a0f6dc47edf21108303fabcba59130a05b899
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41499
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
11 years agoReiplace HDMI unplug polling with HPD line reading.
Stuart Abercrombie [Thu, 17 Jan 2013 00:52:17 +0000 (16:52 -0800)]
Reiplace HDMI unplug polling with HPD line reading.

It looked as if this didn't work at the HW level, but it actually does.
Polling cost us about 100mW if an HDMI monitor was attached.
This also responds more quickly to unplugging.

Based on upstream change:
http://lists.freedesktop.org/archives/intel-gfx/2012-December/023314.html

BUG=chromium-os:37674
TEST=HDMI hotplug works and responds immediately
Change-Id: I9e88671b1ac0e6204feda2666608f30427c8bb79
Reviewed-on: https://gerrit.chromium.org/gerrit/41474
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stuart Abercrombie <sabercrombie@chromium.org>
Commit-Queue: Stuart Abercrombie <sabercrombie@chromium.org>

11 years agoRevert "CHROMIUMOS: mwifiex: Disable transmit aggregation"
Paul Stewart [Wed, 16 Jan 2013 23:00:17 +0000 (15:00 -0800)]
Revert "CHROMIUMOS: mwifiex: Disable transmit aggregation"

New firmware fixes this issue, so this change is no longer necessary.

This reverts commit 6fcfecca9575848120e8c9e35b3ad848b1e85f29

BUG=chrome-os-partner:16279
TEST=Associate with Android AP

Change-Id: Id0542875bc599bf5da23cdeb0da57739cc60c44d
Reviewed-on: https://gerrit.chromium.org/gerrit/41467
Reviewed-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Christopher Wiley <wiley@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoRevert "Revert "drm/i915: Mark the FB's bo as busy when we pageflip""
Stéphane Marchesin [Wed, 16 Jan 2013 19:53:04 +0000 (11:53 -0800)]
Revert "Revert "drm/i915: Mark the FB's bo as busy when we pageflip""

This reverts commit edf0e91c645c10f00f1fb3e5b86bac132d27d9e7.

We previously reverted it because we thought this might cause test
crashes, but it is not the case, so let's reland this change for
good.

BUG=chromium-os:37791
TEST=compiles, works on Alex.

Change-Id: I7dcf708ef5c601e463f10929b802d0682a8be853
Reviewed-on: https://gerrit.chromium.org/gerrit/41460
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Tested-by: Ilja H. Friedel <ihf@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>

11 years agoCHROMIUM: Add file containing known smatch errors
Simon Que [Fri, 21 Dec 2012 00:40:48 +0000 (16:40 -0800)]
CHROMIUM: Add file containing known smatch errors

This file contains the known smatch errors in the kernel.  Currently it
contains only the errors from i386 boards (i.e. 32-bit x86).  In the
future we should add errors from x86_64 and arm boards.

BUG=chromium-os:37418
TEST="FEATURES=test emerge-mario chromeos-kernel" runs successfully
CQ-DEPEND=I9d1f11d00c7852c68d26d0b696bb28e47573e154

Change-Id: If47037fc31960933d18eec5825c996a2035f8f48
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40056
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agogpu: vithar: remove unused functions
Mandeep Singh Baines [Tue, 8 Jan 2013 00:06:09 +0000 (16:06 -0800)]
gpu: vithar: remove unused functions

Fixes the following warnings:

drivers/gpu/arm/t6xx/kbase/src/linux/config/tpip/mali_kbase_config_exynos5.c:180:12: warning: 'pm_callback_runtime_power_on' defined but not used [-Wunused-function]
drivers/gpu/arm/t6xx/kbase/src/linux/config/tpip/mali_kbase_config_exynos5.c:193:13: warning: 'pm_callback_runtime_power_off' defined but not used [-Wunused-function]
drivers/gpu/arm/t6xx/kbase/src/linux/config/tpip/mali_kbase_config_exynos5.c:1213:13: warning: 'kbase_platform_runtime_term' defined but not used [-Wunused-function]
drivers/gpu/arm/t6xx/kbase/src/linux/config/tpip/mali_kbase_config_exynos5.c:1222:19: warning: 'kbase_platform_runtime_init' defined but not used [-Wunused-function]

BUG=chromium-os:5542
TEST=compile,run

Change-Id: Ieb911fe7566ab177eee8c03877ba5753a768cb5f
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40570
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts - Add support for T65, Lensbending Correction
Benson Leung [Thu, 10 Jan 2013 01:30:44 +0000 (17:30 -0800)]
CHROMIUM: Input: atmel_mxt_ts - Add support for T65, Lensbending Correction

Add T65 object to list of supported objects, and mark it readable
and writable.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chrome-os-partner:17253
TEST=cat /sys/kernel/debug/atmel_mxt_ts/2-004a/object
Check that the following object appears:
Type: 65
[ 0]: 00 (0)
[ 1]: 00 (0)
[ 2]: 00 (0)
[ 3]: 00 (0)
[ 4]: 00 (0)
[ 5]: 00 (0)
[ 6]: 00 (0)
[ 7]: 00 (0)
[ 8]: 00 (0)
[ 9]: 00 (0)
[10]: 00 (0)
[11]: 00 (0)
[12]: 00 (0)
[13]: 00 (0)
[14]: 00 (0)
[15]: 00 (0)
[16]: 00 (0)

Change-Id: I8400bd53d619ff0e4af4c4d5ae7f54bb5dc6e9b8
Reviewed-on: https://gerrit.chromium.org/gerrit/41310
Reviewed-by: Yufeng Shen <miletus@chromium.org>
Commit-Queue: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoUPSTREAM: cfg80211: fix interface combinations check for ADHOC(IBSS)
Liang Li [Thu, 2 Aug 2012 22:55:41 +0000 (22:55 +0000)]
UPSTREAM: cfg80211: fix interface combinations check for ADHOC(IBSS)

partial of commit 8e8b41f9d8c8e63fc92f899ace8da91a490ac573 upstream.

As part of commit 463454b5dbd8 ("cfg80211: fix interface
combinations check"), this extra check was introduced:

       if ((all_iftypes & used_iftypes) != used_iftypes)
               goto cont;

However, most wireless NIC drivers did not advertise ADHOC in
wiphy.iface_combinations[i].limits[] and hence we'll get -EBUSY
when we bring up a ADHOC wlan with commands similar to:

 # iwconfig wlan0 mode ad-hoc && ifconfig wlan0 up

In commit 8e8b41f9d8c8e ("cfg80211: enforce lack of interface
combinations"), the change below fixes the issue:

       if (total == 1)
               return 0;

But it also introduces other dependencies for stable. For example,
a full cherry pick of 8e8b41f9d8c8e would introduce additional
regressions unless we also start cherry picking driver specific
fixes like the following:

  9b4760e  ath5k: add possible wiphy interface combinations
  1ae2fc2  mac80211_hwsim: advertise interface combinations
  20c8e8d  ath9k: add possible wiphy interface combinations

And the purpose of the 'if (total == 1)' is to cover the specific
use case (IBSS, adhoc) that was mentioned above. So we just pick
the specific part out from 8e8b41f9d8c8e here.

Doing so gives stable kernels a way to fix the change introduced
by 463454b5dbd8, without having to make cherry picks specific to
various NIC drivers.

Cc: stable@vger.kernel.org
Signed-off-by: Liang Li <liang.li@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Change-Id: Ib81e4382f283752acbd7be03f9c49d5d92511400
BUG=chrome-os-partner:16305
TEST=Boot, login as user, join an IBSS network, run suspend-resume test or
close the lid for few seconds and then open the lid. Check dmesg for WARNINGS.
Signed-off-by: Ashok Nagarajan <asnagarajan@chromium.org>
Tested-by: Ashok Nagarajan <asnagarajan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41294
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: ath9k: Fix a WARNING on suspend/resume with IBSS
Mohammed Shafi Shajakhan [Wed, 6 Jun 2012 05:03:10 +0000 (10:33 +0530)]
UPSTREAM: ath9k: Fix a WARNING on suspend/resume with IBSS

this patch is dependent on the patch "cfg80211: fix interface
combinations"

In ath9k currently we have ADHOC interface as a single incompatible
interface. when drv_add_interface is called during resume we got to
consider number of vifs already present in addition to checking the
drivers 'opmode' information about ADHOC.  we incorrectly assume
an ADHOC interface is already present. Then we may miss some driver
specific data for the ADHOC interface after resume.

The above mentioned checks can be removed from the driver,
as the patch 'cfg80211: fix interface combinations' ensures that
if an interface type is not advertised by the driver in any of the
interface combinations(via ieee80211_iface_combination) then it shall
be treated as a single incompatible interface. Fixes the following
warning on suspend/resume with ibss interface.

        ath: phy0: Cannot create ADHOC interface when other
        interfaces already exist.
        WARNING: at net/mac80211/driver-ops.h:12
        ieee80211_reconfig+0x1882/0x1ca0 [mac80211]()
        Hardware name: 2842RK1
        wlan2:  Failed check-sdata-in-driver check, flags: 0x0

        Call Trace:
        [<c01361b2>] warn_slowpath_common+0x72/0xa0
        [<f8aaa7c2>] ? ieee80211_reconfig+0x1882/0x1ca0
        [mac80211]
        [<f8aaa7c2>] ? ieee80211_reconfig+0x1882/0x1ca0
        [mac80211]
        [<c0136283>] warn_slowpath_fmt+0x33/0x40
        [<f8aaa7c2>] ieee80211_reconfig+0x1882/0x1ca0 [mac80211]
        [<c06c1d1a>] ? mutex_lock_nested+0x23a/0x2f0
        [<f8a95097>] ieee80211_resume+0x27/0x70 [mac80211]
        [<fd177edf>] wiphy_resume+0x8f/0xa0 [cfg80211]

Cc: stable@vger.kernel.org
Cc: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Change-Id: I7edce69980a59b83f67c24cbf2b02e62ce5525c3
BUG=chrome-os-partner:16305
TEST=Boot, login as user, join an IBSS network, run suspend-resume test or
close the lid for few seconds and then open the lid. Check dmesg for WARNINGS.
Signed-off-by: Ashok Nagarajan <asnagarajan@chromium.org>
Tested-by: Ashok Nagarajan <asnagarajan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41293
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: cfg80211: fix interface combinations check
Johannes Berg [Tue, 5 Jun 2012 10:16:50 +0000 (12:16 +0200)]
UPSTREAM: cfg80211: fix interface combinations check

If a given interface combination doesn't contain
a required interface type then we missed checking
that and erroneously allowed it even though iface
type wasn't there at all. Add a check that makes
sure that all interface types are accounted for.

Cc: stable@kernel.org
Reported-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Change-Id: I46925dac512f669f5431861a8e5153e24c9afb08
BUG=chrome-os-partner:16305
TEST=Boot, login as user, join an IBSS network, run suspend-resume test or
close the lid for few seconds and then open the lid. Check dmesg for WARNINGS.
Signed-off-by: Ashok Nagarajan <asnagarajan@chromium.org>
Tested-by: Ashok Nagarajan <asnagarajan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41292
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoCHROMIUM: drm/exynos: drop fb reference in page_flip error path
Mandeep Singh Baines [Tue, 15 Jan 2013 21:15:34 +0000 (13:15 -0800)]
CHROMIUM: drm/exynos: drop fb reference in page_flip error path

Commit "CHROMIUM: drm/exynos: Fix fb refcounting", moved the
exynos_drm_fb_get before the kds failure check. To avoid a leak,
we need to drop the reference if kds fails.

BUG=chrome-os-partner:16069
TEST=compile,run

Change-Id: I832d0f42884ba33953fa40bb156b38e01bf8a3c5
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41302
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: config: enable test_nx test
Kees Cook [Wed, 2 Jan 2013 21:53:44 +0000 (13:53 -0800)]
CHROMIUM: config: enable test_nx test

Now that this test is usable again, enable it for use with autotest.

BUG=chromium-os:37746
TEST=link build, module operates as expected

Change-Id: Ie465599a9f625328119a128e4f25186b9d6c394a
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40982
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: test_nx: make test_nx work again
Kees Cook [Wed, 2 Jan 2013 21:36:02 +0000 (13:36 -0800)]
CHROMIUM: test_nx: make test_nx work again

This makes test_nx work again (has been broken 2.6.28). Can't upstream at
the moment, since upstream (after 3.6) changed module exception handlers
to be relative, which makes it impossible to represent stack and heap
exceptions on 64-bit. For now, though, we are able to use it for
autotest to evaluate our x86 kernels.

BUG=chromium-os:37746
TEST=link build

Change-Id: Ia1c322c420b2f51ed919df03397d13278895023a
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40981
Reviewed-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: drm/exynos: Fix fb refcounting
Stéphane Marchesin [Mon, 14 Jan 2013 22:22:21 +0000 (14:22 -0800)]
CHROMIUM: drm/exynos: Fix fb refcounting

Make sure to always call get before put on the fb. Before this
patch, there is a window where we can put before get if the
callback triggers right away (or if the interrupt triggers quickly
enough). We fix this by taking the reference on the fb before we
setup the async waiting.

BUG=chrome-os-partner:16069
TEST=by hand, compiles and runs (but I was never able to repro the issue)

Change-Id: Iedde277c8f9cfebf6c4f6b0675e4d3bace52f637
Reviewed-on: https://gerrit.chromium.org/gerrit/41238
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>

11 years agoRevert "drm/i915: Mark the FB's bo as busy when we pageflip"
Stéphane Marchesin [Tue, 15 Jan 2013 02:30:12 +0000 (18:30 -0800)]
Revert "drm/i915: Mark the FB's bo as busy when we pageflip"

This reverts commit d8446056008f14ac2cb36cc531a6756a380e49e9.

We are trying to nail down the cause for a recent series of test
crashes in Chrome. Since this is basically the only graphics
change in that time frame, let's try to revert this for a couple
of days and see if our tests heal.

BUG=chromium-os:37791
TEST=compiles, works on Alex.

Change-Id: I5a1086389be56ca2603371b4f89d7a1e3d2d74ee
Reviewed-on: https://gerrit.chromium.org/gerrit/41263
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
11 years agoCHROMIUM: v4l2-m2m: drop rdy_queue on STREAMOFF
John Sheu [Thu, 13 Dec 2012 01:35:08 +0000 (17:35 -0800)]
CHROMIUM: v4l2-m2m: drop rdy_queue on STREAMOFF

When a v4l2-m2m context gets a STREAMOFF call on either its CAPTURE or
OUTPUT queues, we should:
* Drop the corresponding rdy_queue, since a subsequent STREAMON expects
  an empty queue.
* Deschedule the context, as it now has at least one empty queue and
  cannot run.

Signed-off-by: John Sheu <sheu@google.com>
BUG=chrome-os-partner:10057
TEST=build, run on exynos

Change-Id: Id3994907ccb6a6ee7af187e0a5d3e55cda94c76b
Reviewed-on: https://gerrit.chromium.org/gerrit/39643
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Commit-Queue: John Sheu <sheu@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
11 years agoCHROMIUM: drm/exynos: fbdev: Don't recompute fb size in fbdev_update
Daniel Kurtz [Thu, 3 Jan 2013 03:14:21 +0000 (11:14 +0800)]
CHROMIUM: drm/exynos: fbdev: Don't recompute fb size in fbdev_update

The size variable in fbdev_update is used to set the amount of mapped RAM
needed for the framebuffer.  Thus, it is not just the number of pixels
times the bpp; it could be significantly more due to line length cache
alignment and other padding.

Thus, get the size from the gem object itself instead of computing it.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=splash screen displays correctly w/ no HDMI
TEST=splash screen displays correctly w/ HDMI

Change-Id: I7df74770d49931f98ebd62d71178755a83d6db57
Reviewed-on: https://gerrit.chromium.org/gerrit/40445
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: fbdev: Pass gem object to fbdev_update
Daniel Kurtz [Thu, 3 Jan 2013 03:09:19 +0000 (11:09 +0800)]
CHROMIUM: drm/exynos: fbdev: Pass gem object to fbdev_update

Simplify fbdev creation by just passing the just created gem object to
fbdev_update.  The gem object's buffer is always valid (or else the gem
object creation itself would have failed).

This cleans up fbdev creation by removing some unneccessary error
handling.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=splash screen displays properly w/out HDMI
TEST=splash screen displays properly w/ HDMI

Change-Id: I922d6daa44420cad4b90ef980bb7fe928e2efd16
Reviewed-on: https://gerrit.chromium.org/gerrit/40444
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoUPSTREAM: mwifiex: use correct htcapinfo for HT20 ibss network
Amitkumar Karwar [Thu, 3 Jan 2013 00:56:00 +0000 (16:56 -0800)]
UPSTREAM: mwifiex: use correct htcapinfo for HT20 ibss network

It is observed that same htcapinfo ie is included in beacon for
HT20, HT40+ and HT40- ibss networks. This patch makes sure that
we will not advertise 40Mhz flags while creating/joining ibss
network in HT20 mode.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
BUG=None
TEST=Reboot, associate to HT20 network

Change-Id: I1e144840a4258f4d5ecf8bf32f30ce78646753e6
Reviewed-on: https://gerrit.chromium.org/gerrit/40553
Reviewed-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
11 years agoCHROMIUM: v4l2-m2m: use CAPTURE queue lock
John Sheu [Tue, 11 Dec 2012 06:33:50 +0000 (22:33 -0800)]
CHROMIUM: v4l2-m2m: use CAPTURE queue lock

In v4l2_m2m_try_schedule(), use the CAPTURE queue lock when accessing
the CAPTURE queue, instead of relying on just holding the OUTPUT queue
lock.

Signed-off-by: John Sheu <sheu@google.com>
BUG=chrome-os-partner:10057
BUG=chrome-os-partner:14521
TEST=local build, run on exynos

Change-Id: I3f90d703dd051201f338d8e5758d3036150c78a2
Reviewed-on: https://gerrit.chromium.org/gerrit/39537
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
Commit-Queue: John Sheu <sheu@chromium.org>

11 years agoCHROMIUM: v4l2/exynos: move CID enums into videodev2.h
John Sheu [Sat, 5 Jan 2013 03:08:53 +0000 (19:08 -0800)]
CHROMIUM: v4l2/exynos: move CID enums into videodev2.h

<UPSTREAM MERGE NOT REQUIRED>

Move some #defines for V4L_CID_* values out of gsc-core.h and into
videodev2.h, where they belong, as they are part of the userspace API.

Signed-off-by: John Sheu <sheu@google.com>
BUG=chromium-os:37294
BUG=chrome-os-partner:10057
TEST=local build, run on snow

Change-Id: Ib06cd97f8c294a0d5f42f0b2adfefe4d761b256f
Reviewed-on: https://gerrit.chromium.org/gerrit/40499
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Tested-by: John Sheu <sheu@chromium.org>
Commit-Queue: John Sheu <sheu@chromium.org>

11 years agoCHROMIUM: exynos: reset external HSIC hub
Vincent Palatin [Fri, 26 Oct 2012 16:24:51 +0000 (09:24 -0700)]
CHROMIUM: exynos: reset external HSIC hub

The former code was only ensuring that the reset line was released but
neither doing an actual reset pulse if it was already before nor
ensuring we had proper reset timings.
If the HSIC hub was used before booting (e.g on Spring, the external
USB2 port is connected the HSIC hub, so the bootloader is using it to
boot from USB), we need to do a proper 100us low reset pulse, then wait
for 4 ms for the hub to finish initialization (as per SMSC 3503
datasheet).

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:14490
TEST=boot on Spring from a USB key connected to the external USB2 port
(which is connected to the HSIC hub
boot on Snow, do a "lsusb" and see the internal USB peripherals
connected the HSIC hub are there (e.g."ID 1410:a021 Novatel wireless"
 and "ID 2232:1037" which is webcam).

Change-Id: Idb15188aa1b1d502387a5e67b3598d016eeb6ab7
Reviewed-on: https://gerrit.chromium.org/gerrit/36693
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoUPSTREAM: ext4: avoid hang when mounting non-journal filesystems with orphan list
Theodore Ts'o [Thu, 27 Dec 2012 06:42:50 +0000 (01:42 -0500)]
UPSTREAM: ext4: avoid hang when mounting non-journal filesystems with orphan list

When trying to mount a file system which does not contain a journal,
but which does have a orphan list containing an inode which needs to
be truncated, the mount call with hang forever in
ext4_orphan_cleanup() because ext4_orphan_del() will return
immediately without removing the inode from the orphan list, leading
to an uninterruptible loop in kernel code which will busy out one of
the CPU's on the system.

This can be trivially reproduced by trying to mount the file system
found in tests/f_orphan_extents_inode/image.gz from the e2fsprogs
source tree.  If a malicious user were to put this on a USB stick, and
mount it on a Linux desktop which has automatic mounts enabled, this
could be considered a potential denial of service attack.  (Not a big
deal in practice, but professional paranoids worry about such things,
and have even been known to allocate CVE numbers for such problems.)

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
Cc: stable@vger.kernel.org
BUG=chromium-os:37768
TEST=link build, manual test with corrupted filesystem image

(cherry picked from commit 0e9a9a1ad619e7e987815d20262d36a2f95717ca)
Change-Id: I5e985a85e94f3b38f0dd5d8c1517c0bccc93eb04
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41038
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoUPSTREAM: ext4: make orphan functions be no-op in no-journal mode
Anatol Pomozov [Tue, 18 Sep 2012 17:38:59 +0000 (13:38 -0400)]
UPSTREAM: ext4: make orphan functions be no-op in no-journal mode

Instead of checking whether the handle is valid, we check if journal
is enabled. This avoids taking the s_orphan_lock mutex in all cases
when there is no journal in use, including the error paths where
ext4_orphan_del() is called with a handle set to NULL.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
BUG=chromium-os:37768
TEST=link build, manual test with corrupted filesystem image

(cherry picked from commit c9b92530a723ac5ef8e352885a1862b18f31b2f5)
Change-Id: I408cdaaa8872435f530a063bc84c3ca602e01b18
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/41037
Reviewed-by: Olof Johansson <olofj@chromium.org>
11 years agoCHROMIUM: Input: atmel_mxt_ts: Use correct max touch_major in mxt_release_all_fingers()
Yufeng Shen [Thu, 10 Jan 2013 20:00:42 +0000 (15:00 -0500)]
CHROMIUM: Input: atmel_mxt_ts: Use correct max touch_major in mxt_release_all_fingers()

We hard-coded the maximal touch_major value to be 255 in mxt_release_all_fingers().
Fixing this by using the queried actual maximal touch_major value.

Signed-off-by: Yufeng Shen <miletus@chromium.org>
BUG=chrome-os-partner:17176
TEST=1. Run evtest on the touch device
     2. Keep touching the device while closing the lid.
     3. Release the touch after the system suspends.
     4. Open the lid to resume the system
     5. Check evtest result and see that there is release events with correct
        touch major value.

Change-Id: I4c3bbb37c25c0df67c752a8b6943f6c127f01aa7
Reviewed-on: https://gerrit.chromium.org/gerrit/41031
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Yufeng Shen <miletus@chromium.org>
Tested-by: Yufeng Shen <miletus@chromium.org>
11 years agoCHROMIUM: drivers/backlight: allow setting a resume_brightness
Stéphane Marchesin [Tue, 13 Nov 2012 01:31:44 +0000 (17:31 -0800)]
CHROMIUM: drivers/backlight: allow setting a resume_brightness

This lets us set a resume-time backlight value.

BUG=chrome-os-partner:13364
TEST=by hand; automated testcase tracked in crosbug.com/36747

Change-Id: I59ebea1ba3fa59beccdce0970a0e846ee858062c
Signed-off-by: Stéphane Marchesin <marcheu@chromium.org>
[olofj: added reference to testcase bug and fixed checkpatch error]
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37974

11 years agoCHERRY-PICK: ARM: EXYNOS4: Support Charger Manager
MyungJoo Ham [Thu, 23 Jun 2011 02:27:17 +0000 (11:27 +0900)]
CHERRY-PICK: ARM: EXYNOS4: Support Charger Manager

The configuration is supposed to support Exynos4-NURI. However, we
expect that the configuration is mostly compatible with other Exynos4
platforms.

v2
- Remove undefined field of struct charger_desc (measure_ambient_temp)

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Change-Id: Ib568676b0af5fb22ca8bae29dcc8f7fb61e492e4
(cherry picked from commits 914a452e6ef714492bbbfafcec389313a044e760
and 27be8be090694878b8ff05a0611a46af0a8fb598
in branch charger-manager-for-next of
git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40163
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoCHERRY-PICK: ARM: EXYNOS4: Add PMU Wakeup-Stat Register Bits
MyungJoo Ham [Wed, 2 May 2012 02:09:26 +0000 (11:09 +0900)]
CHERRY-PICK: ARM: EXYNOS4: Add PMU Wakeup-Stat Register Bits

Change-Id: Id40ac31fe388bf266a013003e056d9dfe23d7404
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
(cherry picked from commit c7284202121b663559e615e87ad447ea3f6177fb
in branch charger-manager-for-next of
git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40162
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoCHERRY-PICK: Samsung SoC: support Charger Manager.
MyungJoo Ham [Tue, 27 Mar 2012 07:18:43 +0000 (16:18 +0900)]
CHERRY-PICK: Samsung SoC: support Charger Manager.

Change-Id: I9b01982d5ab01185517a6b948fb660a50a7fafd0
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
(cherry picked from commit 914a452e6ef714492bbbfafcec389313a044e760
in branch charger-manager-for-next of
git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40161
Commit-Queue: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoexynos5: asv: Call the core ASV code early
Abhilash Kesavan [Fri, 21 Dec 2012 04:14:39 +0000 (09:44 +0530)]
exynos5: asv: Call the core ASV code early

Change the priority of ASV code initialization. The core ASV code
finds the speed group, lot id and exposes it to various consumer
drivers like busfreq, G3D and CPUfreq. Among these, the G3D driver
is getting called before the core code and thus is always getting
the ASV speed group as 0. Fix this by calling the core ASV early.

BUG=chrome-os-partner:16796
TEST=Checked that G3D, ARM and INT drivers are all getting the same
ASV group on 2 different boards (1 MP and 1 PVT). Also, verified that
the voltages match that speed group.

Change-Id: I1ca234a770bbd8b2d590a83377ee44527327066b
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/40076
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Queue: Doug Anderson <dianders@chromium.org>
Tested-by: Doug Anderson <dianders@chromium.org>
11 years agoCHERRY-PICK: charger-manager: Workaround for checking state of charger before initial...
Chanwoo Choi [Tue, 8 May 2012 04:43:59 +0000 (13:43 +0900)]
CHERRY-PICK: charger-manager: Workaround for checking state of charger before initializaing cm

Change-Id: I071ec6bb9d9a9e3b749572cecbfdcef5f7f8be3d
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
(cherry picked from commit eaef7ab292ec455123d425a519abc399e68048af
in branch charger-manager-for-next of
 git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40159
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoCHERRY-PICK: charger-manager: Provide cm_notify_event function for in-kernel use
Chanwoo Choi [Sat, 5 May 2012 13:26:47 +0000 (06:26 -0700)]
CHERRY-PICK: charger-manager: Provide cm_notify_event function for in-kernel use

By using cm_notify_event function, charger driver can report several
charger events (e.g. battery full and external power in/out, etc) to
Charger-Manager. Charger-Manager can properly and immediately control
chargers by the reported event.

Change-Id: Id791abfc9ab014cba7446f2467830a1af99eff0a
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
(cherry picked from commit d1c35d11cd03167d1479bfbe09998d9dfe361b32
in branch charger-manager-for-next of
 git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Reviewed-on: https://gerrit.chromium.org/gerrit/40158
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoCHERRY-PICK: charger-manager: Poll battery health in normal state
Chanwoo Choi [Sat, 5 May 2012 13:24:10 +0000 (06:24 -0700)]
CHERRY-PICK: charger-manager: Poll battery health in normal state

Charger-Manager needs to check battery health in normal state
as well as suspend-to-RAM state. When the battery is fully charged,
Charger-Manager needs to determine when the chargers restart charging.

This patch allows Charger-Manager to monitor battery health in normal
state and handle operation for chargers after battery is fully charged.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Donggeun Kim <dg77.kim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
(cherry picked from commit 6d193b13aee372996e45c34865aa37c3c603b228
in branch charger-manager-for-next of
git://git.infradead.org/users/kmpark/linux-2.6-samsung)
BUG=chrome-os-partner:10617
TEST=build and boot to kernel prompt on snow
Change-Id: Iab84dc96254dae448cd18d3ba4458c48203b3d13
Reviewed-on: https://gerrit.chromium.org/gerrit/40157
Reviewed-by: Sameer Nanda <snanda@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
11 years agoarm: exynos: Enable CHIP ID clock
Abhilash Kesavan [Fri, 14 Dec 2012 06:02:19 +0000 (11:32 +0530)]
arm: exynos: Enable CHIP ID clock

The bootloader may gate the CLK_CHIPID_APBIF which will cause
an invalid value to be read for the Package ID in ASV. Explicitly
enable the clock in the ASV driver.

BUG=chrome-os-partner:16796
TEST=Boot 5 different snows to the login screen. Verify that the clock
is enabled and the appropriate speed group is being selected. Do a few
suspend/resume cycles with reboots.

Change-Id: Ib094b748301b7e882a50ae056bd9f0f795c133e5
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39695

11 years agoarm: exynos: Use MIF ASV group
Doug Anderson [Fri, 14 Dec 2012 19:21:12 +0000 (11:21 -0800)]
arm: exynos: Use MIF ASV group

The original code doesn't use the MIF ASV group.  Add code to read it.

There are 2 ASV groups for the fused chips ASV0 at 1.05V and ASV1 at
1V. For the non-fused chips the MIF voltage remains at 1V.

BUG=chrome-os-partner:16820
TEST=Verified that we never change MIF voltage, so this doesn't affect
us right now.
TEST=Saw printout about MIF ASV group at bootup.

Change-Id: Ia264991c11469a22a986c385a03b2a0478fb237f
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/39784

11 years agoCHROMIUM: drm/exynos: dp: Handle bad hotplug IRQ
Vic Yang [Thu, 13 Dec 2012 02:09:51 +0000 (18:09 -0800)]
CHROMIUM: drm/exynos: dp: Handle bad hotplug IRQ

If the hotplug detect pin cannot be mapped to an IRQ number, we should
still be able to detect the display with polling loop. This CL prevents
driver initialization from failing in this case, and adds a call to
hotplug handling function in power on sequence.

Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:16280
TEST=on Snow and Spring, boot and see display.

Change-Id: Idaa908ac38e85b8dd10c367a4c1f8ec47a4432b9
Reviewed-on: https://gerrit.chromium.org/gerrit/40363
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Queue: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: drm/exynos: Fix iommu cleanup paths.
Stéphane Marchesin [Fri, 4 Jan 2013 00:22:50 +0000 (16:22 -0800)]
CHROMIUM: drm/exynos: Fix iommu cleanup paths.

The cleanup paths don't destroy the iommu mapping, so they linger around when
init fails.

BUG=none
TEST=compiles, still works on snow

Change-Id: Ieef610db22154d37d307f4a589bd0830ef3fb97c
Reviewed-on: https://gerrit.chromium.org/gerrit/40410
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
11 years agoCHROMIUM: USB: serial: keyspan.c: initialize fw
Mandeep Singh Baines [Mon, 7 Jan 2013 21:53:30 +0000 (13:53 -0800)]
CHROMIUM: USB: serial: keyspan.c: initialize fw

The fw variable is initialized in request_ihex_firmware in the
non-failure case but the compiler is not smart enough to pick
this up so fixing this way.

Fixes the following warning:
drivers/usb/serial/keyspan.c:1298:18: warning: 'fw' may be used uninitialized in this function [-Wmaybe-uninitialized]

BUG=chromium-os:5542
TEST=compile

Change-Id: Id89b68bf4cc061b83615f8db52d2a80e6e9e5cb5
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40569
Reviewed-by: Grant Grundler <grundler@chromium.org>
11 years agoCHROMIUM: md: fix dm-bootcache string compare length
Simon Que [Mon, 7 Jan 2013 21:01:28 +0000 (13:01 -0800)]
CHROMIUM: md: fix dm-bootcache string compare length

The bootcache header has 12-character fields for date and time.
However, the __DATE__ string is only 9 characters long incl. null
terminator.  When comparing __DATE__ and __TIME__ to the header's
fields, we should use the lengths of __DATE__ and __TIME__, because they
are <= 12 (size of the header fields).

e.g.
  strncmp(hdr->date, __DATE__, sizeof(hdr->date))
  --> sizeof(hdr->date) is 12 but __DATE__ is only 9 characters long,
      so will throw a smatch error.

  strncmp(hdr->date, __DATE__, strlen(__DATE__) + 1)
  --> strlen(__DATE__) + 1 == 9, so this will not result in comparing
      a string that is shorter than the required length.

BUG=chromium-os:37656
TEST=Build kernel with USE=test, after this CL has been merged:
https://gerrit.chromium.org/gerrit/#/c/40054/
dm-bootcache.c should not throw any smatch errors about strncmp().

Change-Id: I88c7cbb96dc4da611b96609ef21b3787483c25db
Signed-off-by: Simon Que <sque@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40549
Reviewed-by: Paul Taysom <taysom@chromium.org>
11 years agoCHROMIUM: mfd: chromeos_ec: remove unused variable
Mandeep Singh Baines [Mon, 7 Jan 2013 21:25:11 +0000 (13:25 -0800)]
CHROMIUM: mfd: chromeos_ec: remove unused variable

Fixes the following warning:

drivers/mfd/chromeos_ec_i2c.c:53:5: warning: unused variable 'res_code' [-Wunused-variable]

BUG=chromium-os:5542
TEST=compile

Change-Id: I10384461c14fbe26f082bae4a4375c26a88694e3
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40551
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: Bluetooth: Add MD222 [04ca:3008]
Scott James Remnant [Wed, 2 Jan 2013 22:01:14 +0000 (14:01 -0800)]
CHROMIUM: Bluetooth: Add MD222 [04ca:3008]

BUG=chromium-os:37579
TEST=hciconfig shows device and hcitool scan works

Change-Id: I365fd3c8c7863fc634613ae6ad18a01e600572e2
Signed-off-by: Scott James Remnant <keybuk@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40338
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agoUPSTREAM: mwifiex: check wait_event_interruptible return value
Bing Zhao [Thu, 3 Jan 2013 01:45:19 +0000 (17:45 -0800)]
UPSTREAM: mwifiex: check wait_event_interruptible return value

wait_event_interruptible function returns -ERESTARTSYS if it's
interrupted by a signal. Driver should check the return value
and handle this case properly.

In mwifiex_wait_queue_complete() routine, as we are now checking
wait_event_interruptible return value, the condition check is not
required. Also, we have removed mwifiex_cancel_pending_ioctl()
call to avoid a chance of sending second command to FW by other path
as soon as we clear current command node. FW can not handle two
commands simultaneously.

Cc: "3.6+" <stable@vger.kernel.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
BUG=chrome-os-partner:16031,17015
TEST=Boot, associate, and run "rtcwake -s 10 -mmem" in a
"while/do/done" loop

Change-Id: I54deddb71864a5b638a559b9e51942bf1d46162d
Reviewed-on: https://gerrit.chromium.org/gerrit/40359
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
11 years agoCHROMIUM: drm/exynos: fb: Don't return errors when unmapping fb gem objects
Daniel Kurtz [Thu, 3 Jan 2013 01:51:56 +0000 (09:51 +0800)]
CHROMIUM: drm/exynos: fb: Don't return errors when unmapping fb gem objects

Silently accept and ignore a NULL buffer or a buffer which has not yet
been mapped (i.e., its dma_addr is unset).

These aren't really errors (and I don't see how they are even possible).
Simplifying this lets the unmap function just return void.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=builds clean; sanity check on device

Change-Id: Ib1fa50152b0444fbafc05ac8b712d69ffda962c5
Reviewed-on: https://gerrit.chromium.org/gerrit/40446
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: fbdev: Set visible dimensions correctly
Daniel Kurtz [Thu, 3 Jan 2013 02:37:06 +0000 (10:37 +0800)]
CHROMIUM: drm/exynos: fbdev: Set visible dimensions correctly

When probing the fbdev, the drm_fb_helper may specify a visible area
(fb_width x fb_height) than is smaller than the total requested
framebuffer area (surface_width x surface_height).

Use these fb dimensions when setting the visible area in the "variable"
portion of the fb info.  This is consistent with other drm fbdev drivers
(i915, radeon, nouveau).

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=splash screen displayed properly at boot w/ no HDMI
TEST=splash screen displayed properly at boot w/ HDMI

Change-Id: Id209ea395a7e5eb993632ae4cfe4263b5af18138
Reviewed-on: https://gerrit.chromium.org/gerrit/40443
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: gem: Combine duplicate error handling in gem_create
Daniel Kurtz [Wed, 2 Jan 2013 10:25:58 +0000 (18:25 +0800)]
CHROMIUM: drm/exynos: gem: Combine duplicate error handling in gem_create

The error handling for buffer creation is the same for both CONTIG and
NONCONTIG, so refactor a bit.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=builds clean; sanity check boot on device

Change-Id: I296198291f06fe3dda9b9989ea139badbba53004
Reviewed-on: https://gerrit.chromium.org/gerrit/40442
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: gem: Remove unused gem_get/put_dma_addr
Daniel Kurtz [Wed, 2 Jan 2013 10:22:18 +0000 (18:22 +0800)]
CHROMIUM: drm/exynos: gem: Remove unused gem_get/put_dma_addr

These functions are not used so remove them.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=builds clean; sanity check boot on device

Change-Id: I4f25b7ee5104273587a15d9799b395bb1c1d8648
Reviewed-on: https://gerrit.chromium.org/gerrit/40441
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: gem: Remove gem_init_object
Daniel Kurtz [Wed, 2 Jan 2013 10:18:22 +0000 (18:18 +0800)]
CHROMIUM: drm/exynos: gem: Remove gem_init_object

This function does nothing interesting, it is only called in the unused
drm_gem_object_alloc path, and the drm gem core ignores a NULL callback
anyway.
So, save a little space by just leaving it out.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=builds clean; boot/sanity check

Change-Id: Ief8ccf91c963ddc0a0cf4b1a1a973c6675437713
Reviewed-on: https://gerrit.chromium.org/gerrit/40440
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: drm/exynos: dp: Fix a bug that IRQ number should be signed
Vic Yang [Thu, 3 Jan 2013 06:40:23 +0000 (14:40 +0800)]
CHROMIUM: drm/exynos: dp: Fix a bug that IRQ number should be signed

Negative IRQ value is used to represent error.

Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:16280
TEST=Boot on spring and see bad IRQ translated into driver error.

Change-Id: I8777c0531dceab6c952a50988764be949729e598
Reviewed-on: https://gerrit.chromium.org/gerrit/40364
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
Commit-Queue: Vic Yang <victoryang@chromium.org>

11 years agodrm/i915: Mark the FB's bo as busy when we pageflip
Stéphane Marchesin [Thu, 3 Jan 2013 01:21:16 +0000 (17:21 -0800)]
drm/i915: Mark the FB's bo as busy when we pageflip

Previously, the page flipping case wasn't accounted for, only front buffer
rendering. This change adds a hook from the page flip code to update the
busyness of the crtc in the page flip case.

BUG=chromium-os:37277
TEST=by hand

Change-Id: Iebf826e3dc073579ca1446d7b70bcbf06d7bba5d
Reviewed-on: https://gerrit.chromium.org/gerrit/40355
Tested-by: Jonathan Backer <backer@chromium.org>
Reviewed-by: Chris Wolfe <cwolfe@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132 - Add thorough codec init.
Chee Kin Cheong [Wed, 19 Dec 2012 16:49:06 +0000 (08:49 -0800)]
CHROMIUM: ALSA: hda/ca0132 - Add thorough codec init.

During ca0132_init, check that the codec is ready and if not, reset
and re-initialize.

BUG=chrome-os-partner:14465
TEST=suspend/resume and play youtube.

Change-Id: I70a406042cfb8af80e9d0835d136be2df33f5b28
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39981
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
11 years agoCHROMIUM: Enable CONFIG_HID_MICROSOFT in base config.
Andrew de los Reyes [Wed, 2 Jan 2013 21:11:56 +0000 (13:11 -0800)]
CHROMIUM: Enable CONFIG_HID_MICROSOFT in base config.

This is needed for some MS mice and should be on all
systems. Specifically this was missing from ARM based devices.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:36240
TEST=Tested Link and Daisy to make sure the mouse worked on both.

Change-Id: I610d2593cd6b3e5eb2f19d4831e7e01c582db93a
Reviewed-on: https://gerrit.chromium.org/gerrit/40335
Reviewed-by: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
11 years agoCHROMIUM: drm/exynos: gem: Fix release ioctl arg type
Daniel Kurtz [Thu, 27 Dec 2012 03:26:21 +0000 (11:26 +0800)]
CHROMIUM: drm/exynos: gem: Fix release ioctl arg type

exynos_drm_gem_cpu_release_ioctl should use drm_exynos_gem_cpu_release
arguments.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=builds clean; sanity check display still functional on device

Change-Id: Ic877e679a56d31c6333cfd6dbdc1713248cccfc8
Reviewed-on: https://gerrit.chromium.org/gerrit/40230
Commit-Queue: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: ALSA: hda/ca0132 - log all chip io errors.
Dylan Reid [Wed, 19 Dec 2012 18:34:34 +0000 (10:34 -0800)]
CHROMIUM: ALSA: hda/ca0132 - log all chip io errors.

Any time that a transaction with the chip times out log it as an error.

BUG=chrome-os-partner:14465
TEST=none.

Change-Id: I5b08a9c64d3ae8d48107b193604c6c751bf67499
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39982

11 years agoCHROMIUM: gobi: avoid NULL dereferencing in devqmi_ioctl
Ben Chan [Thu, 27 Dec 2012 00:17:21 +0000 (16:17 -0800)]
CHROMIUM: gobi: avoid NULL dereferencing in devqmi_ioctl

BUG=chrome-os-partner:16163
TEST=Run suspend/resume stress test on a system with Gobi 3000 modem.

Change-Id: I0a8c78036e4ec3579b0d0bb92697fe4d68f62cdb
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/40229
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
11 years agoCHROMIUM: add vbc_ec implementation
Che-Liang Chiou [Wed, 7 Nov 2012 02:07:56 +0000 (18:07 -0800)]
CHROMIUM: add vbc_ec implementation

This allows kernel to read/write vboot context from EC's nvram.

BUG=chrome-os-partner:15609
TEST=manual, add debugging sysfs entry to call
     chromeos_vbc_read/write, and test that the
     driver can actually access vboot context on ec.

Change-Id: Iea90b1a70392fd4d234d7894b8fc52f6a71700f9
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37498
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agoCHROMIUM: abstract vboot context access
Che-Liang Chiou [Wed, 7 Nov 2012 00:49:37 +0000 (16:49 -0800)]
CHROMIUM: abstract vboot context access

As vboot context is not limited to nvram, vboot context access should be
made abstract from storage device.

BUG=chrome-os-partner:15609
TEST=manual, add debugging sysfs entry to call
     chromeos_vbc_read/write, and test that the driver can actually
     access vboot context on nvram on link, and disk on snow.

Change-Id: If236f7b12fa86d2a7bd81623c01e31a3f4f15fe5
Signed-off-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37497
Reviewed-by: Simon Glass <sjg@chromium.org>
11 years agoKDS: fix BUG in change I4df35f08
Gabriele Paoloni [Mon, 3 Dec 2012 18:08:51 +0000 (18:08 +0000)]
KDS: fix BUG in change I4df35f08

In the implementation of change I4df35f08 the same name
is used for the macro "pos" parameter and "head" parameter.
As consequence "head" gets corrupted. this fix introduces an
auxiliar pointer for "head" and rearrange the code to make it
a bit more readable

BUG=chromium-os:36071,chrome-os-partner:15349,chrome-os-partner:14965
TEST=Tested on Daisy Board
Signed-off-by: Gabriele Paoloni <gabriele.paoloni@arm.com>
Change-Id: Icee1c07c9a87f137cdfd87fb1fe04a83f41a44b1
Reviewed-on: https://gerrit.chromium.org/gerrit/39089
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
Commit-Queue: Stéphane Marchesin <marcheu@chromium.org>
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
11 years agodrm/exynos: Cleanup unused kruft in exynos_hdmi.h
Sean Paul [Tue, 18 Dec 2012 19:47:52 +0000 (14:47 -0500)]
drm/exynos: Cleanup unused kruft in exynos_hdmi.h

These are no longer used, delete them.

BUG=None
TEST=Compiles

Change-Id: I31e6eba88f51514f289a571c48c36c43694fb3a7
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39959
Reviewed-by: Mandeep Singh Baines <msb@chromium.org>
11 years agoCHROMIUM: config: enable test_module for autotest
Kees Cook [Tue, 18 Dec 2012 23:19:04 +0000 (15:19 -0800)]
CHROMIUM: config: enable test_module for autotest

Enable the "test_module" kernel module for use with autotest's
security_ModuleLocking test.

BUG=chromium-os:37353
TEST=daisy build, security_ModuleLocking passes when using "test_module"

Change-Id: I16eee5afd1664f0ab4a9ab48b6cb2beaa6f30017
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39919
Reviewed-by: Grant Grundler <grundler@chromium.org>
Tested-by: Grant Grundler <grundler@chromium.org>
11 years agoCHROMIUM: add test_module module
Kees Cook [Tue, 18 Dec 2012 23:17:56 +0000 (15:17 -0800)]
CHROMIUM: add test_module module

Create a module for simple module loading tests.

BUG=chromium-os:37353
TEST=daisy build, security_ModuleLocking passes when using "test_module"

Change-Id: I7ac604b614d69c2f18266a2241a660629b418701
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39918
Reviewed-by: Grant Grundler <grundler@chromium.org>
Tested-by: Grant Grundler <grundler@chromium.org>
11 years agoCHROMIUM: drm/exynos: make struct exynos_drm_crtc private
Mandeep Singh Baines [Mon, 17 Dec 2012 22:38:04 +0000 (14:38 -0800)]
CHROMIUM: drm/exynos: make struct exynos_drm_crtc private

struct exynos_drm_crtc is only used in exynos_drm_crtc.c.

BUG=none
TEST=Compiles. Boots.

Change-Id: I8301930eef575f3015ecd3eae2fe279c516ef351
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39806

11 years agoCHROMIUM: Input: cyapa - fix compile warning
Daniel Kurtz [Wed, 19 Dec 2012 03:26:51 +0000 (11:26 +0800)]
CHROMIUM: Input: cyapa - fix compile warning

The string pointed to by fw_name is non-mutable, so make it const char *.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:36911
TEST=builds without following warning:
  drivers/input/mouse/cyapa.c: In function 'cyapa_update_fw_store':
  drivers/input/mouse/cyapa.c:1351:10: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Change-Id: I43a3fc57a9462cece94d0c1db8011ae3084f8744
Reviewed-on: https://gerrit.chromium.org/gerrit/39934
Reviewed-by: Benson Leung <bleung@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
11 years agoCHROMIUM: mwifiex: reset card on cmd timeout
Thomas Pedersen [Wed, 12 Dec 2012 23:30:16 +0000 (15:30 -0800)]
CHROMIUM: mwifiex: reset card on cmd timeout

If mwifiex hits a commmand timeout the firmware likely
crashed, so trigger a card reset which will clear all
logical card state and reprobe the hardware. Implement
this for sdio which requires fondling of some extra gpio
pins.

Also linearize sdio work by putting all work on the same
work queue. This ensures no work is running when the sdio
reset takes place.

Based on work by Bing Zhao.

TEST=trigger reset by debugfs hook
BUG=chrome-os-partner:15389
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
Change-Id: I3cf12ac88e7598f6daa60f38acea5e0c32302b31
Reviewed-on: https://gerrit.chromium.org/gerrit/39635
Reviewed-by: Bing Zhao <bzhao@marvell.com>
Reviewed-by: Paul Stewart <pstew@chromium.org>
11 years agodrm/i915: Make intel_dp_aux_native_read timeout
Stéphane Marchesin [Tue, 18 Dec 2012 22:08:16 +0000 (14:08 -0800)]
drm/i915: Make intel_dp_aux_native_read timeout

Some adapters return DEFER indefinitely, which results in being stuck in the
kernel, which triggers the watchdog, which reboots. To avoid this, limit to
100 tries, after which we return an error and pring a message.

BUG=chrome-os-partner:15612
TEST=by hand, use the apple miniDP to dual-link adapter, plug a 30 inch
TEST=monitor, the machine shouldn't reboot spontaneously (the monitor still
TEST=won't work, but that is a separate bug).

Change-Id: I842f6edd0da3b67eab8613410bf61474fc40ba7a
Reviewed-on: https://gerrit.chromium.org/gerrit/39888
Tested-by: Stéphane Marchesin <marcheu@chromium.org>
Reviewed-by: Stuart Abercrombie <sabercrombie@chromium.org>
Commit-Ready: Stéphane Marchesin <marcheu@chromium.org>

11 years agoarm: exynos: Don't force ASV group 0 to ASV group 1
Doug Anderson [Fri, 14 Dec 2012 19:21:12 +0000 (11:21 -0800)]
arm: exynos: Don't force ASV group 0 to ASV group 1

The old ASV code had a bug where it would never use group 0.  That
makes sense for the "original" table, but not for the new table and
not for any fused values.

BUG=chrome-os-partner:16820
TEST=Test across a wide variety of devices

Change-Id: Ifc44ed51c9d6f2effee4f0134160f74c320f4335
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39711
Reviewed-by: Abhilash Kesavan <a.kesavan@samsung.com>
Tested-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
11 years agoarm: exynos: Call ABB code when using a fused speed group
Doug Anderson [Fri, 14 Dec 2012 21:19:04 +0000 (13:19 -0800)]
arm: exynos: Call ABB code when using a fused speed group

The previous checkin titled "Add Adaptive Body Bias Control for
exynos5" only added ABB when not using a fused speed group.  Fix it to
also use ABB when using a non-fused speed group.

BUG=chrome-os-partner:16820
TEST=Test this plus the CHIP_ID patch on a wide variety of devices,
including those that had suspend/resume problems.

Change-Id: Ib08a6729488fc3eb97cc102f01138fea914eb8ce
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39714
Reviewed-by: Abhilash Kesavan <a.kesavan@samsung.com>
Tested-by: Abhilash Kesavan <a.kesavan@samsung.com>
Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Reviewed-by: Sameer Nanda <snanda@chromium.org>
11 years agoCHROMIUM: Input: cyapa - Allow filename to be changed in update_fw
Benson Leung [Sun, 16 Dec 2012 00:29:51 +0000 (16:29 -0800)]
CHROMIUM: Input: cyapa - Allow filename to be changed in update_fw

Allow the name of the designated firmware to be passed as the
argument to update_fw from user space. This will allow user space
to specify which firmware to load.

Signed-off-by: Benson Leung <bleung@chromium.org>
BUG=chromium-os:36911,chromium-os:37150
TEST=Make sure you are using chromeos-touch-firmware-daisy-2.4-r2
which contains firmware 2.4 stable, but 3 trial firmwares linked
from /lib/firmware/cyapa.bin-trial[1-3]
Check by manually issuing the command from user space:
1. echo -n cyapa.bin-trial1 > /sys/bus/i2c/devices/1-0067/update_fw
2. cat /sys/bus/i2c/devices/1-0067/firmware_version
3. double check that that returns 2.7
4. echo -n cyapa.bin-trial3 > /sys/bus/i2c/devices/1-0067/update_fw
5. cat /sys/bus/i2c/devices/1-0067/firmware_version
6. double check that that returns 2.9
7. echo -n cyapa.bin > /sys/bus/i2c/devices/1-0067/update_fw
8. cat /sys/bus/i2c/devices/1-0067/firmware_version
9. Check that that returns 2.4

Change-Id: Id51b8ae6439ac822d8c77a96aee43a1c6f67cf1b
Reviewed-on: https://gerrit.chromium.org/gerrit/39839
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Commit-Ready: Benson Leung <bleung@chromium.org>
Tested-by: Benson Leung <bleung@chromium.org>
11 years agoCHROMIUM: cpufreq: cpu_thermal only allows lower max frequency, fix it
Sonny Rao [Fri, 14 Dec 2012 22:48:30 +0000 (14:48 -0800)]
CHROMIUM: cpufreq: cpu_thermal only allows lower max frequency, fix it

The cpu_thermal generic thermal management code has a bug where once
max cpu frequency has been lowered in sysfs (scaling_max_freq) it is
not possible to raise the max back up later.  The bug is that the
notifer gets called by __cpufreq_set_policy() before the user policy
max is raised, and is incorrectly trying to enforce the max frequency
policy even when we are trying to change the policy.

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
BUG=chromium-os:36435
TEST=kernel_CpufreqMinMax

Change-Id: I12ad4ef5aad544333cad4a9ff1e81f04d1cfa5e8
Reviewed-on: https://gerrit.chromium.org/gerrit/39793
Reviewed-by: Doug Anderson <dianders@chromium.org>
Commit-Ready: Sonny Rao <sonnyrao@chromium.org>
Tested-by: Sonny Rao <sonnyrao@chromium.org>
11 years agoCHROMIUM: usb: add VID/PID of Novatel Wireless Gobi 3000 E396U modem
Ben Chan [Fri, 14 Dec 2012 23:58:18 +0000 (15:58 -0800)]
CHROMIUM: usb: add VID/PID of Novatel Wireless Gobi 3000 E396U modem

BUG=chrome-os-partner:16830
TEST=`emerge-daisy chromeos-kernel`

Change-Id: I85dffdf4f4096aca98e2431555e65597205cf78a
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39763
Reviewed-by: Sameer Nanda <snanda@chromium.org>
11 years agoCHROMIUM: ALSA:hda/ca0132 - initialize AEC level.
Dylan Reid [Wed, 12 Dec 2012 18:53:21 +0000 (10:53 -0800)]
CHROMIUM: ALSA:hda/ca0132 - initialize AEC level.

Set the AEC level to max during init.  After testing with various
levels, the maximum value proved to work the best.

BUG=chrome-os-partner:13065
TEST=hangout, listen for echo.

Change-Id: I237b9af5f9e0f8de7331d96f40e1fc5eb6379f79
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39593
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Chih-Chung Chang <chihchung@chromium.org>
11 years agoCHROMIUM: rts_pstor: fix formatting, writing, copying failures with
agnescheng [Thu, 13 Dec 2012 08:44:05 +0000 (16:44 +0800)]
CHROMIUM: rts_pstor: fix formatting, writing, copying failures with
specific SDSDB cards.

Patch from Realtek to correct init option for specific SD cards -
Realtek found those cards cannot be successfully written (read is OK)
because current mount option causes writes(maybe to update the access time) when read.

TEST=insert SDSDB/SDSC card, format and cannot copy files to the card.

BUG=chrome-os-partner:15774

Signed-off-by: Agnes Cheng <agnescheng@chromium.org>
Change-Id: I194db3ce22107208e103dafc3fa9dae3db33d087
Reviewed-on: https://gerrit.chromium.org/gerrit/39646
Commit-Ready: Shawn Nematbakhsh <shawnn@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Derek Basehore <dbasehore@chromium.org>