Commit Graph

34404 Commits

Author SHA1 Message Date
黄涛
2caa51d22a Merge remote-tracking branch 'linux-2.6.32.y/master' into develop
Merge Linux 2.6.32.42
Conflicts:
	Makefile
	drivers/net/wireless/iwlwifi/iwl-5000.c
	drivers/net/wireless/p54/p54usb.c
2011-06-28 09:47:32 +08:00
Thomas Gleixner
8ff753b4ac genirq: Add IRQF_FORCE_RESUME
commit dc5f219e88 upstream.

Xen needs to reenable interrupts which are marked IRQF_NO_SUSPEND in the
resume path. Add a flag to force the reenabling in the resume code.

Tested-and-acked-by: Ian Campbell <Ian.Campbell@eu.citrix.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-23 15:24:09 -07:00
James Bottomley
255e15a4a5 pata_cm64x: fix boot crash on parisc
commit 9281b16caa upstream.

The old IDE cmd64x checks the status of the CNTRL register to see if
the ports are enabled before probing them.  pata_cmd64x doesn't do
this, which causes a HPMC on parisc when it tries to poke at the
secondary port because apparently the BAR isn't wired up (and a
non-responding piece of memory causes a HPMC).

Fix this by porting the CNTRL register port detection logic from IDE
cmd64x.  In addition, following converns from Alan Cox, add a check to
see if a mobility electronics bridge is the immediate parent and forgo
the check if it is (prevents problems on hotplug controllers).

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-23 15:24:08 -07:00
Milton Miller
ff3af58772 seqlock: Don't smp_rmb in seqlock reader spin loop
commit 5db1256a51 upstream.

Move the smp_rmb after cpu_relax loop in read_seqlock and add
ACCESS_ONCE to make sure the test and return are consistent.

A multi-threaded core in the lab didn't like the update
from 2.6.35 to 2.6.36, to the point it would hang during
boot when multiple threads were active.  Bisection showed
af5ab277de (clockevents:
Remove the per cpu tick skew) as the culprit and it is
supported with stack traces showing xtime_lock waits including
tick_do_update_jiffies64 and/or update_vsyscall.

Experimentation showed the combination of cpu_relax and smp_rmb
was significantly slowing the progress of other threads sharing
the core, and this patch is effective in avoiding the hang.

A theory is the rmb is affecting the whole core while the
cpu_relax is causing a resource rebalance flush, together they
cause an interfernce cadance that is unbroken when the seqlock
reader has interrupts disabled.

At first I was confused why the refactor in
3c22cd5709 (kernel: optimise
seqlock) didn't affect this patch application, but after some
study that affected seqcount not seqlock. The new seqcount was
not factored back into the seqlock.  I defer that the future.

While the removal of the timer interrupt offset created
contention for the xtime lock while a cpu does the
additonal work to update the system clock, the seqlock
implementation with the tight rmb spin loop goes back much
further, and is just waiting for the right trigger.

Signed-off-by: Milton Miller <miltonm@bga.com>
Cc: <linuxppc-dev@lists.ozlabs.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Link: http://lkml.kernel.org/r/%3Cseqlock-rmb%40mdm.bga.com%3E
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-23 15:24:02 -07:00
kfx
fbb46ea6d6 update adc driver: interrupt add spin_lock 2011-06-20 10:06:28 +08:00
邱建斌
86061d367c rk29_phonesdk: add headset hook key device 2011-06-17 16:12:21 +08:00
黄涛
7cd3739f32 Merge remote-tracking branch 'linux-2.6.32.y/master' into develop
Merge Linux 2.6.32.41
Conflicts:
	Makefile
	drivers/mmc/core/core.c
	drivers/net/wireless/ath/ath9k/ath9k.h
	drivers/net/wireless/ath/ath9k/hw.c
	drivers/net/wireless/ath/ath9k/main.c
	drivers/net/wireless/ath/regd_common.h
	drivers/net/wireless/b43/dma.c
	drivers/net/wireless/b43/dma.h
	drivers/net/wireless/b43/sdio.c
	drivers/net/wireless/hostap/hostap_cs.c
	drivers/net/wireless/iwlwifi/iwl-5000.c
	drivers/net/wireless/iwlwifi/iwl-agn.c
	drivers/net/wireless/iwlwifi/iwl-helpers.h
	drivers/net/wireless/iwlwifi/iwl-tx.c
	drivers/net/wireless/libertas/cmd.c
	drivers/net/wireless/p54/p54pci.c
	drivers/net/wireless/p54/p54usb.c
	drivers/net/wireless/p54/txrx.c
	drivers/net/wireless/rt2x00/rt2400pci.c
	drivers/net/wireless/rt2x00/rt2500pci.c
	drivers/net/wireless/rt2x00/rt2500usb.c
	drivers/net/wireless/rt2x00/rt2800usb.c
	drivers/net/wireless/rt2x00/rt2x00.h
	drivers/net/wireless/rt2x00/rt2x00dev.c
	drivers/net/wireless/rt2x00/rt2x00queue.c
	drivers/net/wireless/rt2x00/rt61pci.c
	drivers/net/wireless/rt2x00/rt73usb.c
	drivers/usb/serial/option.c
	mm/shmem.c
2011-06-16 11:56:59 +08:00
root
9495dd7a4f A22:change power off to restart if charging 2011-06-14 17:55:47 +08:00
xsf@rock-chips.com
85cc82635a A22 and phonesdk: make wm831x enter sleep in suspend, change vdd voltage to 1.0V 2011-06-14 15:22:04 +08:00
kfx
cd1871b8eb update i2c driver: support gpio i2c 2011-06-06 17:02:32 +08:00
linjh
c71cce9858 phonepad: add lcd hsd07pfw1; tp d70_l3188a 2011-06-02 12:28:56 +08:00
ddl
3249d1ba78 camera: add support mt9t111 and fix gc0309 display error in a22 project 2011-05-26 10:52:55 +08:00
root
850722c442 1. return -1 if read voltage error before reporting battery's event;
2. change to use delay workqueue to wait spi resume;
3. delete flush(dws) operation from spi resume function to avoid spi error while system resume;
4. delete suspend_noirq function from wm831x_on.c to avoid reading spi before spim resume;
5. add touchscreen delay to 200us to avoid i2c error;
2011-05-24 09:11:45 +08:00
赵子初
d6f984c589 TCL-PHONE-PAD:add mu509 2011-05-24 09:55:08 +08:00
root
7569e53e5c add wm831x restart support 2011-05-17 21:54:52 +08:00
kfx
a5663a2a61 update hdmi dirver: unregister err and update i2c driver:support direct mode 2011-05-14 16:58:22 +08:00
kfx
da0057e226 update hdmi driver: support 480p 2011-05-12 16:35:39 +08:00
kfx
7b76455518 update hdmi driver: backlight control 2011-05-11 17:03:31 +08:00
Eric Dumazet
6019f38379 af_unix: limit recursion level
commit 25888e3031 upstream.

Its easy to eat all kernel memory and trigger NMI watchdog, using an
exploit program that queues unix sockets on top of others.

lkml ref : http://lkml.org/lkml/2010/11/25/8

This mechanism is used in applications, one choice we have is to have a
recursion limit.

Other limits might be needed as well (if we queue other types of files),
since the passfd mechanism is currently limited by socket receive queue
sizes only.

Add a recursion_level to unix socket, allowing up to 4 levels.

Each time we send an unix socket through sendfd mechanism, we copy its
recursion level (plus one) to receiver. This recursion level is cleared
when socket receive queue is emptied.

Reported-by: Марк Коренберг <socketpair@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Adjust for 2.6.32]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-09 15:55:36 -07:00
Maxim Levitsky
28e4bf4a8b mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume
commit 4c2ef25fe0 upstream.

If you don't use CONFIG_MMC_UNSAFE_RESUME, as soon as you attempt to
suspend, the card will be removed, therefore this patch doesn't change the
behavior of this option.

However the removal will be done by pm notifier, which runs while
userspace is still not frozen and thus can freely use del_gendisk, without
the risk of deadlock which would happen otherwise.

Card detect workqueue is now disabled while userspace is frozen, Therefore
if you do use CONFIG_MMC_UNSAFE_RESUME, and remove the card during
suspend, the removal will be detected as soon as userspace is unfrozen,
again at the moment it is safe to call del_gendisk.

Tested with and without CONFIG_MMC_UNSAFE_RESUME with suspend and hibernate.

[akpm@linux-foundation.org: clean up function prototype]
[akpm@linux-foundation.org: fix CONFIG_PM-n linkage, small cleanups]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Adjust for 2.6.32]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-09 15:55:31 -07:00
Gertjan van Wingerde
2b5f7f9487 mac80211: Add define for TX headroom reserved by mac80211 itself.
commit d24deb2580 upstream.

Add a definition of the amount of TX headroom reserved by mac80211 itself
for its own purposes. Also add BUILD_BUG_ON to validate the value.
This define can then be used by drivers to request additional TX headroom
in the most efficient manner.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
[bwh: Adjust context for 2.6.32]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-09 15:55:22 -07:00
kfx
3b403975b5 update hdmi driver 2011-05-06 09:23:14 +08:00
ddl
d2aa735713 camera: add support ov2640 sensor 2011-05-04 16:35:03 +08:00
kfx
3901afba10 add new hdmi driver and update sdmmc driver 2011-05-04 11:27:54 +08:00
phc
aaf6c7aab7 RK29 Mobile SDK:update mtk23d to sync with RK2818-project 2011-05-03 17:14:25 +08:00
邱建斌
281a958bde rk29_phone: wm8994 volume pdata fix 2011-05-03 16:07:15 +08:00
ddl
fc19f8e979 camera: fix ov7675/sid130B sensor macro error 2011-04-28 10:08:38 +08:00
ddl
751f546cce camera : add support gc2005/hi253/hi704/nt99250 sensor driver 2011-04-27 22:16:28 +08:00
ddl
3d0097d2fc camera:add support gc0309 and sid130B sensor driver 2011-04-27 21:14:29 +08:00
ddl
e65eceaf0d camera: add support siv120b sensor driver 2011-04-27 15:22:57 +08:00
ddl
7a0dfe623f camera: add support gc0308 sensor driver 2011-04-27 14:42:47 +08:00
ddl
bd060f1a21 camera: add support gt2005 sensor driver 2011-04-27 12:04:06 +08:00
ddl
86360328a8 camera: add support mt9d113 which is from zhong yong wang 2011-04-26 21:43:58 +08:00
phc
3d91347adc RKMobileSDK:add reset ioctl for 23d 2011-04-25 17:19:26 +08:00
root
eccb332a70 xxm FIH:update touch panel && UART3 2011-04-25 17:10:15 +08:00
lyx
6bc981e2f2 rollback gsensor mmaio num 2011-04-24 19:10:36 -07:00
黄涛
4431b3de6d wakelock: port from HTC, dump active wake lock name when unable to suspend 2011-04-23 09:08:19 +08:00
Linus Torvalds
67e022f3ad next_pidmap: fix overflow condition
commit c78193e9c7 upstream.

next_pidmap() just quietly accepted whatever 'last' pid that was passed
in, which is not all that safe when one of the users is /proc.

Admittedly the proc code should do some sanity checking on the range
(and that will be the next commit), but that doesn't mean that the
helper functions should just do that pidmap pointer arithmetic without
checking the range of its arguments.

So clamp 'last' to PID_MAX_LIMIT.  The fact that we then do "last+1"
doesn't really matter, the for-loop does check against the end of the
pidmap array properly (it's only the actual pointer arithmetic overflow
case we need to worry about, and going one bit beyond isn't going to
overflow).

[ Use PID_MAX_LIMIT rather than pid_max as per Eric Biederman ]

Reported-by: Tavis Ormandy <taviso@cmpxchg8b.com>
Analyzed-by: Robert Święcki <robert@swiecki.net>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-22 08:44:25 -07:00
lyx
c75ca5c6d4 modify gsensor and compass drivers 2011-04-20 22:17:01 -07:00
linjh
32eef04ee2 add gyroscope driver 2011-04-20 10:12:02 +08:00
zyw
e25444f917 add a ioctl case in fb0, return current screen type 2011-04-18 15:50:19 +08:00
zyw
8e7de66d9b modify fb hdmi for default output device 2011-04-18 15:43:49 +08:00
luowei
99331f5bc0 improve mtk23d driver's compatibility 2011-04-15 10:38:05 +08:00
Oleg Nesterov
c18114efe9 exec: copy-and-paste the fixes into compat_do_execve() paths
commit 114279be21 upstream.

Note: this patch targets 2.6.37 and tries to be as simple as possible.
That is why it adds more copy-and-paste horror into fs/compat.c and
uglifies fs/exec.c, this will be cleanuped later.

compat_copy_strings() plays with bprm->vma/mm directly and thus has
two problems: it lacks the RLIMIT_STACK check and argv/envp memory
is not visible to oom killer.

Export acct_arg_size() and get_arg_page(), change compat_copy_strings()
to use get_arg_page(), change compat_do_execve() to do acct_arg_size(0)
as do_execve() does.

Add the fatal_signal_pending/cond_resched checks into compat_count() and
compat_copy_strings(), this matches the code in fs/exec.c and certainly
makes sense.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14 16:53:55 -07:00
Oleg Nesterov
d3de146b4e exec: make argv/envp memory visible to oom-killer
commit 3c77f84572 upstream.

Brad Spengler published a local memory-allocation DoS that
evades the OOM-killer (though not the virtual memory RLIMIT):
http://www.grsecurity.net/~spender/64bit_dos.c

execve()->copy_strings() can allocate a lot of memory, but
this is not visible to oom-killer, nobody can see the nascent
bprm->mm and take it into account.

With this patch get_arg_page() increments current's MM_ANONPAGES
counter every time we allocate the new page for argv/envp. When
do_execve() succeds or fails, we change this counter back.

Technically this is not 100% correct, we can't know if the new
page is swapped out and turn MM_ANONPAGES into MM_SWAPENTS, but
I don't think this really matters and everything becomes correct
once exec changes ->mm or fails.

Reported-by: Brad Spengler <spender@grsecurity.net>
Reviewed-and-discussed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14 16:53:55 -07:00
Mark Brown
2b418b5733 ASoC: Explicitly say registerless widgets have no register
commit 0ca03cd7d0 upstream.

This stops code that handles widgets generically from attempting to access
registers for these widgets.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14 16:53:26 -07:00
Krishnasamy, Somasundaram
4000177363 ses: Avoid kernel panic when lun 0 is not mapped
commit d1e12de804 upstream.

During device discovery, scsi mid layer sends INQUIRY command to LUN
0. If the LUN 0 is not mapped to host, it creates a temporary
scsi_device with LUN id 0 and sends REPORT_LUNS command to it. After
the REPORT_LUNS succeeds, it walks through the LUN table and adds each
LUN found to sysfs. At the end of REPORT_LUNS lun table scan, it will
delete the temporary scsi_device of LUN 0.

When scsi devices are added to sysfs, it calls add_dev function of all
the registered class interfaces. If ses driver has been registered,
ses_intf_add() of ses module will be called. This function calls
scsi_device_enclosure() to check the inquiry data for EncServ
bit. Since inquiry was not allocated for temporary LUN 0 scsi_device,
it will cause NULL pointer exception.

To fix the problem, sdev->inquiry is checked for NULL before reading it.

Signed-off-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com>
Signed-off-by: Babu Moger <babu.moger@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-14 16:53:20 -07:00
邱建斌
9cd1c9dd57 rk29_wm8994: spk Power Amplifier Interface Change 2011-04-11 14:36:46 +08:00
kfx
e0181c05d6 update i2c driver: read/wirte delay 2011-04-11 10:30:46 +08:00
邱建斌
10ac2d413d rk29: wm8994 pdata修改 2011-04-09 17:07:26 +08:00