OSDN Git Service
Corentin Chary [Fri, 9 Oct 2009 14:49:07 +0000 (16:49 +0200)]
Bluetooth: Add native RFKILL soft-switch support for all devices
With the re-write of the RFKILL subsystem it is now possible to easily
integrate RFKILL soft-switch support into the Bluetooth subsystem. All
Bluetooth devices will now get automatically RFKILL support.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Marcel Holtmann [Sun, 14 Jun 2009 13:21:25 +0000 (15:21 +0200)]
Bluetooth: Fix Kconfig issue with RFKILL integration
Since the re-write of the RFKILL subsystem it is no longer good to just
select RFKILL, but it is important to add a proper depends on rule.
Based on a report by Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Chih-Wei Huang [Tue, 6 Oct 2009 09:22:40 +0000 (17:22 +0800)]
android-x86: defconfig updates, enable bluetooth drivers
Enable more bluetooth device drivers.
Chih-Wei Huang [Mon, 17 Aug 2009 12:17:39 +0000 (20:17 +0800)]
enable most drivers for auto detection
Yi Sun [Thu, 30 Jul 2009 20:59:31 +0000 (13:59 -0700)]
move firmware to /system/lib/firmware directory
Chih-Wei Huang [Fri, 24 Jul 2009 10:10:42 +0000 (18:10 +0800)]
add skge, sky2 drivers
Chih-Wei Huang [Wed, 22 Jul 2009 10:59:50 +0000 (18:59 +0800)]
enable uvesafb
Yi Sun [Tue, 21 Jul 2009 05:00:47 +0000 (22:00 -0700)]
disable synaptic touchpad by default. It simulates a tochscreen and we can not support it.
Disable it will trigger the system to use generic touchpad driver
Chih-Wei Huang [Sat, 18 Jul 2009 17:23:35 +0000 (01:23 +0800)]
add more drivers for vm
Chih-Wei Huang [Thu, 16 Jul 2009 06:43:09 +0000 (14:43 +0800)]
add audio support for Eee PC 1004, 1005HA
Chih-Wei Huang [Thu, 16 Jul 2009 02:05:22 +0000 (10:05 +0800)]
add audio support for Eee PC 900
Chih-Wei Huang [Tue, 14 Jul 2009 08:45:40 +0000 (16:45 +0800)]
add sata ahci support
Chih-Wei Huang [Thu, 9 Jul 2009 09:48:41 +0000 (17:48 +0800)]
add defconfig for android-x86
Chih-Wei Huang [Wed, 8 Jul 2009 11:16:41 +0000 (19:16 +0800)]
add DRM_I915_COLOR_DEPTH to customize i915 color depth
Chih-Wei Huang [Thu, 2 Jul 2009 08:59:56 +0000 (16:59 +0800)]
fix S3 suspend and resume - by Yi
Chih-Wei Huang [Tue, 30 Jun 2009 09:18:55 +0000 (17:18 +0800)]
fix compile error on x86
David Ding [Fri, 9 Oct 2009 13:38:10 +0000 (06:38 -0700)]
mmc: block: Resume multi-block reads after transient read errors.
Signed-off-by: Bentao Zou <bzou1@motorola.com>
Signed-off-by: David Ding <david.j.ding@motorola.com>
Signed-off-by: San Mehat <san@google.com>
Robert Love [Thu, 8 Oct 2009 19:06:22 +0000 (15:06 -0400)]
net: ipv4: Fix race in tcp_v4_nuke_addr().
To fix a recursive deadlock in 2.6.29, we stopped holding the hash table lock
across tcp_done() calls. This fixed the deadlock, but introduced a race where
the socket could die or change state.
Fix: Before unlocking the hash table, we grab a reference to the socket. We
can then unlock the hash table without risk of the socket going away. We then
lock the socket, which is safe because it is pinned. We can then call
tcp_done() without recursive deadlock and without race. Upon return, we unlock
the socket and then unpin it, killing it.
Change-Id: Idcdae072b48238b01bdbc8823b60310f1976e045
Signed-off-by: Robert Love <rlove@google.com>
Acked-by: Dima Zavin <dima@android.com>
Tom Zhu [Sat, 3 Oct 2009 23:50:04 +0000 (18:50 -0500)]
mtd: nand_base: fix nand_panic_wait
fix the problem of nand_panic_wait
Signed-off-by: Tom Zhu <a2289c@android-hal-04.(none)>
Signed-off-by: San Mehat <san@google.com>
Andrei Emeltchenko [Thu, 3 Sep 2009 09:34:19 +0000 (12:34 +0300)]
Bluetooth: Set general bonding security for ACL by default
This patch fixes double pairing issues with SSP.
It was observed that when pairing with SSP bluez asks confirmation
2 times.
http://www.spinics.net/lists/linux-bluetooth/msg02473.html
This also causes bug when we initiate SSP connection from Vista.
The reason is because bluetoothd does not store link keys since
ioctl HCIGETAUTHINFO returns 0. Setting default general
bonding fixes these issues.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko.news@gmail.com>
San Mehat [Sat, 3 Oct 2009 19:24:54 +0000 (12:24 -0700)]
[ARM] process: Use uber-safe probe_kernel_address() to read mem when dumping.
This prevents the dump from taking pagefaults / external aborts.
Signed-off-by: San Mehat <san@google.com>
Jocelyn Falempe [Tue, 22 Sep 2009 12:27:24 +0000 (14:27 +0200)]
cpufreq: ondemand: Don't synchronize sample rate unless mulitple cpus present
For UP systems this is not required, and results in a more consistent
sample interval.
Signed-off-by: Jocelyn Falempe <jocelyn.falempe@motorola.com>
Signed-off-by: Mike Chan <mike@android.com>
Tom Zhu [Thu, 24 Sep 2009 15:58:50 +0000 (10:58 -0500)]
misc: apanic: erase kpanic when no data
erase kpanic partition when there is no data(console and thread)
Signed-off-by: Tom Zhu <a2289c@android-hal-04.(none)>
Signed-off-by: San Mehat <san@google.com>
Marcel Holtmann [Tue, 28 Apr 2009 16:04:55 +0000 (09:04 -0700)]
Bluetooth: Fix connection establishment with low security requirement
The Bluetooth 2.1 specification introduced four different security modes
that can be mapped using Legacy Pairing and Simple Pairing. With the
usage of Simple Pairing it is required that all connections (except
the ones for SDP) are encrypted. So even the low security requirement
mandates an encrypted connection when using Simple Pairing. When using
Legacy Pairing (for Bluetooth 2.0 devices and older) this is not required
since it causes interoperability issues.
To support this properly the low security requirement translates into
different host controller transactions depending if Simple Pairing is
supported or not. However in case of Simple Pairing the command to
switch on encryption after a successful authentication is not triggered
for the low security mode. This patch fixes this and actually makes
the logic to differentiate between Simple Pairing and Legacy Pairing
a lot simpler.
Based on a report by Ville Tervo <ville.tervo@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Tom Zhu [Tue, 22 Sep 2009 21:36:45 +0000 (16:36 -0500)]
misc: apanic: Improved bad-block / watchdog handling
1. handle cases that there is no more good blocks
2. touch softlockup watchdog at the start of apanic
3. change unsigned char get_bb() to unsigned int get_bb()
4. return idx instead of rc2, to keep the previous written pages.
Signed-off-by: Tom Zhu <ling.zhu@motorola.com>
Signed-off-by: San Mehat <san@google.com>
Nick Pelly [Tue, 22 Sep 2009 22:19:46 +0000 (15:19 -0700)]
Bluetooth: Fallback to SCO on error code 0x10 (Connection Accept Timeout).
This is to support the Motorola HF850 carkit which reports the error code 0x10
for an eSCO attempt, even though it advertises eSCO support. Here is the
hcidump:
2009-09-22 15:40:24.492391 < HCI Command: Setup Synchronous Connection
(0x01|0x0028) plen 17
handle 1 voice setting 0x0060
2009-09-22 15:40:24.493002 > HCI Event: Command Status (0x0f) plen 4
Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
2009-09-22 15:40:30.594869 > HCI Event: Synchronous Connect Complete (0x2c)
plen 17
status 0x10 handle 257 bdaddr 00:50:CD:20:C6:84 type eSCO
Error: Connection Accept Timeout Exceeded
With this patch we will retry with a SCO connection, which succeeds.
Unfortunately the Moto HF850 also takes 5 seconds to return the error for the
eSCO attempt, so it will still take 5 seconds to fallback to SCO with this
patch.
Signed-off-by: Nick Pelly <npelly@google.com>
Nick Pelly [Tue, 22 Sep 2009 01:20:03 +0000 (18:20 -0700)]
Bluetooth: Do not call rfcomm_session_put() due to RFCOMM UA on closed socket.
Processing a RFCOMM UA frame when the socket is closed and we were not the
RFCOMM initiator would cause rfcomm_session_put() to be called twice during
rfcomm_process_rx(). This would cause a kernel panic in rfcomm_session_close.
This could be easily reproduced during disconnect with devices such as
Motorola H270 that send RFCOMM UA followed quickly by L2CAP disconnect request.
This hcidump for this looks like:
2009-09-21 17:22:37.788895 < ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): DISC: cr 0 dlci 20 pf 1 ilen 0 fcs 0x7d
2009-09-21 17:22:37.906204 > HCI Event: Number of Completed Packets (0x13)
plen 5
handle 1 packets 1
2009-09-21 17:22:37.933090 > ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 0 dlci 20 pf 1 ilen 0 fcs 0x57
2009-09-21 17:22:38.636764 < ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c
2009-09-21 17:22:38.744125 > HCI Event: Number of Completed Packets (0x13)
plen 5
handle 1 packets 1
2009-09-21 17:22:38.763687 > ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 0 dlci 0 pf 1 ilen 0 fcs 0xb6
2009-09-21 17:22:38.783554 > ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0041
Avoid calling rfcomm_session_put() twice by skipping this call
in rfcomm_recv_ua() if the socket is closed.
Signed-off-by: Nick Pelly <npelly@google.com>
Nick Pelly [Tue, 22 Sep 2009 00:52:19 +0000 (17:52 -0700)]
Revert "Bluetooth: Fix kernel panic while disconnecting RFCOMM"
This reverts commit
6f505dbe5337e49302574f8d2e65fd83e30f9117.
Unfortunately this fix did not address the unbalanced rfcomm_session_put()
call, and panics during this disconnect sequence (with Moto H270)
2009-09-21 17:22:37.384811 < ACL data: handle 1 flags 0x02 dlen 22
L2CAP(d): cid 0x0041 len 18 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 20 pf 0 ilen 14 fcs 0xeb
0000: 0d 0a 2b 43 49 45 56 3a 20 37 2c 33 0d 0a ..+CIEV: 7,3..
2009-09-21 17:22:37.502273 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 1 packets 1
2009-09-21 17:22:37.788895 < ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): DISC: cr 0 dlci 20 pf 1 ilen 0 fcs 0x7d
2009-09-21 17:22:37.906204 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 1 packets 1
2009-09-21 17:22:37.933090 > ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 0 dlci 20 pf 1 ilen 0 fcs 0x57
2009-09-21 17:22:38.636764 < ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 3]
RFCOMM(s): DISC: cr 0 dlci 0 pf 1 ilen 0 fcs 0x9c
2009-09-21 17:22:38.744125 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 1 packets 1
2009-09-21 17:22:38.763687 > ACL data: handle 1 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 0 dlci 0 pf 1 ilen 0 fcs 0xb6
2009-09-21 17:22:38.783554 > ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0041
2009-09-21 17:22:39.029526 < ACL data: handle 1 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0041
2009-09-21 17:22:39.136581 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 1 packets 1
2009-09-21 17:22:41.337203 > HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 1 reason 0x13
Reason: Remote User Terminated Connection
Signed-off-by: Nick Pelly <npelly@google.com>
Tom Zhu [Mon, 21 Sep 2009 21:36:05 +0000 (16:36 -0500)]
misc: apanic: bad block handling
Add bad block handling in apanic
Signed-off-by: Tom Zhu <ling.zhu@motorola.com>
Signed-off-by: San Mehat <san@google.com>
Nick Pelly [Sat, 19 Sep 2009 01:29:23 +0000 (18:29 -0700)]
Bluetooth: Increase timeout for legacy pairing from 10 seconds to 40 seconds.
Legacy pairing is a bit of a problem because on the incoming end it is
impossible to know pairing has begun:
2009-09-18 18:29:24.115692 > HCI Event: Connect Request (0x04) plen 10
bdaddr 00:23:D4:04:51:7A class 0x58020c type ACL
2009-09-18 18:29:24.115966 < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 00:23:D4:04:51:7A role 0x00
Role: Master
2009-09-18 18:29:24.117065 > HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
2009-09-18 18:29:24.282928 > HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr 00:23:D4:04:51:7A role 0x00
Role: Master
2009-09-18 18:29:24.291534 > HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 1 bdaddr 00:23:D4:04:51:7A type ACL encrypt 0x00
2009-09-18 18:29:24.291839 < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 1
2009-09-18 18:29:24.292144 > HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
bdaddr 00:23:D4:04:51:7A mode 1
2009-09-18 18:29:24.293823 > HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
2009-09-18 18:29:24.303588 > HCI Event: Max Slots Change (0x1b) plen 3
handle 1 slots 5
2009-09-18 18:29:24.309448 > HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 1
Features: 0xff 0xff 0x2d 0xfe 0x9b 0xff 0x79 0x83
2009-09-18 18:29:24.345916 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 00:23:D4:04:51:7A mode 2 clkoffset 0x0000
2009-09-18 18:29:24.346923 > HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
2009-09-18 18:29:24.375793 > HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 00:23:D4:04:51:7A name 'test'
2009-09-18 18:29:34.332190 < HCI Command: Disconnect (0x01|0x0006) plen 3
handle 1 reason 0x13
There are some mainline patches such as "Add different pairing timeout for
Legacy Pairing" but they do not address the HCI sequence above.
I think the real solution is to avoid using CreateBond(), and instead make
the profile connection immediately. This way both sides will use a longer
timeout because there is a higher level connection in progress, and we will
not end up with the useless HCI sequence above.
Signed-off-by: Nick Pelly <npelly@google.com>
Roger Quadros [Thu, 23 Apr 2009 11:50:54 +0000 (14:50 +0300)]
Bluetooth: Ensure that HCI sysfs add/del is preempt safe
Use a different work_struct variables for add_conn() and del_conn() and
use single work queue instead of two for adding and deleting connections.
It eliminates the following error on a preemptible kernel:
[ 204.358032] Unable to handle kernel NULL pointer dereference at virtual address
0000000c
[ 204.370697] pgd =
c0004000
[ 204.373443] [
0000000c] *pgd=
00000000
[ 204.378601] Internal error: Oops: 17 [#1] PREEMPT
[ 204.383361] Modules linked in: vfat fat rfcomm sco l2cap sd_mod scsi_mod iphb pvr2d drm omaplfb ps
[ 204.438537] CPU: 0 Not tainted (2.6.28-maemo2 #1)
[ 204.443664] PC is at klist_put+0x2c/0xb4
[ 204.447601] LR is at klist_put+0x18/0xb4
[ 204.451568] pc : [<
c0270f08>] lr : [<
c0270ef4>] psr:
a0000113
[ 204.451568] sp :
cf1b3f10 ip :
cf1b3f10 fp :
cf1b3f2c
[ 204.463104] r10:
00000000 r9 :
00000000 r8 :
bf08029c
[ 204.468353] r7 :
c7869200 r6 :
cfbe2690 r5 :
c78692c8 r4 :
00000001
[ 204.474945] r3 :
00000001 r2 :
cf1b2000 r1 :
00000001 r0 :
00000000
[ 204.481506] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 204.488861] Control:
10c5387d Table:
887fc018 DAC:
00000017
[ 204.494628] Process btdelconn (pid: 515, stack limit = 0xcf1b22e0)
Signed-off-by: Roger Quadros <ext-roger.quadros@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Arve Hjønnevåg [Thu, 17 Sep 2009 21:52:42 +0000 (14:52 -0700)]
yaffs: Don't update page read and write counts from yaffs_mtdif2.
These counters are now updated from yaffs_nand.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Fri, 18 Sep 2009 19:47:26 +0000 (12:47 -0700)]
Merge branch 'yaffs' into android-2.6.29
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Thu, 17 Sep 2009 01:33:46 +0000 (18:33 -0700)]
Revert "yaffs: Fix yaffs_file_write to not return -ENOSPC when there is nothing to write"
This reverts commit
37db7a3d4d75ce64b621484563d852a0813737e1.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
San Mehat [Thu, 17 Sep 2009 21:27:41 +0000 (14:27 -0700)]
ramconsole/apanic: Ensure ramconsole does not get cluttered by apanic threads
Signed-off-by: San Mehat <san@google.com>
San Mehat [Thu, 17 Sep 2009 21:18:39 +0000 (14:18 -0700)]
Revert "apanic: Send magic sequence to suspend ramconsole before we start dumping threads"
This reverts commit
5dc3d578c42e291781ea7f7529483253aa4283c9.
Signed-off-by: San Mehat <san@google.com>
San Mehat [Thu, 17 Sep 2009 21:18:20 +0000 (14:18 -0700)]
Revert "ramconsole: Disable console capture upon receiving a magic sequence"
This reverts commit
70416fa2dd0095639fd9213b6d923ad442d87ec9.
Signed-off-by: San Mehat <san@google.com>
San Mehat [Thu, 17 Sep 2009 21:13:32 +0000 (14:13 -0700)]
apanic: Fix a few cases of calling non-atomic things from atomic
We need to pay special care to not enrage cond_resched(), and the
base nand bb stuff calls schedule() so thats out.
Signed-off-by: San Mehat <san@google.com>
Arve Hjønnevåg [Thu, 17 Sep 2009 01:30:41 +0000 (18:30 -0700)]
yaffs: Import yaffs from Wed Sep 9 03:03:01 2009 +0000
Author: charles <charles>
Date: Wed Sep 9 03:03:01 2009 +0000
Rationalise stats gathering for nand access. Does not instrument mounting.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Lan Zhu [Thu, 17 Sep 2009 01:07:25 +0000 (18:07 -0700)]
Bluetooth: Fix kernel panic while disconnecting RFCOMM
rfcomm_session_del() was being called after session entry removed from list.
Signed-off-by: Nick Pelly <npelly@google.com>
San Mehat [Wed, 16 Sep 2009 19:39:10 +0000 (12:39 -0700)]
proc: smaps: Allow smaps access for CAP_SYS_RESOURCE
Signed-off-by: San Mehat <san@google.com>
San Mehat [Mon, 14 Sep 2009 21:53:56 +0000 (14:53 -0700)]
apanic: Send magic sequence to suspend ramconsole before we start dumping threads
Signed-off-by: San Mehat <san@google.com>
San Mehat [Mon, 14 Sep 2009 21:53:37 +0000 (14:53 -0700)]
ramconsole: Disable console capture upon receiving a magic sequence
Signed-off-by: San Mehat <san@google.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Arve Hjønnevåg [Wed, 15 Jul 2009 03:51:49 +0000 (20:51 -0700)]
Input: synaptics_i2c_rmi: Add sensitivity adjust option.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Thu, 9 Jul 2009 04:32:06 +0000 (21:32 -0700)]
Input: synaptics_i2c_rmi: Add support for panels with has-no-relative-data property.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Sat, 18 Apr 2009 01:25:55 +0000 (18:25 -0700)]
Input: synaptics_i2c_rmi: disable_irq -> disable_irq_nosync
Also remove duplicate swap macro
Signed-off-by: Arve Hjønnevåg <arve@android.com>