usb: gadget: f_accessory: Enabled Zero Length Packet (ZLP) for acc_write

Accessory connected to Android Device requires
Zero Length Packet (ZLP) to be written when data
transferred out from the Android device are multiples
of wMaxPacketSize (64bytes (Full-Speed) / 512bytes (High-Speed))
to end the transfer.

Change-Id: Ib2c2c0ab98ef9afa10e74a720142deca5c0ed476
Signed-off-by: Anson Jacob <ansonkuzhumbil@gmail.com>
cgroup: Take css_set_lock from cgroup_css_sets_empty()

As indicated in the comment above cgroup_css_sets_empty it needs the
css_set_lock. But neither of the 2 call points have it, so rather then fixing
the callers just take the lock inside cgroup_css_sets_empty().

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Change-Id: If7aea71824f6d0e3f2cc6c1ce236c3ae6be2037b
cgroup: Fix use after free of cgrp (cgrp->css_sets)

Running a 3.4 kernel + Fedora-18 (systemd) userland on my Allwinner A10
(arm cortex a8), I'm seeing repeated, reproducable list_del list corruption
errors when build with CONFIG_DEBUG_LIST, and the backtrace always shows
free_css_set_work as the function making the problematic list_del call.

I've tracked this doen to a use after free of the cgrp struct, specifically
of the cgrp->css_sets list_head, which gets cleared by free_css_set_work.

Since free_css_set_work runs form a workqueue, it is possible for it to not be
done with clearing the list when the cgrp gets free-ed. To avoid this the code
adding the links increases cgrp->count, and the freeing code running from the
workqueue decreases cgrp->count *after* doing list_del, and then if the count
goes to 0 calls cgroup_wakeup_rmdir_waiter().

However cgroup_rmdir() is missing a check for cgrp->count != 0, causing it
to still continue with the rmdir (which leads to the free-ing of the cgrp),
before free_css_set_work is done. Sometimes the free-ed memory is re-used
before free_css_set_work gets around to unlinking link->cgrp_link_list,
triggering the list_del list corruption messages.

This patch fixes this by properly checking for cgrp->count != 0 and waiting
for the cgroup_rmdir_waitq in that case.

Change-Id: I9dbc02a0a75d5dffa1b65d67456e00139dea57c3
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Revert "s3c2410_wdt: Add locking to cpu frequency transition notifier"

This reverts commit 037e771d330cfc51d38782543bc965ec61370820.

Change-Id: I32a81c1fb2d9ac2eb8570438699e8f9ff01f4c93
net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

memset() the structure ethtool_wolinfo that has padded bytes
but the padded bytes have not been zeroed out.

Change-Id: If3fd2d872a1b1ab9521d937b86a29fc468a8bbfe
Signed-off-by: Avijit Kanti Das <avijitnsec@codeaurora.org>
crypto: msm: add suspend/resume callback for qcedev driver

Make chanegs to add suspend/resume callback for qcedev driver, and
disable ce clocks when entering suspend and re-enable clocks in resume.
CRs-Fixed:  661994

Change-Id: Ibeab1e7cb531af79ae973d7ff0d0ed2d776f6d6f
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: William Clark <wclark@codeaurora.org>
usb: core: Limit HCD old enumeration scheme request to root ports

HCD_OLD_ENUM HCD flag is introduced to use old (or short) enumeration
scheme for the devices attached on the corresponding USB bus. The old
enumeration scheme is used by the MSM HSIC controller to avoid multiple
reset during enumeration. This is useful when a known device is attached
to the USB bus, which is the case with MSM HSIC. When a HSIC HUB is
connected, any device can be connected on the HSIC USB bus. The new
enumeration scheme supports wide variety of USB devices. Hence limit
the old enumeration scheme request of a HCD to only root ports.

Change-Id: I6035c2a766787819eb8d0e1fa774e0c79d6e958b
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
block: row-iosched idling triggered by readahead pages

In the current implementation idling is triggered only by request
insertion frequency. This heuristic is not very accurate and may hit
random requests that shouldn't trigger idling. This patch uses the
PG_readahead flag in struct page's flags, which indicates that the page
is part of a readahead window, to start idling upon dispatch of a request
associated with a readahead page.

The above readehead flag is used together with the existing
insertion-frequency trigger. The frequency timer will catch read requests
which are not part of a readahead window, but are still part of a
sequential stream (and therefore dispatched in small time intervals).

Change-Id: Icb7145199c007408de3f267645ccb842e051fd00
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
block: row: change hrtimer_cancel to hrtimer_try_to_cancel

Calling hrtimer_cancel with interrupts disabled can result in a livelock.
When flushing plug list in the block layer interrupts are disabled and an
hrtimer is used when adding requests from that plug list to the scheduler.
In this code flow, if the hrtimer (which is used for idling) is set, it's
being canceled by calling hrtimer_cancel. hrtimer_cancel will perform
the following in an endless loop:
1. try cancel the timer
2. if fails - rest_cpu
the cancellation can fail if the timer function already started. Since
interrupts are disabled it can never complete.
This patch reduced the number of times the hrtimer lock is taken while
interrupts are disabled by calling hrtimer_try_co_cancel. the later will
try to cancel the timer just once and return with an error code if fails.

CRs-fixed: 499887
Change-Id: I25f79c357426d72ad67c261ce7cb503ae97dc7b9
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: row: Remove warning massage from add_request

Regular priority queues is marked as "starved" if it skipped a dispatch
due to being empty. When a new request is added to a "starved" queue
it will be marked as urgent.
The removed WARN_ON was warning about an impossible case when a regular
priority (read) queue was marked as starved but wasn't empty. This is
a possible case due to the bellow:
If the device driver fetched a read request that is pending for
transmission and an URGENT request arrives, the fetched read will be
reinserted back to the scheduler. Its possible that the queue it will be
reinserted to was marked as "starved" in the meanwhile due to being empty.

CRs-fixed: 517800
Change-Id: Iaae642ea0ed9c817c41745b0e8ae2217cc684f0c
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
block: row: Fix crash when adding a new field in bio struct

When adding new field to struct bio there is a crash in the removed
code lines. This issue was introduced by commit
80a8f0f87bee18283e9ca0a8966ec97ad9f084e5 "block: row-iosched idling
triggered by readahead pages"

(Partly) reverting this patch till root cause is fixed (on FS level).

Change-Id: Ie82bc806ea52a6370b57aa15455c85b2db10d0da
Signed-off-by: Tanya Brokhman <tlinder@codeaurora.org>
Merge branch 'merge2b' into HEAD
Modifications for Harkness2

This commit just updates version, etc.

Update to latest CodeBench toolchain (2014.05-28)
Update localversion

Change-Id: Iaebfc73d3e4f18fe39f0b0055aef279450260b48
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
Sound Control: Sound control for WCD93xx codec

Fully GPL'ed version.

Change-Id: I227c6613f5969185d79e8a347fe6db5063255d0a
Signed-off-by: faux123 <reioux@gmail.com>
defconfig: d2: Enable FauxSound Control

Change-Id: I7b7b0a39b03cd0be43c71d997f298295597d8e3a
sound control: update control offsets for MSM8960 soc

MSM8960 audio connections are slightly different from the APQ8064 for:

speaker control &
camcorder control (possibly stereo in nature where its mono on APQ8064)

Signed-off-by: faux123 <reioux@gmail.com>
Sound Control: Added headphone poweramp controls

bump version to 2.1 to reflect this new addition

Signed-off-by: Paul Reioux <reioux@gmail.com>
fastcharge v1

Conflicts:

	drivers/misc/fsa9485.c
fsa9485: fastcharge v3 - fixed, finally tracked this down
inv_mpu: Makefile/Kconfig: Fix up & simplify some configs

Seems Samsung might have derp'd a few config-related changes.
This allows for proper usage of the MPU_SENSORS_MPU6050_GYRO config
and makes selftest parts optional.

Patchset2: Remove reference to building selftest as a module. The
config is not a tristate.

Fixes:
  drivers/misc/inv_mpu/Kconfig:52:warning: defaults for choice values not supported

Change-Id: I80c476c3e8723403a580c9d25ecfe38bc84ddb3b
Signed-off-by: Luis Cruz <ljc2491@gmail.com>