USB: f_mtp: Set maximum burst value to two for superspeed mode

Currently burst value is set to zero for superspeed in mtp driver.
MTP throughput can be improved by setting max burst vlaue to non
zero value in superspeed mode. Hence set max burst vlaue to two
for both IN and OUT bulk endpoints in superspeed mode.

CRs-Fixed: 532070
Change-Id: Ib78b8fec5d1ab934f4d4ec80b7e008149707ce0f
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
USB: gadget: rndis: Optimize tx path for better performance

Current rndis header addition and aggregation steps:
1. Increase skb headroom by size of rndis header.
2. Copy skb data with newly created skb having more headroom.
3. Create and add rndis header with it.
4. Again copy skb data with usb request buffer for aggregation purpose.

New optimized steps :
1. Create and copy rndis header directly with usb request buffer
2. Copy skb data with usb request buffer

Above new steps avoids cpu intensive skb operations which reduces CPU
usage and provide better throughput.

This change also assigns completion handle with usb request at the time
of usb request creation instead of assigning everytime before queueing
usb request.

CRs-Fixed: 551363
Change-Id: Ifc64d6a8573f6a24e28c73ef9a19b62649e171cd
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Paul Reioux <reioux@gmail.com>
Input: Send events one packet at a time

On heavy event loads, such as a multitouch driver, the irqsoff latency
can be as high as 250 us.  By accumulating a frame worth of data
before passing it on, the latency can be dramatically reduced.  As a
side effect, the special EV_SYN handling can be removed, since the
frame is now atomic.

This patch adds the events() handler callback and uses it if it
exists. The latency is improved by 50 us even without the callback.

Change-Id: Iebd9b1868ae6300a922a45b6d104e7c2b38e4cf5
Cc: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>

Input: Improve the events-per-packet estimate

The events-per-packet estimate has so far been used by MT devices
only. This patch adjusts the packet buffer size to also accomodate the
KEY and MSC events.  Keyboards normally send one or two keys at a
time. MT devices normally send a number of button keys along with the
MT information.  The buffer size chosen here covers those cases, and
matches the default buffer size in evdev. Since the input estimate is
now preferred, remove the special input-mt estimate.

Reviewed-and-tested-by: Ping Cheng <pingc@wacom.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>

Change-Id: I5590162622de88908fe0e64516a51ecd92bca8cd
fix a bunch of warnings I missed to fix

thanks to showmp

Change-Id: I2d5d1a58376ce41a425abccb3efae0e1b8216749
fix ICE in fs/fs-writeback.c with gcc4.7:

fs/fs-writeback.c: In function 'bdi_writeback_thread':
fs/fs-writeback.c:993:1: internal compiler error: in push_minipool_fix, at config/arm/arm.c:13180
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[1]: *** [fs/fs-writeback.o] Error 1
make: *** [fs] Error 2

$ arm-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=/home/showp1984/WORK/toolchain/android-toolchain-eabi/bin/arm-eabi-gcc
COLLECT_LTO_WRAPPER=/home/showp1984/WORK/toolchain/android-toolchain-eabi/bin/../libexec/gcc/arm-eabi/4.7.2/lto-wrapper
Target: arm-eabi
Configured with: /mnt/jenkins/workspace/linaro-android_toolchain-4.7-2012.09/build/objdir/temp-src/gcc-linaro-4.7-2012.09/configure --prefix=/tmp/android-toolchain-eabi --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/mnt/jenkins/workspace/linaro-android_toolchain-4.7-2012.09/build/objdir/temp-install --with-mpfr=/mnt/jenkins/workspace/linaro-android_toolchain-4.7-2012.09/build/objdir/temp-install --with-mpc=/mnt/jenkins/workspace/linaro-android_toolchain-4.7-2012.09/build/objdir/temp-install --with-cloog=/mnt/jenkins/workspace/linaro-android_toolchain-4.7-2012.09/build/objdir/temp-install --with-ppl=/mnt/jenkins/workspace/linaro-android_toolchain-4.7-2012.09/build/objdir/temp-install --disable-ppl-version-check --disable-cloog-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --disable-libssp --disable-nls --disable-libmudflap --disable-shared --disable-sjlj-exceptions --disable-libquadmath --disable-libitm --disable-libatomic --with-float=soft --with-fpu=vfp --with-arch=armv5te --enable-target-optspace --prefix=/tmp/android-toolchain-eabi --disable-docs --disable-nls --with-gcc-version=linaro-4.7-2012.09 --with-binutils-version=2.23.51.0.3 --with-gmp-version=5.0.5 --with-mpfr-version=3.1.1 --with-mpc-version=1.0 --target=arm-eabi --enable-threads --enable-tls --disable-libgomp --disable-libstdc__-v3 --disable-libitm --disable-libatomic
Thread model: single
gcc version 4.7.2 20120910 (prerelease) (Linaro GCC 4.7-2012.09)

Change-Id: Ibf92c1f6d844368fe9da52315a975dc1928962a7
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
SCHEDULER: Autogroup patch group by current user android UID instead of task ID

Change-Id: Ia38a66ab376fcc9ca3c9d34d2c18df72c65b7021
mach-msm: Add msm_mpdecision Kconfig & Makefile hooks
Also rename qcom's mpdecision to stay in place and be used if CONFIG_MSM_MPDEC is not set

Signed-off-by: Dennis Rassmann <showp1984@gmail.com>

Conflicts:
	arch/arm/mach-msm/Makefile

Change-Id: Iffe7f9860c87a5cdbb88aaf63f68e5daf9e77152
mach-msm: Add msm_mpdecision
This currently only does the following thing:
Screen on -> CPU1 online
Screen off -> CPU1 offline

More to come.

Change-Id: I7a6fd8f82eb0539b10c4ffdd388dcd30bd080e79
Signed-off-by: Dennis Rassmann <showp1984@gmail.com>
mach-msm: mpdecision: small cleanup

Change-Id: I3adf456ff035251181713539a9ee5ee1b961f180
Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: add load based decision making

This now works like the mpdecision binary from QCOM.
CPU hotplugging/unplugging based on system load.

A sysfs interface will be built in with a later commit.

Signed-off-by: showp1984 <showp1984@gmail.com>

Conflicts:
	arch/arm/mach-msm/msm_rq_stats.c

Change-Id: If94332ef28e4db844a69c480a1cdbea2f2edd0fa
mach-msm: mpdecision: restructure locks, add delay

The new delay allows the CPU to come up before any other action is taken.
This prevents fast plugging and also ensures the CPU hotplug process
is really done, before trying to unplug it again (or plug it).

The new locks are more efficient, and only used if necessary.

Change-Id: I0d8ae8a19f16c90cf776f0e701dfe8007099c018
Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: pause if CPU is unplugged outside of mpdecision

This fixes cpu wars if something else tries to control the cpus.
default delay: 10000ms

Change-Id: If61ce3c1317ae362c323e1b0b8bfc5bfff47defc
Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: change early_suspend_level to blank_screen

Change-Id: I1dbb39575981f6b901b351a77e5319adeda29216
Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: don't start immediately

Change-Id: I49c1b1f35005ffa19916d0aacd3163f1d29eddde
Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: show cpumask after up/down

Change-Id: Ib1b77347f54323a15c22b9af688148f0f57fabce
Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: always set the suspend var

Change-Id: Id10a033a1ad8417b14a86cbfd7189ab04333f474
Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: remove up/down delay, our default delay is large enough

Change-Id: I869e95bd9c37fddb0d348789f5f665f17fbe38f8
Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: add email to (c)

Change-Id: Ieffa72c3ecf0846f19d29211469530d9ec4c5254
Signed-off-by: showp1984 <showp1984@gmail.com>
mach-msm: mpdecision: fix foreign hotplug/unplug detection

Signed-off-by: showp1984 <showp1984@gmail.com>

Conflicts:

	arch/arm/mach-msm/msm_mpdecision.c

Change-Id: I69defaccefd7e142beaf9b77ca5b6950ad7534e0
mach-msm: mpdecision: show how long the cpu was online

Change-Id: I2ee8a96baef29d9e72f952a155ed008ce226bd5e
Signed-off-by: showp1984 <showp1984@gmail.com>