Mike Lockwood [Wed, 2 Feb 2011 16:52:56 +0000 (11:52 -0500)]
USB: gadget: f_accessory: New gadget driver for android USB accesories
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Misc improvements and cleanup:
- Add URI string
- Replace type string with a description string
- Add a control call to retrieve accessory protocol version (currently 1)
- Driver read() and write() calls now fail after USB disconnect until
driver file is closed and reopened.
- Misc cleanup work
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Clear accessory strings when USB is disconnected
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Clear previous strings on ACCESSORY_GET_PROTOCOL
Clearing strings on disconnect does not work since we may receive
a disconnect on some devices when transitioning into accessory mode.
We require an accessory to send ACCESSORY_GET_PROTOCOL before
sending any strings, so any strings from a previous session will be cleared.
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Clear disconnected flag when driver file is opened
Fixes a race condition that can occur when entering accessory mode.
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Add string for accessory's unique serial number
Signed-off-by: Mike Lockwood <lockwood@android.com>
USB: gadget: f_accessory: Set bNumEndpoints to correct value of 2
Change-Id: I24f4e36f196d45436e0573301500c3b93215953d
Signed-off-by: Mike Lockwood <lockwood@android.com>
Howard M. Harte [Thu, 16 Jun 2011 01:52:15 +0000 (18:52 -0700)]
net: wireless: bcmdhd: Combined patch from 4.218.248-31
bcmdhd: Allocate skb with GFP_KERNEL flag if possible: fix for older kernels.
bcmdhd: Fix race conditions for sysioc_thread
* Fix up formatting and #ifdefs.
net: wireless: bcmdhd: Fix get_customized_country_code() for older kernels.
net: wireless: bcmdhd: Move PNO function prototypes to dhd.h.
Add private command support.
net: wireless: bcmdhd: Set proper read barrier
net: wireless: bcmdhd: Fix memory leak in case of dhd_bus_init() failure
net: wireless: bcmdhd: Fix wake_lock symmetry
net: wireless: bcmdhd: Ignore error if scan results are empty
net: wireless: bcmdhd: Add sdlock to firmware loading
net: wireless: bcmdhd: Fix watchdog syncronization during start/stop
net: wireless: bcmdhd: Fix Makefile to allow WEXT compilation
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Todd Poynor [Tue, 7 Jun 2011 01:30:23 +0000 (18:30 -0700)]
cpufreq interactive: support shared CPU scaling
Change-Id: Id5267f04067bf023f6b140b4de2e88ef7287e941
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Stephen Warren [Sat, 11 Jun 2011 03:15:21 +0000 (20:15 -0700)]
ASoC: core: Don't schedule deferred_resume_work twice
For cards that have two or more DAIs, snd_soc_resume's loop over all
DAIs ends up calling schedule_work(deferred_resume_work) once per DAI.
Since this is the same work item each time, the 2nd and subsequent
calls return 0 (work item already queued), and trigger the dev_err
message below stating that a work item may have been lost.
Solve this by adjusting the loop to simply calculate whether to run the
resume work immediately or defer it, and then call schedule work (or not)
one time based on that.
Note: This has not been tested in mainline, but only in chromeos-2.6.38;
mainline doesn't support suspend/resume on Tegra, nor does the mainline
Tegra ASoC driver contain multiple DAIs. It has been compile-checked in
mainline.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Change-Id: I9c29b6c310a94108d81ab6506eb64ee9f30d846a
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Dmitry Shmidt [Wed, 15 Jun 2011 22:20:55 +0000 (15:20 -0700)]
net: wireless: bcmdhd: Fix getting Mac address from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 14 Jun 2011 00:33:26 +0000 (17:33 -0700)]
net: wireless: bcmdhd: Fix race conditions for sysioc_thread
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 23:49:08 +0000 (16:49 -0700)]
net: wireless: bcmdhd: Reduce listen interval to 10 (from 20)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 23:47:58 +0000 (16:47 -0700)]
net: wireless: bcmdhd: Prevent working thread to run during suspend path
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 23:42:13 +0000 (16:42 -0700)]
net: wireless: bcmdhd: Allocate skb with GFP_KERNEL flag if possible
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 23:28:59 +0000 (16:28 -0700)]
net: wireless: bcmdhd: Fix memleak in dev->p
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 23:03:21 +0000 (16:03 -0700)]
net: wireless: bcmdhd: Fix scan timeout for abg case
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Colin Cross [Tue, 14 Jun 2011 18:36:39 +0000 (11:36 -0700)]
HACK: time: Disable alarmtimer
kernel/time/alarmtimer.c conflicts with drivers/rtc/alarm.c,
disable it for now.
Change-Id: I6cdb3b885828d45836a54971adf16143039b0a0e
Signed-off-by: Colin Cross <ccross@android.com>
Jeff Brown [Fri, 18 Mar 2011 23:02:26 +0000 (16:02 -0700)]
input: gpio_input: send input_sync after reporting keys
Signed-off-by: jeffbrown@android.com
Change-Id: Ie170960df3c8ab4833ed686135dc8575cb9f2d48
Jeff Brown [Fri, 18 Mar 2011 21:10:23 +0000 (14:10 -0700)]
input: gpio_matrix: send input_sync after reporting keys
Signed-off-by: jeffbrown@android.com
Change-Id: I9bd2437503b48bf37f4d93505ccd2806e4aab977
Dmitry Shmidt [Mon, 13 Jun 2011 22:16:59 +0000 (15:16 -0700)]
net: wireless: bcmdhd: Prevent using WEXT in case of CFG80211
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 22:14:15 +0000 (15:14 -0700)]
net: wireless: bcmdhd: Add missing dhd_get_dtim_skip() declaration
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 20:37:52 +0000 (13:37 -0700)]
net: wireless: bcmdhd: Get rid of ANDROID define
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 18:11:43 +0000 (11:11 -0700)]
net: wireless: bcmdhd: Add setting country code from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 17:15:12 +0000 (10:15 -0700)]
net: wireless: bcmdhd: Fix SOFTAP compilation
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 17:07:57 +0000 (10:07 -0700)]
net: wireless: bcmdhd: Get MAC from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Mon, 13 Jun 2011 16:59:51 +0000 (09:59 -0700)]
net: wireless: bcmdhd: Fix ANDROID define, clean obsolete code
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Howard M. Harte [Sat, 11 Jun 2011 00:20:12 +0000 (17:20 -0700)]
Update to 5.90.125.27 release.
Change-Id: I593f4a90671468b486e5f39b9eeff8ae65ac9431
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
mhban [Wed, 8 Jun 2011 09:13:15 +0000 (09:13 +0000)]
printk: do not handle non-sleepable notification in console_cpu_notify
- CPU_DYING should not be handled in sleepable context
Signed-off-by: Minho Ban <mhban@samsung.com>
Dmitry Shmidt [Wed, 8 Jun 2011 22:16:52 +0000 (15:16 -0700)]
net: wireless: Add CONFIG_WIFI_CONTROL_FUNC option
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 8 Jun 2011 22:15:31 +0000 (15:15 -0700)]
net: wireless: bcmdhd: Switch to CUSTOMER_HW2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 8 Jun 2011 22:14:25 +0000 (15:14 -0700)]
net: wireless: bcmdhd: Remove obsolete debug messages
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 8 Jun 2011 22:13:38 +0000 (15:13 -0700)]
net: wireless: bcmdhd: Allow error debug prints from the beginning
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry ORNATSKYY [Wed, 18 May 2011 20:58:44 +0000 (13:58 -0700)]
net: wireless: bcm4329: Update example locale table
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry ORNATSKYY [Wed, 11 May 2011 16:44:21 +0000 (09:44 -0700)]
net: wireless: bcm4329: Reduce listen interval to 10 (from 20)
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 10 May 2011 23:29:51 +0000 (16:29 -0700)]
net: wireless: bcm4329: Add new and default wifi locale support
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Thu, 2 Jun 2011 23:08:37 +0000 (16:08 -0700)]
net: wireless: bcmdhd: Fix watchdog firing in softirq on removal
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 1 Jun 2011 23:22:21 +0000 (16:22 -0700)]
net: wireless: bcmdhd: Allow WEXT support
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 1 Jun 2011 23:20:54 +0000 (16:20 -0700)]
net: wireless: bcmdhd: Fix params in wl_cfg80211_event call
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 1 Jun 2011 22:22:10 +0000 (15:22 -0700)]
net: wireless: bcmdhd: Add spinlock initialization
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 1 Jun 2011 22:17:48 +0000 (15:17 -0700)]
net: wireless: bcmdhd: Fix config FW and NVRAM path
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Howard M. Harte [Fri, 27 May 2011 23:07:36 +0000 (16:07 -0700)]
Update to 5.90.125.22:
* Add support for SoftAP, keepalive, ARP offload.
* Clean up cfg80211 and p2p code.
* Update Makefile to support new features.
Change-Id: I1e7a16acd400d7baf5625ca8ba6552a6f1c80661
Signed-off-by: Howard M. Harte <hharte@broadcom.com>
Dmitry Shmidt [Tue, 24 May 2011 18:14:33 +0000 (11:14 -0700)]
net: wireless: bcmdhd: Initial version based on 5.90.125.14
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Arve Hjønnevåg [Thu, 24 Feb 2011 00:51:58 +0000 (16:51 -0800)]
ARM: etm: Power down etm(s) when tracing is not enabled
Without this change a saw an 18% increase in idle power consumption
on one deivce when trace support is compiled into the kernel. Now
I see the same increase only when tracing.
Change-Id: I21bb5ecf1b7d29ce3790ceeb5323409cc22d5a3b
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Sat, 5 Feb 2011 06:38:14 +0000 (22:38 -0800)]
ARM: etm: Support multiple ETMs/PTMs.
If more than one ETM or PTM are present, configure all of them
and enable the formatter in the ETB. This allows tracing on dual
core systems (e.g. omap4).
Change-Id: I028657d5cf2bee1b23f193d4387b607953b35888
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Sat, 5 Feb 2011 06:38:14 +0000 (22:38 -0800)]
ARM: etm: Return the entire trace buffer if it is empty after reset
On some SOCs the read and write pointer are reset when the chip
resets, but the trace buffer content is preserved. If the status
bits indicates that the buffer is empty and we have never started
tracing, assume the buffer is full instead. This can be useful
if the system rebooted from a watchdog reset.
Change-Id: Iaf21c2c329c6059004ee1d38e3dfff66d7d28029
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Tue, 15 Feb 2011 05:09:51 +0000 (21:09 -0800)]
ARM: etm: Add some missing locks and error checks
It is not safe to call etm_lock or etb_lock without holding the
mutex since another thread may also have unlocked the registers.
Also add some missing checks for valid etb_regs in the etm sysfs
entries.
Change-Id: I939f76a6ea7546a8fc0d4ddafa2fd2b6f38103bb
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Tue, 1 Feb 2011 02:33:55 +0000 (18:33 -0800)]
ARM: etm: Configure data tracing
The old code enabled data tracing, but did not configure the
range. We now configure it to trace all data addresses by default,
and add a trace_data_range attribute to change the range or disable
data tracing.
Change-Id: I9d04e3e1ea0d0b4d4d5bcb93b1b042938ad738b2
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Sat, 29 Jan 2011 07:44:43 +0000 (23:44 -0800)]
ARM: etm: Allow range selection
Trace kernel text segment by default as before, allow tracing of other
ranges by writing a range to /sys/devices/etm/trace_range, or to trace
everything by writing 0 0.
Change-Id: Ibb734ca820fedf79560b20536247f1e1700cdc71
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Tue, 1 Feb 2011 05:34:47 +0000 (21:34 -0800)]
ARM: etm: Don't try to clear the buffer full status after reading the buffer
If the write address was at the end of the buffer, toggling the trace
capture bit would set the RAM-full status instead of clearing it, and
if any of the stop bits in the formatter is set toggling the trace
capture bit may not do anything.
Instead use the read position to find out if the data has already
been returned.
This also fixes the read function so it works when the trace buffer is
larger than the buffer passed in from user space. The old version
would reset the trace buffer pointers after every read, so the second
call to read would always return 0.
Change-Id: I75256abe2556adfd66fd5963e46f9e84ae4645e1
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Sat, 29 Jan 2011 07:33:11 +0000 (23:33 -0800)]
ARM: etm: Don't limit tracing to only non-secure code.
On some systems kernel code is considered secure, and this code
already limits tracing to the kernel text segment which results
in no trace data.
Change-Id: I098a0753e874859446d098e1ee209f67fc13cd5d
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Sat, 29 Jan 2011 07:12:32 +0000 (23:12 -0800)]
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>
Nick Pelly [Thu, 11 Feb 2010 19:54:28 +0000 (11:54 -0800)]
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>
Dmitry Shmidt [Tue, 3 May 2011 18:05:04 +0000 (11:05 -0700)]
ARM: Add 'card_present' state to mmc_platfrom_data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Colin Cross [Tue, 3 May 2011 01:06:41 +0000 (18:06 -0700)]
net: wireless: bcm4329: Fix one more 2.6.39 compilation error
Change-Id: Ia290e056a177d0e6f84a3cf9e806307b43de5e1b
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Tue, 3 May 2011 00:23:45 +0000 (17:23 -0700)]
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>
Colin Cross [Sat, 9 Apr 2011 05:20:53 +0000 (22:20 -0700)]
Recreate asm/mach/mmc.h include file
Change-Id: I9f10244b0603f7842b8504a16124d40dc4a71ed2
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Sat, 9 Apr 2011 02:18:42 +0000 (19:18 -0700)]
input: misc: gpio_matrix: Fix irq call for 2.6.39
Change-Id: Ib8dd0ab6554e6b0e3798bf75d41f77ea0b20b8de
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Sat, 9 Apr 2011 00:26:06 +0000 (17:26 -0700)]
ARM: common: fiq_debugger: Fix build for 2.6.39 irq changes
Signed-off-by: Colin Cross <ccross@android.com>
Change-Id: I68147c0a17f9cd1b7693826754edc55b1bb09592
Dmitry Shmidt [Mon, 2 May 2011 21:52:15 +0000 (14:52 -0700)]
net: wireless: bcm4329: Fix 2.6.39 compilation
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 26 Apr 2011 18:36:07 +0000 (11:36 -0700)]
net: wireless: bcm4329: Prevent working thread to run during suspend path
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Greg Goldman [Wed, 20 Apr 2011 18:23:06 +0000 (11:23 -0700)]
net: wireless: bcm4329: Clean ARP offload table on IP update
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Chia-chi Yeh [Fri, 15 Apr 2011 22:22:09 +0000 (15:22 -0700)]
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>
Lorenzo Colitti [Fri, 11 Mar 2011 04:24:12 +0000 (20:24 -0800)]
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>
Dmitry Shmidt [Thu, 10 Mar 2011 18:18:39 +0000 (10:18 -0800)]
net: wireless: bcm4329: Allocate skb with GFP_KERNEL flag if possible
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Thu, 10 Mar 2011 00:52:08 +0000 (16:52 -0800)]
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>
Mike Lockwood [Sat, 19 Feb 2011 20:33:17 +0000 (15:33 -0500)]
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>
Mike Lockwood [Mon, 14 Feb 2011 18:32:05 +0000 (13:32 -0500)]
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>
Greg Goldman [Sat, 19 Feb 2011 01:12:19 +0000 (17:12 -0800)]
net: wireless: bcm4329: Fix disable pno call
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 15 Feb 2011 01:48:56 +0000 (17:48 -0800)]
net: wireless: bcm4329: Get country translation from platform data
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 15 Feb 2011 00:58:48 +0000 (16:58 -0800)]
net: wireless: Add get_country_code functionality to platform
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Greg Goldman [Mon, 14 Feb 2011 23:54:42 +0000 (15:54 -0800)]
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>
Mike Corrigan [Sat, 12 Feb 2011 01:05:54 +0000 (17:05 -0800)]
net: wireless: bcm4329: Fix mem leak in wl_iw_handle_scanresults_ies
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Andrei Warkentin [Sat, 12 Feb 2011 01:01:28 +0000 (17:01 -0800)]
net: wireless: bcm4329: Fix memleak in dev->p
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Sat, 12 Feb 2011 00:54:39 +0000 (16:54 -0800)]
net: wireless: bcm4329: Add sdlock to firmware loading
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Benoit Goby [Mon, 7 Feb 2011 21:55:26 +0000 (13:55 -0800)]
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>
Mike Lockwood [Thu, 10 Feb 2011 16:54:53 +0000 (11:54 -0500)]
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>
Mike Lockwood [Wed, 9 Feb 2011 14:38:26 +0000 (09:38 -0500)]
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>
Colin Cross [Sat, 12 Feb 2011 21:21:32 +0000 (13:21 -0800)]
Revert "mmc: subtract boot sectors from disk size for eMMC 4.3+ devices"
This reverts commit
f0b0e4bec1e89014f3dcef4da8bcf95428cc771c.
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>
Colin Cross [Wed, 30 Mar 2011 19:37:49 +0000 (12:37 -0700)]
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>
Oleg Matcovschi [Fri, 11 Mar 2011 18:24:30 +0000 (10:24 -0800)]
usb: gadget: composite: USB_GET_CONFIGURATION must return 0 in unconfigured state.
Change-Id: I5212ca9990308d0c4ae6a55c60cba42d6b0e4fee
Signed-off-by: Oleg Matcovschi <olegmatcovsky@gmail.com>
Iliyan Malchev [Fri, 18 Feb 2011 19:28:32 +0000 (11:28 -0800)]
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>
Mike Lockwood [Mon, 7 Feb 2011 16:51:07 +0000 (11:51 -0500)]
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>
Vikram Pandita [Tue, 8 Feb 2011 05:20:50 +0000 (21:20 -0800)]
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>
Brian Swetland [Fri, 4 Feb 2011 21:19:10 +0000 (13:19 -0800)]
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>
Colin Cross [Thu, 27 Jan 2011 23:46:20 +0000 (15:46 -0800)]
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>
Colin Cross [Sat, 29 Jan 2011 03:32:31 +0000 (19:32 -0800)]
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>
Benoit Goby [Thu, 27 Jan 2011 02:28:33 +0000 (18:28 -0800)]
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>
Todd Poynor [Mon, 24 Jan 2011 22:36:39 +0000 (14:36 -0800)]
Print pending wakeup IRQ preventing suspend to dmesg
Change-Id: I36f90735c75fb7c7ab1084775ec0d0ab02336e6e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Colin Cross [Fri, 21 Jan 2011 21:42:46 +0000 (13:42 -0800)]
input: keyreset: Only print message for default handler
Change-Id: I68e5451fef2e6f08bf1035077ea999e34a619f87
Signed-off-by: Colin Cross <ccross@android.com>
Benoit Goby [Fri, 21 Jan 2011 23:53:44 +0000 (15:53 -0800)]
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>
Benoit Goby [Wed, 19 Jan 2011 22:10:37 +0000 (14:10 -0800)]
input: evdev: Add missing wake_lock_destroy
Change-Id: Ief1ef44d98a197e5b457f5e8617c413e76e3c6d2
Signed-off-by: Benoit Goby <benoit@android.com>
Colin Cross [Fri, 14 Jan 2011 22:32:49 +0000 (14:32 -0800)]
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>
Mike Lockwood [Thu, 13 Jan 2011 21:19:57 +0000 (16:19 -0500)]
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>
Dmitry Shmidt [Thu, 13 Jan 2011 04:12:26 +0000 (20:12 -0800)]
net: wireless: bcm4329: Turn off CONFIG_US_NON_DFS_CHANNELS_ONLY
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Thu, 13 Jan 2011 00:22:14 +0000 (16:22 -0800)]
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>
Arve Hjønnevåg [Sat, 8 Jan 2011 03:00:01 +0000 (19:00 -0800)]
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>
Colin Cross [Fri, 7 Jan 2011 22:52:56 +0000 (14:52 -0800)]
input: keyreset: Allow reset function to be overriden
Change-Id: Ibb3dda05772b2e89d7b2646689944d309cb1f74e
Signed-off-by: Colin Cross <ccross@android.com>
Todd Poynor [Fri, 24 Dec 2010 01:33:07 +0000 (17:33 -0800)]
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>
Arve Hjønnevåg [Wed, 24 Nov 2010 01:29:04 +0000 (17:29 -0800)]
staging: android: lowmemorykiller: Ignore shmem pages in page-cache
Change-Id: Ia54fc50b7dcabfeb71eb487c652803f83e2f3d8e
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Arve Hjønnevåg [Wed, 24 Nov 2010 02:20:28 +0000 (18:20 -0800)]
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>
Rabin Vincent [Thu, 9 Sep 2010 05:18:21 +0000 (10:48 +0530)]
lowmemorykiller: don't unregister notifier from atomic context
The lowmemorykiller registers an atomic notifier for notfication of when
the task is freed. From this atomic notifier callback, it removes the
atomic notifier via task_free_unregister(). This is incorrect because
atomic_notifier_chain_unregister() calls syncronize_rcu(), which can
sleep, which shouldn't be done from an atomic notifier.
Fix this by registering the notifier during init, and only unregister it
if the lowmemorykiller is unloaded.
Change-Id: I1577b04e617bc2b2e39dcb490fcfc9ce660eb7ec
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
Colin Cross [Wed, 24 Nov 2010 05:37:04 +0000 (21:37 -0800)]
cgroup: Remove call to synchronize_rcu in cgroup_attach_task
synchronize_rcu can be very expensive, averaging 100 ms in
some cases. In cgroup_attach_task, it is used to prevent
a task->cgroups pointer dereferenced in an RCU read side
critical section from being invalidated, by delaying the
call to put_css_set until after an RCU grace period.
To avoid the call to synchronize_rcu, make the put_css_set
call rcu-safe by moving the deletion of the css_set links
into free_css_set_work, scheduled by the rcu callback
free_css_set_rcu.
The decrement of the cgroup refcount is no longer
synchronous with the call to put_css_set, which can result
in the cgroup refcount staying positive after the last call
to cgroup_attach_task returns. To allow the cgroup to be
deleted with cgroup_rmdir synchronously after
cgroup_attach_task, have rmdir check the refcount of all
associated css_sets. If cgroup_rmdir is called on a cgroup
for which the css_sets all have refcount zero but the
cgroup refcount is nonzero, reuse the rmdir waitqueue to
block the rmdir until free_css_set_work is called.
Signed-off-by: Colin Cross <ccross@android.com>
Colin Cross [Wed, 24 Nov 2010 05:37:03 +0000 (21:37 -0800)]
cgroup: Set CGRP_RELEASABLE when adding to a cgroup
Changes the meaning of CGRP_RELEASABLE to be set on any cgroup
that has ever had a task or cgroup in it, or had css_get called
on it. The bit is set in cgroup_attach_task, cgroup_create,
and __css_get. It is not necessary to set the bit in
cgroup_fork, as the task is either in the root cgroup, in
which can never be released, or the task it was forked from
already set the bit in croup_attach_task.
Signed-off-by: Colin Cross <ccross@android.com>
Benoit Goby [Mon, 13 Dec 2010 23:27:06 +0000 (15:27 -0800)]
PM: Wait for completion of the parent resume before resuming
If the parent device is in the DPM_RESUMING state, resume might get called
before the parent's resume has completed, because dpm_wait won't get
called. This issue was introduced by:
3d46a3c PM: Prevent waiting forever on asynchronous resume after abort
Wait for completion of the parent resume if the parent state is >= DPM_OFF
or == DPM_RESUMING
Signed-off-by: Benoit Goby <benoit@android.com>
[dima: fixed to work on 2.6.38, use .in_suspend instead of .state]
Signed-off-by: Dima Zavin <dima@android.com>
Todd Poynor [Fri, 3 Dec 2010 19:20:09 +0000 (11:20 -0800)]
cpufreq interactive governor save/restore IRQs around cpumask spinlocks
Need to use irqsave/restore spin locking for cpumasks since these
are accessed in timers and in thread context.
Change-Id: I4a53eaf0ced7e73b445feddba90ec11482de9126
Signed-off-by: Todd Poynor <toddpoynor@google.com>