mmc: core: Fix null pointer dereference due to race conditions

Fix race condition between mmcqd thread and the mmc_queue_suspend
updating a shared variable mq->flags, which can lead to potential
null pointer dereference as following-

Unable to handle kernel NULL pointer dereference at
virtual address 00000020
pgd = c0004000
[00000020] *pgd=00000000
mmcqd/0:  186] Internal error: Oops: 5 [#1] PREEMPT SMP ARM
CPU: 0    Tainted: G        W     (3.4.0-1251694-eng #1)
PC is at mmc_blk_err_check+0x20c/0x3b8
LR is at mmc_start_req+0x198/0x718

cpu0		|	cpu1
x |= 1		|	x |= 2

final value of x can be x = 1 or x = 2

Change-Id: Ie0fff6d6dba5aebb3584cba9fb98de24515c4cd8
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Dorimanx note:
i have the next mmc commit
https://github.com/neobuddy89/hammerhead_kernel_caf/commit/a36865db45a54e53c8fcbc7c32a6bb12251ac901

so i have merged this one + one i had.
mmc: core: Fix power class config for HS400

Use the correct power class field from the extended CSD register
for HS400 mode as defined in the eMMC5.0 specification.

Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: msm_bus: Fix inadvertent stomp on BKE_EN register

While setting the QoS mode of fixed mode masters bad masking
operations is causing accidental stomp on the upper nibble of the
BKE_EN register.

Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
regulator: Add proxy consumer driver

Add a proxy consumer driver which can be used to ensure that a
given regulator maintains a certain minimum state during bootup.
Enable state, voltage, and current may be forced to specified
levels.

Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
regulator: Call proxy-consumer functions for each regulator registered

Add a call to regulator_proxy_consumer_register() at the end of
regulator_register() and a call to
regulator_proxy_consumer_unregister() at the beginning of
regulator_unregister().  These calls ensure that proxy consumer
features may be used by any type of regulator regardless of the
driver supporting it.

Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ARM: dts: msm: Add proxy consumer properties for regulators on msm8974

Add regulator proxy consumer properties for the regulators used
by clocks on msm8974 and msm8974pro targets:

     supply     msm8974            msm8974pro
1. vdd_dig    pm8841_s2_corner  pma8084_s2_corner
2. vdd_mem    pm8841_s1_ao      pma8084_s1_ao
3. vdd_hfpll  pm8941_l12        pma8084_l12

Use proxy consumers to ensure that each of these regulators is
kept on during boot-up at the highest allowed voltage.  This
guarantees that any hardware set up by bootloaders at non-minimum
regulator voltage will continue to operate until the driver
responsible for the hardware has initialized and made its own
regulator requests.

Signed-off-by: David Collins <collinsd@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
dwc3: gadget: Add support for transfer complete events counting

Add counting of USB transfers completion events/interrupts
so that it can be used to determine USB transfers or BUS usage.
This is a simple approach which gives reasonable accuracy to
avoid counting actual bytes that got transferred over USB.

Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
USB: ci13xxx_udc: Add support for UI interrupts counting

Add counting of UI or USB transfers completion interrupts
so that it can be used to determine USB transfers or
BUS usage. This is a simple approach which gives
reasonable accuracy to avoid counting actual bytes
that got transferred over USB.

Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ARM: dts: msm: Update the vifeed back routing

Codec clock should be enabled when vifeedback path for speaker
protection is enabled.
Change adds the routing entries to enable the codec clock for
speaker protection vi capture feedback path for 8974.

Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ASoC: msm: Rampup volume on each start

Rampup volume on each trigger start call to compress driver.
This helps in reducing pops heard by the listener after a seek/pause+resume

Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
mfd: wcd9xxx: Add support for REPEAT_CHANGE_VALUE

Slimbus supports ability to write upto 16 bytes to the same register as
one transaction on the bus through REPEAT_CHANGE_VALUE slimbus message.
Add support to write codec register with multiple values using
REPEAT_CHANGE_VALUE. Not all sizes from 1 to 16 are supported by such a
message, add support in driver to be able to write all sizes from 1 to
16 by splitting the register writes of unsupported sizes into multiple
writes of supported sizes.

Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
WIFI:  bcmdhd: fix p2p interface and wlan0 assoc race

Do not allow virtual p2p interface creation while the AP
driver status is CONNECTING

Bug 200009241
Bug 200009346
Bug 200009344
Bug 200009328

Signed-off-by: bibhayr <bibhayr@nvidia.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Config update: Enable new REGULATOR_PROXY_CONSUMER
PowerSuspend: V1.5 Remove HYBRID Mode. as it's stuck LG MDSS!!!

Users report random screen stuck in BLANK state. after many tests.

This seems to be the problem. when using KERNEL (autosleep.c) all ok

Maybe there is other drivers that do the bug. but i need stable kernel.

So i can always switch to PANEL to test, but i dont think i will.

Also USER/APP cant switch the kernel mode.
slimbus: Enable clients to send user messages to devices.

Slimbus protocol allows user messages of destination referred, or
source referred type to be sent to a slimbus device.
Provide framework to support such messages. Note that, controller
may not support all user messages.

Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Update tuxera_update.sh from LG. used to get exfat module for kernel.
patch-3.4.101-102 using patch -p1 <
SCHED: Fix remaining printk_sched after patch 3.4.102
Kernel 6.8
SOUND CONTROLS: Fix locked LG controls when set on boot is set in APP.