m7: fix proximity sensor issues

Needs http://review.cyanogenmod.org/#/c/49528/

Props to TripNRaver for the fix

Change-Id: Ia6514924b74ce7e4c627b385f1af2cb8f6c66994
usb: gadget: mass_storage: added sysfs entry for cdrom to LUNs

This patch adds a "cdrom" sysfs entry for each mass_storage LUN, just
like "ro" sysfs entry. This allows switching between USB and CD-ROM
emulation without reinserting the module or recompiling the kernel.

Change-Id: Idf83c74815b1ad370428ab9d3e5503d5f7bcd3b6
sound: don't enable debug by default

This removes a large number of messages that used to be printed
during audio playback making the log much easier to use.

Change-Id: I67822a11755a098f22c672784a6667c4abc45507
net: wireless: bcmdhd: Enable p2p support bits for p2p device

Change-Id: I62102ead0e72be41d591f9562f3ac27c41b9e395
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Remove PASS_ARP_PACKET define

Change-Id: Ic5787ffb40840def3cb676ce0030c0923b0738c4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Remove chatty message from wl_cfgp2p_act_frm_search

Change-Id: I06ffddddf239443f3684f97a5c31b6872c89d769
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Update to version 1.88.41

- Fix sched scan processing
- Fix NDO processing
- Do not wake dhd_dpc process if not necessary
- Remove unnecessary defines and ifdefs
- Fix SDIO bus wakeup code when idletime was zero case
- Fix OOB interrupt handler was not registered when WLAN on failed case
- Clean up ARP Packet filter code
- Clean up P2P ESCAN source code
- Clean up TDLS code

Change-Id: I6b9a15f0d49c80d72183fd6e9f4b6bb01e450cd4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Update to version 1.88.42

- Add batched scan implementation

Change-Id: I48a36f753597734b2a8865a53f15df30c5ae0d36
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Update to version 1.88.45

	1. Remove WL_SUPPORT_AUTO_CHANNEL codes
	2. add codes for WL_IFACE_COMB_NUM_CHANNELS and
	   WL_CFG80211_P2P_DEV_IF to support concurent mode.
	   (Google Bug : [9892309] support Wifi direct 5GHZ channels)
	   but, remove the WL_IFACE_COM_NUM_CHANELS in Makefile
	3. refactoring the codes for hidden ap roaming
Signed-off-by: Ecco Park <eccopark@broadcom.com>

Conflicts:
	drivers/net/wireless/bcmdhd/Makefile
	drivers/net/wireless/bcmdhd/wl_android.c
	drivers/net/wireless/bcmdhd/wl_cfg80211.c
	drivers/net/wireless/bcmdhd/wl_cfgp2p.c
	drivers/net/wireless/bcmdhd/wl_cfgp2p.h

Change-Id: If8283f26714196aa971c186c57758c0e64ce87df
net: wireless: bcmdhd: enable WL_IFACE_COMB_NUM_CHANNELS

Change-Id: I5f0649719270e23d88c2eecf61f6827fead50fa3
Signed-off-by: Ecco Park <eccopark@broadcom.com>
net: wireless: bcmdhd: Update Location Service code

	updated the dhd_pno.c based on new firmware which will be
	released today.
	updated the wl_anroid.c based on Robert's requirement

Signed-off-by: Ecco Park <eccopark@broadcom.com>

Conflicts:
	drivers/net/wireless/bcmdhd/common/include/proto/bcmevent.h

Change-Id: I5662c221cc93396c4a18c64f142f6f959c884399
net: wireless: bcmdhd: Fix of Wireless Location Service

	Fixed [10378803] [BATCHED-SCAN] WLS_BATCHING commands often
	return their command back rather than expected outputs
Signed-off-by: Ecco Park <eccopark@broadcom.com>

Change-Id: I0bfe81e6cc16c954067f40ba01a97cf85929e584
net: wireless: bcmdhd: Fix of Wireless Location Service

	Fixed memory Leak in case of rmmod DHD without batching stop.
Signed-off-by: Ecco Park <eccopark@broadcom.com>

Change-Id: Ie7a503ce528c4db81507818a34527bfa11b29bea
AIO: Don't plug the I/O queue in do_io_submit()

Asynchronous I/O latency to a solid-state disk greatly increased
between the 2.6.32 and 3.0 kernels. By removing the plug from
do_io_submit(), we observed a 34% improvement in the I/O latency.

Unfortunately, at this level, we don't know if the request is to
a rotating disk or not.

Change-Id: I404f1fd0c20eff41243f3feae1909723a7eefb3e
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: linux-aio@kvack.org
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Merge "m7: fix proximity sensor issues" into cm-10.2
Merge "usb: gadget: mass_storage: added sysfs entry for cdrom to LUNs" into cm-10.2
Merge "AIO: Don't plug the I/O queue in do_io_submit()" into cm-10.2
Merge changes Ie7a503ce,I0bfe81e6,I5662c221,I5f064971,If8283f26,I48a36f75,I6b9a15f0,I06ffdddd,Ic5787ffb,I62102ead into cm-10.2

* changes:
  net: wireless: bcmdhd: Fix of Wireless Location Service
  net: wireless: bcmdhd: Fix of Wireless Location Service
  net: wireless: bcmdhd: Update Location Service code
  net: wireless: bcmdhd: enable WL_IFACE_COMB_NUM_CHANNELS
  net: wireless: bcmdhd: Update to version 1.88.45
  net: wireless: bcmdhd: Update to version 1.88.42
  net: wireless: bcmdhd: Update to version 1.88.41
  net: wireless: bcmdhd: Remove chatty message from wl_cfgp2p_act_frm_search
  net: wireless: bcmdhd: Remove PASS_ARP_PACKET define
  net: wireless: bcmdhd: Enable p2p support bits for p2p device
msm_serial_hs_brcm: Fix sleeping while atomic during device open

Change-Id: I00f96f06a397f92402db06a4fe33913a4f862e9e
lib: spinlock_debug: Avoid livelock in do_raw_spin_lock

The logic in do_raw_spin_lock attempts to acquire a spinlock
by invoking arch_spin_trylock in a loop with a delay between
each attempt. Now consider the following situation in a 2
CPU system:

1. Cpu 0 continually acquires and releases a spinlock in a
   tight loop; it stays in this loop until some condition X
   is satisfied. X can only be satisfied by another CPU.

2. Cpu 1 tries to acquire the same spinlock, in an attempt
   to satisfy the aforementioned condition X. However, it
   never sees the unlocked value of the lock because the
   debug spinlock code uses trylock instead of just lock;
   it checks at all the wrong moments - whenever Cpu 0 has
   locked the lock.

Now in the absence of debug spinlocks, the architecture specific
spinlock code can correctly allow Cpu1 to wait in a "queue"
(e.g., ticket spinlocks), ensuring that it acquires the lock at
some point. However, with the debug spinlock code, livelock
can easily occur due to the use of try_lock, which obviously
cannot put the CPU in that "queue".

Address this by actually attempting arch_spin_lock once it is
suspected that there is a spinlock lockup. If we're in a
situation that is described above, the arch_spin_lock should
succeed; otherwise other timeout mechanisms (e.g., watchdog)
should alert the system of a lockup.

Additionally, the delay between each trylock attempt adds up
to a total delay of 1 second. On some embedded architectures,
this is an unacceptably large value. Reduce this to a ~62 ms
delay.

CRs-Fixed: 393351
Change-Id: I56f0d8f5e483cd7e8167fc7a363b9de7777a0830
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>

kernel/lib: add additional debug capabilites for data corruption

Data corruptions in the kernel often end up in system crashes that
are easier to debug closer to the time of detection. Specifically,
if we do not panic immediately after lock or list corruptions have been
detected, the problem context is lost in the ensuing system mayhem.
Add support for allowing system crash immediately after such corruptions
are detected. The CONFIG option controls the enabling/disabling of the
feature.

Change-Id: I9b2eb62da506a13007acff63e85e9515145909ff
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>

lib: spinlock_debug: increase spin dump timeout

On certain targets the worst case console buffer draining time can
exceed the aggressive spin dump timeout value. Relax the timeout value
to cater to these scenarios.

Change-Id: I7312ffe06bafd2dc7adf0f4e8b73a53fc5839235
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>