CPUFREQ: Hotplug CPU1 on governor change
CONFIG: Build optimizations
GOV: Fix Badass
Revert "cpufreq: added SLP"

This reverts commit 37f191b54fd86fb550d4fce91d155a3dc94bf740.
msm: clock-8960: Lower frequency requirements of fpb active votes

We have an active set vote for the multimedia fpb and chip fpb so
that the registers are accessible whenever the processor is
awake. Unfortunately these requests are at the highest rate
supported which is not really necessary to ensure that the buses
are clocking. Lower the rate requests to the fastest speed that
doesn't require increasing voltages to allow the chip to hit low
voltages when the processor is awake.

(cherry picked from commit 9e497f042d8525e57e11d417e9e37c2932a18dbf)

Change-Id: I467d4c09947a0dfe18c06ef046ea3c06c222632d
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
EHCI: HSIC: Increase IAA watchdog timeout to 100ms

In order to remove queue heads(QH) from Asynchronous Schedule Interrupt
on Async Advance(IAA) bit is used in USBCMD as doorbell by ehci driver
to handshake with host controller. When the host controller has evicted
all appropriate cached schedule states, then the host controller will
assert an interrupt which indicates ehci driver that it is safe to
modify a removed queue head from the asynchronous list.

EHCI driver walks through the asynchronous schedule list to search for
the QH(say QH1) which needs to be unlinked from HW. It removes QH1 from
the list, sets ehci->reclaim points to QH1 and starts iaa watchdog timer
after setting IAAD bit in USBCMD register. Before getting IAAD interrupt
for QH1, rest of other interface drives can also issue unlinking of their
QHs which get added to the list of QHs to be removed and pointed by
ehci->reclaim. It is possible that IAAD interrupt gets delayed for more
than current watchdog timeout value. This causes watchdog handler to
finish the unlinking process of QH1 with ehci lock held. Unlinking process
ends by setting QH1's next pointer to NULL, ehci->reclaim pointing to next
QH to be unlinked(say QH2) and calling qh_completions() to retire all the
transfer descriptor associated with QH1. qh_completions() releases
ehci->lock in ehci_urb_done(). There is a possibility of controller
asserting IAAD interrupt during this time on other core. After ehci lock
is released, ehci irq handler gets a chance to acquire ehci lock and
execute which results in premature unlinking of QH2, since ehci->reclaim
now points to QH2. QH2 is not yet removed from the asynchronous list and
ehci driver has not initiated IAAD handshake for QH2. Similarly unlinking
ends for QH2 by setting QH2's next qh pointer to NULL, since QH2 is not yet
removed from asynchronous list, this breaks the list. Due to this racing
between IAAD interrupt and watchdog timer interrupt ehci driver loses
track of which IAAD interrupt triggered for which QH. This results in NULL
pointer dereference while searching for subsequent QHs to be unlinked, in
already broken asynchronous list. Hence increase the IAA watchdog timeout
value from 10ms to a higher value of 100ms. Higher timeout value avoids
the race between IAAD interrupt and IAA watchdog handler and allows IAAD
interrupt to finish the unlinking of QH. Watchdog handler is still be
used to take care of scenarios when controller does not generate IAAD
interrupt for some reason (which is rare, but possible).

(cherry picked from commit 8a657de16d301e1bfab7ba69349446720d4a70e3)

(cherry picked from commit e39942ae0dbbdd1c4202ebf3d3cd92559f6dc8a0)

Change-Id: I53bdf4fcce088b82bb9ef58ad4d946881ee90394
CRs-Fixed: 396250
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
msm: kgsl: Remove non-critical error messages

Stop the kernel from spamming error messages on non-kernel errors.
Remove the error messages that are coming from the user space passing
invalid parameters to the kgsl ioctls.

Change-Id: Iea9646da1d3a92ebaffd6c4449130c069d61021d
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
(cherry picked from commit eae66bfd916fa7e922ae9de6a6722ae980365778)

Signed-off-by: Liam Fernandez <liam@codeaurora.org>
net: usb: Fix memory leak on Tx data path

Driver anchors the tx urbs and defers the urb submission if
a transmit request comes when the interface is suspended.
Anchoring urb increments the urb reference count. These
deferred urbs are later accessed by calling usb_get_from_anchor()
for submission during interface resume. usb_get_from_anchor()
unanchors the urb but urb reference count remains same.
This causes the urb reference count to remain non-zero
after usb_free_urb() gets called and urb never gets freed.
Hence call usb_put_urb() after anchoring the urb to properly
balance the reference count for these deferred urbs. Also,
unanchor these deferred urbs during disconnect, to free them
up.

(cherry picked from commit 673e1f276a71065638da2dd7f431b630e9d414f4)

Change-Id: I182f94a915662c9c6dbcff8293f1ee2e1620392e
CRs-Fixed: 408145
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
workqueue: fix possible stall on try_to_grab_pending() of a delayed work item

commit 3aa62497594430ea522050b75c033f71f2c60ee6 upstream.

Currently, when try_to_grab_pending() grabs a delayed work item, it
leaves its linked work items alone on the delayed_works.  The linked
work items are always NO_COLOR and will cause future
cwq_activate_first_delayed() increase cwq->nr_active incorrectly, and
may cause the whole cwq to stall.  For example,

state: cwq->max_active = 1, cwq->nr_active = 1
       one work in cwq->pool, many in cwq->delayed_works.

step1: try_to_grab_pending() removes a work item from delayed_works
       but leaves its NO_COLOR linked work items on it.

step2: Later on, cwq_activate_first_delayed() activates the linked
       work item increasing ->nr_active.

step3: cwq->nr_active = 1, but all activated work items of the cwq are
       NO_COLOR.  When they finish, cwq->nr_active will not be
       decreased due to NO_COLOR, and no further work items will be
       activated from cwq->delayed_works. the cwq stalls.

Fix it by ensuring the target work item is activated before stealing
PENDING in try_to_grab_pending().  This ensures that all the linked
work items are activated without incorrectly bumping cwq->nr_active.

tj: Updated comment and description.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
ASoC: msm8960: Fix button detection voltage thresholds

Recent measurements indicate that the button threshold voltages
have changed. Adjust the button voltages accordingly

CRs-fixed: 390846
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
(cherry picked from commit b15d0e39310c93f859b51d382797784717935555)

Change-Id: Iff0f2c4c1ac0cb1722ae709d489c04aec48caa84
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>

Conflicts:
	sound/soc/msm/msm8960.c
Merge remote-tracking branch 'korg/linux-3.0.y' into jb_cm_exp

Conflicts:
	lib/genalloc.c
block: deadline: change some tunables to prioritize read over writes. Also if a READ is detected instead of adding the request with a expiration time don't give a deadline expiration at all. According to my idea this should force reads to be done instantly and delegate writes to be less important in the list. Its in testing at the moment.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Conflicts:
	block/deadline-iosched.c
net: wireless: bcmdhd: Use proper jiffie-related functions
net: wireless: bcmdhd: Fill station_info packet fields
net: wireless: bcmdhd: Report proper mcs rate mask

Setting proper mcs rate mask allows to connect in 802.11n-only mode
CONFIG: Version 1.0
wakelock: use single threaded workqueueus

Avoid the concurrency management that could delay execution if there's
lots of workqueue traffic (and allow the runqueue to run on any CPU).

Lots of workqueue traffic can be generated by setting
ondemand/sampling_rate to 10000.

Change-Id: I55b8a223f4a389b93d49eef0d809eb1efe1790ba

Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Revert "ASoC: msm8960: Fix button detection voltage thresholds"

This reverts commit 808e88ed45f24b06c02a935b47f2d44390d2ec2a.
WIRELESS: Try some additional compile options
Revert "WIRELESS: Try some additional compile options"

This reverts commit 44e1e5b4b6ad8d7f285105c8e1f138a47ce35381.