linux-on-qualcomm-s-msm:linux-msm-kovsky.git
8 years agosynaptics_i2c_rmi : Make the android part optional htc-msm-2.6.29
Denis 'GNUtoo' Carikli [Sat, 17 Oct 2009 17:05:03 +0000 (19:05 +0200)]
synaptics_i2c_rmi : Make the android part optional

The driver will present an android or a tslib interface,
depending on a boolean in the kenrel configuration
If someone needs to make an evdev compatible interface for this driver,
he should look into the ts_filter from the openmoko kernel
(so he won't have calibrations issues),
but the ts_filter_chain interface seem to require to have a
platform_device struct.

8 years agomsm_fb: make the doubble buffering of android optional
Denis 'GNUtoo' Carikli [Sat, 17 Oct 2009 17:04:01 +0000 (19:04 +0200)]
msm_fb: make the doubble buffering of android optional

Android uses doubble buffer for rendering smoothly page flips,
Xorg or kdrive's fbdev don't need it

8 years agomsmfb: added refresh thread for Xorg or Kdrive fbdev (non android)
Denis 'GNUtoo' Carikli [Sat, 17 Oct 2009 17:02:09 +0000 (19:02 +0200)]
msmfb: added refresh thread for Xorg or Kdrive fbdev (non android)

8 years agoMerge branch 'android-2.6.29' into android-msm-2.6.29
Dima Zavin [Wed, 16 Sep 2009 05:26:10 +0000 (22:26 -0700)]
Merge branch 'android-2.6.29' into android-msm-2.6.29

8 years ago[ARM] msm: move fixed iomappings and VMALLOC_END to 0xF8000000
Brian Swetland [Tue, 15 Sep 2009 20:50:31 +0000 (13:50 -0700)]
[ARM] msm: move fixed iomappings and VMALLOC_END to 0xF8000000

This increases the total virtual footprint available for the 1:1
physical map and the vmalloc space from 256MB to 896MB, which should
much improve things for hardware with 256-512MB of ram, discontiguous
ram banks, etc.

Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Dima Zavin <dima@android.com>
8 years ago[ARM] msm: Remove unused regions that were tagged as remapped in iomap.h
Dima Zavin [Tue, 15 Sep 2009 21:16:20 +0000 (14:16 -0700)]
[ARM] msm: Remove unused regions that were tagged as remapped in iomap.h

These defines were marked as if iomem was being reserved for them at
initialization, but they were not actually in the msm_io_desc list in
io.c, and no users for these defines exist.

Signed-off-by: Dima Zavin <dima@android.com>
8 years ago[ARM] msm: camera: msm8k updates
Iliyan Malchev [Mon, 14 Sep 2009 01:47:04 +0000 (18:47 -0700)]
[ARM] msm: camera: msm8k updates

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: s5k3e2fx: check suspend flag
Iliyan Malchev [Wed, 9 Sep 2009 23:01:32 +0000 (16:01 -0700)]
[ARM] msm: camera: s5k3e2fx: check suspend flag

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: add a need_suspend flag to the camera-sensor info struct
Iliyan Malchev [Mon, 14 Sep 2009 22:53:20 +0000 (15:53 -0700)]
[ARM] msm: add a need_suspend flag to the camera-sensor info struct

When this flag is set in the board file, then the sensor's suspend/resume code
is allowed to run.  Otherwise, suspend/resume is a no-op.

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: make msm_camera_legacy_device_platform_data always available
Iliyan Malchev [Mon, 14 Sep 2009 22:51:49 +0000 (15:51 -0700)]
[ARM] msm: make msm_camera_legacy_device_platform_data always available

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: replace flash_type with a flash function
Iliyan Malchev [Tue, 15 Sep 2009 00:05:20 +0000 (17:05 -0700)]
[ARM] msm: camera: replace flash_type with a flash function

Replace the old flash_type with a pointer to a function that takes in a flash
level from [0, num_flash_levels).

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: add more support for postprocessing
Iliyan Malchev [Thu, 3 Sep 2009 01:58:52 +0000 (18:58 -0700)]
[ARM] msm: camera: add more support for postprocessing

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: add Code-Aurora license and GPL boilerplate
Iliyan Malchev [Thu, 3 Sep 2009 01:36:42 +0000 (18:36 -0700)]
[ARM] msm: camera: add Code-Aurora license and GPL boilerplate

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: s5k3e2fx: add suspend/resume
Becker Hsieh [Mon, 31 Aug 2009 23:05:41 +0000 (16:05 -0700)]
[ARM] msm: camera: s5k3e2fx: add suspend/resume

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: add lookup for AF buffers
Becker Hsieh [Wed, 5 Aug 2009 20:39:07 +0000 (13:39 -0700)]
[ARM] msm: camera: add lookup for AF buffers

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: camera: s5k3e2fx-sensor updates
Iliyan Malchev [Thu, 25 Jun 2009 01:52:14 +0000 (18:52 -0700)]
[ARM] msm: camera: s5k3e2fx-sensor updates

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: hw3d: stub out functions when CONFIG_MSM_HW3D not defined
Iliyan Malchev [Mon, 14 Sep 2009 22:18:51 +0000 (15:18 -0700)]
[ARM] msm: hw3d: stub out functions when CONFIG_MSM_HW3D not defined

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: htc: Avoid usb_mass_storage_platform_data symbol collision.
Mike Lockwood [Fri, 11 Sep 2009 15:46:08 +0000 (11:46 -0400)]
[ARM] msm: htc: Avoid usb_mass_storage_platform_data symbol collision.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agokernel: printk: Add non exported function for clearing the log ring buffer
San Mehat [Thu, 6 Aug 2009 17:25:21 +0000 (10:25 -0700)]
kernel: printk: Add non exported function for clearing the log ring buffer

Signed-off-by: San Mehat <san@google.com>
8 years agousb: gadget: f_mass_storage: Clean up wakelocks on error paths
Rebecca Schultz Zavin [Tue, 25 Aug 2009 22:46:01 +0000 (15:46 -0700)]
usb: gadget: f_mass_storage: Clean up wakelocks on error paths

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agousb: gadget: f_mass_storage: Handle setup request correctly
James Luan [Fri, 4 Sep 2009 00:47:58 +0000 (19:47 -0500)]
usb: gadget: f_mass_storage: Handle setup request correctly

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years ago[ARM] defconfig: msm_defconfig: Enable cpu_freq_stat
Mike Chan [Thu, 3 Sep 2009 01:16:47 +0000 (18:16 -0700)]
[ARM] defconfig: msm_defconfig: Enable cpu_freq_stat

Signed-off-by: Mike Chan <mike@android.com>
8 years ago[ARM] msm: camera: do an AXI reset together with the VFE reset
Iliyan Malchev [Wed, 2 Sep 2009 02:18:59 +0000 (19:18 -0700)]
[ARM] msm: camera: do an AXI reset together with the VFE reset

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] mach-msm: nand: Add Virtual kpanic mtd partition support.
San Mehat [Tue, 1 Sep 2009 21:01:11 +0000 (14:01 -0700)]
[ARM] mach-msm: nand: Add Virtual kpanic mtd partition support.

Adds an option to snag a portion of a specified
partition into a virtual partition named 'kpanic' Useful
for platforms which do not have a kpanic partition but want
to take advantage of CONFIG_APANIC logging. As this is not a real
nand partition, both the snagged and new partitions should be
erased when switching to/from a kernel with this option enabled/disabled.

**** WARNING ****
DO NOT enable if you are using a Recovery/OTA scheme in which
the recovery kernel needs to access the partition you are snagging
from. If you do not heed this warning, you may end up with a
corrupted OTA image and there be dragons. Just don't do it.
**** WARNING ****

Signed-off-by: San Mehat <san@google.com>
8 years agodrivers: apanic: Android kernel panic handler.
San Mehat [Tue, 1 Sep 2009 20:43:01 +0000 (13:43 -0700)]
drivers: apanic: Android kernel panic handler.

This driver triggers when the kernel panics and attempts to
write critical debug data to the flash.

Signed-off-by: San Mehat <san@google.com>
drivers: apanic: checkpatch fixes

Signed-off-by: San Mehat <san@google.com>
8 years agolib/genalloc.c: remove unmatched write_lock() in gen_pool_destroy
Zygo Blaxell [Wed, 17 Jun 2009 05:33:57 +0000 (22:33 -0700)]
lib/genalloc.c: remove unmatched write_lock() in gen_pool_destroy

There is a call to write_lock() in gen_pool_destroy which is not balanced
by any corresponding write_unlock().  This causes problems with preemption
because the preemption-disable counter is incremented in the write_lock()
call, but never decremented by any call to write_unlock().  This bug is
gen_pool_destroy, and one of them is non-x86 arch-specific code.

Signed-off-by: Zygo Blaxell <zygo.blaxell@xandros.com>
Cc: Jiri Kosina <trivial@kernel.org>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 years agousb: gadget: mass_storage: Fix Mass Storage Panic during PC reboot
Jared Suttles [Fri, 28 Aug 2009 21:53:32 +0000 (16:53 -0500)]
usb: gadget: mass_storage: Fix Mass Storage Panic during PC reboot

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years ago[ARM] msm: smd_rpc: Fix wakelock leak for interrupted rpc call/reply.
Mike Chan [Fri, 21 Aug 2009 23:28:17 +0000 (16:28 -0700)]
[ARM] msm: smd_rpc: Fix wakelock leak for interrupted rpc call/reply.

Discard incoming packets when rpc_call_reply is not expecting a reply.
Always process for server.

Signed-off-by: Mike Chan <mike@android.com>
8 years ago[ARM] defconfig: msm_defconfig: Enable various debug options + disable swap
San Mehat [Wed, 26 Aug 2009 16:58:32 +0000 (09:58 -0700)]
[ARM] defconfig: msm_defconfig: Enable various debug options + disable swap

Signed-off-by: San Mehat <san@google.com>
8 years agopower: wakelocks: fix buffer overflow in print_wake_locks
Erik Gilling [Wed, 26 Aug 2009 03:09:12 +0000 (20:09 -0700)]
power: wakelocks: fix buffer overflow in print_wake_locks

Change-Id: Ic944e3b3d3bc53eddc6fd0963565fd072cac373c
Signed-off-by: Erik Gilling <konkers@android.com>
8 years agopower: Prevent spinlock recursion when wake_unlock() is called
Mike Chan [Wed, 26 Aug 2009 01:10:32 +0000 (18:10 -0700)]
power: Prevent spinlock recursion when wake_unlock() is called

Signed-off-by: Mike Chan <mike@android.com>
8 years ago[ARM] process: Add display of memory around registers when displaying regs.
San Mehat [Tue, 25 Aug 2009 23:52:22 +0000 (16:52 -0700)]
[ARM] process: Add display of memory around registers when displaying regs.

This is extremely useful in diagnosing remote crashes, and is based heavily
on original work by <md@google.com>.

Signed-off-by: San Mehat <san@google.com>
Cc: Michael Davidson <md@google.com>
8 years agoRevert "[ARM] msm: defconfig: Switch to CFQ I/O scheduler"
San Mehat [Mon, 24 Aug 2009 18:09:09 +0000 (11:09 -0700)]
Revert "[ARM] msm: defconfig: Switch to CFQ I/O scheduler"

This reverts commit a09ca632d7659a219e55974a515897d915619da4.

Signed-off-by: San Mehat <san@google.com>
8 years agoRevert "[ARM] msm: defconfig: Switch to SLOB allocator"
San Mehat [Mon, 24 Aug 2009 18:04:37 +0000 (11:04 -0700)]
Revert "[ARM] msm: defconfig: Switch to SLOB allocator"

This reverts commit adeb928f0f76c3d91077a8ce055964689a39764a.

Conflicts:

arch/arm/configs/msm_defconfig

Signed-off-by: San Mehat <san@google.com>
8 years agonet: ipv4: Fix a spinlock recursion bug in tcp_v4_nuke.
Dima Zavin [Thu, 20 Aug 2009 20:21:24 +0000 (13:21 -0700)]
net: ipv4: Fix a spinlock recursion bug in tcp_v4_nuke.

We can't hold the lock while calling to tcp_done(), so we drop
it before calling. We then have to start at the top of the chain again.

Signed-off-by: Dima Zavin <dima@android.com>
8 years agoFAT: add 'errors' mount option
Denis Karpov [Wed, 3 Jun 2009 17:34:22 +0000 (02:34 +0900)]
FAT: add 'errors' mount option

On severe errors FAT remounts itself in read-only mode. Allow to
specify FAT fs desired behavior through 'errors' mount option:
panic, continue or remount read-only.

`mount -t [fat|vfat] -o errors=[panic,remount-ro,continue] \
<bdev> <mount point>`

This is analog to ext2 fs 'errors' mount option.

Signed-off-by: Denis Karpov <ext-denis.2.karpov@nokia.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
8 years agodrivers: usb: gadget: Add platform data struct for usb_mass_storage device
Mike Lockwood [Fri, 21 Aug 2009 17:33:54 +0000 (13:33 -0400)]
drivers: usb: gadget: Add platform data struct for usb_mass_storage device

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agodrivers: usb: gadget: Use usb_mass_storage platform device as parent for lun
Mike Lockwood [Fri, 21 Aug 2009 14:54:39 +0000 (10:54 -0400)]
drivers: usb: gadget: Use usb_mass_storage platform device as parent for lun

If a platform device is specified for the f_mass_storage function, use it as the
parent driver for the lun files in sysfs.
This allows a platform independent file path for controlling USB mass storage
from user space.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agodrivers: usb: gadget: Add "usb_mass_storage" platform driver.
Jared Suttles [Wed, 19 Aug 2009 02:31:58 +0000 (21:31 -0500)]
drivers: usb: gadget: Add "usb_mass_storage" platform driver.

This will be used for configuring vendor, product and release from board file.

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agomtd: nand: Add naieve panic_write support for generic nand devices.
San Mehat [Thu, 20 Aug 2009 17:50:45 +0000 (10:50 -0700)]
mtd: nand: Add naieve panic_write support for generic nand devices.

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] msm: camera: fix memory corruptions and add checks on copy_from_user
Iliyan Malchev [Sat, 15 Aug 2009 01:25:24 +0000 (18:25 -0700)]
[ARM] msm: camera: fix memory corruptions and add checks on copy_from_user

Signed-off-by: Iliyan Malchev <malchev@google.com>
8 years ago[ARM] msm: mdp: Set the correct pack pattern for XRGB/ARGB
Dima Zavin [Sat, 15 Aug 2009 01:10:06 +0000 (18:10 -0700)]
[ARM] msm: mdp: Set the correct pack pattern for XRGB/ARGB

Signed-off-by: Dima Zavin <dima@android.com>
8 years ago[ARM] msm: mdp: Add support for RGBX 8888 image format.
Dima Zavin [Fri, 14 Aug 2009 23:51:59 +0000 (16:51 -0700)]
[ARM] msm: mdp: Add support for RGBX 8888 image format.

Signed-off-by: Dima Zavin <dima@android.com>
8 years agoMerge branch 'android-2.6.29' into android-msm-2.6.29
Dima Zavin [Mon, 17 Aug 2009 19:16:45 +0000 (12:16 -0700)]
Merge branch 'android-2.6.29' into android-msm-2.6.29

8 years ago[ARM] 5545/2: add flush_kernel_dcache_page() for ARM
Nicolas Pitre [Fri, 12 Jun 2009 02:09:29 +0000 (03:09 +0100)]
[ARM] 5545/2: add flush_kernel_dcache_page() for ARM

Without this, the default implementation is a no op which is completely
wrong with a VIVT cache, and usage of sg_copy_buffer() produces
unpredictable results.

Tested-by: Sebastian Andrzej Siewior <bigeasy@breakpoint.cc>
CC: stable@kernel.org
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: San Mehat <san@google.com>
8 years agommc_block: do not DMA to stack
Ben Dooks [Mon, 8 Jun 2009 22:33:57 +0000 (23:33 +0100)]
mmc_block: do not DMA to stack

In the write recovery routine, the data to get from the card
is allocated from the stack. The DMA mapping documentation says
explicitly stack memory is not mappable by any of the DMA calls.

Change to using kmalloc() to allocate the memory for the result
from the card and then free it once we've finished with the
transaction.

[ Changed to GFP_KERNEL allocation - Pierre Ossman ]

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: San Mehat <san@google.com>
8 years agommc: mmc_rescan detects card change in one run
San Mehat [Thu, 13 Aug 2009 18:23:37 +0000 (11:23 -0700)]
mmc: mmc_rescan detects card change in one run

With this patch, mmc_rescan can detect the removal of an mmc card and
the insertion of (possibly another) card in the same run. This means
that a card change can be detected without having to call
mmc_detect_change multiple times.

This change generalises the core such that it can be easily used by
hosts which provide a mechanism to detect only the presence of a card
reader cover, which has to be taken off in order to insert a card. Other
hosts ("card detect" or "MMC_CAP_NEEDS_POLL") each receive an event when
a card is removed and when a card is inserted, so it is sufficient for
them if mmc_rescan handles only one event at a time. "Cover detect"
hosts, however, only receive events about the cover status. This means
that between 2 subsequent events, both a card removal and a card
insertion can occur. In this case, the pre-patch version of mmc_rescan
would only detect the removal of the previous card but not the insertion
of the new card.

Signed-off-by: Jorg Schummer <ext-jorg.2.schummer@nokia.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: San Mehat <san@android.com>
Conflicts:

drivers/mmc/core/core.c

Signed-off-by: San Mehat <san@google.com>
8 years agommc: increase power up delay
José M. Fernández [Tue, 10 Mar 2009 01:21:21 +0000 (02:21 +0100)]
mmc: increase power up delay

The TI controller on Toshiba Tecra M5 needs more time to power up or
the cards will init incorrectly or not at all.

Signed-off-by: José M. Fernández <josemariafg@gmail.com>
Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: San Mehat <san@google.com>
8 years agommc_block: be prepared for oversized requests
Pierre Ossman [Fri, 10 Apr 2009 15:52:57 +0000 (17:52 +0200)]
mmc_block: be prepared for oversized requests

The block layer does not support very low sector count restrictions
so we need to be prepared to handle bigger requests than we can send
directly to the controller.

Problem found by Manuel Lauss.

Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Signed-off-by: San Mehat <san@google.com>
8 years agommc: During unsafe resume, select the right volatge for the card
Balaji Rao [Wed, 25 Feb 2009 09:58:09 +0000 (15:28 +0530)]
mmc: During unsafe resume, select the right volatge for the card

During mmc unsafe resume, choose the right voltage for the card after
powerup.

Although this has not seen to cause trouble, it's the wrong behaviour.

Signed-off-by: Balaji Rao <balajirrao@openmoko.org>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: San Mehat <san@google.com>
8 years agommc: Add Extended CSD register to debugfs
Adrian Hunter [Wed, 11 Feb 2009 12:52:20 +0000 (14:52 +0200)]
mmc: Add Extended CSD register to debugfs

Extended CSD is a MMC card register.  As increasingly interesting
fields are being added to Extended CSD, it is helpful to see its
value.  Note that SD cards do not have an Extended CSD
register, so it is MMC only.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: San Mehat <san@google.com>
8 years agommc: add MODALIAS linkage for MMC/SD devices
Andy Whitcroft [Mon, 23 Feb 2009 12:38:41 +0000 (12:38 +0000)]
mmc: add MODALIAS linkage for MMC/SD devices

Currently we are using an explicit udev rule to trigger loading of the
mmc-block module when an MMC or SD card is detected:

    SUBSYSTEM=="mmc", RUN+="/sbin/modprobe -Qba mmc-block"

It makes much more sense for the mmc bus driver and the mmc-block module to
share MODALIAS information so that they are linked automatically.

There is no real information of use in the MMC system at the current time.
All devices inserted require us to load the mmc-block device.  Until such
time as useful parameters exist simply reflect the module linkage via
the module alias below:

mmc:block

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: San Mehat <san@google.com>
8 years agommc: delayed_work was never cancelled
Jorg Schummer [Thu, 19 Feb 2009 11:17:03 +0000 (13:17 +0200)]
mmc: delayed_work was never cancelled

The delayed work item mmc_host.detect is now cancelled before flushing
the work queue. This takes care of cases when delayed_work was scheduled
for mmc_host.detect, but not yet placed in the work queue.

Signed-off-by: Jorg Schummer <ext-jorg.2.schummer@nokia.com>
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Signed-off-by: San Mehat <san@google.com>
8 years agoBluetooth: Fallback from eSCO to SCO on error code 0x1a (unsupported feature).
Nick Pelly [Fri, 14 Aug 2009 18:36:19 +0000 (11:36 -0700)]
Bluetooth: Fallback from eSCO to SCO on error code 0x1a (unsupported feature).

GM carkits with LGE BT chipsets return this error code when eSCO is attempted.

Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Acked-by: Nick Pelly <npelly@google.com>
8 years agopersonality: fix PER_CLEAR_ON_SETID
Julien Tinnes [Fri, 26 Jun 2009 18:27:40 +0000 (20:27 +0200)]
personality: fix PER_CLEAR_ON_SETID

We have found that the current PER_CLEAR_ON_SETID mask on Linux doesn't
include neither ADDR_COMPAT_LAYOUT, nor MMAP_PAGE_ZERO.

The current mask is READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE.

We believe it is important to add MMAP_PAGE_ZERO, because by using this
personality it is possible to have the first page mapped inside a
process running as setuid root.  This could be used in those scenarios:

 - Exploiting a NULL pointer dereference issue in a setuid root binary
 - Bypassing the mmap_min_addr restrictions of the Linux kernel: by
   running a setuid binary that would drop privileges before giving us
   control back (for instance by loading a user-supplied library), we
   could get the first page mapped in a process we control.  By further
   using mremap and mprotect on this mapping, we can then completely
   bypass the mmap_min_addr restrictions.

Less importantly, we believe ADDR_COMPAT_LAYOUT should also be added
since on x86 32bits it will in practice disable most of the address
space layout randomization (only the stack will remain randomized).

Signed-off-by: Julien Tinnes <jt@cr0.org>
Signed-off-by: Tavis Ormandy <taviso@sdf.lonestar.org>
Cc: stable@kernel.org
Acked-by: Christoph Hellwig <hch@infradead.org>
Acked-by: Kees Cook <kees@ubuntu.com>
Acked-by: Eugene Teo <eugene@redhat.com>
[ Shortened lines and fixed whitespace as per Christophs' suggestion ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 years agoMake sock_sendpage() use kernel_sendpage()
Linus Torvalds [Thu, 13 Aug 2009 17:00:15 +0000 (10:00 -0700)]
Make sock_sendpage() use kernel_sendpage()

kernel_sendpage() does the proper default case handling for when the
socket doesn't have a native sendpage implementation.

Now, arguably this might be something that we could instead solve by
just specifying that all protocols should do it themselves at the
protocol level, but we really only care about the common protocols.
Does anybody really care about sendpage on something like Appletalk? Not
likely.

Acked-by: David S. Miller <davem@davemloft.net>
Cc: Julien TINNES <julien@cr0.org>
Cc: Tavis Ormandy <taviso@sdf.lonestar.org>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 years agosecurity: use mmap_min_addr indepedently of security models
Christoph Lameter [Wed, 3 Jun 2009 20:04:31 +0000 (16:04 -0400)]
security: use mmap_min_addr indepedently of security models

This patch removes the dependency of mmap_min_addr on CONFIG_SECURITY.
It also sets a default mmap_min_addr of 4096.

mmapping of addresses below 4096 will only be possible for processes
with CAP_SYS_RAWIO.

Signed-off-by: Christoph Lameter <cl@linux-foundation.org>
Acked-by: Eric Paris <eparis@redhat.com>
Looks-ok-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: James Morris <jmorris@namei.org>
8 years ago[ARM] msm: hw3d: Don't reset client_file until release time
Dima Zavin [Thu, 13 Aug 2009 06:15:05 +0000 (23:15 -0700)]
[ARM] msm: hw3d: Don't reset client_file until release time

This addresses a potential problem where the current client started an
MDP blit operation, and then got revoked before the blit has finished.
The new client should have to wait until the MDP is done, which will fput
the current client file.

Signed-off-by: Dima Zavin <dima@android.com>
8 years agodrivers: power: Add watchdog timer to catch drivers which lockup during suspend.
San Mehat [Thu, 13 Aug 2009 16:40:42 +0000 (09:40 -0700)]
drivers: power: Add watchdog timer to catch drivers which lockup during suspend.

Rather than hard-lock the kernel, we now BUG() when a driver takes
> 3 seconds to suspend. If the underlying platform supports panic dumps,
then the data can be collected for debug.

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] msm: hw3d: Clean up the interface to get file from fd
Dima Zavin [Thu, 13 Aug 2009 00:17:45 +0000 (17:17 -0700)]
[ARM] msm: hw3d: Clean up the interface to get file from fd

Signed-off-by: Dima Zavin <dima@android.com>
8 years ago[ARM] video: msm: mdp: Make put_img operate on one file at a time
Dima Zavin [Wed, 12 Aug 2009 23:41:43 +0000 (16:41 -0700)]
[ARM] video: msm: mdp: Make put_img operate on one file at a time

Signed-off-by: Dima Zavin <dima@android.com>
8 years agoUSB: gadget: android: Fix USB WHQL Certification Issues
Jared Suttles [Fri, 7 Aug 2009 23:57:49 +0000 (18:57 -0500)]
USB: gadget: android: Fix USB WHQL Certification Issues

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agoUSB: composite: Fix USB WHQL Certification Issues
Jared Suttles [Fri, 7 Aug 2009 23:57:49 +0000 (18:57 -0500)]
USB: composite: Fix USB WHQL Certification Issues

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years ago[ARM] video: msmfb: Add support for using msm_hw3d fds for blits
Dima Zavin [Wed, 5 Aug 2009 06:48:12 +0000 (23:48 -0700)]
[ARM] video: msmfb: Add support for using msm_hw3d fds for blits

Signed-off-by: Dima Zavin <dima@android.com>
8 years ago[ARM] video: msmfb: don't check if CONFIG_ANDROID_PMEM is defined
Dima Zavin [Thu, 16 Jul 2009 07:20:44 +0000 (00:20 -0700)]
[ARM] video: msmfb: don't check if CONFIG_ANDROID_PMEM is defined

The header should now define stubs if pmem is not compiled in.

Signed-off-by: Dima Zavin <dima@android.com>
8 years ago[ARM] msm: change the hw3d driver to let appications directly map the gpu
Dima Zavin [Mon, 6 Jul 2009 23:29:18 +0000 (16:29 -0700)]
[ARM] msm: change the hw3d driver to let appications directly map the gpu

If another user has control of the device, open() will attempt to revoke the
gpu by releasing a blocked "wait for revoke" ioctl, if any.
If a grace period expires and the gpu is still not relased, the application
is SIGKILLed. On suspend, the same approach is applied to make the
application release the gpu so that hw can be put into low power mode.

Signed-off-by: Dima Zavin <dima@android.com>
8 years agoBluetooth: Do not attempt to send dlci disconnect when in BT_CONFIG.
Nick Pelly [Thu, 9 Jul 2009 19:23:44 +0000 (12:23 -0700)]
Bluetooth: Do not attempt to send dlci disconnect when in BT_CONFIG.

This fixes a bug where shutdown() and close() on a rfcomm socket during ACL
connection would not cause HCI Create Connection Cancel.

Signed-off-by: Nick Pelly <npelly@google.com>
8 years agodrivers: usb: gadget: Add helper function for installing ACM gadget function.
Joe Swantek [Thu, 23 Jul 2009 01:16:06 +0000 (20:16 -0500)]
drivers: usb: gadget: Add helper function for installing ACM gadget function.

Submitted on behalf of James Luan <James.Luan@motorola.com>

Signed-off-by: Joe Swantek <joseph.swantek@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agousb: gadget: android: Add dependency on switch driver.
Mike Lockwood [Fri, 7 Aug 2009 12:09:05 +0000 (08:09 -0400)]
usb: gadget: android: Add dependency on switch driver.

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agodrivers: usb: gadget: call switch_dev_unregister in mass storage unbind callback
Ninja Tekkaman [Fri, 7 Aug 2009 12:04:52 +0000 (08:04 -0400)]
drivers: usb: gadget: call switch_dev_unregister in mass storage unbind callback

This fixes a problem unloading the android gadget driver when built as a module

Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agodrivers: usb: gadget: handle NULL descriptors in composite config_buf
Jared Suttles [Thu, 30 Jul 2009 21:13:27 +0000 (16:13 -0500)]
drivers: usb: gadget: handle NULL descriptors in composite config_buf

This fixes a problem in enumeration after a gadget function is removed.

Submitted on behalf of RaviKumar Vembu <ravi.v@motorola.com>

Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
8 years agoMerge branch 'android-2.6.29' into android-msm-2.6.29
Dima Zavin [Fri, 7 Aug 2009 18:07:17 +0000 (11:07 -0700)]
Merge branch 'android-2.6.29' into android-msm-2.6.29

8 years ago[ARM] msm: Remove hw3d config option.
Dima Zavin [Fri, 7 Aug 2009 17:53:18 +0000 (10:53 -0700)]
[ARM] msm: Remove hw3d config option.

Signed-off-by: Dima Zavin <dima@android.com>
8 years agoGRO: Disable GRO on legacy netif_rx path
Herbert Xu [Thu, 26 Mar 2009 07:59:10 +0000 (00:59 -0700)]
GRO: Disable GRO on legacy netif_rx path

When I fixed the GRO crash in the legacy receive path I used
napi_complete to replace __napi_complete.  Unfortunately they're
not the same when NETPOLL is enabled, which may result in us
not calling __napi_complete at all.

What's more, we really do need to keep the __napi_complete call
within the IRQ-off section since in theory an IRQ can occur in
between and fill up the backlog to the maximum, causing us to
lock up.

Since we can't seem to find a fix that works properly right now,
this patch reverts all the GRO support from the netif_rx path.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jack Veenstra <veenstra@android.com>
8 years agopmem: Make the exposed functions be noops if CONFIG_ANDROID_PMEM is not set.
Dima Zavin [Thu, 16 Jul 2009 07:18:38 +0000 (00:18 -0700)]
pmem: Make the exposed functions be noops if CONFIG_ANDROID_PMEM is not set.

Signed-off-by: Dima Zavin <dima@android.com>
8 years agopmem: Expose is_pmem_file to the in-kernel users.
Dima Zavin [Thu, 16 Jul 2009 07:16:10 +0000 (00:16 -0700)]
pmem: Expose is_pmem_file to the in-kernel users.

Signed-off-by: Dima Zavin <dima@android.com>
8 years agopmem: remove HW3D_* ioctls
Dima Zavin [Thu, 9 Jul 2009 23:37:39 +0000 (16:37 -0700)]
pmem: remove HW3D_* ioctls

Signed-off-by: Dima Zavin <dima@android.com>
8 years agoptrace: ptrace_attach: fix the usage of ->cred_exec_mutex
Oleg Nesterov [Sun, 26 Apr 2009 23:41:34 +0000 (01:41 +0200)]
ptrace: ptrace_attach: fix the usage of ->cred_exec_mutex

ptrace_attach() needs task->cred_exec_mutex, not current->cred_exec_mutex.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
8 years ago[ARM] msm: defconfig: Switch to CFQ I/O scheduler
San Mehat [Sat, 1 Aug 2009 15:43:25 +0000 (08:43 -0700)]
[ARM] msm: defconfig: Switch to CFQ I/O scheduler

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] msm: defconfig: Switch to SLOB allocator
San Mehat [Sat, 1 Aug 2009 15:38:59 +0000 (08:38 -0700)]
[ARM] msm: defconfig: Switch to SLOB allocator

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] msm: defconfig: Enable IPV6 in defconfig
San Mehat [Sat, 1 Aug 2009 15:17:15 +0000 (08:17 -0700)]
[ARM] msm: defconfig: Enable IPV6 in defconfig

Signed-off-by: San Mehat <san@google.com>
8 years ago[ARM] msm: defconfig: Regenerate defconfig
San Mehat [Sat, 1 Aug 2009 15:15:35 +0000 (08:15 -0700)]
[ARM] msm: defconfig: Regenerate defconfig

Signed-off-by: San Mehat <san@google.com>
8 years agoserial_core: Add wake_peer uart operation which is called before starting UART TX...
San Mehat [Thu, 30 Jul 2009 03:21:28 +0000 (20:21 -0700)]
serial_core: Add wake_peer uart operation which is called before starting UART TX. The idea here is to provide a mechanism where we can wakeup our peer before sending data.

Signed-off-by: San Mehat <san@google.com>
8 years agomsm: defconfig: Enable CONFIG_MMC_BLOCK_DEFERRED_RESUME
San Mehat [Thu, 30 Jul 2009 18:37:12 +0000 (11:37 -0700)]
msm: defconfig: Enable CONFIG_MMC_BLOCK_DEFERRED_RESUME

Signed-off-by: San Mehat <san@google.com>
8 years agoMerge branch 'android-2.6.29' into android-msm-2.6.29
Dima Zavin [Thu, 30 Jul 2009 18:23:45 +0000 (11:23 -0700)]
Merge branch 'android-2.6.29' into android-msm-2.6.29

8 years agommc: sdio: Claim host in sdio_reset_comm()
Dmitry Shmidt [Wed, 29 Jul 2009 17:22:03 +0000 (10:22 -0700)]
mmc: sdio: Claim host in sdio_reset_comm()

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
8 years agoRevert "mmc: mmcblk: Add new feature 'CONFIG_MMC_BLOCK_PARANOID_RESUME'"
San Mehat [Thu, 30 Jul 2009 15:27:38 +0000 (08:27 -0700)]
Revert "mmc: mmcblk: Add new feature 'CONFIG_MMC_BLOCK_PARANOID_RESUME'"

This reverts commit 5ca694dfd981a371e9b18cdd4a89c002ffaccbc5.

Conflicts:

drivers/mmc/card/Kconfig
drivers/mmc/card/block.c

Signed-off-by: San Mehat <san@google.com>
8 years agommc: card: Add MMC_BLOCK_DEFERRED_RESUME option to Kconfig
San Mehat [Thu, 30 Jul 2009 15:23:22 +0000 (08:23 -0700)]
mmc: card: Add MMC_BLOCK_DEFERRED_RESUME option to Kconfig

Signed-off-by: San Mehat <san@google.com>
8 years agommc: mmcblk: Add support for deferred SD bus resume
San Mehat [Thu, 30 Jul 2009 15:21:19 +0000 (08:21 -0700)]
mmc: mmcblk: Add support for deferred SD bus resume

Signed-off-by: San Mehat <san@google.com>
8 years agommc: core: Rework mmc_delayed_work wakelock so that the wakelock is only extended...
San Mehat [Thu, 30 Jul 2009 14:58:34 +0000 (07:58 -0700)]
mmc: core: Rework mmc_delayed_work wakelock so that the wakelock is only extended if a card is added or removed.

Signed-off-by: San Mehat <san@google.com>
8 years agommc: core: Add deferred bus resume policy.
San Mehat [Thu, 30 Jul 2009 14:55:28 +0000 (07:55 -0700)]
mmc: core: Add deferred bus resume policy.

A card driver can now specify that the underlying bus should *not*
auto-resume with the rest of the system. This is useful for reducing resume
latency as well as saving power when the card driver is not using the
bus. In the future, we'll add support for manual suspend

Signed-off-by: San Mehat <san@google.com>
8 years agoInput: gpio_event: Allow multiple input devices per gpio_event device
Arve Hjønnevåg [Fri, 24 Jul 2009 22:19:56 +0000 (15:19 -0700)]
Input: gpio_event: Allow multiple input devices per gpio_event device

This is needed to support devices that put non-keyboard buttons in
the keyboard matrix. For instance several devices put the trackball
button in the keyboard matrix. In this case BTN_MOUSE should be
reported from the same input device as REL_X/Y.

It is also useful for devices that have multiple logical keyboard in
the same matrix. The HTC dream has a menu key on the external keyboard
and another menu key on the slide-out keyboard. With a single input
device only one of these menu keys can be mapped to KEY_MENU.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agoInput: gpio_input: Fix keys with keycode 0x100-0x1ff
Arve Hjønnevåg [Wed, 15 Jul 2009 03:58:41 +0000 (20:58 -0700)]
Input: gpio_input: Fix keys with keycode 0x100-0x1ff

KEY_MAX is no longer a power of 2.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agoInput: synaptics_i2c_rmi: Add irqflags to platform data struct to pass them to driver
Rebecca Schultz Zavin [Mon, 30 Mar 2009 05:10:22 +0000 (22:10 -0700)]
Input: synaptics_i2c_rmi: Add irqflags to platform data struct to pass them to driver

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years ago[ARM] msm: sapphire: Update Novatek client detect and Sharp panel init.
solomon [Tue, 14 Jul 2009 20:06:24 +0000 (04:06 +0800)]
[ARM] msm: sapphire: Update Novatek client detect and Sharp panel init.

This patch does the following:

1. Add retrial method for panel ID detection with nt35399 MDDI client
   and treat as a Sharp is still fails.
2. Remove the test mode of sharp panel with Novatek MDDI client
3. To avoid blink of sharp panel after resume.
4. Change FTE postion of sharp panel to 0x80. (Tearing issue)

Signed-off-by: Eric Olsen <eolsen@android.com>
8 years ago[ARM] msm: sapphire: Add pull down to sharp panel mddi power sequence
Thomas Tsai [Thu, 9 Jul 2009 16:17:55 +0000 (00:17 +0800)]
[ARM] msm: sapphire: Add pull down to sharp panel mddi power sequence

Without this patch, leakage current occurs when the mddi panel is turned off

Signed-off-by: Thomas Tsai <thomas_tsai@htc.com>
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Signed-off-by: Eric Olsen <eolsen@google.com>
8 years agomsm: sapphire: add sharp panel Noveteck NT35399 driver ic setting
Nita Huang [Mon, 4 May 2009 13:58:09 +0000 (21:58 +0800)]
msm: sapphire: add sharp panel Noveteck NT35399 driver ic setting

Signed-off-by: San Mehat <san@google.com>
Signed-off-by: Eric Olsen <eolsen@google.com>
8 years agoInput: synaptics_i2c_rmi: Send new multi touch events
Arve Hjønnevåg [Tue, 21 Jul 2009 03:11:31 +0000 (20:11 -0700)]
Input: synaptics_i2c_rmi: Send new multi touch events

Send both fingers using the new multitouch protocol in addition to
the old single finger event and second finger ABS_HAT* hack.

The new protocol does not specify how to report up events. To make
sure the user-space frameworks can generate up events, we send at
least one event where ABS_MT_TOUCH_MAJOR is zero before we stop
sending events for a finger.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
8 years agoInput: add detailed multi-touch finger data report protocol
Henrik Rydberg [Tue, 28 Apr 2009 14:47:33 +0000 (07:47 -0700)]
Input: add detailed multi-touch finger data report protocol

In order to utilize the full power of the new multi-touch devices, a
way to report detailed finger data to user space is needed. This patch
adds a multi-touch (MT) protocol which allows drivers to report details
for an arbitrary number of fingers.

The driver sends a SYN_MT_REPORT event via the input_mt_sync() function
when a complete finger has been reported.

In order to stay compatible with existing applications, the data
reported in a finger packet must not be recognized as single-touch
events. In addition, all finger data must bypass input filtering,
since subsequent events of the same type refer to different fingers.

A set of ABS_MT events with the desired properties are defined. The
events are divided into categories, to allow for partial implementation.
The minimum set consists of ABS_MT_TOUCH_MAJOR, ABS_MT_POSITION_X and
ABS_MT_POSITION_Y, which allows for multiple fingers to be tracked.
If the device supports it, the ABS_MT_WIDTH_MAJOR may be used to provide
the size of the approaching finger. Anisotropy and direction may be
specified with ABS_MT_TOUCH_MINOR, ABS_MT_WIDTH_MINOR and
ABS_MT_ORIENTATION. Devices with more granular information may specify
general shapes as blobs, i.e., as a sequence of rectangular shapes
grouped together by a ABS_MT_BLOB_ID. Finally, the ABS_MT_TOOL_TYPE
may be used to specify whether the touching tool is a finger or a pen.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
8 years agoInput: allow certain EV_ABS events to bypass all filtering
Henrik Rydberg [Tue, 28 Apr 2009 14:45:31 +0000 (07:45 -0700)]
Input: allow certain EV_ABS events to bypass all filtering

With the upcoming multi-touch interface as an example, there is
a need to make certain that all reported events actually get passed
to the event handler. This patch equips the input core with the
ability to bypass all filtering for certain EV_ABS events.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>