htc-msm-2-6-32:leviathan-incoming.git
8 years agoAllow CONFIG_STACKTRACE to be enabled by itself.
Arve Hjønnevåg [Thu, 3 Jun 2010 23:33:07 +0000 (16:33 -0700)]
Allow CONFIG_STACKTRACE to be enabled by itself.

This allows us to get a kernel stacktrace for a thread though /proc.
Also enable it by default.

Change-Id: If8c21cd02feaf9863f4841ace524fa30c7328d49
Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agoRevert "network: wireless: bcm4329: Add "HANG" event and console monitoring"
Dmitry Shmidt [Wed, 19 May 2010 23:58:58 +0000 (16:58 -0700)]
Revert "network: wireless: bcm4329: Add "HANG" event and console monitoring"

This reverts commit b81ce00c75ec0966af1022c5878bbed440045736.

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Signed-off-by: Dmitry Shmidt <dimitrysh@android.com>
8 years agonetwork: wireless: bcm4329: Add "HANG" event and console monitoring
Howard Harte [Tue, 18 May 2010 23:08:24 +0000 (16:08 -0700)]
network: wireless: bcm4329: Add "HANG" event and console monitoring

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agonet: wireless: bcm4329: Add "getpower" support
Dmitry Shmidt [Mon, 10 May 2010 21:09:53 +0000 (14:09 -0700)]
net: wireless: bcm4329: Add "getpower" support

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Dima Zavin [Thu, 6 May 2010 23:35:00 +0000 (16:35 -0700)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years agostaging: android: lowmemorykiller: Remove bitrotted codepath
San Mehat [Thu, 6 May 2010 22:43:46 +0000 (15:43 -0700)]
staging: android: lowmemorykiller: Remove bitrotted codepath

Now that we're murder-synchronous, this code path will never be
called (and if it does, it doesn't tell us anything useful other
than we killed a task that was already being killed by somebody
else but hadn't gotten its' signal yet)

Signed-off-by: San Mehat <san@google.com>
8 years agostaging: android: lowmemorykiller: Fix task_struct leak
San Mehat [Thu, 6 May 2010 22:40:07 +0000 (15:40 -0700)]
staging: android: lowmemorykiller: Fix task_struct leak

As it turns out, the CONFIG_PROFILING interfaces leak a
task struct if the notifier chain returns NOTIFY_OK.. doh.

This patch reworks lowmemkiller to use the new generic task
free notifier chain.

Signed-off-by: San Mehat <san@google.com>
8 years agosched: Add a generic notifier when a task struct is about to be freed
San Mehat [Thu, 6 May 2010 22:37:55 +0000 (15:37 -0700)]
sched: Add a generic notifier when a task struct is about to be freed

This patch adds a notifier which can be used by subsystems that may
be interested in when a task has completely died and is about to
have it's last resource freed.

  The Android lowmemory killer uses this to determine when a task
it has killed has finally given up its goods.

Signed-off-by: San Mehat <san@google.com>
8 years agoMerge remote branch 'common/android-2.6.32' into 'msm/android-msm-2.6.32'
Iliyan Malchev [Thu, 6 May 2010 01:21:29 +0000 (18:21 -0700)]
Merge remote branch 'common/android-2.6.32' into 'msm/android-msm-2.6.32'

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: trout/sapphire: move *_CPLD_BASE outside the vmalloc range
Christopher Lais [Sat, 1 May 2010 23:19:23 +0000 (18:19 -0500)]
[ARM] msm: trout/sapphire: move *_CPLD_BASE outside the vmalloc range

SAPPHIRE_CPLD_BASE and TROUT_CPLD_BASE were inside the range of memory
allocated by the kernel for virtual mappings, causing the IO mapping
to be overwritten if the kernel allocated the space.

To reproduce, allocate then deallocate all virtual kernel memory.
The mapping will be removed and the kernel will crash when any of
the IO memory is accessed (e.g. for changing phone brightness).

Change-Id: I49b3b8af5257ba77998e03d0ecff0f909ddc752c
Signed-off-by: Christopher Lais <chris+android@zenthought.org>
8 years agobinder: Fix memory corruption via page aliasing
Christopher Lais [Sat, 1 May 2010 20:51:48 +0000 (15:51 -0500)]
binder: Fix memory corruption via page aliasing

binder_deferred_release was not unmapping the page from the buffer
before freeing it, causing memory corruption.  This only happened
when page(s) had not been freed by binder_update_page_range, which
properly unmaps the pages.

This only happens on architectures with VIPT aliasing.

To reproduce, create a program which opens, mmaps, munmaps, then closes
the binder very quickly.  This should leave a page allocated when the
binder is released.  When binder_deferrred_release is called on the
close, the page will remain mapped to the address in the linear
proc->buffer.  Later, we may map the same physical page to a different
virtual address that has different coloring, and this may cause
aliasing to occur.

PAGE_POISONING will greatly increase your chances of noticing any
problems.

Change-Id: I6941bf212881b8bf846bdfda43d3609c7ae4892e

Signed-off-by: Christopher Lais <chris+android@zenthought.org>
8 years ago[ARM] msm: switch to the Hierarchical Token Buckets (HTB) packet scheduling algorithm.
Iliyan Malchev [Wed, 5 May 2010 22:14:44 +0000 (15:14 -0700)]
[ARM] msm: switch to the Hierarchical Token Buckets (HTB) packet scheduling algorithm.

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Dima Zavin [Wed, 5 May 2010 20:05:27 +0000 (13:05 -0700)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years agostaging: android: lowmemkiller: Substantially reduce overhead during reclaim
San Mehat [Wed, 5 May 2010 18:38:42 +0000 (11:38 -0700)]
staging: android: lowmemkiller: Substantially reduce overhead during reclaim

This patch optimizes lowmemkiller to not do any work when it has an outstanding
kill-request. This greatly reduces the pressure on the task_list lock
(improving interactivity), as well as improving the vmscan performance
when under heavy memory pressure (by up to 20x in tests).

Note: For this enhancement to work, you need CONFIG_PROFILING

Signed-off-by: San Mehat <san@google.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Dima Zavin [Wed, 5 May 2010 03:07:30 +0000 (20:07 -0700)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years ago[ARM] Do not call flush_cache_user_range with mmap_sem held
Dima Zavin [Wed, 28 Apr 2010 03:57:04 +0000 (20:57 -0700)]
[ARM] Do not call flush_cache_user_range with mmap_sem held

We can't be holding the mmap_sem while calling flush_cache_user_range
because the flush can fault. If we fault on a user address, the
page fault handler will try to take mmap_sem again. Since both places
acquire the read lock, most of the time it succeeds. However, if another
thread tries to acquire the write lock on the mmap_sem (e.g. mmap) in
between the call to flush_cache_user_range and the fault, the down_read
in do_page_fault will deadlock.

Also, since we really can't be holding the mmap_sem while calling
flush_cache_user_range AND vma is actually unused by the flush itself,
get rid of vma as an argument.

Change-Id: If55409bde41ad1060fa4fe7cbd4ac530d4d9a106
Signed-off-by: Dima Zavin <dima@android.com>
8 years agoUSB: android gadget: mass storage: Fix format issue for Vista Host
Velempati Chiranjeevi [Wed, 21 Oct 2009 04:23:10 +0000 (09:53 +0530)]
USB: android gadget: mass storage: Fix format issue for Vista Host

As part of formating the mass storage device, Host sends the INQUIRY
scsi command. As per the standard, the command length for this
command should be 6 bytes, whereas the Vista host sends 12 bytes.

When the command length of the command is not equal to the standard
length, the device sends a phase error as part of the status phase.
When the host receives a phase error, it re-enumerates, hence the
error.

If the command is INQUIRY, and the command length is 12 bytes,
treating this as a good command and not sending the phase error
to the host fixes this issue.

Signed-off-by: Velempati Chiranjeevi <c_cvelem@qualcomm.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years ago[ARM] defconfig: mahimahi: Switch from CBQ -> HTB
San Mehat [Thu, 29 Apr 2010 19:11:27 +0000 (12:11 -0700)]
[ARM] defconfig: mahimahi: Switch from CBQ -> HTB

Signed-off-by: San Mehat <san@google.com>
8 years agonet: wireless: bcm4329: Add FW crash trap debug
Howard Harte [Wed, 28 Apr 2010 21:01:19 +0000 (14:01 -0700)]
net: wireless: bcm4329: Add FW crash trap debug

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Dima Zavin [Tue, 27 Apr 2010 23:23:04 +0000 (16:23 -0700)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years agolowmemorykiller: Don't try to kill the same pid over and over
San Mehat [Mon, 26 Apr 2010 22:11:04 +0000 (15:11 -0700)]
lowmemorykiller: Don't try to kill the same pid over and over

  Under certain circumstances, a process can take awhile to
handle a sig-kill (especially if it's in a scheduler group with
a very low share ratio). When this occurs, lowmemkiller returns
to vmscan indicating the process memory has been freed - even
though the process is still waiting to die. Since the memory
hasn't actually freed, lowmemkiller is called again shortly after,
and picks the same process to die; regardless of the fact that
it has already been 'scheduled' to die and the memory has already
been reported to vmscan as having been freed.

  Solution is to check fatal_signal_pending() on the selected
task, and if it's already pending destruction return; indicating
to vmscan that no resources were freed on this pass.

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] msm: stop the VFE before releasing the sensor
Wu-cheng Li [Sat, 24 Apr 2010 17:02:46 +0000 (10:02 -0700)]
[ARM] msm: stop the VFE before releasing the sensor

On msm7k, the sensor needs to be released after stopping the VFE, but before
releasing the ADSP VFE and QCAM tasks.  Otherwise, the DSP locks up.  The code
for qsd8k is modified accordingly.

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years agonet: wireless: bcm4329: Fix dhd_os_wd_timer if bus is down
Greg Goldman [Mon, 26 Apr 2010 18:31:18 +0000 (11:31 -0700)]
net: wireless: bcm4329: Fix dhd_os_wd_timer if bus is down

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agonet: wireless: bcm4329: Fix AP interface processing and removal
Greg Goldman [Fri, 23 Apr 2010 20:36:31 +0000 (13:36 -0700)]
net: wireless: bcm4329: Fix AP interface processing and removal

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Dima Zavin [Fri, 23 Apr 2010 20:18:06 +0000 (13:18 -0700)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years agoStaging: android: binder: Create dedicated workqueue for binder deferred work
Arve Hjønnevåg [Thu, 22 Apr 2010 22:53:23 +0000 (15:53 -0700)]
Staging: android: binder: Create dedicated workqueue for binder deferred work

Some drivers flush the global workqueue when closed. This would deadlock if
the last reference to the file was released from the binder.

Change-Id: Ifdabc0b383fecb20836d1bbb9786c632402a14e1
Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agomsm_nand: Don't return -EUCLEAN for single error corrections.
Arve Hjønnevåg [Tue, 16 Sep 2008 23:44:25 +0000 (16:44 -0700)]
msm_nand: Don't return -EUCLEAN for single error corrections.

This change was lost by: Move empty page check after dma_unmap_page.

Single bit errors are frequent. If we don't correct more than one
symbol per sector, return zero so yaffs does not retire the block.

Change-Id: If3b7b219babe026e5c52387186a8513f9b0d03fb
Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years ago[ARM] msm7k: hw3d: add more security checks
Iliyan Malchev [Thu, 22 Apr 2010 00:26:08 +0000 (17:26 -0700)]
[ARM] msm7k: hw3d: add more security checks

-- check the VMA size against the GPU-memory-region size
-- in mmap(), clear EBI and SMI memory regions before handing them to the user;
this prevents a malicious client from stealing the previous clients data by
doing a forced revoke and mmapping the GPU memory.

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years agonet: wireless: bcm4329: Improve BT-coex during DHCP session
Daniel Chen [Wed, 21 Apr 2010 23:43:05 +0000 (16:43 -0700)]
net: wireless: bcm4329: Improve BT-coex during DHCP session

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Dima Zavin [Mon, 19 Apr 2010 17:11:27 +0000 (10:11 -0700)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years agoproc: pagemap: Hold mmap_sem during page walk
KAMEZAWA Hiroyuki [Fri, 2 Apr 2010 00:11:29 +0000 (09:11 +0900)]
proc: pagemap: Hold mmap_sem during page walk

In initial design, walk_page_range() was designed just for walking page
table and it didn't require mmap_sem.  Now, find_vma() etc..  are used
in walk_page_range() and we need mmap_sem around it.

This patch adds mmap_sem around walk_page_range().

Because /proc/<pid>/pagemap's callback routine use put_user(), we have
to get rid of it to do sane fix.

Changelog: 2010/Apr/2
 - fixed start_vaddr and end overflow
Changelog: 2010/Apr/1
 - fixed start_vaddr calculation
 - removed unnecessary cast.
 - removed unnecessary change in smaps.
 - use GFP_TEMPORARY instead of GFP_KERNEL

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Brian Swetland <swetland@google.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: San Mehat <san@google.com>
[ Fixed kmalloc failure return code as per Matt ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 years agoRevert "proc: pagemap: Hold mmap_sem during page walk"
San Mehat [Mon, 19 Apr 2010 14:45:33 +0000 (07:45 -0700)]
Revert "proc: pagemap: Hold mmap_sem during page walk"

This reverts commit 0bf551684025a5f0f3c9aac694cd5cf73706cb70.

Reverting for proper up-stream fix

Signed-off-by: San Mehat <san@google.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Dima Zavin [Mon, 19 Apr 2010 03:35:05 +0000 (20:35 -0700)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years agoStaging: android: timed_gpio: Properly discard invalid timeout values.
Mike Lockwood [Sat, 17 Apr 2010 16:01:35 +0000 (12:01 -0400)]
Staging: android: timed_gpio: Properly discard invalid timeout values.

The timed output device never previously checked the return value of sscanf,
resulting in an uninitialized int being passed to enable() if input value
was invalid.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agoUSB: gadget: f_mass_storage: Defer handling interface changes until it is safe.
Mike Lockwood [Thu, 15 Apr 2010 19:04:07 +0000 (15:04 -0400)]
USB: gadget: f_mass_storage: Defer handling interface changes until it is safe.

Pulling in some code from file_storage.c, we now handle interface changes
in do_set_config(), which is now not called until any pending requests have
been successfully completed or cancelled.

This fixes a race condition that resulted in usb_ep_free_request() being called
while the request is still busy.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years ago[ARM] msm: camera: s5k3e2fx: Fix the reddish color shading issue
Andy Yeh [Sat, 3 Apr 2010 14:18:52 +0000 (22:18 +0800)]
[ARM] msm: camera: s5k3e2fx: Fix the reddish color shading issue

modify the EVT5 lens correction setting

Signed-off-by: Paul Eastham <eastham@google.com>
8 years ago[ARM] mtd: msm_nand: Move empty page check after dma_unmap_page.
Arve Hjønnevåg [Thu, 8 Apr 2010 05:55:22 +0000 (22:55 -0700)]
[ARM] mtd: msm_nand: Move empty page check after dma_unmap_page.

This fixes a crash in dma_sync_single_for_cpu when reading a flash page with
an uncorrectable error into a highmem page.

Change-Id: Ie0d9e80f1efb2d7cc4d95315127f94fb6b89e699
Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years ago[ARM] configs: msm: Disable debug options
San Mehat [Mon, 12 Apr 2010 18:37:17 +0000 (11:37 -0700)]
[ARM] configs: msm: Disable debug options

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] configs: msm: Enable CBQ network scheduling
San Mehat [Mon, 12 Apr 2010 18:35:42 +0000 (11:35 -0700)]
[ARM] configs: msm: Enable CBQ network scheduling

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] configs: msm: Regenerate defconfig
San Mehat [Mon, 12 Apr 2010 18:27:36 +0000 (11:27 -0700)]
[ARM] configs: msm: Regenerate defconfig

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] configs: mahimahi: Disable debug options
San Mehat [Mon, 12 Apr 2010 18:25:04 +0000 (11:25 -0700)]
[ARM] configs: mahimahi: Disable debug options

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] msm: kgsl: Invalidate base addrs when setting page tables or flushing TLBs
Shubhraprakash Das [Fri, 9 Apr 2010 00:11:57 +0000 (17:11 -0700)]
[ARM] msm: kgsl: Invalidate base addrs when setting page tables or flushing TLBs

Change-Id: I17917aac393bec76950cbdc1978f11ee734b836b
Signed-off-by: Shubhraprakash Das <sadas@quicinc.com>
Signed-off-by: Dima Zavin <dima@android.com>
8 years agofs: partitions: Fix warnings in fs/partitions/check.c
Colin Cross [Wed, 7 Apr 2010 19:08:27 +0000 (12:08 -0700)]
fs: partitions: Fix warnings in fs/partitions/check.c

Change-Id: I4398ace0c55d4833b1fcbb7a4e71ab8f0b1b044a
Signed-off-by: Colin Cross <ccross@android.com>
8 years ago[ARM] configs: mahimahi: Enable net class actions, and ingress net sched
San Mehat [Fri, 9 Apr 2010 23:27:25 +0000 (16:27 -0700)]
[ARM] configs: mahimahi: Enable net class actions, and ingress net sched

Signed-off-by: San Mehat <san@google.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Dima Zavin [Thu, 8 Apr 2010 23:55:46 +0000 (16:55 -0700)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years agoBluetooth: Hack: Don't dereference null pointer.
Nick Pelly [Thu, 8 Apr 2010 23:23:32 +0000 (16:23 -0700)]
Bluetooth: Hack: Don't dereference null pointer.

This avoids the S305 panic during incoming connection.

S305 sends PSM 25 L2CAP connection request before the L2CAP info response.
When we receive that info response we crash on null pointer here.

Bug: 2127637
Change-Id: Ib637516251f46fa9a9c87ac015dc2f27df5a27fd
Signed-off-by: Nick Pelly <npelly@google.com>
8 years ago[ARM] msm: mdp: Fix workarounds in MDP 3.1
Colin Cross [Thu, 8 Apr 2010 20:26:05 +0000 (13:26 -0700)]
[ARM] msm: mdp: Fix workarounds in MDP 3.1

There were a few problems with the last patch that are fixed by this patch:
1. Missing "goto end" would cause the bad blit to be executed after the
   workaround in one case
2. Incorrect printing of failed blit on a crash
3. Fix split blits when rotating

Change-Id: Ie3d97cc1bd6d7b5efde5b0343c776d02dabd7edb
Signed-off-by: Colin Cross <ccross@android.com>
8 years ago[ARM] msm: mahimahi: Switch to generic wlan_plat.h header
Dmitry Shmidt [Thu, 8 Apr 2010 22:20:54 +0000 (15:20 -0700)]
[ARM] msm: mahimahi: Switch to generic wlan_plat.h header

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agonet: wireless: bcm4329: Update to Ver 4.218.209
Howard Harte [Thu, 8 Apr 2010 22:10:11 +0000 (15:10 -0700)]
net: wireless: bcm4329: Update to Ver 4.218.209
    includes: SoftAP fixes and unique MAC address, WPS fix, use of wlan_plat.h

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years ago[ARM] configs: mahimahi: Enable CBQ/U32 packet matching
San Mehat [Thu, 8 Apr 2010 18:33:30 +0000 (11:33 -0700)]
[ARM] configs: mahimahi: Enable CBQ/U32 packet matching

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] configs: mahimahi: Regenerate defconfig
San Mehat [Thu, 8 Apr 2010 17:32:30 +0000 (10:32 -0700)]
[ARM] configs: mahimahi: Regenerate defconfig

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] msm: mdp: Work around hardware bugs in mdp 3.1
Colin Cross [Thu, 8 Apr 2010 07:09:00 +0000 (00:09 -0700)]
[ARM] msm: mdp: Work around hardware bugs in mdp 3.1

Adds two workarounds for MDP 3.1 bugs.
1. When blitting to a destination in a 32bpp buffer with width%8==6, split
   the blit into two vertical stripes
2. When blitting to a destination buffer with height%32==1 or 3, split the
   blit into two horizontal stripes.

Change-Id: I4368f6f3cf8ce3046ac83b22fc11693608ccfb51
Signed-off-by: Colin Cross <ccross@android.com>
8 years ago[ARM] msm: hw3d: bump the revoke timeout to 2 seconds
Dima Zavin [Thu, 8 Apr 2010 04:52:06 +0000 (21:52 -0700)]
[ARM] msm: hw3d: bump the revoke timeout to 2 seconds

Change-Id: Id3d5226d85f49bdd2c580d25e58eab72db4a4c0d
Signed-off-by: Dima Zavin <dima@android.com>
8 years ago[ARM] msm: hw3d: block new client while suspended instead of failing
Dima Zavin [Thu, 8 Apr 2010 04:46:31 +0000 (21:46 -0700)]
[ARM] msm: hw3d: block new client while suspended instead of failing

Also fixes a potential issue where if there were multiple clients
trying to open the device, a random process would get it. Now, the
last requester always gets it.

Change-Id: I5ec36edd368f7a2979c64740b63dd807cc2fa857
Signed-off-by: Dima Zavin <dima@android.com>
8 years ago[ARM] msm: kgsl: bug if we detect a gpu hang
Dima Zavin [Wed, 7 Apr 2010 07:35:04 +0000 (00:35 -0700)]
[ARM] msm: kgsl: bug if we detect a gpu hang

Change-Id: I01c5b9fdabab33cd0a4354e391c5e360e362ee29
Signed-off-by: Dima Zavin <dima@android.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Dima Zavin [Wed, 7 Apr 2010 05:41:22 +0000 (22:41 -0700)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years ago[ARM] msm: camera: request EBI1 to run at 128MHz when camera is in use
Iliyan Malchev [Wed, 7 Apr 2010 00:10:36 +0000 (17:10 -0700)]
[ARM] msm: camera: request EBI1 to run at 128MHz when camera is in use

This prevents the AXI bus frequency from falling below 128MHz when the VFE is
in use.  The VFE needs the AXI at at least 128MHz.

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: clean up the 7k VFE driver
Iliyan Malchev [Tue, 6 Apr 2010 23:23:23 +0000 (16:23 -0700)]
[ARM] msm: camera: clean up the 7k VFE driver

-- replace unnecessary kmallocs with stack variables
-- clean up error handling, remove confusing labels
-- remove unecessary local variables

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: s5k3e2fx: revised fix for greenish snapshot in low light
Andy Yeh [Tue, 6 Apr 2010 19:33:03 +0000 (12:33 -0700)]
[ARM] msm: camera: s5k3e2fx: revised fix for greenish snapshot in low light

The issue affects the Samsung s5k3e2fx camera sensor.  The fix consists of:
-- stream-on snapshot after writing gain/line
-- removing parameter hold/release from snapshot session

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: sapphire: allocate gpio TP_LS_EN before using it
Iliyan Malchev [Tue, 30 Mar 2010 16:50:45 +0000 (09:50 -0700)]
[ARM] msm: sapphire: allocate gpio TP_LS_EN before using it

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: mahimahi: Set initial state of microp LEDs.
Eric Olsen [Fri, 2 Apr 2010 23:06:46 +0000 (16:06 -0700)]
[ARM] msm: mahimahi: Set initial state of microp LEDs.

Signed-off-by: Eric Olsen <eolsen@android.com>
8 years agoUSB: gadget: android: mass_storage: Use spin_lock_irqsave/spin_unlock_irqrestore
Arve Hjønnevåg [Thu, 11 Dec 2008 04:01:15 +0000 (20:01 -0800)]
USB: gadget: android: mass_storage: Use spin_lock_irqsave/spin_unlock_irqrestore

The old code did not allways disable interrupts when called from thread
context, but tried to lock the same spinlock from interrupt context.

This was merged from a change to drivers/usb/function/mass_storage.c
in the android-msm-2.6.29 branch.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agoi2c: akm8973: Disable on akm_aot_release() instead of pm hooks.
Mike Chan [Thu, 1 Apr 2010 22:35:03 +0000 (15:35 -0700)]
i2c: akm8973: Disable on akm_aot_release() instead of pm hooks.

When close is called on the fd and akm_aot_release() is called disable
interrupts and have akm8973 auto power down..

Change-Id: Ice8168321a3427443069bb39d796d4c2667bfc7f
Signed-off-by: Mike Chan <mike@android.com>
8 years agomsm_serial_hs: Use dedicated workqueue thread for tty RX.
Nick Pelly [Wed, 31 Mar 2010 21:24:31 +0000 (14:24 -0700)]
msm_serial_hs: Use dedicated workqueue thread for tty RX.

Previously the tty layer used the global workqueue, which can introduce high
latency on the RX path if other global workqueue users block.

Introduce a dedicated msm_serial_hs workqueue thread - managed by the
msm_serial_hs drvier - to call tty_flip_buffer_push(). Set tty low_latency
to 1 so that the tty layer does not use its own work queue.

This patch fixes an issue where A2DP would skip when the screen turns on.

Change-Id: I28253f8e5b0f577c7fc635ff5b10cf2abc042245
Signed-off-by: Nick Pelly <npelly@google.com>
8 years agoproc: pagemap: Hold mmap_sem during page walk
San Mehat [Tue, 30 Mar 2010 23:43:18 +0000 (16:43 -0700)]
proc: pagemap: Hold mmap_sem during page walk

If the mmap_sem is not held while we walk_page_range(), then
it is possible for find_vma() to race with a remove_vma_list()
caused by do_munmap() (or others).

Unable to handle kernel paging request at virtual address 6b6b6b5b
Internal error: Oops: 5 [#1] PREEMPT
CPU: 0    Not tainted  (2.6.32.9-27154-ge3e6e27 #1)
PC is at find_vma+0x40/0x7c
LR is at walk_page_range+0x70/0x230
pc : [<c00aa3ac>]    lr : [<c00b298c>]    psr: 20000013
sp : c6aa9eb8  ip : 6b6b6b53  fp : c6a58f60
r10: c7e1d1b8  r9 : 0001bca0  r8 : 47000000
r7 : c6aa9f80  r6 : c6aa8000  r5 : 46fbd000  r4 : 6b6b6b6b
r3 : c7ca4820  r2 : 6b6b6b6b  r1 : 46fbd000  r0 : c70e3e40
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5787d  Table: 26574019  DAC: 00000015

[<c00aa3ac>] (find_vma+0x40/0x7c) from [<c00b298c>] (walk_page_range+0x70/0x230)
[<c00b298c>] (walk_page_range+0x70/0x230) from [<c00f5d3c>] (pagemap_read+0x1a4/0x278)
[<c00f5d3c>] (pagemap_read+0x1a4/0x278) from [<c00bac40>] (vfs_read+0xa8/0x150)
[<c00bac40>] (vfs_read+0xa8/0x150) from [<c00bad94>] (sys_read+0x3c/0x68)
[<c00bad94>] (sys_read+0x3c/0x68) from [<c0026f00>] (ret_fast_syscall+0x0/0x2c)
Code: 98bd8010 e5932004 e3a00000 ea000008 (e5124010)

Signed-off-by: San Mehat <san@google.com>
CC: Brian Swetland <swetland@google.com>
CC: Matt Mackall <mpm@selenic.com>
CC: Andrew Morton <akpm@linux-foundation.org>
CC: Linus Torvalds <torvalds@linux-foundation.org>
8 years ago[ARM] configs: mahimahi_defconfig: Enable kmemleak, slab, and list debugging
San Mehat [Tue, 30 Mar 2010 20:44:20 +0000 (13:44 -0700)]
[ARM] configs: mahimahi_defconfig: Enable kmemleak, slab, and list debugging

Signed-off-by: San Mehat <san@google.com>
8 years agonet: wireless: bcm4329: Ignore several settings for SoftAP mode
Greg Goldman [Thu, 25 Mar 2010 22:27:08 +0000 (15:27 -0700)]
net: wireless: bcm4329: Ignore several settings for SoftAP mode

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years ago[ARM] msm: msm7k_udc: Remove dead request tracking logic.
Mike Lockwood [Wed, 24 Mar 2010 00:11:00 +0000 (20:11 -0400)]
[ARM] msm: msm7k_udc: Remove dead request tracking logic.

This code was broken as there was no safe way to handle requests being freed
from completion routines.  It was also unnecessary because the gadget framework
does not allow freeing busy requests anyway.
This fixes a race condition that could result in a use after free bug when
requests are freed via a completion routine.

This change also fixes updating msm_endpoint "last" pointer in msm72k_dequeue().

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agonet: wireless: bcm4329: Add deassociate functionality to SoftAP
Greg Goldman [Wed, 24 Mar 2010 17:23:00 +0000 (10:23 -0700)]
net: wireless: bcm4329: Add deassociate functionality to SoftAP

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agoqsd8k: audio: make dsp_debug work in multi-crash situations
Brian Swetland [Wed, 24 Mar 2010 01:19:06 +0000 (18:19 -0700)]
qsd8k: audio: make dsp_debug work in multi-crash situations

If a second thread called q6audio_dsp_not_responding() while
the daemon was ram-dumping the dsp, we'd panic the kernel before
the ram dump completed.  Park any additional threads so that
we can ensure we finish the ramdump.

Signed-off-by: Brian Swetland <swetland@google.com>
8 years agoqsd8k: audio: fix incorrect length of data field printed by DAL trace dump.
Eric Laurent [Mon, 22 Mar 2010 15:54:25 +0000 (08:54 -0700)]
qsd8k: audio: fix incorrect length of data field printed by DAL trace dump.

Signed-off-by: Eric Laurent <elaurent@google.com>
8 years agonet: wireless: bcm4329: Add mutex for cached scan data protection
Dmitry Shmidt [Tue, 23 Mar 2010 23:46:46 +0000 (16:46 -0700)]
net: wireless: bcm4329: Add mutex for cached scan data protection

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years ago[ARM] msm: kgsl: fix compile error when MMU is not enabled
Abhijeet Dharmapurikar [Thu, 11 Mar 2010 18:27:17 +0000 (10:27 -0800)]
[ARM] msm: kgsl: fix compile error when MMU is not enabled

kgsl_yamato_setstate should be static inline

Change-Id: I7b4f5de07894b3fdb270d9068c18b53cafc54d14
Signed-off-by: Abhijeet Dharmapurikar <adharmap@quicinc.com>
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
8 years ago[ARM] msm: swordfish: Add base board support for qsd8x50_ffa
Abhijeet Dharmapurikar [Fri, 12 Mar 2010 02:13:40 +0000 (18:13 -0800)]
[ARM] msm: swordfish: Add base board support for qsd8x50_ffa

Change-Id: Ia660db145e6bebc937f1e9c1f57750be3e66d3a2
Signed-off-by: Abhijeet Dharmapurikar <adharmap@quicinc.com>
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
8 years ago[ARM] msm: Add mach-type for qsd8x50_ffa
Michael Bohan [Wed, 27 May 2009 17:44:30 +0000 (10:44 -0700)]
[ARM] msm: Add mach-type for qsd8x50_ffa

Change-Id: I23acf42bb21b769259c3423c6f51b79bd4a2cedc
Signed-off-by: Michael Bohan <mbohan@quicinc.com>
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
8 years agowlan: Extract generic wlan platform data from tiwlan specific header
Dmitry Shmidt [Thu, 18 Mar 2010 23:04:18 +0000 (16:04 -0700)]
wlan: Extract generic wlan platform data from tiwlan specific header

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years ago[ARM] msm: mahimahi_defconfig: Turn off tuner drivers
Dima Zavin [Mon, 22 Mar 2010 19:00:15 +0000 (12:00 -0700)]
[ARM] msm: mahimahi_defconfig: Turn off tuner drivers

These are unused. It saves 30K+

Change-Id: I23489f56c9d587a4205f060e37b817dacf734397
Signed-off-by: Dima Zavin <dima@android.com>
8 years ago[ARM] msm: mahimahi_defconfig: Update config with actual one generated
Dima Zavin [Mon, 22 Mar 2010 18:57:31 +0000 (11:57 -0700)]
[ARM] msm: mahimahi_defconfig: Update config with actual one generated

Change-Id: I366144a62c9259234831682194d9b2262c7d1e3b
Signed-off-by: Dima Zavin <dima@android.com>
8 years agonet: wireless: bcm4329: Fix SoftAP security mode change
Greg Goldman [Mon, 22 Mar 2010 16:46:59 +0000 (09:46 -0700)]
net: wireless: bcm4329: Fix SoftAP security mode change

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years ago[ARM] qsd8k: mahimahi: enable support for rgb666 on post-EVT1 CDMA revs
Solomon Chiu [Wed, 3 Mar 2010 23:49:57 +0000 (15:49 -0800)]
[ARM] qsd8k: mahimahi: enable support for rgb666 on post-EVT1 CDMA revs

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: mdp_lcdc: support output format rgb666
Solomon Chiu [Wed, 3 Mar 2010 23:48:34 +0000 (15:48 -0800)]
[ARM] msm: mdp_lcdc: support output format rgb666

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm_fb: add definitions for RGB555 and RGB666 output interface formats
Solomon Chiu [Wed, 3 Mar 2010 23:47:37 +0000 (15:47 -0800)]
[ARM] msm_fb: add definitions for RGB555 and RGB666 output interface formats

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: msm_defconfig: increase mmap_min_addr to 32k
Iliyan Malchev [Wed, 17 Mar 2010 20:58:55 +0000 (13:58 -0700)]
[ARM] msm: msm_defconfig: increase mmap_min_addr to 32k

A lot of kernel structures are larger than 4k, and so NULL-pointer dereferences
could still be exploitable.

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] qsd8k: mahimahi_defconfig: increase mmap_min_addr to 32k
Iliyan Malchev [Wed, 17 Mar 2010 20:58:55 +0000 (13:58 -0700)]
[ARM] qsd8k: mahimahi_defconfig: increase mmap_min_addr to 32k

A lot of kernel structures are larger than 4k, and so NULL-pointer dereferences
could still be exploitable.

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: msm_defconfig: switch to CFQ, set mmap_min_addr
Iliyan Malchev [Wed, 17 Mar 2010 19:15:56 +0000 (12:15 -0700)]
[ARM] msm: msm_defconfig: switch to CFQ, set mmap_min_addr

This brings msm_defconfig in sync with mahimahi_defconfig.  Also, we disable
explicitly setting CONFIG_XFRM_IPCOMP.  It is still enabled indirectly via the
settings in IPv4 and IPv6 that turn on support for IPCOMP.

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years agonet: wireless: bcm4329: Fix SoftAP start/stop
Dmitry Shmidt [Thu, 18 Mar 2010 00:14:22 +0000 (17:14 -0700)]
net: wireless: bcm4329: Fix SoftAP start/stop

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agoUSB: gadget: android: check for null _android_dev in android_register_function()
Mike Lockwood [Wed, 17 Mar 2010 19:42:29 +0000 (15:42 -0400)]
USB: gadget: android: check for null _android_dev in android_register_function()

This fixes a load ordering issue that occurred if a function driver loads before
the android gadget driver is initialized.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years ago[ARM] qsd8k: mahimahi_defconfig: remove APANIC from the kernel
Iliyan Malchev [Wed, 17 Mar 2010 19:14:41 +0000 (12:14 -0700)]
[ARM] qsd8k: mahimahi_defconfig: remove APANIC from the kernel

We use last_kmsg on mahimahi instead.

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years agoapanic: make APANIC_LABEL depend on APANIC
Iliyan Malchev [Wed, 17 Mar 2010 19:02:26 +0000 (12:02 -0700)]
apanic: make APANIC_LABEL depend on APANIC

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: fix greenish snapshot in low light (w/o flash)
Andy Yeh [Fri, 12 Mar 2010 21:44:13 +0000 (13:44 -0800)]
[ARM] msm: camera: fix greenish snapshot in low light (w/o flash)

-- stream-on snapshot after writing gain/line
-- correct wrong reg 0x3051 to 0x3151
-- set 0x105 to 0x1h to prevent first corrupted frame
-- parameter hold/release is removed from snapshot session

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years agonet: wireless: bcm4329: Turn ON SoftAP support
Dmitry Shmidt [Fri, 12 Mar 2010 18:15:31 +0000 (10:15 -0800)]
net: wireless: bcm4329: Turn ON SoftAP support

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agoUSB: gadget: f_mass_storage: Flush writes after every 4 MB.
Mike Lockwood [Fri, 12 Mar 2010 16:01:05 +0000 (11:01 -0500)]
USB: gadget: f_mass_storage: Flush writes after every 4 MB.

This avoids excessive caching at the block level layer when copying large
files to the storage device.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agonet: wireless: bcm4329: Version 4.218.204 update (SoftAP support)
Dmitry Shmidt [Thu, 11 Mar 2010 23:24:07 +0000 (15:24 -0800)]
net: wireless: bcm4329: Version 4.218.204 update (SoftAP support)

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years ago[ARM] msm: make hw3d master and client char devices (used to be misc)
Iliyan Malchev [Fri, 12 Mar 2010 00:09:54 +0000 (16:09 -0800)]
[ARM] msm: make hw3d master and client char devices (used to be misc)

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: usb: diag: fix several deadlocks
Haley Teng [Wed, 10 Mar 2010 21:43:33 +0000 (13:43 -0800)]
[ARM] msm: usb: diag: fix several deadlocks

-- diag_release() can get blocked because user_lock was being acquired before
   wait_event_interruptible() in diag_write()/diag_read().
-- wake up 'read_wq' and 'write_wq' when usb status changes, to help userspace
   return from read()/write() when
      - usb is offline
      - echo 0 > /sys/module/diag/parameters/enabled

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: htc: Add platform data for RNDIS vendor ID and MAC address.
Mike Lockwood [Thu, 11 Mar 2010 01:58:15 +0000 (20:58 -0500)]
[ARM] msm: htc: Add platform data for RNDIS vendor ID and MAC address.

This fixes a kernel panic in rndis.c when receiving the
OID_GEN_VENDOR_DESCRIPTION command.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years ago[ARM] msm: mahimahi: Add platform data for RNDIS ethernet USB function
Mike Lockwood [Wed, 10 Mar 2010 22:07:02 +0000 (17:07 -0500)]
[ARM] msm: mahimahi: Add platform data for RNDIS ethernet USB function

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agoMerge branch 'android-2.6.32' into android-msm-2.6.32
Arve Hjønnevåg [Thu, 11 Mar 2010 00:40:54 +0000 (16:40 -0800)]
Merge branch 'android-2.6.32' into android-msm-2.6.32

8 years agoMerge commit 'v2.6.32.9' into android-2.6.32
Arve Hjønnevåg [Thu, 11 Mar 2010 00:38:33 +0000 (16:38 -0800)]
Merge commit 'v2.6.32.9' into android-2.6.32

8 years agoRevert "sysfs: Fix sysfs owner and group."
Arve Hjønnevåg [Thu, 11 Mar 2010 00:38:13 +0000 (16:38 -0800)]
Revert "sysfs: Fix sysfs owner and group."

This reverts commit f1f8e7cd6f796b15ed011361f09b57db796d9b4e.