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>
Andrei Warkentin [Wed, 6 Apr 2011 21:30:00 +0000 (16:30 -0500)]
MMC: Fix erase/trim for certain SanDisk cards.
CMD38 argument is passed through EXT_CSD[113].
Change-Id: I47e9d5e2cf44d9274a65a3b1955026185cb8f2b8
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Andrei Warkentin [Wed, 6 Apr 2011 21:33:44 +0000 (16:33 -0500)]
MMC: Expose mmc_switch to higher drivers.
Needed for Sandisk workaround (manipulate EXT_CSD).
Change-Id: I7bfe50a1503ac73ae072db718b60c27526521e41
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Andrei Warkentin [Wed, 9 Mar 2011 21:35:04 +0000 (15:35 -0600)]
MMC: Support for block quirks.
Block quirks implemented using core/quirks.c support.
Change-Id: I81d9ad57a7ae95c60ee8026f090c8df7c75fd069
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Andrei Warkentin [Sun, 13 Mar 2011 13:48:37 +0000 (08:48 -0500)]
MMC: Extends card quicks with MMC/SD quirks matching the CID.
The current mechanism is SDIO-only. This allows us to create
function-specific quirks, without creating messy Kconfig dependencies,
or polluting core/ with function-specific code.
Change-Id: If31a151c20a8a1fddb0774674821e9fdc4aa61a0
Signed-off-by: Andrei Warkentin <andreiw@motorola.com>
Pierre Tardy [Sun, 6 Feb 2011 18:03:46 +0000 (19:03 +0100)]
mmc: add per device quirk placeholder
Some cards have quirks valid for every platforms using current
platform quirk hooks leads to a lot of code and debug duplication.
So we inspire a bit from what exists in PCI subsystem and do our own
per vendorid/deviceid quirk. We still drop the complexity of the pci
quirk system (with special section tables, and so on).
That can be added later if needed.
Change-Id: Ib67a3e97486023267f5ea3e7c6ef8fc99b13a704
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Jaikumar Ganesh [Tue, 22 Mar 2011 19:27:11 +0000 (12:27 -0700)]
Use BT POWER force_active parameter for rx data.
We were going to active mode during rx processing which
defeats the purpose of force_active parameter for HID devices.
Based on a report and discussion with Leijun Tao <L.J.Tao@motorola.com>
Change-Id: I0dc5ccae131e8a2245328eba5cc35159e7656e8a
Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Rebecca Schultz Zavin [Tue, 22 Mar 2011 18:04:55 +0000 (11:04 -0700)]
Revert "ARM: Cortex-A9: Enable dynamic clock gating"
This reverts commit
91406b03fa4add49db13e55c3220911be55d9883.
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>
Todd Poynor [Tue, 15 Feb 2011 19:48:42 +0000 (11:48 -0800)]
ARM: Cortex-A9: Enable dynamic clock gating
Enable dynamic high level clock gating for Cortex-A9 CPUs, as
described in 2.3.3 "Dynamic high level clock gating" of the
Cortex-A9 TRM. This may cut the clock of the integer core,
system control block, and Data Engine in certain conditions.
Add ARM errata 720791 to avoid corrupting the Jazelle
instruction stream on earlier Cortex-A9 revisions.
Change-Id: I48e51d907e593f26982ea91b0a811553f68e3c86
Signed-off-by: Todd Poynor <toddpoynor@google.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>
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.
Change-Id: Ib006acf9e517b3b8f7570220c28e19c91e7b5f25
Signed-off-by: Colin Cross <ccross@android.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>
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>
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>
Simon Wilson [Sat, 8 Jan 2011 02:46:34 +0000 (18:46 -0800)]
cgroup: leave cg_list valid upon cgroup_exit
A thread/process in cgroup_attach_task() could have called
list_del(&tsk->cg_list) after cgroup_exit() had already called
list_del() on the same list. Since it only checked for
!list_empty(&tsk->cg_list) before doing this, the list_del()
call would thus be made twice.
The solution is to leave tsk->cg_list in a valid state in
cgroup_exit() with list_del_init(&tsk->cg_list), which leaves
an empty list.
Change-Id: I4e7c1d0665fced629f5ca033c18dd98afe080e0c
Signed-off-by: Simon Wilson <simonwilson@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>
MyungJoo Ham [Tue, 23 Nov 2010 10:39:23 +0000 (11:39 +0100)]
ARM: 6490/1: MM: bugfix: initialize spinlock for init_mm.context
init_mm used at kernel/sched.c:idle_task_exit() has spin_lock
(init_mm.context.id_lock) that is not initialized when spin_lock/unlock
is called at an ARM machine. Note that mm_struct.context.id_lock is
usually initialized except for the instance of init_mm at
linux/arch/arm/mm/context.c
Not initializing this spinlock incurs "BUG: pinlock bad magic"
warning when spinlock debug is enabled. We have observed such
instances when testing PM in S5PC210 machines.
Change-Id: I52c6c6d035c220822a5675faaf8d163a3535985d
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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>
Todd Poynor [Tue, 9 Nov 2010 04:26:23 +0000 (20:26 -0800)]
ARM: Stop irqsoff trace on return to user
If the irqsoff tracer is in use, stop tracing the interrupt disable
interval when returning to userspace. Tracing userspace execution
time as interrupts disabled time is not helpful for kernel
performance analysis purposes. Only do so if the irqsoff tracer
is enabled, to avoid overhead purely for lockdep, which doesn't
care.
Change-Id: I74cde7dd0c4c3a783af34e76bd4efc1f85315abe
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>
Greg Goldman [Tue, 21 Dec 2010 19:14:17 +0000 (11:14 -0800)]
net: wireless: bcm4329: Update to version 4.218.248-18
- Improve BT-coex to differentiate HID and SCO device during DHCP session
- Enforce DTIM=1 for any SoftAP settings to optimize internal memory logic
Signed-off-by: Dmitry Shmidt <dimitrysh@google.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>
Mike Lockwood [Sat, 11 Dec 2010 00:30:15 +0000 (16:30 -0800)]
USB: gadget: composite: Use separate switches for connected and config state
Also remove disconnect debouncing, which didn't actually work on some platforms
Signed-off-by: Mike Lockwood <lockwood@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
Change-Id: I14a4e16426f61efceaefedc7e772f53b7522b5dd
Signed-off-by: Benoit Goby <benoit@android.com>
Greg Goldman [Mon, 13 Dec 2010 17:57:24 +0000 (09:57 -0800)]
net: wireless: bcm4329: Update to Version 4.218.248-17
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
John Michelau [Fri, 10 Dec 2010 19:51:19 +0000 (13:51 -0600)]
USB: gadget: acm,rndis: IAD class, subclass & prot should match 1st iface
Microsoft recommends that the class and subclass fields of
an IAD match the same fields from the first interface in the
collection that the IAD is grouping. In practice, we are also
finding that the protocol fields should also match. Without
this change, the default Microsoft composite driver may not
group interfaces properly, which is what allows child
function drivers with IAD's to load correctly.
Signed-off-by: Mike Lockwood <lockwood@android.com>
John Michelau [Fri, 10 Dec 2010 18:09:53 +0000 (12:09 -0600)]
USB: gadget: composite: Dynamically set IAD bFirstInterface
bFirstInterface should be set equal to bInterfaceNumber of
the first interface in a grouping. It's currently being set
only when a composite device is bound, and it does not get
updated when functions are enabled or disabled.
Signed-off-by: Mike Lockwood <lockwood@android.com>
John Michelau [Fri, 10 Dec 2010 17:33:54 +0000 (11:33 -0600)]
USB: gadget: android Fix gadget descriptor compliance for IAD's
USB-IF core team mandates that composite devices containing
IAD's must use bDeviceClass=0xEF, bDeviceSubClass=0x02, &
bDeviceProtocol=0x01 instead of the usual 0x00 in all fields.
This is not a problem currently on Linux hosts, but it is a
problem when connecting to Windows hosts. Without this change
the default Microsoft composite driver will not group
interfaces properly, which is what allows child function
drivers with IAD's to load correctly.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Dima Zavin [Tue, 7 Dec 2010 00:31:53 +0000 (16:31 -0800)]
Revert "futex: Restore one of the fast paths eliminated by
38d47c1b7075bd7ec3881141bb3629da58f88dab"
This reverts commit
cb93471ed5d924b6efdfe5d0215668a9b4b91c21.
Change-Id: I7f0b45c29b3b91ba5282c51eb6b315d70ac6c813
Signed-off-by: Dima Zavin <dima@android.com>
Greg Goldman [Tue, 7 Dec 2010 18:06:32 +0000 (10:06 -0800)]
net: wireless: bcm4329: Add CONFIG_FIRST_SCAN option
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
John Michelau [Tue, 9 Nov 2010 00:05:37 +0000 (18:05 -0600)]
usb: gadget: Multiple ACM gadget instances
- Added multiple ACM instance support in Android gadget
- Fixed multiple instance naming issue in ACM function
- Increased max instances from 4 to 8
Change-Id: I65f1b0be94da859bab7ec0ad7cd804b896c7c4c5
Signed-off-by: John Michelau <john.michelau@motorola.com>
John Michelau [Tue, 30 Nov 2010 21:36:29 +0000 (15:36 -0600)]
usb: gadget: Fixed Android gadget function discovery & product matching
- Don't bind until all required functions have registered
- Consider multi-instance functions when matching products
Change-Id: I6fa10567db71d49cd81968c01d75e326ff9a17c8
Signed-off-by: John Michelau <john.michelau@motorola.com>
Dmitry Shmidt [Fri, 3 Dec 2010 22:52:13 +0000 (14:52 -0800)]
net: wireless: bcm4329: Fix memory leak in case of dhd_bus_init() failure
Signed-off-by: Dmitry Shmidt <dimitrysh@google.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>
Dmitry Shmidt [Fri, 3 Dec 2010 00:33:41 +0000 (16:33 -0800)]
net: wireless: bcm4329: Fix driver 'start' retry ability
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Wed, 1 Dec 2010 22:22:52 +0000 (14:22 -0800)]
net: wireless: bcm4329: Fix watchdog syncronization during start/stop
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Theodore Ts'o [Wed, 3 Nov 2010 16:03:21 +0000 (12:03 -0400)]
ext4: initialize the percpu counters before replaying the journal
We now initialize the percpu counters before replaying the journal,
but after the journal, we recalculate the global counters, to deal
with the possibility of the per-blockgroup counts getting updated by
the journal replay.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Ken Sumrall [Wed, 24 Nov 2010 20:57:00 +0000 (12:57 -0800)]
fuse: fix attributes after open(O_TRUNC)
The attribute cache for a file was not being cleared when a file is opened
with O_TRUNC.
If the filesystem's open operation truncates the file ("atomic_o_trunc"
feature flag is set) then the kernel should invalidate the cached st_mtime
and st_ctime attributes.
Also i_size should be explicitly be set to zero as it is used sometimes
without refreshing the cache.
Signed-off-by: Ken Sumrall <ksumrall@android.com>
Cc: Anfei <anfei.zhou@gmail.com>
Cc: "Anand V. Avati" <avati@gluster.com>
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Chan [Tue, 22 Jun 2010 18:26:45 +0000 (11:26 -0700)]
cpufreq: interactive: New 'interactive' governor
This governor is designed for latency-sensitive workloads, such as
interactive user interfaces. The interactive governor aims to be
significantly more responsive to ramp CPU quickly up when CPU-intensive
activity begins.
Existing governors sample CPU load at a particular rate, typically
every X ms. This can lead to under-powering UI threads for the period of
time during which the user begins interacting with a previously-idle system
until the next sample period happens.
The 'interactive' governor uses a different approach. Instead of sampling
the CPU at a specified rate, the governor will check whether to scale the
CPU frequency up soon after coming out of idle. When the CPU comes out of
idle, a timer is configured to fire within 1-2 ticks. If the CPU is very
busy from exiting idle to when the timer fires then we assume the CPU is
underpowered and ramp to MAX speed.
If the CPU was not sufficiently busy to immediately ramp to MAX speed, then
the governor evaluates the CPU load since the last speed adjustment,
choosing the highest value between that longer-term load or the short-term
load since idle exit to determine the CPU speed to ramp to.
A realtime thread is used for scaling up, giving the remaining tasks the
CPU performance benefit, unlike existing governors which are more likely to
schedule rampup work to occur after your performance starved tasks have
completed.
The tuneables for this governor are:
/sys/devices/system/cpu/cpufreq/interactive/min_sample_time:
The minimum amount of time to spend at the current frequency before
ramping down. This is to ensure that the governor has seen enough
historic CPU load data to determine the appropriate workload.
Default is 80000 uS.
/sys/devices/system/cpu/cpufreq/interactive/go_maxspeed_load
The CPU load at which to ramp to max speed. Default is 85.
Change-Id: Ib2b362607c62f7c56d35f44a9ef3280f98c17585
Signed-off-by: Mike Chan <mike@android.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Bug:
3152864
Dmitry Shmidt [Fri, 19 Nov 2010 19:20:35 +0000 (11:20 -0800)]
net: wireless: bcm4329: Add 'setdfschannels' command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Benoit Goby [Wed, 17 Nov 2010 22:27:51 +0000 (14:27 -0800)]
usb: gadget: rndis: don't use dev_get_stats
Since 2.6.36, spin_lock_bh has been added to dev_txq_stats_fold. So
dev_get_stats cannot be called from atomic context.
Replaced it by netdev_stats_to_stats64 to copy the stats directly. This
will work if the device driver does not need txq tx stats folding.
http://lkml.org/lkml/2010/9/20/250
Change-Id: I715b00892beda56cc369139d6e2bdc9efb6bfe79
Signed-off-by: Benoit Goby <benoit@android.com>
Dmitry Shmidt [Thu, 18 Nov 2010 22:31:18 +0000 (14:31 -0800)]
net: wireless: bcm4329: Use non-DFS channels only for US
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Greg Goldman [Thu, 18 Nov 2010 22:08:58 +0000 (14:08 -0800)]
net: wireless: bcm4329: Improve way to detect BT SCO connection for BT-coex
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Greg Goldman [Thu, 18 Nov 2010 21:49:25 +0000 (13:49 -0800)]
net: wireless: bcm4329: Update to Version 4.218.248-15
- Increase default Listen Interval to 20 Beacons
- Add logic to adjust SKIP_DTIM if Listen Interval < DTIM * DTIM_SKIP to
avoid data lost due to fact that packet maybe not retrieved during Listen
Interval and AP may toss it
- Fix problem with Hidden AP setting after AP reconfigure
- Add new SoftAP optional parameter as COUNTRY to pass country code to SoftAP
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Thu, 18 Nov 2010 00:20:48 +0000 (16:20 -0800)]
net: wireless: bcm4329: Set first channel passive scan to 30 ms
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 16 Nov 2010 23:40:13 +0000 (15:40 -0800)]
ARM: fiq_debugger: Add help command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Mike Lockwood [Wed, 17 Nov 2010 16:16:35 +0000 (11:16 -0500)]
USB: gadget: f_mtp: Zero length packet fixes
Send zero length packets at end of transfers that are a multiple of the
bulk max packet size as required by MTP.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Dmitry Shmidt [Tue, 16 Nov 2010 23:39:43 +0000 (15:39 -0800)]
misc: kernel_debugger: Add help command
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Mike Lockwood [Tue, 16 Nov 2010 22:14:32 +0000 (17:14 -0500)]
USB: gadget: f_mtp: Support for file transfer length greater than 4 gigabytes
For backward compatibility with PTP, MTP is limited to a 32-bit file size.
When transferring files greater than 4 gig, MTP uses 0xFFFFFFFF as the file size
and the receiver reads until it receives a short packet.
Expanded size of mtp_file_range.length to 64 bits and added support for
writing zero length packets.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Mike Lockwood [Mon, 15 Nov 2010 20:22:21 +0000 (15:22 -0500)]
USB: gadget: f_mtp: Return zero result for successful file transfer.
Returning number of bytes transfered does not work for files > 2 gig
since ioctl() result is a signed integer.
Signed-off-by: Mike Lockwood <lockwood@android.com>
Dmitry Shmidt [Thu, 11 Nov 2010 01:56:37 +0000 (17:56 -0800)]
net: wireless: bcm4329: Fix Softap start/stop race conditions
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dima Zavin [Wed, 10 Nov 2010 23:39:07 +0000 (15:39 -0800)]
ARM: fiq_debugger: make fiq_debugger be in debug mode by default
Adds a config option that controls whether or not the console is on at
boot, defaulting to no.
Change-Id: Id4a3cad1c9dd4fb3c2b8c2298ca5d385a8bd0f8d
Signed-off-by: Dima Zavin <dima@android.com>
Mike Lockwood [Mon, 8 Nov 2010 15:41:31 +0000 (10:41 -0500)]
USB: gadget: f_mtp: MTP driver cleanup:
Use a work queue instead of a separate thread for file transfer ioctls
(note: the file transfer must be done on a kernel thread rather than in
process context so vfs_read and vfs_write will use the correct address space
for the buffers)
Enforce requirement that only one ioctl call may be active at a time,
and remove mutex in mtp_send_event that is now no longer necessary.
Synchronize around use of shared variables to avoid SMP issues
Fix mismatched calls to fget and fput
Signed-off-by: Mike Lockwood <lockwood@android.com>
Jaikumar Ganesh [Wed, 10 Nov 2010 03:07:45 +0000 (19:07 -0800)]
Bluetooth: Add BT_POWER L2CAP socket option.
Add BT_POWER socket option used to control the power
characteristics of the underlying ACL link. When the remote end
has put the link in sniff mode and the host stack wants to send
data we need need to explicitly exit sniff mode to work well with
certain devices (For example, A2DP on Plantronics Voyager 855).
However, this causes problems with HID devices.
Hence, moving into active mode when sending data, irrespective
of who set the sniff mode has been made as a socket option. By
default, we will move into active mode. HID devices can set the
L2CAP socket option to prevent this from happening.
Currently, this has been implemented for L2CAP sockets. This has been
tested with incoming and outgoing L2CAP sockets for HID and A2DP.
Based on discussions on linux-bluetooth and patches submitted by
Andrei Emeltchenko.
Signed-off-by: Jaikumar Ganesh <jaikumar@google.com>
Jaikumar Ganesh [Wed, 10 Nov 2010 23:45:07 +0000 (15:45 -0800)]
Revert "Bluetooth: Hack: Do not use power_save feature."
This reverts commit
3b02c046c3dfef5b5c4fa0c45b69654c107c7403.
Signed-off-by: Jaikumar Ganesh<jaikumar@google.com>
Greg Goldman [Tue, 9 Nov 2010 21:28:20 +0000 (13:28 -0800)]
net: wireless: bcm4329: Add FW Reload event processing
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 9 Nov 2010 18:08:27 +0000 (10:08 -0800)]
net: wireless: bcm4329: Enable KEEP_ALIVE feature
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 9 Nov 2010 18:07:48 +0000 (10:07 -0800)]
net: wireless: bcm4329: Fix watchdog termination after 'driver stop'
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Greg Goldman [Fri, 5 Nov 2010 22:39:20 +0000 (15:39 -0700)]
net: wireless: bcm4329: Update to version 4.218.248-12
- Fix crash during Specific Scan handling
- Fix potential insmod crash by increase Registration Timeout to 12 sec
- Added max time restriction to PNO scan timer
- New IWPRIV "AP_STA_DISASSOC" to disassoc STAs in SoftAP mode
- Add new setting to SoftAP "AP_SET_CFG" to enable Hidden SSID
- Fixs bugs for SoftAP AP_SET_MAC_FLTR iwpriv commnd
- Add STAs rssi filed to SoftAP "AP_GET_STA_LIST" IWPRIV commnd
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Thu, 4 Nov 2010 17:38:08 +0000 (10:38 -0700)]
net: wireless: bcm4329: Add check for out of bounds scan buffer
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Colin Cross [Thu, 4 Nov 2010 06:15:07 +0000 (23:15 -0700)]
pm_qos: Fix reversed min and max
pm_qos_get_value had min and max reversed, causing all pm_qos
requests to have no effect. Broken by the plist conversion,
sha
5f279845f9d684661563894d44729a0c706375b4.
Change-Id: I252c764821eac8d94de57eb482c05bf6afcea15b
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: mark gross <markgross@thegnar.org>
Cc: James Bottomley <James.Bottomley@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Colin Cross <ccross@android.com>
Dmitry Shmidt [Wed, 3 Nov 2010 23:08:25 +0000 (16:08 -0700)]
net: wireless: bcm4329: Check for out of bounds in scan results parsing
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Greg Goldman [Mon, 1 Nov 2010 23:58:08 +0000 (16:58 -0700)]
net: wireless: bcm4329: Update to version 4.218.248-11
Check for 'driver start' failure, Set keep-alive feature forever
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dmitry Shmidt [Tue, 2 Nov 2010 23:35:22 +0000 (16:35 -0700)]
net: wireless: bcm4329: Fix race conditions for sysioc_thread
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Theodore Ts'o [Thu, 28 Oct 2010 01:30:13 +0000 (21:30 -0400)]
ext4: fix kernel oops if the journal superblock has a non-zero j_errno
Commit
84061e0 fixed an accounting bug only to introduce the
possibility of a kernel OOPS if the journal has a non-zero j_errno
field indicating that the file system had detected a fs inconsistency.
After the journal replay, if the journal superblock indicates that the
file system has an error, this indication is transfered to the file
system and then ext4_commit_super() is called to write this to the
disk.
But since the percpu counters are now initialized after the journal
replay, the call to ext4_commit_super() will cause a kernel oops since
it needs to use the percpu counters the ext4 superblock structure.
The fix is to skip setting the ext4 free block and free inode fields
if the percpu counter has not been set.
Thanks to Ken Sumrall for reporting and analyzing the root causes of
this bug.
Addresses-Google-Bug: #
3054080
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Todd Poynor [Mon, 11 Oct 2010 23:51:28 +0000 (16:51 -0700)]
sdhci: Always pass clock request value zero to set_clock host op
To allow the set_clock host op to disable the SDCLK source when not
needed, always call the host op when the requested clock speed is
zero. Do this even if host->clock already equals zero, because
the SDHCI driver may set that value (without calling the host op)
to force an update at the next (non-zero-speed) call.
Change-Id: If99230d76138679b5767f77cb925f15408ae518e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Rebecca Schultz Zavin [Fri, 22 Oct 2010 22:55:17 +0000 (15:55 -0700)]
[ARM] fiq_debugger: Print local timer irqs count
Prints the number of local timer irqs on each cpu when
the irqs command is executed.
Change-Id: Ic70fa9f528d98996fabb2d0cc80e937c5b239c1a
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Greg Goldman [Thu, 21 Oct 2010 21:04:41 +0000 (14:04 -0700)]
net: wireless: bcm4329: Improve BT-coex for eSCO
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Dima Zavin [Thu, 21 Oct 2010 22:00:17 +0000 (15:00 -0700)]
Merge commit 'v2.6.36' into android-2.6.36
Brian Swetland [Thu, 21 Oct 2010 21:19:31 +0000 (14:19 -0700)]
staging: remove Greg's TODO, now obsolete.
Signed-off-by: Brian Swetland <swetland@google.com>
Linus Torvalds [Wed, 20 Oct 2010 20:30:22 +0000 (13:30 -0700)]
Linux 2.6.36
Linus Torvalds [Wed, 20 Oct 2010 20:18:21 +0000 (13:18 -0700)]
Merge branch 'upstream' of git://git.linux-mips.org/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus:
MIPS: O32 compat/N32: Fix to use compat syscall wrappers for AIO syscalls.
MAINTAINERS: Change list for ioc_serial to linux-serial.
SERIAL: ioc3_serial: Return -ENOMEM on memory allocation failure
MIPS: jz4740: Fix Kbuild Platform file.
MIPS: Repair Kbuild make clean breakage.
Amit Shah [Wed, 20 Oct 2010 03:15:43 +0000 (13:45 +1030)]
virtio: console: Don't block entire guest if host doesn't read data
If the host is slow in reading data or doesn't read data at all,
blocking write calls not only blocked the program that called write()
but the entire guest itself.
To overcome this, let's not block till the host signals it has given
back the virtio ring element we passed it. Instead, send the buffer to
the host and return to userspace. This operation then becomes similar
to how non-blocking writes work, so let's use the existing code for this
path as well.
This code change also ensures blocking write calls do get blocked if
there's not enough room in the virtio ring as well as they don't return
-EAGAIN to userspace.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
CC: stable@kernel.org
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>