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>
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
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>
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>
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.
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.
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>
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>
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>
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>
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.
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.
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>
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>
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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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.
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.
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>
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]
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
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
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>
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>
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).
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>
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.
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
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.
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.
CHROMIUM: atkbd: Fix scancode handling on reconnect / resume from suspend.
On resume from suspend there is a possibility for multi-byte scancodes
to be handled incorrectly. atkbd_reconnect disables the processing of
scancodes in software by calling atkbd_disable, but the keyboard may
still be active because no disconnect command was sent. Later, software
handling is re-enabled. If a multi-byte scancode sent from the keyboard
straddles the re-enable, only the latter byte(s) will be handled.
In practice, this leads to cases where multi-byte break codes (ex. "e0
4d" - break code for right-arrow) are misread as make codes ("4d" - make
code for numeric 6), leading to one or more unwanted, untyped characters
being interpreted.
The solution implemented here involves sending command f5 (reset
disable) to the keyboard prior to disabling software handling of codes.
Later, the command to re-enable the keyboard is sent only after we are
prepared to handle scancodes.
TEST=spam right/left arrow keys during resume for many iterations,
verify that no phantom characters are seen.
BUG=chrome-os-partner:16605
Change-Id: Ieba1e42398c2f4f6a1623afa3ed82903dc393045 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39690 Reviewed-by: Derek Basehore <dbasehore@chromium.org> Reviewed-by: Andrew de los Reyes <adlr@chromium.org>
Doug Anderson [Fri, 14 Dec 2012 16:56:34 +0000 (08:56 -0800)]
arm: exynos: Fix potential buffer overrun in printk with asv
The asv code stores 5 characters in in a 5-byte array. It properly
compares against this with strncmp, but then goes and passes the
character array to printk() which could read off the end.
Terminate the array properly, then go ahead and promote the printout
to print all the details we have every time.
BUG=chrome-os-partner:16820
TEST=Boot and see message printed out.
Ray Smith [Tue, 20 Nov 2012 12:53:23 +0000 (12:53 +0000)]
MALI: Allow kbase to cancel a lock before it is acquired
This is based on Ib42b8e5c8039fd5f900885f097418b87d9614225,
most of which has been integrated into the wk45 release but
this particular commit is to account for local changes to
KDS in this repo.
Michael Spang [Wed, 14 Nov 2012 22:51:39 +0000 (17:51 -0500)]
CHROMIUM: gobi: Take clients_lock in qc_deregister
It is not legal to access the clients list without taking
clients_lock. This change makes qc_deregister take the lock while
finding new clients to free.
This fixes a crash when qc_deregister races devqmi_release.
Sonny Rao [Mon, 10 Dec 2012 19:06:02 +0000 (11:06 -0800)]
CHROMIUM: sysrq: add ability for sysrq-x to signal chrome/X
Because we weren't getting reports of actual kernel issues, and
we've already trained some users to hit sysrq-x when the system
appears to freeze, we decided to have sysrq-x try a few other things
in addition to crashing the kernel. For the first keypress it will
try to find the Chrome browser process, by looking for the one which
has the session_manager as a parent, and send a SIGABRT to that. If
there is a second sysrq-x within 5 seconds, it will send a SIGABRT to
the X process, and if there's a third then it will crash the kernel as
before.
BUG=chromium-os:36901
TEST=manual (debugging feature):
hold down alt-volup then x - chrome should crash
repeat immediately afterward - session should restart
repeat and machine should reboot
Daniel Kurtz [Mon, 10 Dec 2012 07:34:24 +0000 (15:34 +0800)]
CHROMIUM: drm/exynos: fbdev: Offset is always zero
A freshly filled fb_info will always have .xoffset and .yoffset = 0.
So, computing an offset during during fbdev_update is not necessary,
since it is only called in the fbdev_probe/fbdev_create path.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test; manual check fbdev created and shows chromeball at boot
Change-Id: I648e16200cf3840a69e59a8f8d4dea69541c9cf7
Reviewed-on: https://gerrit.chromium.org/gerrit/39479 Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Daniel Kurtz [Mon, 10 Dec 2012 05:53:11 +0000 (13:53 +0800)]
CHROMIUM: drm/exynos: gem: Remove useless size field
exynos_drm_gem_obj, drm_gem_object, the dma_buf and the exynos_drm_gem_buf
all store a buffer's size. This seems a bit excessive.
Remove the exynos_drm_gem_obj copy, since it is written to but never read.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test
Change-Id: I5bf057964351d08f40146f0e928e6eb8414f164f
Reviewed-on: https://gerrit.chromium.org/gerrit/39475
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Daniel Kurtz [Mon, 10 Dec 2012 05:51:40 +0000 (13:51 +0800)]
CHROMIUM: drm/exynos: Remove vaddr from drm_overlay
Consumers of the drm_overlay vaddr object only care about the dma_addr,
so they can program DMA in a display controller. They never need to know
the corresponding vaddr.
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:37097
TEST=compile test; booted w/ debug enabled and verified debug messages
no longer include vaddr
Change-Id: Ia96ebea8f39d4a733bc6732b6cc9be85f1a8c0e3
Reviewed-on: https://gerrit.chromium.org/gerrit/39474
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Tested-by: Daniel Kurtz <djkurtz@chromium.org>
CHROMIUM: drm/exynos: don't warn about non-kds modeset
Now that the page_flip logic is shared with the mode_set code,
it's possible for us to call page_flip on a non-kds buffer.
Modify the warning to only check the non-modeset case.
Olof Johansson [Fri, 7 Dec 2012 19:42:19 +0000 (11:42 -0800)]
CHROMIUM: LSM: allow old style loads when locking disabled
This is needed when our kernel is used with other userspaces, i.e. Ubuntu
and other distros.
Enabling old-style module init when locking is explicitly disabled doesn't
open up any security exposure for users unless they have disabled
rootfs_verification AND module load restrictions. I.e. default users have
no added exposure.
BUG=chromium-os:37055
TEST=needs a new testcase (crosbug.com/37056)
This patch switches zcache and zram dependency to ZSMALLOC
rather than X86. There is no net change since ZSMALLOC
depends on X86, however, this prevent further changes to
these files as zsmalloc dependencies change.
Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
BUG=chromium-os:36829
TEST=compile, verify that zram module is updated and /boot/config is correct
Change-Id: I91f6ed46549fe62a9fe3035063d98beb2f5d966a Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39289 Tested-by: Luigi Semenzato <semenzato@google.com> Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Luigi Semenzato <semenzato@google.com>
John Sheu [Thu, 6 Dec 2012 01:23:26 +0000 (17:23 -0800)]
CHROMIUM: exynos: keep exynos_plane zpos on disable
Exynos DRM planes are implemented using overlay hardware. Presently we
reset the overlay zpos back to default every time a plane is disabled.
Don't do this anymore.
Signed-off-by: John Sheu <sheu@chromium.org>
BUG=chromium-os:36991
TEST=local build, run on exynos
Change-Id: I4c3490ef05d1ecdfeea6cbf26f020b9a19ebe764
Reviewed-on: https://gerrit.chromium.org/gerrit/39296 Tested-by: John Sheu <sheu@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@chromium.org> Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Commit-Ready: John Sheu <sheu@chromium.org>
Michael Spang [Fri, 9 Nov 2012 19:33:47 +0000 (14:33 -0500)]
CHROMIUM: serial: exynos: Resume UART earlier with SAMSUNG_PM_DEBUG
Even with SAMSUNG_PM_DEBUG enabled, we're losing lots of console UART
output during resume. This patch makes SAMSUNG_PM_DEBUG correcly
resume the UART as early as possible, so that no output is lost.
BUG=chrome-os-partner:10932
TEST=powerd_suspend with no_console_suspend and SAMSUNG_PM_DEBUG
Change-Id: Ic892ed225c9075e8d72d851a4f2e22263ee6047d Signed-off-by: Michael Spang <spang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/37734 Reviewed-by: Jon Kliegman <kliegs@chromium.org>
Dylan Reid [Mon, 19 Nov 2012 06:56:40 +0000 (22:56 -0800)]
BACKPORT: ALSA: hda - Fix Acer Aspire models with analog mics.
The Acer Aspire AO756 has an analog built-in mic on nid 0x1b and an
external mic on nid 0x19. The BIOS doesn't set this up.
The mic detect on this Acer Aspire netbook and Acer C7 ChromeBook is
only valid when the headphone is plugged. The detect circuit relies on
the tip detect switch being closed on the jack. Tell hda_jack to ignore
the mic sense unless the headphones are plugged.
Dylan Reid [Mon, 19 Nov 2012 18:48:07 +0000 (19:48 +0100)]
BACKPORT: ALSA: hda - Allow jack state to depend on another jack
Introduce the concept of a "gated" jack. The gated jack's pin sense
is
only valid when the "gating" jack is plugged. This requires checking
the gating jack when the gated jack changes and re-checking the gated
jack when the gating jack is plugged/unplugged.
This allows handling of devices where the mic jack detect floats when
the headphone jack is unplugged.
[Rewritten for fixing the possible snd_array reallocation, covering
the missing callback calls and jack sync operations, as well as some
code cleanups -- tiwai]