htc-msm-2-6-32:leviathan-incoming.git
6 years agosound: soc: msm: msm7k prevent blocking in .close android-msm-2.6.32-rebase android-msm-2.6.32-rebase+alsa_pixie_driver+working
Denis 'GNUtoo' Carikli [Sat, 3 Jul 2010 12:31:04 +0000 (14:31 +0200)]
sound: soc: msm: msm7k prevent blocking in .close

with the 0.22.19.26l(the more recent one at the time of the commit)
  firmware under the htcdream,it seem that PCMDMAMISSED is not
  emited,and so close wait eternally for this message

6 years agosound: soc: msm: enable realtime .copy
Denis 'GNUtoo' Carikli [Sat, 3 Jul 2010 12:28:40 +0000 (14:28 +0200)]
sound: soc: msm: enable realtime .copy

6 years agosound: soc: msm: set the .copy function realtime(disabled by default)
Denis 'GNUtoo' Carikli [Sat, 3 Jul 2010 12:15:37 +0000 (14:15 +0200)]
sound: soc: msm: set the .copy function realtime(disabled by default)

This is a hack,and doesn't fix totally the buffer underrun issues.
The code was taken from arch/arm/mach-msm/qdsp5/audio_out.c

arch/arm/mach-msm/qdsp5/audio_out.c's audio_write is very similar to
the alsa driver's alsa_send_buffer function.but had a difference:
It used code to set the write realtime,which I imported.

6 years agosound: soc: msm: improved code readability
Denis 'GNUtoo' Carikli [Sun, 27 Jun 2010 01:42:04 +0000 (03:42 +0200)]
sound: soc: msm: improved code readability

6 years agosound: soc: msm7k switch to a more standard/classic sound routing
David Lanzendörfer [Wed, 20 Jan 2010 00:51:54 +0000 (01:51 +0100)]
sound: soc: msm7k switch to a more standard/classic sound routing

The sound routing used a volume bar to achieve it.
It has now been replaced by switches.
Android bluetooth routing(which made the sound crash) was removed

This work was entierely done by
  David Lanzendörfer <david.lanzendoerfer@o2s.ch>
I only merged it.

7 years agosound: soc: msm: make it find the alsa cards android-msm-2.6.32-rebase+alsa_pixie_driver
Denis 'GNUtoo' Carikli [Wed, 10 Nov 2010 04:33:39 +0000 (05:33 +0100)]
sound: soc: msm: make it find the alsa cards

7 years agosound: soc: msm: make it compile
Denis 'GNUtoo' Carikli [Wed, 10 Nov 2010 04:07:50 +0000 (05:07 +0100)]
sound: soc: msm: make it compile

7 years agosound: soc: import palm-pixie msm directory
Denis 'GNUtoo' Carikli [Wed, 10 Nov 2010 03:57:46 +0000 (04:57 +0100)]
sound: soc: import palm-pixie msm directory

7 years agosound: soc: delete the msm directory for future import from palm pixie driver
Denis 'GNUtoo' Carikli [Wed, 10 Nov 2010 03:56:56 +0000 (04:56 +0100)]
sound: soc: delete the msm directory for future import from palm pixie driver

7 years agopower: first sketch at delivering wakeup reason to userland via /proc interface
Michael 'Mickey' Lauer [Sun, 20 Jun 2010 15:43:07 +0000 (17:43 +0200)]
power: first sketch at delivering wakeup reason to userland via /proc interface

7 years agopower: add suspend/resume notification under /proc/wakelocks_suspend_resume
Michael 'Mickey' Lauer [Sun, 20 Jun 2010 13:27:12 +0000 (15:27 +0200)]
power: add suspend/resume notification under /proc/wakelocks_suspend_resume

Since Android suspends asynchronously, we need a way to find out whether we
actually felt asleep

7 years agosdio: add new function for RAW (Read after Write) operation
Grazvydas Ignotas [Wed, 26 May 2010 21:42:09 +0000 (14:42 -0700)]
sdio: add new function for RAW (Read after Write) operation

SDIO specification allows RAW (Read after Write) operation using
IO_RW_DIRECT command (CMD52) by setting the RAW bit.  This operation is
similar to ordinary read/write commands, except that both write and read
are performed using single command/response pair.  The Linux SDIO layer
already supports this internaly, only external function is missing for
drivers to make use, which is added by this patch.

This type of command is required to implement proper power save mode
support in wl1251 wifi driver.

Android has similar patch for G1 in it's tree for the same reason:

http://android.git.kernel.org/?p=kernel/common.git;a=commitdiff;h=74a47786f6ecbe6c1cf9fb15efe6a968451deb52

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Cc: Dmitry Shmidt <dimitrysh@google.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
7 years agosound: soc: msm7k switch to a more standard/classic sound routing
David Lanzendörfer [Wed, 20 Jan 2010 00:51:54 +0000 (01:51 +0100)]
sound: soc: msm7k switch to a more standard/classic sound routing

The sound routing used a volume bar to achieve it.
It has now been replaced by switches.
Android bluetooth routing(which made the sound crash) was removed

This work was entierely done by
  David Lanzendörfer <david.lanzendoerfer@o2s.ch>
I only merged it.

7 years agoinput: touchscreen: synaptics_i2c_rmi: change from tslib to evdev compatibility
Denis 'GNUtoo' Carikli [Thu, 8 Jul 2010 18:14:44 +0000 (20:14 +0200)]
input: touchscreen: synaptics_i2c_rmi: change from tslib to evdev compatibility

People in #xorg-devel told me that I should really use xf86-input-evdev.
That needs a small change to be able to register touch/clicks

7 years ago[ARM] msm: add bob copeland's patch for msm wifi activation
Denis 'GNUtoo' Carikli [Thu, 8 Jul 2010 01:44:27 +0000 (03:44 +0200)]
[ARM] msm: add bob copeland's patch for msm wifi activation

I forgott to add this,because it was a new file and was not
  modified

7 years ago[ARM] msm: trout: add wifi support
Denis 'GNUtoo' Carikli [Thu, 8 Jul 2010 01:26:26 +0000 (03:26 +0200)]
[ARM] msm: trout: add wifi support

I used:
*bob copeland's patch available here:
  http://bobcopeland.com/srcs/android/msm_wifi.patch
*trout_wl1251_init comes from openpandora's pandora_wl1251_init at :
arch/arm/mach-omap2/board-omap3pandora.c in git://git.openpandora.org/pandora-kernel.git

7 years ago[ARM] msm: trout: convert the lcd backlight from led to backlight
Denis 'GNUtoo' Carikli [Sat, 3 Jul 2010 13:34:18 +0000 (15:34 +0200)]
[ARM] msm: trout: convert the lcd backlight from led to backlight

Imported the driver from the leviathan-incomming branch at commit
3a5d683e5893ae75ace4bdfef4f5605555d40740

7 years agosound: soc: msm: msm7k prevent blocking in .close
Denis 'GNUtoo' Carikli [Sat, 3 Jul 2010 12:31:04 +0000 (14:31 +0200)]
sound: soc: msm: msm7k prevent blocking in .close

with the 0.22.19.26l(the more recent one at the time of the commit)
  firmware under the htcdream,it seem that PCMDMAMISSED is not
  emited,and so close wait eternally for this message

7 years agosound: soc: msm: enable realtime .copy
Denis 'GNUtoo' Carikli [Sat, 3 Jul 2010 12:28:40 +0000 (14:28 +0200)]
sound: soc: msm: enable realtime .copy

7 years agosound: soc: msm: move min period size to msm-pcm.h
Denis 'GNUtoo' Carikli [Sat, 3 Jul 2010 12:25:38 +0000 (14:25 +0200)]
sound: soc: msm: move min period size to msm-pcm.h

7 years agosound: soc: msm: msm7k: rework .silence to return 0 directly
Denis 'GNUtoo' Carikli [Sat, 3 Jul 2010 12:21:08 +0000 (14:21 +0200)]
sound: soc: msm: msm7k: rework .silence to return 0 directly

7 years agosound: soc: msm: set the .copy function realtime(disabled by default)
Denis 'GNUtoo' Carikli [Sat, 3 Jul 2010 12:15:37 +0000 (14:15 +0200)]
sound: soc: msm: set the .copy function realtime(disabled by default)

This is a hack,and doesn't fix totally the buffer underrun issues.
The code was taken from arch/arm/mach-msm/qdsp5/audio_out.c

arch/arm/mach-msm/qdsp5/audio_out.c's audio_write is very similar to
the alsa driver's alsa_send_buffer function.but had a difference:
It used code to set the write realtime,which I imported.

7 years agoRevert "[ARM] msm: qdsp5: fix memset issue"
Denis 'GNUtoo' Carikli [Mon, 28 Jun 2010 17:10:50 +0000 (19:10 +0200)]
Revert "[ARM] msm: qdsp5: fix memset issue"

This reverts commit b5a8cc383135589df04d986323b89aae4e701e7a.
Because this commit was useless(I've blindly rebased it)
u16 and uint16_t are equivalents

7 years ago[ARM]: add function graph tracer patches from Tim Bird
Denis 'GNUtoo' Carikli [Sun, 27 Jun 2010 21:33:59 +0000 (23:33 +0200)]
[ARM]: add function graph tracer patches from Tim Bird

The patch was taken from
  http://elinux.org/images/e/ee/Ftrace-patches-oct-2009.tgz

7 years agoPM: [HACK] revert suspend-safeguard introduced in 2.6.30-rc
Denis 'GNUtoo' Carikli [Sun, 27 Jun 2010 20:57:04 +0000 (22:57 +0200)]
PM: [HACK] revert suspend-safeguard introduced in 2.6.30-rc

This was breaking suspend thanks to some buggy android drivers for the HTC Dream
The revert should fix it.

Thains alain2210 for finding the problematic commit.

7 years agoSound-soc: msm: add .silence prototypes
Denis 'GNUtoo' Carikli [Sun, 27 Jun 2010 01:47:40 +0000 (03:47 +0200)]
Sound-soc: msm: add .silence prototypes

Without the silence prototypes:
    int snd_pcm_format_set_silence(snd_pcm_format_t format,
                               void *data, unsigned int samples)
  is called with a NULL data pointer which causes some trobble.
  We return an error because the content of the function is not
  implemented yet

7 years agosound: soc: msm: improved code readability
Denis 'GNUtoo' Carikli [Sun, 27 Jun 2010 01:42:04 +0000 (03:42 +0200)]
sound: soc: msm: improved code readability

7 years ago[ARM] msm: qdsp5: fix memset issue
Denis 'GNUtoo' Carikli [Sat, 26 Jun 2010 18:32:21 +0000 (20:32 +0200)]
[ARM] msm: qdsp5: fix memset issue

The issue is that the kernel crashes,when using mplayer with alsa.
This fixes that issue.
This fix was made by David Lanzendörfer

7 years agosound: soc: msm: make it compile and load
Denis 'GNUtoo' Carikli [Sat, 26 Jun 2010 18:28:54 +0000 (20:28 +0200)]
sound: soc: msm: make it compile and load

7 years agoalsa: soc: imported msm soc from codeaurora
Denis 'GNUtoo' Carikli [Sat, 26 Jun 2010 18:26:03 +0000 (20:26 +0200)]
alsa: soc: imported msm soc from codeaurora

Alsa support for the msm arch was imported from
git://codeaurora.org/kernel/msm.git, branch
android-msm-2.6.32,commit a49bb5e0a151f6813cdb345039a38d04300a75c6

7 years agoinput: touchscreen: synaptics_i2c_rmi : remove multitouch and pressure
Denis 'GNUtoo' Carikli [Sat, 26 Jun 2010 18:22:55 +0000 (20:22 +0200)]
input: touchscreen: synaptics_i2c_rmi : remove multitouch and pressure

Multitouch and pressure made one press reported as 2 press

7 years agovideo: msm: unblank the pannel when resuming
Denis 'GNUtoo' Carikli [Fri, 2 Apr 2010 20:16:32 +0000 (22:16 +0200)]
video: msm: unblank the pannel when resuming

Unblanking the pannel at resume is necessary,else at resume
The screen stays black.

Note that This commit makes possible(and advisable) to choose
None in the "User-space screen access" kernel configuration

Thanks mickey lauer for the idea(he told me that unblank
  was not called when resuming)

7 years agovideo: msm: added an optional refresh thread for Xorg
Denis 'GNUtoo' Carikli [Fri, 25 Jun 2010 23:18:07 +0000 (01:18 +0200)]
video: msm: added an optional refresh thread for Xorg

This patch was Rebased from  Martijn Stolk <linuxtogo@netripper.nl>

From the original commit message:
"As the touchscreen is now interrupt based instead of polling,
the screen does not get updated in a regular fashion.
The refresh thread has been added to compensate for this.
As it's not a very nice solution,
it is disabled by default and can be enabled at compile-time
by setting CONFIG_MSM_FB_REFRESH."
Note that this refresh thread is not neccesary for Android

7 years agousb: gadget: ether: fix compilation issue (MKDEV)
Denis 'GNUtoo' Carikli [Fri, 25 Jun 2010 22:48:07 +0000 (00:48 +0200)]
usb: gadget: ether: fix compilation issue (MKDEV)

If we don't include kdev_t.h,the compilation fails like this:
  CC      drivers/usb/gadget/ether.o
In file included from drivers/usb/gadget/ether.c:106:0:
drivers/usb/gadget/composite.c: In function ‘usb_add_function’:
drivers/usb/gadget/composite.c:131:3: error: implicit declaration of function ‘MKDEV’
make[2]: *** [drivers/usb/gadget/ether.o] Error 1
make[1]: *** [drivers/usb/gadget] Error 2

7 years agonet: wireless: bcm4329: Add SoftAP MAC address randomization
Dmitry Shmidt [Wed, 16 Jun 2010 22:01:23 +0000 (15:01 -0700)]
net: wireless: bcm4329: Add SoftAP MAC address randomization

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
7 years ago[ARM] msm: sapphire: give 3MB back to the system (with radio update)
Kevin.Ch Lee [Mon, 7 Jun 2010 20:42:32 +0000 (13:42 -0700)]
[ARM] msm: sapphire: give 3MB back to the system (with radio update)

Signed-off-by: Iliyan Malchev <malchev@google.com>
7 years ago[ARM] msm: mahimahi: Debounce power key.
Arve Hjønnevåg [Fri, 4 Jun 2010 04:34:56 +0000 (21:34 -0700)]
[ARM] msm: mahimahi: Debounce power key.

Change-Id: Ifbe88223e566b7f5627e19a03a600cdfa079522a
Signed-off-by: Arve Hjønnevåg <arve@android.com>
7 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>
7 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>
7 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>
7 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>
7 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

7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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

7 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>
7 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

7 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>
7 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>
7 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>
7 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>
7 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

7 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>
7 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>
7 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>
7 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>
7 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

7 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>
7 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>
7 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>
7 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>
7 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

7 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>
7 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>
7 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

7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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

7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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

7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>