chromiumos/third_party/kernel.git
3 years agoBACKPORT: iio: tsl258x i2c device id change master
Bryan Freed [Tue, 3 May 2011 23:42:02 +0000 (16:42 -0700)]
BACKPORT: iio: tsl258x i2c device id change

The upstream version of this driver gives us the "tsl2583" name.
Port this to our 2.6.32 version so we can easily find it from our
device instantiation script.

BUG=chromium-os:11098
TEST=Verify that covering and uncovering the sensor affects the backlight.

Change-Id: Ia9f493dea743b0cbce06aa9e9235b5e1be666bee
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/283
Reviewed-by: Olof Johansson <olofj@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
3 years agoCHROMIUM: x86: vdso: Added -Wl to linker flags.
Ahmad Sharif [Wed, 27 Apr 2011 20:41:58 +0000 (13:41 -0700)]
CHROMIUM: x86: vdso: Added -Wl to linker flags.

Change-Id: I8aa78ef9f881ef8c04b41dd498e4b10c23bb340a

BUG=chromium-os:14511
TEST=emerge-x86-agz chromeos-kernel

Signed-off-by: Olof Johansson
Review URL: http://codereview.chromium.org/6904008

3 years agoath9k: Fix LED gpio for AR93xx chipsets.
Sam Leffler [Tue, 26 Apr 2011 15:55:55 +0000 (08:55 -0700)]
ath9k: Fix LED gpio for AR93xx chipsets.

The LED gpio is incorrectly programmed for AR9300 and so the led
is not working propelry. AR93xx uses gpio 10 for LED and not the
default.

Change-Id: I11501a55bf9a8d1990d9ad3a88f2e19c32dd5ae7
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
BUG=chromium-os-partner:3440
TEST=manual:check device operation

Review URL: http://codereview.chromium.org/6900058

3 years agoath9k_hw: partially revert "fix dma descriptor rx error bit parsing"
Sam Leffler [Mon, 25 Apr 2011 22:32:48 +0000 (15:32 -0700)]
ath9k_hw: partially revert "fix dma descriptor rx error bit parsing"

The rx error bit parsing was changed to consider PHY errors and various
decryption errors separately. While correct according to the documentation,
this is causing spurious decryption error reports in some situations.

Fix this by restoring the original order of the checks in those places,
where the errors are meant to be mutually exclusive.

If a CRC error is reported, then MIC failure and decryption errors
are irrelevant, and a PHY error is unlikely.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chromium-os:14507
TEST=SecMat WiFiPerf

Review URL: http://codereview.chromium.org/6883138

Change-Id: Ic5c27ed91d862e8259ba4e5104080e773b9a3806

3 years agoCHROMIUMOS: compat-wireless: fixup rate control configuration
Sam Leffler [Mon, 25 Apr 2011 22:31:38 +0000 (15:31 -0700)]
CHROMIUMOS: compat-wireless: fixup rate control configuration

The intended rate control configuration was lost in the recent update.
Enable ath9k and minstrel_ht rate control modules and change the default
algorithm to minstrel_ht. Remove the configuration of the default algorithm
used by the in-kernel code; it's not used by compat wireless and just
causes build complaints.

Signed-off-by: sleffler@chromium.org
Change-Id: I842060b3362b603a993d3a23911e535230d537f2

BUG=none (complaints about recent throughput drops)
TEST=TBA

Review URL: http://codereview.chromium.org/6880162

3 years agoCHROMIUMOS: Don't return an error for interrupt URB submit
Paul Stewart [Mon, 25 Apr 2011 18:58:43 +0000 (11:58 -0700)]
CHROMIUMOS: Don't return an error for interrupt URB submit

usbnet is currently a mess in terms of suspend-resume.  The resume
function can be called at any time, including during device
discovery of a device that was inserted during system resume.
As architected, it seems impossible to determine whether we
should or should not (re)start interrupt URBs from usbnet_resume
or from usbnet_start.  If we do it from both, the only downside
is that we end up with errors due to the URB already being active.
Unfortunately usb_submit_urb doesn't current return -EINPROGRESS
for this error condition, so for now we need to mute errors from
usb_submit_urb().

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chromium-os:10955
TEST=Run on both a platform that shuts down USB at suspend and one that
does not

Change-Id: I16e6aa6fb71b5f960e34966dc2a3b759bac3ffcc

Review URL: http://codereview.chromium.org/6877020

3 years agoath9k: fix transmit stall issues
Sam Leffler [Fri, 22 Apr 2011 20:31:15 +0000 (13:31 -0700)]
ath9k: fix transmit stall issues

This is a backport of these two changes:

ath9k: clean up the code that wakes the mac80211 queues

Instead of spreading ath_wake_mac80211_queue() calls over multiple places
in the tx path that process the tx queue for completion, call it only
where the pending frames counter gets decremented, eliminating some
redundant checks.
To prevent queue draining from waking the queues prematurely (e.g. during
a hardware reset), reset the queue stop state when draining all queues,
as the caller in main.c will run ieee80211_wake_queues(hw) anyway.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k: Fix TX queue stuck issue.

commit 86271e460a66003dc1f4cbfd845adafb790b7587 introduced a
regression that caused mac80211 queues in stopped state.

ath_drain_all_txq is called in driver flush which would reset
the stopped flag and the mac80211 queues were never started
after that. iperf traffic is completely stalled due to this issue.

Restart the mac80211 queues in driver flush only if the txqs were
drained.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chromium-os:14228
TEST=run MatFunc SecMat WiFiPerf WiFiRoaming for regression

Change-Id: I2b46bd776ebc14def265aab80337823ecd890a7f

Review URL: http://codereview.chromium.org/6897022

3 years agoath: fix 0x6C for beaconing/passive scan flags based on country IE
Luis R. Rodriguez [Thu, 14 Apr 2011 21:55:36 +0000 (14:55 -0700)]
ath: fix 0x6C for beaconing/passive scan flags based on country IE

The 0x6C regulatory domain is just like the 0x6A regulatory
domain but differs in that 0x6C will allow adhoc and active
scan on its channels only if we are associated to an AP
with a country IE that allows those channels. The
ath_reg_apply_beaconing_flags() does just this -- we respect
the manufacturer's intent on only enabling beaconing modes
of operation if and only if blessed by the country IE.

Cc: David Quan <david.quan@atheros.com>
Cc: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3 years agoath: Add a missing world regulatory domain 0x6C
Senthil Balasubramanian [Thu, 14 Apr 2011 11:11:30 +0000 (16:41 +0530)]
ath: Add a missing world regulatory domain 0x6C

Some customers use 0x6C world regulatory domain and this patch
adds the support.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
3 years agoCHROMIUM: chromeos: config: verbose sound sysfs 0.13.434.B
Simon Que [Thu, 21 Apr 2011 00:16:04 +0000 (17:16 -0700)]
CHROMIUM: chromeos: config: verbose sound sysfs

Enable more sound-related sysfs files so the status of the sound system
can be probed.

BUG=chromium-os:866
TEST=Check for existence of /proc/asound/card0/pcm0p/sub0/status.

Change-Id: Ibc51056795b874225362ffb1d431a8adbb3ce7c3
Signed-off-by: Simon Que <sque@chromium.org>
Review URL: http://codereview.chromium.org/6887001

3 years agoCHROMIUM: USB: cdc-acm: fix possible null pointer in acm_tty_hangup
Vincent Palatin [Tue, 19 Apr 2011 21:17:10 +0000 (17:17 -0400)]
CHROMIUM: USB: cdc-acm: fix possible null pointer in acm_tty_hangup

Sometimes, acm_tty_hangup and acm_tty_close are called concurrently.
This results in acm pointer being null in acm_tty_hangup and aborts when it is
dereferenced.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:3143
TEST=run power_Resume in tight loop, then browse the web using the 3G
connection.

Review URL: http://codereview.chromium.org/6873072

Change-Id: I88ef7b85e7977c85b37b2866c5f3904285723866

3 years agoath9k_hw: fix stopping rx DMA during resets
Sam Leffler [Mon, 18 Apr 2011 18:14:56 +0000 (11:14 -0700)]
ath9k_hw: fix stopping rx DMA during resets

During PHY errors, the MAC can sometimes fail to enter an idle state on older
hardware (before AR9380) after an rx stop has been requested.

This typically shows up in the kernel log with messages like these:

ath: Could not stop RX, we could be confusing the DMA engine when we start RX up
------------[ cut here ]------------
WARNING: at drivers/net/wireless/ath/ath9k/recv.c:504 ath_stoprecv+0xcc/0xf0 [ath9k]()
Call Trace:
[<8023f0e8>] dump_stack+0x8/0x34
[<80075050>] warn_slowpath_common+0x78/0xa4
[<80075094>] warn_slowpath_null+0x18/0x24
[<80d66d60>] ath_stoprecv+0xcc/0xf0 [ath9k]
[<80d642cc>] ath_set_channel+0xbc/0x270 [ath9k]
[<80d65254>] ath_radio_disable+0x4a4/0x7fc [ath9k]

When this happens, the state that the MAC enters is easy to identify and
does not result in bogus DMA traffic, however to ensure a working state
after a channel change, the hardware should still be reset.

This patch adds detection for this specific MAC state, after which the above
warnings completely disappear in my tests.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Cc: Kyungwan Nam <Kyungwan.Nam@Atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=chromium-os:13936
TEST=MatFunc SecMat WiFiPerf WiFiRoaming for regression

Review URL: http://codereview.chromium.org/6849006

Change-Id: Ic1bccdb3290492cab0d9a3955d40a00f9ac0e37c

3 years agoCHROMIUM: Input: introduce device properties
Daniel Kurtz [Sun, 17 Apr 2011 07:42:11 +0000 (15:42 +0800)]
CHROMIUM: Input: introduce device properties

Today, userspace sets up an input device based on the data it emits.
This is not always enough; a tablet and a touchscreen may emit exactly
the same data, for instance, but the former should be set up with a
pointer whereas the latter does not need to. Recently, a new type of
touchpad has emerged where the buttons are under the pad, which
changes logic without changing the emitted data. This patch introduces
a new ioctl, EVIOCGPROP, which enables user access to a set of device
properties useful during setup. The properties are given as a bitmap
in the same fashion as the event types, and are also made available
via sysfs, uevent and /proc/bus/input/devices.

Change-Id: Ia55c9f9fc44847090247dcef8cedc6c053a14394
Acked-by: Ping Cheng <pingc@wacom.com>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
(cherry picked from commit aefa83a889256918be11599d82e180ae85457a41)

Signed-off-by: Daniel Stone <daniel.stone@collabora.co.uk>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=chromium-os:13970
TEST=Cr-48 trackpad works as expected with x86-generic build

Review URL: http://codereview.chromium.org/6823007

3 years agoCHROMIUM: qcusbnet: Signal to worker that we expect an exit before waking it.
Elly Jones [Fri, 15 Apr 2011 21:16:36 +0000 (17:16 -0400)]
CHROMIUM: qcusbnet: Signal to worker that we expect an exit before waking it.

If we don't do this, the worker can wake up (when we signal completion), see
that there is no work to do, and go back to sleep, leaving us waiting forever.
Oops.

Change-Id: Ida9c4d691d77138ca4b7ee5c6cb7adee5b0cb13d
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
BUG=chromium-os:14190
TEST=Adhoc
Disable and enable cellular.

Review URL: http://codereview.chromium.org/6865017

3 years agoUPSTREAM: init: add support for root devices specified by partition UUID
Mandeep Singh Baines [Thu, 14 Apr 2011 00:19:23 +0000 (17:19 -0700)]
UPSTREAM: init: add support for root devices specified by partition UUID

This is the third patch in a series which adds support for
storing partition metadata, optionally, off of the hd_struct.

One major use for that data is being able to resolve partition
by other identities than just the index on a block device.  Device
enumeration varies by platform and there's a benefit to being able
to use something like EFI GPT's GUIDs to determine the correct
block device and partition to mount as the root.

This change adds that support to root= by adding support for
the following syntax:

  root=PARTUUID=hex-uuid

Signed-off-by: Will Drewry <wad@chromium.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
(cherry picked from commit b5af921ec02333e943efb59aca4f56b78fc0e100)
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
BUG=chromium-os:14127
TEST=Boots.

localhost ~ # cat /proc/cmdline
quiet loglevel=1 console=tty2 init=/sbin/init add_efi_memmap boot=local noresume noswap i915.modeset=1 cros_secure kern_guid=8bbdf9bc-e3dd-174f-aaea-3fe58fb67c55 tpm_tis.force=1 tpm_tis.interrupts=0 nmi_watchdog=panic,lapic root=PARTUUID=BC1642D3-990F-184D-91CD-440ED29AFA75 rootwait ro dm_verity.error_behavior=3 dm_verity.max_bios=-1 dm_verity.dev_wait=0 dm="vroot none ro,0 1740800 verity ROOT_DEV HASH_DEV 1740800 0 sha1 662d3607032977b25bfd415c8fdef9158d034cea" noinitrd

Change-Id: I1b96111e8a890b6e6a343e840c98568a3ad297ab

R=wad@chromium.org,olofj@chromium.org,bleung@chromium.org

Review URL: http://codereview.chromium.org/6850005

3 years agoCHROMIUMOS: qcusbnet Set the network interface's MAC address based on the MEID
Jason Glasgow [Wed, 13 Apr 2011 15:28:32 +0000 (11:28 -0400)]
CHROMIUMOS: qcusbnet Set the network interface's MAC address based on the MEID

Signed-off-by: Jason R. Glasgow <jglasgow@chromium.org>
BUG=chromium-os:14101
TEST=reboot machine, examine list-devices output, notice device
address is similar to MEID.  Disable Cellular Data, reboot ensure that
cellular data is still off.

Change-Id: Id45d2a11b2315d104a1f00b38095ad7ae7143dd5

Review URL: http://codereview.chromium.org/6839020

3 years agoUSB: cdc-acm: fix deadlock in acm_tty_open
Vincent Palatin [Tue, 12 Apr 2011 20:20:17 +0000 (16:20 -0400)]
USB: cdc-acm: fix deadlock in acm_tty_open

The mutex must be dropped before calling usb_autopm_interface_put,
else a concurrent call to acm_suspend will trigger a deadlock.

BUG=chrome-os-partner:3143
TEST=run power_Resume test in tight loops on Alex.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Review URL: http://codereview.chromium.org/6822052

Change-Id: I304f942012c66bca3631e168022f41028b2a988e

3 years agoUSB: cdc-acm: fix possible deadlock with multiple openers
Vincent Palatin [Tue, 12 Apr 2011 20:19:48 +0000 (16:19 -0400)]
USB: cdc-acm: fix possible deadlock with multiple openers

The lock must be dropped before usb_autopm_interface_put() is called

Signed-off-by: Oliver Neukum <oliver@neukum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
BUG=chrome-os-partner:3143
TEST=run power_Resume test in tight loops on Alex.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Review URL: http://codereview.chromium.org/6822051

Change-Id: Ibc2686aa2114d4415c0d0df781b94f59690c94ed

3 years agoUSB: cdc-acm: fix potential null-pointer dereference on disconnect
Vincent Palatin [Tue, 12 Apr 2011 20:19:23 +0000 (16:19 -0400)]
USB: cdc-acm: fix potential null-pointer dereference on disconnect

Fix potential null-pointer exception on disconnect introduced by commit
11ea859d64b69a747d6b060b9ed1520eab1161fe (USB: additional power savings
for cdc-acm devices that support remote wakeup).

Only access acm->dev after making sure it is non-null in control urb
completion handler.

Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
BUG=chrome-os-partner:3143
TEST=run power_Resume test in tight loops on Alex.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Review URL: http://codereview.chromium.org/6823074

Change-Id: I288e2c3a3fa3b03193ca16498877cced1ee8e8cf

3 years agoUSB: cdc-acm: fix potential null-pointer dereference
Vincent Palatin [Tue, 12 Apr 2011 20:18:58 +0000 (16:18 -0400)]
USB: cdc-acm: fix potential null-pointer dereference

Must check return value of tty_port_tty_get.

Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
BUG=chrome-os-partner:3143
TEST=run power_Resume test in tight loops on Alex.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Review URL: http://codereview.chromium.org/6822050

Change-Id: I23580457a0234f8c8468475800135d714d3c9e7d

3 years agoUSB: cdc-acm: fix memory corruption / panic
Vincent Palatin [Tue, 12 Apr 2011 20:18:07 +0000 (16:18 -0400)]
USB: cdc-acm: fix memory corruption / panic

Prevent read urbs from being resubmitted from tasklet after port close.

The receive tasklet was not disabled on port close, which could lead to
corruption of receive lists on consecutive port open. In particular,
read urbs could be re-submitted before port open, added to free list in
open, and then added a second time to the free list in the completion
handler.

cdc-acm.c: Entering acm_tty_open.
cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x3 len: 0x0 result: 0
cdc-acm.c: Entering acm_rx_tasklet
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da280, rcv 0xf57fbc24, buf 0xf57fbd64
cdc-acm.c: set line: 115200 0 0 8
cdc-acm.c: acm_control_msg: rq: 0x20 val: 0x0 len: 0x7 result: 7
cdc-acm.c: acm_tty_close
cdc-acm.c: acm_port_down
cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x0 len: 0x0 result: 0
cdc-acm.c: acm_ctrl_irq - urb shutting down with status: -2
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da300, rcv 0xf57fbc10, buf 0xf57fbd50
cdc-acm.c: Entering acm_read_bulk with status -2
cdc_acm 4-1:1.1: Aborting, acm not ready
cdc-acm.c: Entering acm_read_bulk with status -2
cdc_acm 4-1:1.1: Aborting, acm not ready
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da380, rcv 0xf57fbbfc, buf 0xf57fbd3c
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da400, rcv 0xf57fbbe8, buf 0xf57fbd28
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da480, rcv 0xf57fbbd4, buf 0xf57fbd14
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da900, rcv 0xf57fbbc0, buf 0xf57fbd00
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da980, rcv 0xf57fbbac, buf 0xf57fbcec
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50daa00, rcv 0xf57fbb98, buf 0xf57fbcd8
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50daa80, rcv 0xf57fbb84, buf 0xf57fbcc4
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dab00, rcv 0xf57fbb70, buf 0xf57fbcb0
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dab80, rcv 0xf57fbb5c, buf 0xf57fbc9c
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dac00, rcv 0xf57fbb48, buf 0xf57fbc88
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dac80, rcv 0xf57fbb34, buf 0xf57fbc74
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dad00, rcv 0xf57fbb20, buf 0xf57fbc60
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50dad80, rcv 0xf57fbb0c, buf 0xf57fbc4c
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da880, rcv 0xf57fbaf8, buf 0xf57fbc38
cdc-acm.c: Entering acm_tty_open.
cdc-acm.c: acm_control_msg: rq: 0x22 val: 0x3 len: 0x0 result: 0
cdc-acm.c: Entering acm_rx_tasklet
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da280, rcv 0xf57fbc24, buf 0xf57fbd64
cdc-acm.c: Entering acm_tty_write to write 3 bytes,
cdc-acm.c: Get 3 bytes...
cdc-acm.c: acm_write_start susp_count: 0
cdc-acm.c: Entering acm_read_bulk with status 0
------------[ cut here ]------------
WARNING: at /home/johan/src/linux/linux-2.6/lib/list_debug.c:57 list_del+0x10c/0x120()
Hardware name: Vostro 1520
list_del corruption. next->prev should be f57fbc10, but was f57fbaf8
Modules linked in: cdc_acm
Pid: 3, comm: ksoftirqd/0 Not tainted 2.6.37+ #39
Call Trace:
 [<c103c7e2>] warn_slowpath_common+0x72/0xa0
 [<c11dd8ac>] ? list_del+0x10c/0x120
 [<c11dd8ac>] ? list_del+0x10c/0x120
 [<c103c8b3>] warn_slowpath_fmt+0x33/0x40
 [<c11dd8ac>] list_del+0x10c/0x120
 [<f8051dbf>] acm_rx_tasklet+0xef/0x3e0 [cdc_acm]
 [<c135465d>] ? net_rps_action_and_irq_enable+0x6d/0x80
 [<c1042bb6>] tasklet_action+0xe6/0x140
 [<c104342f>] __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
---[ end trace efd9a11434f0082e ]---
------------[ cut here ]------------
WARNING: at /home/johan/src/linux/linux-2.6/lib/list_debug.c:57 list_del+0x10c/0x120()
Hardware name: Vostro 1520
list_del corruption. next->prev should be f57fbd50, but was f57fbdb0
Modules linked in: cdc_acm
Pid: 3, comm: ksoftirqd/0 Tainted: G        W   2.6.37+ #39
Call Trace:
 [<c103c7e2>] warn_slowpath_common+0x72/0xa0
 [<c11dd8ac>] ? list_del+0x10c/0x120
 [<c11dd8ac>] ? list_del+0x10c/0x120
 [<c103c8b3>] warn_slowpath_fmt+0x33/0x40
 [<c11dd8ac>] list_del+0x10c/0x120
 [<f8051dd6>] acm_rx_tasklet+0x106/0x3e0 [cdc_acm]
 [<c135465d>] ? net_rps_action_and_irq_enable+0x6d/0x80
 [<c1042bb6>] tasklet_action+0xe6/0x140
 [<c104342f>] __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
---[ end trace efd9a11434f0082f ]---
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da300, rcv 0xf57fbc10, buf 0xf57fbd50
cdc-acm.c: disconnected from network
cdc-acm.c: acm_rx_tasklet: sending urb 0xf50da380, rcv 0xf57fbbfc, buf 0xf57fbd3c
cdc-acm.c: Entering acm_rx_tasklet
------------[ cut here ]------------
WARNING: at /home/johan/src/linux/linux-2.6/lib/list_debug.c:48 list_del+0xd5/0x120()
Hardware name: Vostro 1520
list_del corruption, next is LIST_POISON1 (00100100)
Modules linked in: cdc_acm
Pid: 3, comm: ksoftirqd/0 Tainted: G        W   2.6.37+ #39
Call Trace:
 [<c103c7e2>] warn_slowpath_common+0x72/0xa0
 [<c11dd875>] ? list_del+0xd5/0x120
 [<c11dd875>] ? list_del+0xd5/0x120
 [<c103c8b3>] warn_slowpath_fmt+0x33/0x40
 [<c11dd875>] list_del+0xd5/0x120
 [<f8051fac>] acm_rx_tasklet+0x2dc/0x3e0 [cdc_acm]
 [<c106dbab>] ? trace_hardirqs_on+0xb/0x10
 [<c1042b30>] ? tasklet_action+0x60/0x140
 [<c1042bb6>] tasklet_action+0xe6/0x140
 [<c104342f>] __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
---[ end trace efd9a11434f00830 ]---
BUG: unable to handle kernel paging request at 00200200
IP: [<c11dd7bd>] list_del+0x1d/0x120
*pde = 00000000
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:1a.1/usb4/4-1/4-1:1.0/tty/ttyACM0/uevent
Modules linked in: cdc_acm
Pid: 3, comm: ksoftirqd/0 Tainted: G        W   2.6.37+ #39 0T816J/Vostro 1520
EIP: 0060:[<c11dd7bd>] EFLAGS: 00010046 CPU: 0
EIP is at list_del+0x1d/0x120
EAX: f57fbd3c EBX: f57fb800 ECX: ffff8000 EDX: 00200200
ESI: f57fbe90 EDI: f57fbd3c EBP: f600bf54 ESP: f600bf3c
 DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process ksoftirqd/0 (pid: 3, ti=f600a000 task=f60791c0 task.ti=f6082000)
Stack:
 c1527e84 00000030 c1527e54 00100100 f57fb800 f57fbd3c f600bf98 f8051fac
 f8053104 f8052b94 f600bf6c c106dbab f600bf80 00000286 f60791c0 c1042b30
 f57fbda8 f57f5800 f57fbdb0 f57fbd80 f57fbe7c c1656b04 00000000 f600bfb0
Call Trace:
 [<f8051fac>] ? acm_rx_tasklet+0x2dc/0x3e0 [cdc_acm]
 [<c106dbab>] ? trace_hardirqs_on+0xb/0x10
 [<c1042b30>] ? tasklet_action+0x60/0x140
 [<c1042bb6>] ? tasklet_action+0xe6/0x140
 [<c104342f>] ? __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>
 [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
Code: ff 48 14 e9 57 ff ff ff 90 90 90 90 90 90 55 89 e5 83 ec 18 81 38 00 01 10 00 0f 84 9c 00 00 00 8b 50 04 81 fa 00 02 20 00 74 33 <8b> 12 39 d0 75 5c 8b 10 8b 4a 04 39 c8 0f 85 b5 00 00 00 8b 48
EIP: [<c11dd7bd>] list_del+0x1d/0x120 SS:ESP 0068:f600bf3c
CR2: 0000000000200200
---[ end trace efd9a11434f00831 ]---
Kernel panic - not syncing: Fatal exception in interrupt
Pid: 3, comm: ksoftirqd/0 Tainted: G      D W   2.6.37+ #39
Call Trace:
 [<c13fede1>] ? printk+0x1d/0x24
 [<c13fecce>] panic+0x66/0x15c
 [<c10067df>] oops_end+0x8f/0x90
 [<c1025476>] no_context+0xc6/0x160
 [<c10255a8>] __bad_area_nosemaphore+0x98/0x140
 [<c103cf68>] ? release_console_sem+0x1d8/0x210
 [<c1025667>] bad_area_nosemaphore+0x17/0x20
 [<c1025a49>] do_page_fault+0x279/0x420
 [<c1006a8f>] ? show_trace+0x1f/0x30
 [<c13fede1>] ? printk+0x1d/0x24
 [<c10257d0>] ? do_page_fault+0x0/0x420
 [<c140333b>] error_code+0x5f/0x64
 [<c103007b>] ? select_task_rq_fair+0x37b/0x6a0
 [<c10257d0>] ? do_page_fault+0x0/0x420
 [<c11dd7bd>] ? list_del+0x1d/0x120
 [<f8051fac>] acm_rx_tasklet+0x2dc/0x3e0 [cdc_acm]
 [<c106dbab>] ? trace_hardirqs_on+0xb/0x10
 [<c1042b30>] ? tasklet_action+0x60/0x140
 [<c1042bb6>] tasklet_action+0xe6/0x140
 [<c104342f>] __do_softirq+0xaf/0x210
 [<c1043380>] ? __do_softirq+0x0/0x210
 <IRQ>  [<c1042c9a>] ? run_ksoftirqd+0x8a/0x1c0
 [<c1042c10>] ? run_ksoftirqd+0x0/0x1c0
 [<c105ac24>] ? kthread+0x74/0x80
 [<c105abb0>] ? kthread+0x0/0x80
 [<c100337a>] ? kernel_thread_helper+0x6/0x10
panic occurred, switching back to text console
------------[ cut here ]------------

Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
BUG=chrome-os-partner:3143
TEST=run power_Resume test in tight loops on Alex.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Review URL: http://codereview.chromium.org/6821073

Change-Id: I5b79132b8b48a785c74d6c03d57c73c4181ef328

3 years agoecryptfs: modify write path to encrypt page in writepage
Thieu Le [Tue, 12 Apr 2011 18:59:51 +0000 (11:59 -0700)]
ecryptfs: modify write path to encrypt page in writepage

Change the write path to encrypt the data only when the page is written to
disk in ecryptfs_writepage. Previously, ecryptfs encrypts the page in
ecryptfs_write_end which means that if there are multiple write requests to
the same page, ecryptfs ends up re-encrypting that page over and over again.
This patch minimizes the number of encryptions needed.

Change-Id: Ib24b0931005fb577506af5ee11a4ab693a2bfc5f
Signed-off-by: Thieu Le <thieule@chromium.org>
[tyhicks: Changed NULL .drop_inode sop pointer to generic_drop_inode]
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
BUG=chromium-os:11706
TEST=fsx-linux, bash-shared-mapping, usemem, git cloned the kernel tree, make defconfig and make, web browsing, change Chrome preferences

Review URL: http://codereview.chromium.org/6823046

3 years agoeCryptfs: Unlock page in write_begin error path
Thieu Le [Fri, 8 Apr 2011 00:08:37 +0000 (17:08 -0700)]
eCryptfs: Unlock page in write_begin error path

Unlock the page if we hit an error in ecryptfs_write_begin(). This may
happen, for example, if decryption of the page fails.

Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
(cherry picked from commit c5c4716fb5a9891ed65295f1fe8ae6030cba77e5)

Signed-off-by: Thieu Le <thieule@chromium.org>
BUG=None
TEST=Build, boot, login, browse web, change preferences

Review URL: http://codereview.chromium.org/6816036

Change-Id: If29e87f82a731973fa7366f89f88c0c870d2ddac

3 years agoEnable async suspend/resume on industrial IO devices
Sonny Rao [Wed, 6 Apr 2011 23:38:07 +0000 (16:38 -0700)]
Enable async suspend/resume on industrial IO devices

Industrial I/O devices can sometimes take a long time to resume,
allowing them to be asynchronus saves 50ms on one light sensor

BUG=chrome-os-partner:2490
TEST= do a suspend/resume cycle and ensure iio devices were correctly
resumed

Change-Id: Ib7b09b4d567c3c5ce371a3ee7ebdd2017901225e
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Review URL: http://codereview.chromium.org/6794044

3 years agoEnable async suspend/resume of i2c devices
Sonny Rao [Tue, 5 Apr 2011 22:51:41 +0000 (15:51 -0700)]
Enable async suspend/resume of i2c devices

This improves our resume time when we have devices on an i2c bus
that are slow to resume.  In particular we have a light sensor that
adds about 50ms of resume time on one device. We have to enable it
both on the i2c master and i2c client side and then we get fully async
suspend/resume.

BUG=chrome-os-partner:2490
TEST= do a suspend/resume cycle and ensure i2c devices were correctly
resumed

Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Change-Id: I4d8d882aec533d42acf7d0da3a85327ae7ceb97b

Review URL: http://codereview.chromium.org/6689025

3 years agoCHROMIUMOS: usbnet: Kill, then restart interrupt URB on suspend/resume
Paul Stewart [Mon, 4 Apr 2011 21:42:19 +0000 (14:42 -0700)]
CHROMIUMOS: usbnet: Kill, then restart interrupt URB on suspend/resume

Otherwise a USB ethernet device that is not re-enumerated on resume
won't resume status polling.  For ASIX this means that device carrier
state isn't monitored and reported after suspend-resume.  A change of
this ilk is already in kernel-next, so I don't believe we need to
upstream this.

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=chrome-os-partner:1524
TEST=Reboot with these changes plus code in asix.c to report when the
device status is updated.

Change-Id: I662250a17e62dc5e1dafbc2360010df88fb91472

Review URL: http://codereview.chromium.org/6588096

3 years agoAdd PPP and PPP_ASYNC modules to kernel
Taylor Hutt [Mon, 4 Apr 2011 20:19:13 +0000 (13:19 -0700)]
Add PPP and PPP_ASYNC modules to kernel

Details

  The L2TP/IPsec VPN system (specifically the L2TP layer) requires that PPP and PPP_ASYNC be
  included in the kernel to function properly.

  This change enables both of these options as modules.

Testing

  Besides building the kernel and testing against the L2TP/IPsec work
  I am implementing, I don't know what I should do to test; please
  educate.

  When the L2TP/IPsec project is finished (which includes the
  wifi_testbed 'rspro' firmware, this kernel change, and a WiFi test
  suite), this kernel config change is testable by the following:

     ./bin/cros_run_wifi_tests.sh --cell <desired cell> --lab chromelab VPN

BUG=chromium-os:13519
TEST=See above
Signed-off-by: thutt@chromium.org
Change-Id: I4d45261c73504c8a23df1a3d03fd3194188a2aef
Signed-off-by: Taylor Hutt <thutt@google.com>
R=pstew@chromium.org,kmixter@chromium.org,msb@chromium.org

Review URL: http://codereview.chromium.org/6749007

3 years agoCHROMIUM: verity: create a regular trie when depth=0
Mandeep Singh Baines [Mon, 4 Apr 2011 17:05:30 +0000 (10:05 -0700)]
CHROMIUM: verity: create a regular trie when depth=0

We want to eventually remove support for the depth constructor parameter
only create trees where level[0]->count = 1.

BUG=9752
TEST=Ran dm-verity.git unit tests. Ran platform_DMVerityCorruption on H/W.

verity.git Review URL: http://codereview.chromium.org/6670096

TBRing. Already LGTMed and comitted to verity.git.

Change-Id: I847c3b9a722aa5b93864fe5f5fd7318e806f0ad9
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org,taysom@chromium.org,ups@chromium.org

Review URL: http://codereview.chromium.org/6677133

3 years agoRevert "ecryptfs: modify write path to encrypt page in writepage" 0.12.362.B
Satoru Takabayashi [Mon, 4 Apr 2011 04:57:26 +0000 (13:57 +0900)]
Revert "ecryptfs: modify write path to encrypt page in writepage"

This reverts commit b83351b773731a01ae9bf423b6b22d92821797bb.

BUG=chromium-os:13658,chromium-os:13677
TEST=dpolukhin tested and confirmed it fixed the problem per http://code.google.com/p/chromium-os/issues/detail?id=13658#c28

Change-Id: Ia753af01c38eb91663357cc5d17a79751ec110f3

Review URL: http://codereview.chromium.org/6720011

3 years agoCHROMIUM: chromeos_acpi: Fix comment typos
Daniel Kurtz [Sun, 3 Apr 2011 08:56:59 +0000 (16:56 +0800)]
CHROMIUM: chromeos_acpi: Fix comment typos

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6764011

Change-Id: I1fc6a456b00ac393adab7ffe19345ff9423fe757

3 years agoAdd message about nl80211 change
Paul Stewart [Thu, 24 Mar 2011 01:38:30 +0000 (18:38 -0700)]
Add message about nl80211 change

Change-Id: Iaa4af056103c18d443bce4799209c860c911ef93

3 years agoCHROMIUMOS: Add associated BSS parameters to nl80211 station
Paul Stewart [Mon, 21 Mar 2011 20:46:01 +0000 (13:46 -0700)]
CHROMIUMOS: Add associated BSS parameters to nl80211 station

Signed-off-by: Paul Stewart <pstew@google.com>
TEST=Manual -- use iw dev wlan0 station dump during autotests
BUG=chromium-os:13308

Change-Id: I97b8294f01e075430fbe13fd0ac33555397117fc

3 years agoMoved more patches to the "drop" list
Paul Stewart [Thu, 17 Mar 2011 23:30:02 +0000 (16:30 -0700)]
Moved more patches to the "drop" list

Change-Id: I219107131a310e357fe613ca7c3d52f6d8a86ae6

3 years agoCHROMIUMOS: mac80211: do not enable ps if 802.1x controlled port is unblocked
Paul Stewart [Mon, 14 Mar 2011 17:18:54 +0000 (10:18 -0700)]
CHROMIUMOS: mac80211: do not enable ps if 802.1x controlled port is unblocked

If dynamic_ps is disabled, enabling power save before the 4-way
handshake completes may delay the station from being authorized to
send/receive traffic, i.e. increase roaming times. It also may result in
a failed 4-way handshake depending on the AP's timing requirements and
beacon interval, and the station's listen interval.

To fix this, prevent power save from being enabled while the station
isn't authorized and recalculate power save whenever the station's
authorized state changes.

Signed-off-by: Jason Young <a.young.jason@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=n0ne
TEST=Enable PS in testbed and instrument to make sure we are entering PS
through ps_enable_work with the patch.  Multiple runs of 802.1x SecMat
shows equivalent association times to non-PS mode (which is 0-20ms better
than PS mode used to be).  The big gain is that about 30% of the time
EAP auth would have to retry, adding ~3sec to the total auth time in PS
mode, and I never saw that in any of the new runs.

Change-Id: Ia16ca52566b82bfac568cb3f2110d6d9355b8da2

R=sleffler@chromium.org,snanda@chromium.org

Review URL: http://codereview.chromium.org/6684020
(cherry picked from commit cfc54e6c513d2b1c9a4a08ac7054b1cb9c1e8314)

3 years agoCHROMIUMOS: compat-wireless: add uevent function to regulatory
Scott James Remnant [Mon, 28 Feb 2011 17:05:27 +0000 (09:05 -0800)]
CHROMIUMOS: compat-wireless: add uevent function to regulatory

This adds COUNTRY=xx if there is an in-flight regulartory update that has been missed.

Change-Id: I9a17bfac3806f71ae8e85848493ad2cf07d0ea67
Signed-off-by: Scott James Remnant <keybuk@chromium.org>
BUG=chromium-os:537
TEST=manual

Review URL: http://codereview.chromium.org/6575047
(cherry picked from commit 96f61e0da3fc21397afc21d3fbac214d7be989a2)

3 years agoCHROMIUMOS: ath9k: use split rx buffers to get rid of order-1 skb allocations
Sam Leffler [Sun, 30 Jan 2011 19:14:42 +0000 (11:14 -0800)]
CHROMIUMOS: ath9k: use split rx buffers to get rid of order-1 skb allocations

With this change, less CPU time is spent trying to look for consecutive
pages for rx skbs. This also reduces the socket memory required for IP/UDP
reassembly.
Only two buffers per frame are supported. Frames spanning more buffers
will be dropped, but the buffer size is enough to handle the required
AMSDU size.

Change-Id: I3dde64fdcfbdde45a0cff4a6fbc73b867d684a58
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
BUG=chrome-os:10192
TEST=matfunc+secmat+perf (note downstream udp perf test improvements)

Review URL: http://codereview.chromium.org/6317018
(cherry picked from commit 74e76725da2d81f9bfb34fb30e6e2af5a8d47b5a)

3 years ago[Re-Apply] CHROMIUMOS: ath9k: add PAPRD module parameter and disable by default
Paul Stewart [Thu, 17 Mar 2011 02:39:39 +0000 (19:39 -0700)]
[Re-Apply] CHROMIUMOS: ath9k: add PAPRD module parameter and disable by default

This cherry-pick's the upstream fix to disable PAPRD and adds a module
parameter to control PAPRD for testing and so we can check whether or
not PAPRD is enabled.

ath9k_hw: disabled PAPRD for AR9003

AR9003's PAPRD was enabled prematurely, and is causing some
large discrepancies on throughput and network connectivity.
For example downlink (RX) throughput against an AR9280 AP
can vary widlely from 43-73 Mbit/s while disabling this
gets AR9382 (2x2) up to around 93 Mbit/s in a 2.4 GHz HT20 setup.

Cc: stable@kernel.org
Cc: Paul Shaw <paul.shaw@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
BUG=chromium-os:2001
TEST=run WiFiPerf w/ and w/o PAPRD and compare results; check module parameter by loading module with paprd_disable=1/0 and running a problematic perf test + cat /sys/module/ath9k_hw/parameters/paprd_disable

Review URL: http://codereview.chromium.org/6274021

Change-Id: I8bd4d72481f3b3d41f6c0a880b05ef11a6fa4ef0

Conflicts:

chromeos/compat-wireless/drivers/net/wireless/ath/ath9k/hw.c
(cherry picked from commit f7cf35f2894d8f8584850fe2e7bc5fcb07f307a1)

3 years agoPull changes from wireless-next:
Paul Stewart [Thu, 17 Mar 2011 02:04:15 +0000 (19:04 -0700)]
Pull changes from wireless-next:

    wireless-testing bfc31df33b162540c6c3e1473e022cd0a312a522
    Author: Ben Greear <greearb@candelatech.com>
    mac80211: Show max retry-counts in kernel messages.

    wireless-testing 180205bdb22b79cd7b2a07a5002dd747badc82f3
    Author: Ben Greear <greearb@candelatech.com>
    mac80211: Make some mlme timers module paramaters.

    wireless-testing f3e85b9edeaf8ad0446a37a40c873f3f8898c57d
    Author: Vivek Natarajan <vnatarajan@atheros.com>
    mac80211: Fix a race on enabling power save.

Change-Id: Ifcb1d28203ef177672f7c8bc12dca98dda7cf18b
(cherry picked from commit c5ac889ba32d8308e94f631cb70e71484077b09f)

3 years agoRe apply "expose more sta state via debugfs for use in testing"
Paul Stewart [Thu, 17 Mar 2011 00:35:29 +0000 (17:35 -0700)]
Re apply "expose more sta state via debugfs for use in testing"

dtim_period
beacon_int
cts_prot
short_preamble
short_slot

Note: dtim_period is only valid when power save is enabled

Review URL: http://codereview.chromium.org/1750006

Conflicts:

chromeos/compat-wireless/net/mac80211/debugfs_netdev.c

Change-Id: I864714b5d794883014c33f7a63fd030add921a4f
(cherry picked from commit 55e33661aa8672747254e08be6ef63fe8baf358c)

3 years agoMake compat-wireless compilable again
Paul Stewart [Thu, 17 Mar 2011 00:29:30 +0000 (17:29 -0700)]
Make compat-wireless compilable again

Change-Id: I4711b73d42238f5a994f47a70c40cfbfdebb6f2c
(cherry picked from commit 17928b69f02de25510d41dafe5f3a32223c5edf2)

3 years agoCHROMIUMOS: update compat-wireless to 2.6.38-rc7-2-s
Paul Stewart [Thu, 17 Mar 2011 17:35:08 +0000 (10:35 -0700)]
CHROMIUMOS: update compat-wireless to 2.6.38-rc7-2-s

Lots of small changes to mac80211.  Sync the many driver
changes with stable.  This is the first of a series of
changes meant to merge in the new compat-wireless.  The
changes that follow will bring the tree back to a
compileable state and re-insert necessary changes and
cherry-picks.

Signed-off-by: Paul Stewart <pstew@chromium.org>
BUG=n0ne
TEST=TBD

Change-Id: I76060fac4f600ca78b043585f202cad554546bac

3 years agoCHROMIUM: chromneos_acpi: support both firmware flavors
Vadim Bendebury [Wed, 30 Mar 2011 23:35:25 +0000 (16:35 -0700)]
CHROMIUM: chromneos_acpi: support both firmware flavors

Recent modification of chromeos_acpi.c (under
http://codereview.chromium.org/6673050) accomodated the new
firmware NVRAM interface, where a multibyte block is
reserved in the NVRAM to communicate between the firmware
and the kernel.

This change is incompatible with the "legacy" ChromeOS
firmware (used in CR-48 devices). Two things got broken for
CR-48:

- it is not considered a ChromeOS platform anymore, because
the availability of the VBNV ACPI element is used to decide
whether the platform is ChromeOS or not, and this element is
not exported by the legacy firmware. if the platform is not
a ChromeOS device, the crash memory dump is not initialized
on start up, hence the bug this CL is associated with.

- even if this was fixed, the
chromeos.c:chromeos_set_need_recovery() interface is also
broken, because it presumes that the nvram buffer is
available.

The fix is to use CHSW ACPI object as the evidence of
running on a ChromeOS platform, and using either CHNV
(if present) or VBNV to communicate the need for recovery
mode reboot.

Change-Id: I5674d68e2eec4e4313783a7edcac1da2b2c9123f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
BUG=chromium-os:13483
TEST=manual, see below

Testing was conducted on two platforms, Mario (legacy
firmware) and Alex (new firmware).

-1-

. install the new image
. reboot the DUT
. examine the kernel startup log:

on Mario:
localhost ~ # dmesg | egrep 'chromeos_|Chrome'
[    0.470199] chromeos_acpi: falling back to default list of methods
[    0.470249] chromeos_acpi: registering CHSW 0
[    0.471392] chromeos_acpi: registering CHNV 0
[    0.471651] chromeos_acpi: failed to retrieve MLST (5)
[    0.471690] chromeos_acpi: installed
[    0.472069] Legacy ChromeOS firmware detected
localhost ~ #

on Alex:

localhost ~ # dmesg | egrep 'chromeos_|Chrome'
[    0.365498] chromeos_acpi: registering CHSW 0
[    0.366985] chromeos_acpi: registering VBNV 0
[    0.367012] chromeos_acpi: registering VBNV 1
[    0.368926] chromeos_acpi: truncating buffer from 3750 to 1336
[    0.369894] chromeos_acpi: installed
[    0.370490] ChromeOS firmware detected
localhost ~ #

- 2 -

. execute the following commands

localhost ~ # rm -rf /var/spool/crash
localhost ~ # echo -n test-consent > '/home/chronos/Consent To Send Stats'
localhost ~ # reboot

. observe the DUT reboot
. login again and enter

localhost ~ # echo bug > /proc/breakme

. observe the DUT reboot
. after it comes back up

localhost ~ # ls /var/spool/crash
kernel.20110329.180733.0.kcrash  kernel.20110329.180733.0.meta

Review URL: http://codereview.chromium.org/6775012

3 years agoCHROMIUM: verity: fix valgrind warnings in OddLeafCount
Mandeep Singh Baines [Wed, 30 Mar 2011 20:18:53 +0000 (13:18 -0700)]
CHROMIUM: verity: fix valgrind warnings in OddLeafCount

We don't clear the end bits (non-hash) of the last block. This results
in uninitialized bits being factored into the root hash. This causes
test flakiness.

Fix by memset all leaf blocks after allocation.

BUG=none
TEST=Ran OddLeafCount with valgrind.

verity.git Review URL: http://codereview.chromium.org/6726045

TBRing. Already LGTMed and committed to verity.git.

Change-Id: I75a7f2618273043dd88ebb276cc4d33a3d2a814b
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org

Review URL: http://codereview.chromium.org/6776030

3 years agoCHROMIUM: verity: handle trees with an odd node count correctly
Mandeep Singh Baines [Wed, 30 Mar 2011 18:33:00 +0000 (11:33 -0700)]
CHROMIUM: verity: handle trees with an odd node count correctly

This fixes a bug we were seeing when setting root_depth=3.

BUG=none
TEST=Ran unittests.

verity.git Review URL: http://codereview.chromium.org/6742001

TBRing. Already reviewed and committed to verity.git.

Change-Id: Id56ccff4e48dc52ccba7f997f3b292bdd7b6a5eb
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org

Review URL: http://codereview.chromium.org/6675055

3 years agoCHROMIUM: verity: remove BUG_ON alignment check
Mandeep Singh Baines [Wed, 30 Mar 2011 18:07:34 +0000 (11:07 -0700)]
CHROMIUM: verity: remove BUG_ON alignment check

The buffer passed to the compute_hash needs to be aligned when dm-bht.c
is used in the kernel. dm-bht.c is also used by the dm-verity user-space
code where you don't need aligned buffers.

Remove the BUG_ON for now. Eventually, re-enable once we've modified
the user-space code to use aligned buffers (or once we stop use
common code).

BUG=none
TEST=Ran unittests.

verity.git Review URL: http://codereview.chromium.org/6726018

TBRing. Already LGTMed and committed to verity.git

Change-Id: I26febb69a2b4da8c89b1410d27cdd45f489c5f4a
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org

Review URL: http://codereview.chromium.org/6756041

3 years agoCHROMIUM: gobi: resubmit interrupt urb on failed reads
Elly Jones [Wed, 30 Mar 2011 17:56:54 +0000 (13:56 -0400)]
CHROMIUM: gobi: resubmit interrupt urb on failed reads

If we don't do this and there are pending reads when the card suspends, we can
fail to re-request interrupt urbs when the card comes back up, and we fall into
a hole. Oops.

BUG=None
TEST=Adhoc
suspend/resume a few times; make sure 'modem status' is sensible after each.

Change-Id: Ia0e1b96e983249113c1e1dbf35490487f60a205c
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/6731086

3 years agoCHROMIUM: kernel: config: Abort with error if an unknown flavour is passed to prepare...
Chris Wolfe [Wed, 30 Mar 2011 12:38:42 +0000 (08:38 -0400)]
CHROMIUM: kernel: config: Abort with error if an unknown flavour is passed to prepareconfig

Depends-on: http://codereview.chromium.org/6676055/

Signed-off-by: Chris Wolfe <cwolfe@chromium.org>
BUG=chromium-os:13213
TEST=Ran prepareconfig with known and unknown flavors across x86 and arm.

Change-Id: If89a2d92770e9792dfe12af6cf2850e71cbefcc7

Review URL: http://codereview.chromium.org/6677097

3 years agoCHROMIUM: verity: include delay.h, required for msleep
Mandeep Singh Baines [Tue, 29 Mar 2011 22:32:32 +0000 (15:32 -0700)]
CHROMIUM: verity: include delay.h, required for msleep

My earlier cleanup removed this include.

BUG=none
TEST=none

Change-Id: If443ba49af3a76d91a8f0b4c3629fcb073b3bd95
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org,olofj@chromium.org

Review URL: http://codereview.chromium.org/6775009

3 years agoRevert 2f8d7f57e5502360a6d08f3f79e6d0334c34585e "Send TPM commands on S3 resume to...
Sonny Rao [Tue, 29 Mar 2011 20:13:15 +0000 (13:13 -0700)]
Revert 2f8d7f57e5502360a6d08f3f79e6d0334c34585e "Send TPM commands on S3 resume to fix dogfood devices."

This isn't required anymore on current devices/firmwares

BUG=chrome-os-partner:2490
BUG=chromium-os:2384
TEST=do suspend/resume and verify tpm works
as root run:
stop tscd ; tpmc resume

should get an error like this:

command "resume" failed with code 0x26
TPM_INVALID_POSTINIT
The command was received in the wrong sequence relative to TPM_Init and a subsequent TPM_Startup

Change-Id: Icb154b418288178ef63728a146623d68a964a395
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Review URL: http://codereview.chromium.org/6760009

3 years agoCHROMIUM: verity: remove unused includes
Mandeep Singh Baines [Tue, 29 Mar 2011 20:00:32 +0000 (13:00 -0700)]
CHROMIUM: verity: remove unused includes

BUG=9752
TEST=Compiles.

Change-Id: Ifd84ef4e343082ab8456ef7eacd6414e1b4b9587
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org,taysom@chromium.org,ups@chromium.org

Review URL: http://codereview.chromium.org/6747021

3 years agoCHROMIUM: verity: remove entry_readahead
Mandeep Singh Baines [Tue, 29 Mar 2011 19:58:57 +0000 (12:58 -0700)]
CHROMIUM: verity: remove entry_readahead

We don't use entry_readahead and readahead is really best done by
other layers.

BUG=9752
TEST=Ran platform_DMVerityCorruption on H/W.

Change-Id: If2243bbfe6eb6ab2ff6b95e074238705e51543fa
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org,taysom@chromium.org,ups@chromium.org

Review URL: http://codereview.chromium.org/6757012

3 years agoCHROMIUM: verity: only requeue if necessary
Mandeep Singh Baines [Tue, 29 Mar 2011 19:57:24 +0000 (12:57 -0700)]
CHROMIUM: verity: only requeue if necessary

For the most part, I/Os will be ordered so it is more than likely that
PENDING I/Os will become ready. Instead of requeuing an I/O for which
there were pending I/Os, check the state of all dependent I/Os and
only requeue if necessary.

I also removed the _queue functions. They were two liners that could
easily be open-coded to reduce abstraction. Just makes it easier for
me to see what's really going on.

This change saves about 2 seconds off of a depth=3 boot:

Before:

  seconds_power_on_to_login                                       10.03
  seconds_power_on_to_login{1}                                    9.96
  seconds_power_on_to_login{2}                                    10.4
  seconds_power_on_to_login{3}                                    9.96
  seconds_power_on_to_login{4}                                    10.04
  seconds_power_on_to_login{5}                                    10.04
  seconds_power_on_to_login{6}                                    9.95
  seconds_power_on_to_login{7}                                    10.18
  seconds_power_on_to_login{8}                                    10.13
  seconds_power_on_to_login{9}                                    10.07

0 1740800 verity 0 0 0 438 4017

After:

  seconds_power_on_to_login                                       7.74
  seconds_power_on_to_login{1}                                    7.89
  seconds_power_on_to_login{2}                                    7.84
  seconds_power_on_to_login{3}                                    7.74
  seconds_power_on_to_login{4}                                    7.8
  seconds_power_on_to_login{5}                                    7.85
  seconds_power_on_to_login{6}                                    7.92
  seconds_power_on_to_login{7}                                    7.77
  seconds_power_on_to_login{8}                                    7.81
  seconds_power_on_to_login{9}                                    7.88

0 1740800 verity 0 0 0 0 4014

Notice: No more requeus in the after case.

BUG=chromium-os:9752
TEST=Ran platform_DMVerityCorruption on H/W. Ran platform_BootPerf on H/W.

Change-Id: I360cca3e93db1158694a216aafffc219c9715e88
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org,taysom@chromium.org,ups@chromium.org

Review URL: http://codereview.chromium.org/6739006

3 years agoUPSTREAM: Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal...
Olof Johansson [Sat, 26 Mar 2011 03:13:45 +0000 (20:13 -0700)]
UPSTREAM: Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code

Userland should be able to trust the pid and uid of the sender of a
signal if the si_code is SI_TKILL.

Unfortunately, the kernel has historically allowed sigqueueinfo() to
send any si_code at all (as long as it was negative - to distinguish it
from kernel-generated signals like SIGILL etc), so it could spoof a
SI_TKILL with incorrect siginfo values.

Happily, it looks like glibc has always set si_code to the appropriate
SI_QUEUE, so there are probably no actual user code that ever uses
anything but the appropriate SI_QUEUE flag.

So just tighten the check for si_code (we used to allow any negative
value), and add a (one-time) warning in case there are binaries out
there that might depend on using other si_code values.

Signed-off-by: Julien Tinnes <jln@google.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit da48524eb20662618854bb3df2db01fc65f3070c)

Signed-off-by: Olof Johansson <olof@lixom.net>
BUG=chromium-os:13395
TEST=none

Review URL: http://codereview.chromium.org/6725017

Change-Id: I27e1930cc360a98479c2ccd9ad2a6ebf873f2f18

3 years agoCHROMEOS: chromeos_acpi: handle data buffer overflow.
Vadim Bendebury [Fri, 25 Mar 2011 19:15:07 +0000 (12:15 -0700)]
CHROMEOS: chromeos_acpi: handle data buffer overflow.

It was observed that running crossystem on a target with a
recent firmware (supporting the VDAT acpi object) causes
the kernel to complain about buffer overruns (see the
attached bug entry).

It turns out that the recent firmwares supply more than
3700 bytes in VDAT object, which (when converted into an
ASCII string) results in a buffer exceeding maximum sysfs
file size allowance of 4096 (kernel page size). The driver
was truncating the data to exactly the page size, which
caused the kernel generated warnings.

The proper fix would be to split the supplied data into
multiple sysfs objects, each not exceeding 4k, but as of
now only the small part of the VDAT buffer close to its
beginning is used by the application, so it is OK to
truncate the data at source.

This fix moves the VDAT processing code into a separate
function. It now stores the hex dump representation of the
beginning of the buffer guaranteed to fit into 4096 bytes.

Change-Id: I7f380f690be7cf4746f2fa76db37895e58773d73
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
BUG=chromium-os:13482
TEST=msnual

- build a new image
- install it on the target supporting VDAT in firmware
- restart the target
1. Run the following commands:

dmesg | tail
crossystem
dmesg | tail

observe that crossystem succeeds and there is no messages
added to the dmesg output.

2.
localhost ~ # cat /sys/devices/platform/chromeos_acpi/VDAT | wc
    84    1336    4092
localhost ~ # dmesg | grep chromeos_acpi
[    0.370592] chromeos_acpi: truncating buffer from 3750 to 1336
[    0.371629] chromeos_acpi: installed

Review URL: http://codereview.chromium.org/6732045

3 years agoCHROMIUM: Hide packet dumps behind a flag.
Elly Jones [Wed, 23 Mar 2011 19:58:47 +0000 (15:58 -0400)]
CHROMIUM: Hide packet dumps behind a flag.

BUG=None
TEST=Adhoc
built, installed, dmesg | grep gobi, modem status

Change-Id: Ic9152dad864d4125204620b7f93b1170cf0d7159
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Review URL: http://codereview.chromium.org/6731002

3 years agodrm/i915: Ensure that while(INREG()) are bounded (v2)
Chris Wilson [Tue, 22 Mar 2011 00:58:38 +0000 (17:58 -0700)]
drm/i915: Ensure that while(INREG()) are bounded (v2)

Add a new macro, wait_for, to simplify the act of waiting on a register
to change state. wait_for() takes three arguments, the condition to
inspect on every loop, the maximum amount of time to wait and whether to
yield the cpu for a length of time after each check.

v2: Upgrade failure messages to DRM_ERROR on the suggestion of
Eric Anholt. We do not expect to hit these conditions as they reflect
programming errors, so if we do we want to be notified.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
(cherry-picked from commit 913d8d110078788c14812dce8bb62c37946821d2 upstream)
Signed-off-by: Benson Leung <bleung@chromium.org>
Change-Id: Id2f31bb889170cd468a5aaee7696333301172006

R=msb@chromium.org
BUG=chrome-os-partner:2798,chrome-os-partner:1628,chromium-os:13134
TEST=Built, ran with quick close/open case.
Ensure no hard hang, just case where ends up suspended
with lid open.

Review URL: http://codereview.chromium.org/6676074
Patch from Chris Wilson <chris@chris-wilson.co.uk>.

3 years agoUPSTREAM: modpost: Fix address calculation in reloc_location()
Olof Johansson [Mon, 21 Mar 2011 16:52:28 +0000 (09:52 -0700)]
UPSTREAM: modpost: Fix address calculation in reloc_location()

This patch fixes a segfault in modpost that is observed when the gold
linker is used to link the input objects.

The problem is that reloc_location (modpost.c) is computing the
address of the relocation target incorrectly. Here, elf->hdr points
to the beginning of the ELF file in memory, sechdr points to the
relocation section header, section is the index of the section
being relocated, and sechdrs[section].sh_offset would be the offset
of that section, relative to the beginning of the ELF file. Adding
elf->hdr + sechdrs[section].sh_offset gives you the address of the
beginning of the section, and adding r->r_offset to that gives you the
address of the location to be relocated. You do not need to subtract
sechdrs[section].sh_addr from that -- the result of this is an address
outside the file, and causes the segfault when addend_386_rel tries to
dereference it.

This bug is not observed when GNU ld is used to link the inputs. The
object file ubuntu/omnibook/omnibook.o is the result of an ld -r of
several other files.  When GNU ld does an ld -r, it sets the vaddr
field for each section to 0, but gold lays out the section addresses
sequentially instead:

Section Headers:
 [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
 [ 0]                   NULL            00000000 000000 000000 00      0   0  0
 [ 1] .text             PROGBITS        00000000 000034 004794 00  AX  0   0  4
 [ 2] .data             PROGBITS        0000b9d0 0047c8 0009c0 00  WA  0   0  4
 [ 3] .bss              NOBITS          000162f8 005188 00013c 00  WA  0   0  4
 [ 4] .rodata.str1.1    PROGBITS        00004f2d 0052c4 001b1a 01 AMS  0   0  1
 [ 5] .init.text        PROGBITS        00004794 006dde 0005fa 00  AX  0   0  1
 [ 6] .exit.text        PROGBITS        00004d8e 0073d8 00018a 00  AX  0   0  1
  ...

So the bug in the tool remained undiscovered because the section's vaddr
always happened to be 0.

Signed-off-by: Raymes Khoury <raymes@google.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Michal Marek <mmarek@suse.cz>
(cherry picked from commit 731ece41fb1047816303295a0cdfed90a528137e)
Signed-off-by: Olof Johansson <olofj@chromium.org>
Change-Id: I9bca9d76eb0c779c2f88459a23188dba72267fa6

BUG=chromium-os:13195
TEST=build factory image (that was showing this bug)

Review URL: http://codereview.chromium.org/6677106

3 years agoCHROMIUM: chromeos_acpi Support new NVRAM interface.
Vadim Bendebury [Thu, 17 Mar 2011 23:44:30 +0000 (16:44 -0700)]
CHROMIUM: chromeos_acpi Support new NVRAM interface.

This CL changes the interface between chromeos_acpi and
chromeos drivers to accommodate the new NVRAM contents
structure (as described in http://goo.gl/kW1he).

Each shared integer element retrieved through ACPI is placed
in its own container, including the value and a boolean
indicating that the value has been already retrieved. This
scheme obviates the need for a separate
`chromeos_acpi_available` flag.

Writing nvram is now causing recalculating the crc8 value.

We want to be make sure that chromeos.c and chromeos_acpi.c
are always present together. The Kconfig change enforces
this.

The scheme is still vulnerable to race condition when more
than one entity are trying to modify the nvram buffer
contents, the locking mechanism needs to be implemented, but
this is beyond the scope of this change.

Change-Id: I636cc65d6a40ecd2a7b67a4d3bb7d2eb935d8723
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
BUG=chromium-os:12734
TEST= see below, ideas welcome

The system builds and boots with the appropriate messages
showing up in the kernel log and the NVRAM read failure not
reported:

localhost ~ # dmesg | egrep -i '(chr|Failed reading NVRAM)'
[    0.000000] Linux version 2.6.32.26+drm33.12 (vbendeb@eskimo.mtv.corp.google.com) (gcc version 4.4.3 (gcc-4.4.3_cos_gg_v1_41723) ) #1 SMP Wed Mar 16 18:23:48 PDT 2011 (Ubuntu 2.6.32-0.1-chromeos-intel-menlow)
[    0.106129] checking TSC synchronization [CPU#0 -> CPU#1]: passed.
[    0.178137] checking TSC synchronization [CPU#0 -> CPU#2]:
[    0.403575] chromeos_acpi: installed
[    0.404253] Chrome OS platform detected
[    1.000655] device-mapper: verity-chromeos: dm-verity-chromeos registered

Review URL: http://codereview.chromium.org/6673050

3 years agoCHROMIUM: config: Switch from qualcomm's gobi driver to ours.
Elly Jones [Thu, 17 Mar 2011 22:00:45 +0000 (18:00 -0400)]
CHROMIUM: config: Switch from qualcomm's gobi driver to ours.

Ours supports both gobi2k and gobi3k, and we understand it better. (It also has
a snowball's chance of going upstream).

BUG=chromium-os:12380,chromium-os:10342,chromium-os:10122,chromium-os:10717
TEST=Adhoc

Change-Id: I1befce297fb141a3049ebf30fa69f54c3ac15155
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/6708002

3 years agoCHROMIUM: gobi: Fix races in qc_deregister() once and for all.
Elly Jones [Thu, 17 Mar 2011 18:12:48 +0000 (14:12 -0400)]
CHROMIUM: gobi: Fix races in qc_deregister() once and for all.

This is a fix to my rewritten driver, and is ported from the fix at http://codereview.chromium.org/6602058/.

Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
BUG=chromium-os:10342
TEST=/opt/Qualcomm/bin/open-deauth

Review URL: http://codereview.chromium.org/6612045

Change-Id: I404edbfde49a154604bc657b7f76776b7423f51e

3 years agoCHROMIUM: config: enable panic on softlockup
Mandeep Singh Baines [Thu, 17 Mar 2011 01:59:24 +0000 (18:59 -0700)]
CHROMIUM: config: enable panic on softlockup

We'd like to panic the system on a softlockup so that we can get a
crash dump. No point in letting the machine stay wedged.

BUG=13165
TEST=platform_KernelErrorPaths autotest

(separate patch to enable softlockup in platform_KernelErrorPaths)

./run_remote_tests.sh --remote 172.22.75.20 --board x86-generic platform_KernelErrorPaths
...
INFO    : Test results:
---------------------------------------------------------
platform_KernelErrorPaths                           PASS
platform_KernelErrorPaths/platform_KernelErrorPaths PASS
---------------------------------------------------------
Total PASS: 2/2 (100%)

Change-Id: I9579fb615afbd615e996ef61ffaac5d9ceb8a191
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=olofj@chromium.org,vbendeb@chromium.org,bleung@chromium.org

Review URL: http://codereview.chromium.org/6670063

3 years agoCHROMIUM: qcusbnet: Add gobi3k support.
Elly Jones [Wed, 16 Mar 2011 18:30:06 +0000 (14:30 -0400)]
CHROMIUM: qcusbnet: Add gobi3k support.

This entails:
1) Adding a couple of new vid:pid pairs for known Gobi3k devices.
2) Handling the extra USB interface gobi3ks have
3) Installing a proper 'parent' pointer to help udev emit the correct number of
   device events, and
4) Changing the driver's registration name.

The latter change was requested by upstream when I first submitted this driver.
It is correct, in that the driver's name should reflect that it does not just
drive gobi2ks, but it will require changes in userspace to match.

BUG=chromium-os:12380
TEST=Adhoc
ls /dev/qcqmi* with both a g2k and g3k present; try 'gobi3k list', too.

Change-Id: I0e86fcbce22f3a1f3fd58caf0e8d47e39a1af9ed
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/6672003

3 years agoCHROMIUM: qcserial: Add support for Gobi 3000 devices.
Elly Jones [Wed, 16 Mar 2011 18:08:36 +0000 (14:08 -0400)]
CHROMIUM: qcserial: Add support for Gobi 3000 devices.

BUG=chromium-os:12380
TEST=Adhoc
With a gobi 3000: boot up, ls /dev/ttyUSB*. You ought to see two.

Change-Id: Ida58ad8eb3ed3e76be87f511215cd3d2156b04f1
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/6652004

3 years agoCHROMIUM: qcusbnet: fix devqmi_close() races.
Elly Jones [Wed, 16 Mar 2011 18:03:34 +0000 (14:03 -0400)]
CHROMIUM: qcusbnet: fix devqmi_close() races.

Originally, devqmi_close() was attached to the flush hook (instead of the
release hook), meaning it would be called whenever a userspace task called
close() (instead of just when the last ref to the file was dropped), which
necessitated the task-list-walking song and dance. Instead, add a new ioctl
which userspace can use to tear down the QMI connection and remove the refcount
check stuff.

This fixes a whole raft of nasty races in devqmi_close().

Note that it is not required that userspace use the ioctl; if it doesn't
(because, for example, it crashes), we'll still clean up any dangling QMI
contexts at release time.

BUG=chromium-os:10360
TEST=Adhoc
Reproducing the bug this fixes (see 10360) is almost impossible. :(

Change-Id: Ic64f64d89757f2ad95d2df9e8da04ddda3209bda
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/6694028

3 years agoCHROMIUM: qcusbnet: don't leak clients_lock
Elly Jones [Wed, 16 Mar 2011 18:01:06 +0000 (14:01 -0400)]
CHROMIUM: qcusbnet: don't leak clients_lock

Was present in the original qualcomm driver; we reported it to them and they
fixed it, but we didn't pull the fix into the rewrite. Oops.

BUG=None
TEST=Adhoc
'gobi3k reset' with a gobi3k present triggers this most of the time.

Change-Id: I02bd90fd17bec841a8d448507e2f8117f57e8328
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Review URL: http://codereview.chromium.org/6695025

3 years agoCHROMIUM: config: normalize after recent additions.
Vadim Bendebury [Tue, 15 Mar 2011 23:23:24 +0000 (16:23 -0700)]
CHROMIUM: config:  normalize after recent additions.

Change-Id: Iad3428618fc7f8c2b8625b70516941fa2f23ac5c
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
TBR=msb
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6698059

3 years agoIntroduce the ability to handle ACPI buffers.
Vadim Bendebury [Tue, 15 Mar 2011 17:24:59 +0000 (10:24 -0700)]
Introduce the ability to handle ACPI buffers.

ChromeOS needs to be able to receive assorted information
from the BIOS. Passing it in an opaque buffer structure
seems an obvious choice. This change adds the ability
to handle ACPI buffers in chromeos_acpi driver.

It turned out that chromeos_acpi can not be converted into a
removable module anymore, which made debugging difficult
(full kernel recompilation needed, if something goes wrong -
the machine is hosed, etc.)

This change restores the option of building chromeos_acpi as
a module, maintaining status quo (it is built in by
default). chromeos_acpi_exit() is copied from the original
implementation.

chromeos_acpi driver is architectured such that ACPI object
values are represented as strings. This addition converts
converts the binary buffer contents into a multiline string
(16 bytes representes in %.2.x format in each) line.

Change-Id: I8db12454e48db5dddb56a11836ad2d8fd8b6d7bf
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
BUG=chromium-os:13069, chromium-os:13091
TEST=manual

For two cases, when chromeos_acpi is configured as a module
and not:

- build system image, modify it for test
- install it on an target with BIOS supplying a
  chromeos ACPI buffer object
- restart the machine
- observe the contents of the VDAT object:

localhost tmp # cat /sys/devices/platform/chromeos_acpi/VDAT
 11 22 33 44 f7 1f 1c 40 96 57 74 41 cc dd ee ff

In case it is configured as a module:

- observe that chromeos_acpi can be removed/reinstalled:
localhost tmp # rmmod chromeos_acpi
localhost tmp # modprobe chromeos_acpi
localhost tmp # rmmod chromeos_acpi
localhost tmp # modprobe chromeos_acpi

- temporarily modify the module to print 5 bytes per string
- try installing the changed module and examine VDAT again:
localhost tmp # cat /sys/devices/platform/chromeos_acpi/VDAT
 11 22 33 44 f7
 1f 1c 40 96 57
 74 41 cc dd ee
 ff

Review URL: http://codereview.chromium.org/6690023

3 years agoCHROMIUM: verity: use atomic_set instead of atomic_cmpxchg in read_completed
Mandeep Singh Baines [Tue, 15 Mar 2011 17:08:44 +0000 (10:08 -0700)]
CHROMIUM: verity: use atomic_set instead of atomic_cmpxchg in read_completed

When moving from the PENDING to READY state it is sufficient to use
an atomic_set since we know the previous state MUST have been
PENDING. In addition, there is a BUG_ON which verifies this.

BUG=9752
TEST=Ran tests in verity.git. Ran platform_DMVerityCorruption on H/W.

Change-Id: I3e7a2a8cdd909f85e232b77bc8190a7550461688
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org,taysom@chromium.org,ups@chromium.org

Review URL: http://codereview.chromium.org/6677048

3 years agoCHROMIUM: verity: use atomic_set instead of atomic_cmpxchg in verify_path
Mandeep Singh Baines [Tue, 15 Mar 2011 15:38:04 +0000 (08:38 -0700)]
CHROMIUM: verity: use atomic_set instead of atomic_cmpxchg in verify_path

When moving from the READY to VERIFIED state it is sufficient to use
an atomic_set since we know the previous state MUST have been
either READY or VERIFIED.

BUG=9752
TEST=Ran tests in verity.git. Ran platform_DMVerityCorruption on H/W.

Change-Id: Id55dcbe1ba880801af9166f39859f944c8f418d3
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
R=wad@chromium.org,taysom@chromium.org,ups@chromium.org

Review URL: http://codereview.chromium.org/6694010

3 years agoCHROMIUM: verity: collapse check_block into verify_path
Mandeep Singh Baines [Mon, 14 Mar 2011 23:07:56 +0000 (16:07 -0700)]
CHROMIUM: verity: collapse check_block into verify_path

There was a lot of common code between the two functions.

BUG=9752
TEST=Ran tests in verity.git. Ran platform_DMVerityCorruption on H/W.

Change-Id: If26ea858537e8a5d28cc1c03ebab794447459388
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/6686017

3 years agoCHROMIUMOS: mac80211: do not enable ps if 802.1x controlled port is unblocked
Paul Stewart [Mon, 14 Mar 2011 17:18:54 +0000 (10:18 -0700)]
CHROMIUMOS: mac80211: do not enable ps if 802.1x controlled port is unblocked

If dynamic_ps is disabled, enabling power save before the 4-way
handshake completes may delay the station from being authorized to
send/receive traffic, i.e. increase roaming times. It also may result in
a failed 4-way handshake depending on the AP's timing requirements and
beacon interval, and the station's listen interval.

To fix this, prevent power save from being enabled while the station
isn't authorized and recalculate power save whenever the station's
authorized state changes.

Signed-off-by: Jason Young <a.young.jason@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
BUG=n0ne
TEST=Enable PS in testbed and instrument to make sure we are entering PS
through ps_enable_work with the patch.  Multiple runs of 802.1x SecMat
shows equivalent association times to non-PS mode (which is 0-20ms better
than PS mode used to be).  The big gain is that about 30% of the time
EAP auth would have to retry, adding ~3sec to the total auth time in PS
mode, and I never saw that in any of the new runs.

Change-Id: Ia16ca52566b82bfac568cb3f2110d6d9355b8da2

R=sleffler@chromium.org,snanda@chromium.org

Review URL: http://codereview.chromium.org/6684020

3 years agoCHROMIUM: ALSA: hda: Add fixup for alex model
Todd Broch [Sat, 12 Mar 2011 02:27:09 +0000 (18:27 -0800)]
CHROMIUM: ALSA: hda: Add fixup for alex model

create fixup function for the alex model and override amp capabilities
for NID 0x2 to remove clipping of audio to built-in speakers

related CL(s):
http://codereview.chromium.org/6544026/
http://codereview.chromium.org/6469065/

BUG=chrome-os-partner:2273
TEST=manual,
1. Build kernel and install on device
2. Edit /etc/modprobe.d/alsa.conf to include 'options snd_hda_intel model=alex'
3. Reboot
4. shell>amixer -c 0 sget Speaker | grep -i limit
   Should produce 'Limits: Playback 0 - N' where N < 64 (max gain)

Change-Id: Ie66d8ad572f1a232d5e37217eb62e9d20ed8ee5b
Signed-off-by: Todd Broch <tbroch@chromium.org>
Review URL: http://codereview.chromium.org/6546058

3 years agoALSA: hda: Add fixup for mario system
Todd Broch [Fri, 11 Mar 2011 23:51:57 +0000 (15:51 -0800)]
ALSA: hda: Add fixup for mario system

create fixup function for the mario model and override amp capabilities
for NID 0x2

related CL(s):
http://codereview.chromium.org/6544026/
http://codereview.chromium.org/6469065/

BUG=chrome-os-partner:1221
TEST=built successfully.  Ran on mario, saw max gain now 59 vs. 64

Change-Id: Ie1cbe9323dac40876cc5b5e95afeeb2e0c663c81
Signed-off-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Review URL: http://codereview.chromium.org/6543032

3 years agoecryptfs: modify write path to encrypt page in writepage
Thieu Le [Fri, 11 Mar 2011 22:52:21 +0000 (14:52 -0800)]
ecryptfs: modify write path to encrypt page in writepage

Change the write path to encrypt the data only when the page is written to
disk in ecryptfs_writepage. Previously, ecryptfs encrypts the page in
ecryptfs_write_end which means that if there are multiple write requests to
the same page, ecryptfs ends up re-encrypting that page over and over again.
This patch minimizes the number of encryptions needed.

Change-Id: Ib24b0931005fb577506af5ee11a4ab693a2bfc5f
Signed-off-by: Thieu Le <thieule@chromium.org>
[tyhicks: Changed NULL .drop_inode sop pointer to generic_drop_inode]
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
BUG=chromium-os:11706
TEST=fsx-linux, bash-shared-mapping, usemem, git cloned the kernel tree, make defconfig and make, web browsing

Review URL: http://codereview.chromium.org/6685009
Patch from Thieu Le <thieule@chromium.org>.

3 years agoCHROMIUM: verity: use sg_set_buf instead of sg_set_page
Mandeep Singh Baines [Fri, 11 Mar 2011 22:48:15 +0000 (14:48 -0800)]
CHROMIUM: verity: use sg_set_buf instead of sg_set_page

This is in preparation for removing the assumption that the block
size = PAGE_SIZE.

BUG=9752
TEST=Ran tests in verity.git. Ran platform_DMVerityCorruption on H/W.

Change-Id: I4ef68f914f58f181c131df6cccab0d27e5e00ee2
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/6684008

3 years agoALSA: hda: Add modelname lookup and fixup for realtek codecs
Todd Broch [Fri, 11 Mar 2011 21:19:46 +0000 (13:19 -0800)]
ALSA: hda: Add modelname lookup and fixup for realtek codecs

Facilitate fixup for realtek codecs via modelname lookup of fixup
data.  Fallback to quirk based lookup in absence of model definition.

related CL(s):
http://codereview.chromium.org/6469065/

BUG=chrome-os-partner:1221
TEST=built successfully

Change-Id: Ia44a90f3f747c9ee2120c1e53c73bd647a14f719
Signed-off-by: Todd Broch <tbroch@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Review URL: http://codereview.chromium.org/6544026

3 years agoRevert "CHROMIUM: ALSA: hda: Add setup for mario"
Todd Broch [Fri, 11 Mar 2011 20:58:40 +0000 (12:58 -0800)]
Revert "CHROMIUM: ALSA: hda: Add setup for mario"

This reverts commit e433afe45e222e432a01e746321502e62478634c.

The equivalent functionality will be added in two following patches based on upstream-preferred implementation. Backing out our local change for now.

BUG=chrome-os-partner:1221
TEST=None

Change-Id: I125c2c012c6e69c94c0e982f93504e604e776c5c
Signed-off-by: Todd Broch <tbroch@chromium.org>
Review URL: http://codereview.chromium.org/6469065

3 years agoCHROMIUM: verity: remove checks for error states
Mandeep Singh Baines [Fri, 11 Mar 2011 20:53:36 +0000 (12:53 -0800)]
CHROMIUM: verity: remove checks for error states

All entries along the path must be either READY or VERIFIED as per
the contract with the caller. There is a BUG_ON which checks this.

BUG=9752
TEST=Ran tests in verity.git. Ran platform_DMVerityCorruption on H/W.

Change-Id: Ib7d00f9bfc3e55ee236974ed6408c11002e14a41
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/6681004

3 years agoCHROMIUM: usbnet & cdc-ether: Autosuspend for online devices
Vincent Palatin [Fri, 11 Mar 2011 19:40:47 +0000 (14:40 -0500)]
CHROMIUM: usbnet & cdc-ether: Autosuspend for online devices

Using remote wakeup and delayed transmission to allow
online device to go into usb autosuspend.
Minimal alternate support for devices that don't support
remote wakeup.

Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This is a backport of the vanilla 2.6.37 commit 69ee472f2706371ca639de49b06df91615c07d8d.
It aims at getting a proper auto-suspend support for the Ericsson
F3307 3G Modem.

BUG=chrome-os-partner:2466
TEST=on L13 with Ericsson F3307 modem and T-Mobile SIM card, activate
the autosuspend for the modem USB device (by putting "auto" in the
/sys/bus/usb/devices/Xxx/power/level), then check that the non-suspended
time is no longer increasing when not using the connection (by reading
the /sys/bus/usb/devices/Xxx/power/active_duration) and we can still browse
over the 3G connection after some periods spent in suspend mode.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Review URL: http://codereview.chromium.org/6609024

Change-Id: I74dba420a66e3f310370be6a1914763eca5bdd6f

3 years agoCHROMIUM: cdc_ether: Identify MBM devices by GUID in MDLM descriptor
Vincent Palatin [Fri, 11 Mar 2011 19:36:37 +0000 (14:36 -0500)]
CHROMIUM: cdc_ether: Identify MBM devices by GUID in MDLM descriptor

This patch removes vid/pid for Ericsson MBM devices from the whitelist
set of devices. The MBM devices are instead identified by GUID.

This aims at getting a proper auto-suspend support for the Ericsson
F3307 3G Modem.

On 2.6.37, there is a similar modification

BUG=chrome-os-partner:2466
TEST=on L13 with Ericsson F3307 modem and T-Mobile SIM card, connect and
check we can browse over the 3G connection.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Review URL: http://codereview.chromium.org/6612023

Change-Id: Ifa94b4e523ad72b00687655742acbc4cfc2ec701

3 years agoCHROMIUM: verity: short circuit once you hit a verified node
Mandeep Singh Baines [Fri, 11 Mar 2011 16:28:53 +0000 (08:28 -0800)]
CHROMIUM: verity: short circuit once you hit a verified node

Since we set the VERIFIED bits top-down we can short circuit once
we hit a VERIFIED node.

BUG=9752
TEST=Ran tests in verity.git. Ran platform_DMVerityCorruption on H/W.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I1b1423f1f076965bb12bd1c97235f95ec65a0ca3

Review URL: http://codereview.chromium.org/6670008

3 years agoCHROMIUM: verity: remove verify_mode
Mandeep Singh Baines [Thu, 10 Mar 2011 21:39:10 +0000 (13:39 -0800)]
CHROMIUM: verity: remove verify_mode

We don't really use verify_mode any more. We used to use it when
dm_bht_compute called verify_path but that is no longer the case.

I'm sending this patch now because it makes the LOCALLY_VERIFIED state
patch I'm working on a little cleaner. So this is really work
leading up to that.

BUG=9752
TEST=Ran platform_DMVerityCorruption on H/W.

Change-Id: I4ef602f1b0a6c1c4a26927925dbe6d7abe75048c
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/6659037

3 years agoCHROMIUM: Fix UserspaceClose() races once and for all.
Elly Jones [Thu, 10 Mar 2011 21:14:45 +0000 (16:14 -0500)]
CHROMIUM: Fix UserspaceClose() races once and for all.

Since we now have a fix in userspace (having it explicitly tear down QMI
connections before closing file descriptors), we can rip out the race-prone code
in UserspaceClose() and use a real release hook instead.

BUG=chromium-os:10360
TEST=network_3GStressEnable

Change-Id: Id53ecd4202399a2d636806e7e9436cf1bcee6846
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Review URL: http://codereview.chromium.org/6658003

3 years agoCHROMIUM: verity: remove short-circuiting of verify_path
Mandeep Singh Baines [Wed, 9 Mar 2011 23:04:10 +0000 (15:04 -0800)]
CHROMIUM: verity: remove short-circuiting of verify_path

This removes the optimization which short-circuited verify_path. The net
result is the addition of a few cycles and the removal of a few so zero
or negligible cycles added.

The main benefit is the removal of the one of the larget comments in the
code. Ran BootPerfServer to verify no noticable overhead added.

Before:

  seconds_power_on_to_login                                       8.44

After:

  seconds_power_on_to_login                                       8.4

This result is within variance.

BUG=9752
TEST=Ran dm-verity.git unit tests. Ran platform_DMVerityCorruption on H/W.

Change-Id: Iad06d4a9590d149150af1461b88c28db32daedc7
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/6659004

3 years agoCHROMIUM: verity: don't pass hash_desc down the stack
Mandeep Singh Baines [Wed, 9 Mar 2011 23:01:11 +0000 (15:01 -0800)]
CHROMIUM: verity: don't pass hash_desc down the stack

Simplify the code by grabbing a hash_desc reference inside compute_hash().

BUG=9752
TEST=Ran platform_DMVerityCorruption on H/W.

Change-Id: Id7f7102203a503f58781130e0208509c222ee104
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/6660003

3 years agoCHROMIUM: Add gobi driver.
Elly Jones [Wed, 9 Mar 2011 20:02:32 +0000 (15:02 -0500)]
CHROMIUM: Add gobi driver.

(It isn't built yet, so this should have no functional changes at all).

BUG=chromium-os:5521
TEST=suite_Cellular

Change-Id: I28bc550bd600ba350f8b34926e698bbb2b3c8c6c
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Review URL: http://codereview.chromium.org/6539018

3 years agoTCP: increase default initial receive window.
Sam Leffler [Wed, 9 Mar 2011 17:18:53 +0000 (09:18 -0800)]
TCP: increase default initial receive window.

This patch changes the default initial receive window to 10 mss
(defined constant). The default window is limited to the maximum
of 10*1460 and 2*mss (when mss > 1460).

draft-ietf-tcpm-initcwnd-00 is a proposal to the IETF that recommends
increasing TCP's initial congestion window to 10 mss or about 15KB.
Leading up to this proposal were several large-scale live Internet
experiments with an initial congestion window of 10 mss (IW10), where
we showed that the average latency of HTTP responses improved by
approximately 10%. This was accompanied by a slight increase in
retransmission rate (0.5%), most of which is coming from applications
opening multiple simultaneous connections. To understand the extreme
worst case scenarios, and fairness issues (IW10 versus IW3), we further
conducted controlled testbed experiments. We came away finding minimal
negative impact even under low link bandwidths (dial-ups) and small
buffers.  These results are extremely encouraging to adopting IW10.

However, an initial congestion window of 10 mss is useless unless a TCP
receiver advertises an initial receive window of at least 10 mss.
Fortunately, in the large-scale Internet experiments we found that most
widely used operating systems advertised large initial receive windows
of 64KB, allowing us to experiment with a wide range of initial
congestion windows. Linux systems were among the few exceptions that
advertised a small receive window of 6KB. The purpose of this patch is
to fix this shortcoming.

References:
1. A comprehensive list of all IW10 references to date.
http://code.google.com/speed/protocols/tcpm-IW10.html

2. Paper describing results from large-scale Internet experiments with IW10.
http://ccr.sigcomm.org/drupal/?q=node/621

3. Controlled testbed experiments under worst case scenarios and a
fairness study.
http://www.ietf.org/proceedings/79/slides/tcpm-0.pdf

4. Raw test data from testbed experiments (Linux senders/receivers)
with initial congestion and receive windows of both 10 mss.
http://research.csc.ncsu.edu/netsrv/?q=content/iw10

5. Internet-Draft. Increasing TCP's Initial Window.
https://datatracker.ietf.org/doc/draft-ietf-tcpm-initcwnd/

Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
TCP: Bug fix in initialization of receive window.

The bug has to do with boundary checks on the initial receive window.
If the initial receive window falls between init_cwnd and the
receive window specified by the user, the initial window is incorrectly
brought down to init_cwnd. The correct behavior is to allow it to
remain unchanged.

Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Add rtnetlink init_rcvwnd to set the TCP initial receive window

Add rtnetlink init_rcvwnd to set the TCP initial receive window size
advertised by passive and active TCP connections.
The current Linux TCP implementation limits the advertised TCP initial
receive window to the one prescribed by slow start. For short lived
TCP connections used for transaction type of traffic (i.e. http
requests), bounding the advertised TCP initial receive window results
in increased latency to complete the transaction.
Support for setting initial congestion window is already supported
using rtnetlink init_cwnd, but the feature is useless without the
ability to set a larger TCP initial receive window.
The rtnetlink init_rcvwnd allows increasing the TCP initial receive
window, allowing TCP connection to advertise larger TCP receive window
than the ones bounded by slow start.

Signed-off-by: Laurent Chavey <chavey@google.com>
BUG=chromium-os:7500
TEST=full wifi test suite + live testing in a variety of settings

Review URL: http://codereview.chromium.org/6602015

Change-Id: I9d48077781cad74817e34ea9654b6d4e0f129074

3 years agoCHROMIUM: verity: do all hashing in dm-bht.c
Mandeep Singh Baines [Wed, 9 Mar 2011 00:57:43 +0000 (16:57 -0800)]
CHROMIUM: verity: do all hashing in dm-bht.c

We were doing the hashing of the disk blocks in dm-verity.c and hashing
hash blocks in dm-bht.c. We can simplifiy the code by doing all the
hashing in dm-bht.c. We couldn't do this earlier because we had
to handle unaligned reads (no longer an issue).

I also removed the BUG_ON in dm_bht_get_node because I wanted to use it
in dm_bht_check_block with depth == bht->depth.

BUG=9752
TEST=Ran dm-verity.git unit tests. Ran platform_DMVerityCorruption on H/W.

Note: Had to modify the tests to use the new interface.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Change-Id: I246a39b83a727743b49fcb420e57629d69af5dfd

Review URL: http://codereview.chromium.org/6626037

3 years agoCHROMIUM: iio: tsl258x Clean whitespace at end of line
Benson Leung [Mon, 7 Mar 2011 05:27:29 +0000 (21:27 -0800)]
CHROMIUM: iio: tsl258x Clean whitespace at end of line

Change-Id: I8cbe0ce1255429df007a26f39a463d32e207d606
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Olof Johansson <olofj@chromium.org>
BUG=chrome-os-partner:2163
TEST=Built

Review URL: http://codereview.chromium.org/6625047

3 years agoCHROMIUM: iio: tsl258x chip on at resume if WORKING before
Benson Leung [Mon, 7 Mar 2011 05:17:20 +0000 (21:17 -0800)]
CHROMIUM: iio: tsl258x chip on at resume if WORKING before

Previously, suspend/resume would always taos_chip_on, even
if the device state was sleep at suspend time. Now this will
only chip_on the device if it was WORKING at suspend time.

Change-Id: Ie86e711e43aed4dea6b301856fd08ea9d704fb67
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Olof Johansson <olofj@chromium.org>
BUG=chrome-os-partner:2163
TEST=
echo 1 > /sys/class/iio/light/device0/device_state
cat /sys/class/iio/light/device0/lux
powerd_suspend
wake the system
cat/sys/class/iio/light/device0/device_state
cat /sys/class/iio/light/device0/lux
Ensure that the device state is 1, and that lux is correct.
(shine a light source and try another reading to see it
change).

echo 0 > /sys/class/iio/light/device0/device_state
cat /sys/class/iio/light/device0/lux
powerd_suspend
wake the system
cat /sys/class/iio/light/device0/device_state
cat /sys/class/iio/light/device0/lux
Ensure that device state is 0 in this case, and that
lux is a negative number.

Review URL: http://codereview.chromium.org/6623045

3 years agoCHROMIUM: config: tsl258x driver configuration for chromeos.
Bryan Freed [Sun, 6 Mar 2011 02:59:14 +0000 (18:59 -0800)]
CHROMIUM: config: tsl258x driver configuration for chromeos.

BUG=chrome-os-partner:2163
TEST=manual: verify this change causes the tsl258x.ko module to be built.

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Change-Id: Id3d2d269803a21d5a7772c80ff57bb8449998a39

Review URL: http://codereview.chromium.org/6625039

3 years agoCHROMIUM: iio: tsl258x driver
Olof Johansson [Sun, 6 Mar 2011 02:50:11 +0000 (18:50 -0800)]
CHROMIUM: iio: tsl258x driver

Picked up from the list, followed by lots of cleanups done by Bryan, Benson and myself.

BUG=chrome-os-partner:2163
TEST=autotest hardware_LightSensor + autotest power_Resume + autotest hardware_LightSensor

Change-Id: Id04d90449ee618b252ff168b8080900bf63269c6

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Olof Johansson <olofj@chromium.org>
Review URL: http://codereview.chromium.org/6621032

3 years agoCHROMIUM: light sensor: back out the checkin of a bad tsl258x driver.
Bryan Freed [Sat, 5 Mar 2011 05:16:47 +0000 (21:16 -0800)]
CHROMIUM: light sensor: back out the checkin of a bad tsl258x driver.

This driver was soundly rejected upstream.  Delete it here in preparation
for another one.

BUG=chrome-os-partner:2163
TEST=none needed, it was never built.

Change-Id: I61d3d03f72008adab67cdf8ab0b6f6c08820a594
Signed-off-by: Bryan Freed <bfreed@chromium.org>
Review URL: http://codereview.chromium.org/6627035

3 years agoCheck in the 2.6.37 version of the tsl258x light sensor driver.
Bryan Freed [Fri, 4 Mar 2011 06:39:42 +0000 (22:39 -0800)]
Check in the 2.6.37 version of the tsl258x light sensor driver.

This version comes directly from Taos early in its upstream process.
The backport to 2.6.32 will be checked in after this.

BUG=chrome-os-partner:2163
TEST=untested, unbuilt

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Signed-off-by: Jon Brenner <jbrenner@taosinc.com>
Change-Id: I8a2802c8facca28988a168175e21e60959f49414

Review URL: http://codereview.chromium.org/6626006

3 years agoCHROMIUM: x86: efi: add smbios base debugfs export
Olof Johansson [Tue, 1 Mar 2011 23:15:32 +0000 (15:15 -0800)]
CHROMIUM: x86: efi: add smbios base debugfs export

This can then be used by mosys to get to the DMI table. Scraping from
dmesg is fragile at best.

Change-Id: I5c4548bfba01be8c514777921cc9e340619a6f38
Signed-off-by: Olof Johansson <olofj@chromium.org>
BUG=chrome-os:6795
TEST=boot image, check /sys/kernel/debug/efi_smbios_base

Review URL: http://codereview.chromium.org/6588089

3 years agoCHROMIUM: chromeos_acpi driver reads list of methods from MLST ACPI method
Randall Spangler [Mon, 28 Feb 2011 21:19:59 +0000 (13:19 -0800)]
CHROMIUM: chromeos_acpi driver reads list of methods from MLST ACPI method

Change the chromeos_acpi driver to read its list of methods from the
MLST ACPI method.  This allows the chromeos_acpi device to support
future expansion of the methods provided by the BIOS, without changing
the device source code each time.

The driver still supports a hard-coded list of methods if the MLST
method is not present; this supports Cr-48 systems, which did not provide MLST.

Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=12485
TEST=emerge-x86-generic kernel, then manually test on Cr-48

(1) With existing Cr-48 BIOS, check that /sys/devices/platform/chromeos_acpi
contains the same contents as before the patch.

(2) With a patched BIOS which provides MLST, check that
/sys/devices/platform/chromeos_acpi contains the methods listed in MLST.

Review URL: http://codereview.chromium.org/6576021

Change-Id: I48b9aa9f279fa5cd9acd8ad51629dcd76c334591

3 years agoCHROMIUMOS: compat-wireless: add uevent function to regulatory
Scott James Remnant [Mon, 28 Feb 2011 17:05:27 +0000 (09:05 -0800)]
CHROMIUMOS: compat-wireless: add uevent function to regulatory

This adds COUNTRY=xx if there is an in-flight regulartory update that has been missed.

Change-Id: I9a17bfac3806f71ae8e85848493ad2cf07d0ea67
Signed-off-by: Scott James Remnant <keybuk@chromium.org>
BUG=chromium-os:537
TEST=manual

Review URL: http://codereview.chromium.org/6575047

3 years agoCHROMIUM: qcusbnet2k: Disable safeEnumDelay by default.
Elly Jones [Wed, 23 Feb 2011 15:17:26 +0000 (10:17 -0500)]
CHROMIUM: qcusbnet2k: Disable safeEnumDelay by default.

When we pulled in qualcomm's upstream driver version, it got enabled by default.
Oops.

BUG=chromium-os:12201
TEST=suite_Cellular

Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Change-Id: Ib80ca95bb4b706ff0001bd645a7069d3cee71a5f

Review URL: http://codereview.chromium.org/6542071

3 years agocompat_wireless: turn off mac80211 verbose debug msgs
Sam Leffler [Wed, 23 Feb 2011 00:37:31 +0000 (16:37 -0800)]
compat_wireless: turn off mac80211 verbose debug msgs

These messages no longer are useful and the msg about dropping a
frag needs to be rate-limited or it can cause DOS a system under
load.

Signed-off-by: Sam Leffler <sleffler@chromium.org>
BUG=none
TEST=run downstream udp wifi test and verify no complaints about dropped frags

Review URL: http://codereview.chromium.org/6546064

Change-Id: Ic98d0deeb49c7d96c22e30305ee4987df9274611

3 years agoCHROMIUM: config: Build veth virtual ethernet driver.
Elly Jones [Tue, 15 Feb 2011 22:34:52 +0000 (17:34 -0500)]
CHROMIUM: config: Build veth virtual ethernet driver.

We need this for the veth script, which is required to run some of our cellular
autotests.

BUG=chromium-os:11924
TEST=Adhoc
emerge-$board chromeos-kernel ; modprobe veth

Change-Id: I59ba8a23e30b27e812a5d930308a1bafb46ed2d0
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Review URL: http://codereview.chromium.org/6475016