msm: sdio: fix MCI_CLK corruption

when sdio_al calls set_pwrsave at the end of sdio_al_sleep
the following scenario can happen:
if between the reading of MCI_CLK and the writing of
MCI_CLK we got an interrupt from the modem, the msm_sdcc
irq handler will turn on the clocks.
set_pwrsave and msmsdcc_platform_sdiowakeup_irq
have no protection between them so set_pwrsave
will write a corrupted value

(cherry-picked from commit
483f77e3b00ad33896ebdf374ae4072db39b68a9)
Signed-off-by: Maya Erez <merez@codeaurora.org>

CRs-fixed: 300739
Change-Id: I18417b570c21551974f5515c05ef96cb12fe2389
Signed-off-by: Maya Erez <merez@codeaurora.org>
mmc: msm_sdcc: Send CMD52 after every CMD53 write

On a completion of a CMD53 write, send a dummy CMD52
before reporting completion to client.

Change-Id: I63eee90f7e1d0eb20cda3dc0cc3a800c6e6a85b3
Signed-off-by: Oluwafemi Adeyemi <aadeyemi@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
mmc: msm_sdcc: Use nosync variant to disable sdcc irq

There is a possible deadlock between msmsdcc_sdio_al_lpm() and
msmsdcc_irq(). The former acquires host resource and waits for
pending msmsdcc_irq() to be completed which inturn waits for the same
resource to be released. Fix this by using nosync variant while
disabling sdcc irq.

Change-Id: I8273976f78eb45852c32517294081630f91e38d7
CRs-Fixed: 299342
Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org>
mmc: msm_sdcc: Fix issue with runtime PM resume

Due to the changes introduced in recent commit 68338b, runtime PM
resume is getting called twice while doing platform resume as below -

msmsdcc_pm_resume()->msmsdcc_runtime_resume()->mmc_resume_host()
->mmc_claim_host()->msmsdcc_enable()->msmsdcc_runtime_resume

This patch fixes this issue by checking the runtime PM state of
the device before resuming.

CRs-Fixed: 303742
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
(cherry picked from commit 792677d9414c5ff50f21a740f3fd1072187dcc81)

Change-Id: I8dcf149b83f6b7e24392a5e0af1f8bb8055c0b03
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
mmc: msm_sdcc: Fix issue with msmsdcc_enable()

Due to the recent commit 68338b, any pending runtime PM
work (runtime suspend/resume request) is not getting
cancelled before enabling the host for a new request.
This results in a possibility for suspend work to happen
in parallel while processing any active SD/MMC command.

Change-Id: I8db6c53480ad9c9bac972b4cb16ea2bc248a790f
CRs-fixed: 305399
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
mmc: msm_sdcc: Extend the spin lock to cover all register reads

In PIO IRQ handler, currently the STATUS and MASK registers are
read without the host lock being grabbed. Fix this by extending
the scope of the lock.

CRs-Fixed: 304791
Signed-off-by: Murali Palnati <palnatim@codeaurora.org>
(cherry picked from commit 78bbcac0ddb9a0e979cd45734bdaaee7714c31d4)

Change-Id: I25add6a04b94383515ebffa49bdefba2cbe21666
Signed-off-by: Raj Kushwaha <rajk@codeaurora.org>
Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
(cherry picked from commit a9e1d1ad63af8845ae5cc957587808bf9d2843ae)

Signed-off-by: Gopal G Goberu <ggober@codeaurora.org>
msm: audio: qdsp5v2: Fix issues with LPA playback volume after call

- LPA audio plays with higher volume after voice call.
- In LPA driver POPP gain is always set to unity. This should only
reset when switching from NON-HLB to HLB device.
- Add attribute to maintain the previous state to set POPP gain only
in case of device switch from NON-HLB to HLB.

Change-Id: Id125d8f81b5b423ffbfd6dee551e9061e13a500e
CRs-Fixed: 321780
Signed-off-by: Vinay Vaka <vvaka@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/qdsp5v2/audio_lpa.c
ipsec: be careful of non existing mac headers

Niccolo Belli reported ipsec crashes in case we handle a frame without
mac header (atm in his case)

Before copying mac header, better make sure it is present.

Bugzilla reference:  https://bugzilla.kernel.org/show_bug.cgi?id=42809

Reported-by: Niccolò Belli <darkbasic@linuxsystems.it>
Tested-by: Niccolò Belli <darkbasic@linuxsystems.it>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

CRs-Fixed: 344300
Signed-off-by: Jin Hong <jinh@codeaurora.org>
(cherry picked from commit 6329bf0a03811f4644a4c8d50bf241f6db6f19b5)

Conflicts:

	include/linux/skbuff.h

Change-Id: I062e7540bdeb8b2fa1c7b57e8a6d07a01b95d0a6
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: rotator: Call S/W reset on AXI bus error interrupts

Call Rotator S/W Reset when AXI bus error interrupts are
seen during a rotate request

CRs-fixed: 341947
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
(cherry picked from commit 30cf3eba95df9c6bf90f77b7f4ce40307d106e5d)

Change-Id: I4e0cd0b58fcf6a54301b875925354f8648cec5fb
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
Revert "msm_fb: display: disable pan display and memory access to fb1 and fb2"

This reverts commit 72f8a7382d528e233a06cf765d11ec8a6ef4d7d2.