Commit Graph

253798 Commits

Author SHA1 Message Date
Arve Hjønnevåg
875e2e1140 ARM: etm: Don't require clock control
If clk_get fail, assume the etb does not need a separate clock.

Change-Id: Ia0bf3f5391e94a60ea45876aa7afc8a88a7ec3bf
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:58 -07:00
Nick Pelly
bbcda3b9e1 Bluetooth: Allow SCO/eSCO packet type selection for outgoing SCO connections.
__u16 sco_pkt_type is introduced to struct sockaddr_sco. It allows bitwise
selection of SCO/eSCO packet types. Currently those bits are:

0x0001 HV1 may be used.
0x0002 HV2 may be used.
0x0004 HV3 may be used.
0x0008 EV3 may be used.
0x0010 EV4 may be used.
0x0020 EV5 may be used.
0x0040 2-EV3 may be used.
0x0080 3-EV3 may be used.
0x0100 2-EV5 may be used.
0x0200 3-EV5 may be used.

This is similar to the Packet Type parameter in the HCI Setup Synchronous
Connection Command, except that we are not reversing the logic on the EDR bits.
This makes the use of sco_pkt_tpye forward portable for the use case of
white-listing packet types, which we expect will be the primary use case.

If sco_pkt_type is zero, or userspace uses the old struct sockaddr_sco,
then the default behavior is to allow all packet types.

Packet type selection is just a request made to the Bluetooth chipset, and
it is up to the link manager on the chipset to negiotiate and decide on the
actual packet types used. Furthermore, when a SCO/eSCO connection is eventually
made there is no way for the host stack to determine which packet type was used
(however it is possible to get the link type of SCO or eSCO).

sco_pkt_type is ignored for incoming SCO connections. It is possible
to add this in the future as a parameter to the Accept Synchronous Connection
Command, however its a little trickier because the kernel does not
currently preserve sockaddr_sco data between userspace calls to accept().

The most common use for sco_pkt_type will be to white-list only SCO packets,
which can be done with the hci.h constant SCO_ESCO_MASK.

This patch is motivated by broken Bluetooth carkits such as the Motorolo
HF850 (it claims to support eSCO, but will actually reject eSCO connections
after 5 seconds) and the 2007/2008 Infiniti G35/37 (fails to route audio
if a 2-EV5 packet type is negiotiated). With this patch userspace can maintain
a list of compatible packet types to workaround remote devices such as these.

Based on a patch by Marcel Holtmann.

Rebased to 2.6.39.

Change-Id: Ide1c89574fa4f6f1b9218282e1af17051eb86315
Signed-off-by: Nick Pelly <npelly@google.com>
2011-06-14 09:09:58 -07:00
Dmitry Shmidt
5228a59441 ARM: Add 'card_present' state to mmc_platfrom_data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:58 -07:00
Colin Cross
9938b0239e net: wireless: bcm4329: Fix one more 2.6.39 compilation error
Change-Id: Ia290e056a177d0e6f84a3cf9e806307b43de5e1b
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:58 -07:00
Colin Cross
c473cbb867 net: Fix "Support nuking IPv6 sockets as well as IPv4" for 2.6.39
Change-Id: I247b8dc2e32bb83e731209928600e92892dd042c
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:58 -07:00
Colin Cross
b44b7d7ddd Recreate asm/mach/mmc.h include file
Change-Id: I9f10244b0603f7842b8504a16124d40dc4a71ed2
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:58 -07:00
Colin Cross
6e89051692 input: misc: gpio_matrix: Fix irq call for 2.6.39
Change-Id: Ib8dd0ab6554e6b0e3798bf75d41f77ea0b20b8de
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:57 -07:00
Colin Cross
999853b973 ARM: common: fiq_debugger: Fix build for 2.6.39 irq changes
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I68147c0a17f9cd1b7693826754edc55b1bb09592
2011-06-14 09:09:57 -07:00
Dmitry Shmidt
0781790c05 net: wireless: bcm4329: Fix 2.6.39 compilation
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:57 -07:00
Dmitry Shmidt
f3cf9f821b net: wireless: bcm4329: Prevent working thread to run during suspend path
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:57 -07:00
Greg Goldman
a100159b0a net: wireless: bcm4329: Clean ARP offload table on IP update
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:56 -07:00
Chia-chi Yeh
9be0c37a06 net: Reorder incoming packets in PPPoLAC and PPPoPNS.
PPP handles packet loss but does not work with out of order packets.
This change performs reordering of incoming data packets within a
sliding window of one second. Since sequence number is optional,
receiving a packet without it will drop all queued packets.

Currently the logic is triggered by incoming packets, so queued
packets have to wait till another packet is arrived. It is done for
simplicity since no additional locks or threads are required. For
reliable protocols, a retransmission will kick it. For unreliable
protocols, queued packets just seem like packet loss. Time-critical
protocols might be broken, but they never work with queueing anyway.

Signed-off-by: Chia-chi Yeh <chiachi@android.com>
2011-06-14 09:09:56 -07:00
Lorenzo Colitti
810bf5db1e net: Support nuking IPv6 sockets as well as IPv4.
On Linux, when an interface goes down all its IPv6
addresses are deleted, so relying on knowing the previous
IPv6 addresses on the interface is brittle. Instead,
support nuking all sockets that are bound to IP addresses
that are not configured and up on the system. This
behaviour is triggered by specifying the unspecified
address (:: or 0.0.0.0). If an IP address is specified, the
behaviour is unchanged, except the ioctl now supports IPv6
as well as IPv4.

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
2011-06-14 09:09:56 -07:00
Dmitry Shmidt
d31005f052 net: wireless: bcm4329: Allocate skb with GFP_KERNEL flag if possible
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:56 -07:00
Dmitry Shmidt
b2e3b46441 net: wireless: bcm4329: Disable wake irq at driver stop
Previously at driver stop interrupts were not disabled and
might cause never-ending waking up

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:55 -07:00
Mike Lockwood
43f3dc8f5c USB: gadget: f_mtp: dequeue request on error in mtp_read
In mtp_read(), if wait_event_interruptible() returns an error, we need to
remove the request from the EP queue.  Else, on the next call to mtp_read(), we
will attempt to enqueue the request again, potentially corrupting the
queue.  This is what happens with musb_gadget_queue(), which does not check for
duplicate requests.

Based on a similar change to f_adb.c

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-14 09:09:55 -07:00
Mike Lockwood
1adbbfbe99 USB: gadget: android: Fix problem switching vendor IDs
We need to update the vendor ID in the composite driver as well

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-14 09:09:55 -07:00
Greg Goldman
ae4cd3a4cf net: wireless: bcm4329: Fix disable pno call
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:55 -07:00
Dmitry Shmidt
eb4a0fc0cf net: wireless: bcm4329: Get country translation from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:54 -07:00
Dmitry Shmidt
51d4429a28 net: wireless: Add get_country_code functionality to platform
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:54 -07:00
Greg Goldman
0f3118dfc0 net: wireless: bcm4329: Update to version 4.218.248-23
- Add support to PNO with adaptive scan time
- Remove logic to generate Link Down based on Roaming Event
- Improve sco/esco detection method for BT COEX
- Add new function TXPOWER to reduce power if needed

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:54 -07:00
Mike Corrigan
05cbe0d20b net: wireless: bcm4329: Fix mem leak in wl_iw_handle_scanresults_ies
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:54 -07:00
Andrei Warkentin
98ca2b1b29 net: wireless: bcm4329: Fix memleak in dev->p
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:54 -07:00
Dmitry Shmidt
aa781dcc1a net: wireless: bcm4329: Add sdlock to firmware loading
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:54 -07:00
Benoit Goby
1b13947f3d PM: Increase dpm suspend timeout
usbhid devices have a 10s timeout waiting for the out queue to clear.
Increased the watchdog to 12s.

Change-Id: I96368fca6dff98e4eba8aedb09c23be964c8f4b4
Signed-off-by: Benoit Goby <benoit@android.com>
2011-06-14 09:09:54 -07:00
Mike Lockwood
292b96396c USB: gadget: f_mtp: Don't block in mtp_send_event
We used to wait for the previous interrupt packet to complete before sending
the next packet.  But unfortunately the previous packet will not complete
until USB is disconnected if the host is not listening on the interrupt
endpoint (which is the case with libmtp on Linux and Mac).
To avoid hanging indefinitely in this case, we now simply return -EBUSY
if the previous interrupt packet has not completed yet.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-14 09:09:53 -07:00
Mike Lockwood
aecca43f09 USB: gadget: android: Support switching vendor ID when configuration changes
Based on the list of enabled USB functions, we can now switch the vendor ID
as well as the product ID.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-14 09:09:53 -07:00
Colin Cross
6bb1acf2eb Revert "mmc: subtract boot sectors from disk size for eMMC 4.3+ devices"
This reverts commit f0b0e4bec1.

The reverted commit incorrectly calculates the size of eMMC
devices in some (all?) cases.

This revert may cause problems in cases where the bootloader was
bug-compatible and puts a GPT partition at the incorrect end of
the eMMC device.

Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:53 -07:00
Colin Cross
28e23cf73c power: wakelock: use get_xtime_and_monotonic_and_sleep_offset in get_expired_time
Change-Id: I6ebe6b954b2ff328d46898d683650dafb9c4fe74
Signed-off-by: Erik Gilling <konkers@android.com>
2011-06-14 09:09:53 -07:00
Oleg Matcovschi
e67dd1611d usb: gadget: composite: USB_GET_CONFIGURATION must return 0 in unconfigured state.
Change-Id: I5212ca9990308d0c4ae6a55c60cba42d6b0e4fee
Signed-off-by: Oleg Matcovschi <olegmatcovsky@gmail.com>
2011-06-14 09:09:52 -07:00
Iliyan Malchev
7d5250301d USB: gadget: f_adb: dequeue request on error in adb_read
In adb_read(), if wait_event_interruptible() returns an error, we need to
remove the request from the EP queue.  Else, on the next call to adb_read(), we
will attempt to enqueue the request again, potentially corrupting the
queue.  This is what happens with musb_gadget_queue(), which does not check for
duplicate requests.

Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-06-14 09:09:52 -07:00
Mike Lockwood
090cbc41c9 USB: gadget: f_mtp: Fix problems transferring files from device to host
Exit from send_file_work immediately when a cancel request is received.

Only busy status if there is a cancel pending that has not been repoorted to userspace.
This avoids a race condition that can occur when mtp_read resets the state
to STATE_BUSY before we report status OK back to the host.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-14 09:09:52 -07:00
Vikram Pandita
8abaec8e78 USB: gadget: composite: fix compile issues
In file included from drivers/usb/gadget/ether.c:114:
drivers/usb/gadget/composite.c: In function 'usb_composite_force_reset':
drivers/usb/gadget/composite.c:121: error: implicit declaration of function 'msleep'
drivers/usb/gadget/composite.c: In function 'usb_add_function':
drivers/usb/gadget/composite.c:158: error: implicit declaration of function 'MKDEV'

Signed-off-by: Vikram Pandita <vikram.pandita@ti.com>
2011-06-14 09:09:52 -07:00
Brian Swetland
ec3e26868a block: genhd: Add partition name to the partition info uevent callback
For disk and partition devices, add new uevent parameter:
PARTNAME specifices the partition name of a partition device

Signed-off-by: Dima Zavin <dima@android.com>
2011-06-14 09:09:51 -07:00
Colin Cross
082fec5ea3 ARM: vfp: Move exception address fixup into vfphw.S
If the PC on the stack is updated in entry-armv.S,
do_undefinstr can get called after the fixup.  do_undefinstr
does its own fixup, and doing both causes the PC to point to
half way through an instruction.

Instead, do the fixup in do_vfp, where only the vfp code
can get called.

Change-Id: I6d966887adc8ed58d88bfe0cb3c0ba29213be488
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:51 -07:00
Colin Cross
d20e6ae8ac cpufreq: Prevent memory leak in cpufreq_stats on hotplug
Ensures that cpufreq_stats_free_table is called before
__cpufreq_remove_dev on cpu hotplug (which also occurs during
suspend on SMP systems) to make sure that sysfs_remove_group
can get called before the cpufreq kobj is freed.  Otherwise,
the sysfs file structures are leaked.

Change-Id: I87e55277272f5cfad47e9e7c92630e990bb90069
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:51 -07:00
Benoit Goby
8e42bee3ab PM: Change dpm watchdog to support async suspend
Exclude from the watchdog the time spent waiting for children that
are resumed asynchronously and time every devices, whether or not they
resumed synchronously.

Change-Id: I84209dfd5df72842e045096c906fd61e20e6d183
Signed-off-by: Benoit Goby <benoit@android.com>
2011-06-14 09:09:50 -07:00
Todd Poynor
1613ecd0e1 Print pending wakeup IRQ preventing suspend to dmesg
Change-Id: I36f90735c75fb7c7ab1084775ec0d0ab02336e6e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-06-14 09:09:50 -07:00
Colin Cross
f780a1f78f input: keyreset: Only print message for default handler
Change-Id: I68e5451fef2e6f08bf1035077ea999e34a619f87
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:50 -07:00
Benoit Goby
34dcf173c5 PM: Dump suspend thread stack on dpm suspend timeout
When a driver takes more than 3 seconds to suspend, dump the suspend
thread stack since BUG() might only dump the idle thread stack.

Change-Id: If854db355fdcf3b773ea20b1b5e031def6d4b114
Signed-off-by: Benoit Goby <benoit@android.com>
2011-06-14 09:09:50 -07:00
Benoit Goby
0ee5695f24 input: evdev: Add missing wake_lock_destroy
Change-Id: Ief1ef44d98a197e5b457f5e8617c413e76e3c6d2
Signed-off-by: Benoit Goby <benoit@android.com>
2011-06-14 09:09:49 -07:00
Colin Cross
eb1af91a7d ARM: Fix up vfp exception location in thumb mode
The exception handler in entry-armv.S checks for thumb mode and
correctly determines the exception location and instruction,
but VFP_bounce uses the uncorrected location off the stack.
If the VFP exception occured in Thumb mode, fix up the
exception location on the stack to match the value that would
be returned in ARM mode.

Fixes segfaults in userspace applications running in Thumb mode
caused by a handled VFP exception returning to the middle of the
instruction that triggered the exception.

Change-Id: I02be4c5b546561d9a967a02c1e9eb1de876cff07
Original-author: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:49 -07:00
Mike Lockwood
50fe49af85 USB: gadget: f_mtp: Make sure request is dequeued if transfer is canceled
If the host cancels a file transfer while we have a read request pending,
call usb_ep_dequeue to cancel the read.
Also return -ECANCELED from mtp_ioctl if we are canceled in MTP_RECEIVE_FILE

Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-06-14 09:09:49 -07:00
Dmitry Shmidt
fac435cf49 net: wireless: bcm4329: Turn off CONFIG_US_NON_DFS_CHANNELS_ONLY
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:48 -07:00
Dmitry Shmidt
af53f0d37a net: wireless: bcm4329: Update to version 4.218.248-20
- Use US/69 locale for US
- Remove dhdsdio_mem_dump() function

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2011-06-14 09:09:48 -07:00
Arve Hjønnevåg
2cd24680f6 rtc: alarm: Update hrtimer if alarm at the head of the queue is reprogrammed
If an alarm was restarted with a value that moved it away from the head
of a queue, the hrtimer would not be updated. This would cause unnecessary
wakeups.

Change-Id: If379f8dd92b0bdb3173bd8d057adfe0dc1d15259
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:45 -07:00
Colin Cross
677ef29f71 input: keyreset: Allow reset function to be overriden
Change-Id: Ibb3dda05772b2e89d7b2646689944d309cb1f74e
Signed-off-by: Colin Cross <ccross@android.com>
2011-06-14 09:09:44 -07:00
Todd Poynor
9b6f4a382d cpufreq interactive governor: fix crash on CPU shutdown
Don't reference the saved copy of the CPU's cpufreq policy
pointer after the governor has been stopped for the CPU.

When the governor is stopped for a CPU:

* Use del_timer_sync() to wait for a currently-running timer
function to stop.

* Delete the timer when the governor is stopped for the
associated CPU, not when the last CPU is stopped.

* Flush any speed down work ongoing.

* Reset the timestamp that is used to tell if the timer function
has had a chance to run since last idle exit.

Check the governor enabled flag for the CPU before re-arming the
timer from within the timer function and at idle exit (in case
stopping the governor at runtime).

Check the governor enabled flag for the CPU in the worker
function and thread before using the policy pointer.  (There is
still a tiny window in the thread that needs more work to close.)

Change-Id: Ifaddf7a495a8dae15a579a57bdc654f7c47f6ada
Signed-off-by: Todd Poynor <toddpoynor@google.com>
2011-06-14 09:09:41 -07:00
Arve Hjønnevåg
320faa1750 staging: android: lowmemorykiller: Ignore shmem pages in page-cache
Change-Id: Ia54fc50b7dcabfeb71eb487c652803f83e2f3d8e
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:40 -07:00
Arve Hjønnevåg
280e506943 staging: android: lowmemorykiller: Don't wait more than one second for a process to die
If a process forked and the child process was killed by the
lowmemorykiller, the lowmemory killer would be disabled until
the parent process reaped the child or it died itself.

Change-Id: I709b1a4e1b1a1970e51d26a39fcbee57977bbc7f
Signed-off-by: Arve Hjønnevåg <arve@android.com>
2011-06-14 09:09:40 -07:00