mmc: card: fix timeout on erase/trim command due to sanitize

Sanitize command should never be issued with timeout argument of 0,
cause then it invokes timeout.
Moreover, sanitize command should not be called from routines that
does erase/trim/secure-discard commands, but only from a routine that
issues the sanitize spesifically.(mmc_blk_issue_sanitize_rq)

Change-Id: Ia3e3737f4bad149edc2248b8a30d74a9bd812be1
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
(cherry picked from commit 9a87427db940047907aee0dc86965645656f1ca9)
Signed-off-by: Neha Pandey <nehap@codeaurora.org>
wcnss: Add interface to Reset wcnss

Add wcnss reset interface, this interface generates an FIQ to Riva.
Upon receiving this interrupt, Riva will execute the ERR_FATAL
routine and invoke SSR.

Conflicts:

	drivers/net/wireless/wcnss/wcnss_wlan.c
	include/linux/wcnss_wlan.h

Change-Id: I74c293121cb69b312ed980902a12019adb700792
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>

Conflicts:
	include/linux/wcnss_wlan.h
ASoC: msm: skip sending volume in compressed pass through playback

For the playback use of compressed pass through on HDMI device,
post processing features are not supported and should not be sent to
DSP. Hence the change is now to send the volume only for the playback
of decode and render in DSP and skip for compressed pass through

CRs-Fixed: 442140
Change-Id: I2125f08baf1676f6bb1d13463a1f01dfe280963f
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
msm: kgsl: Fix hang detection to be 50ms or more

In current design waittimestamp can trigger hang detection
in less than 50ms. Check if hang detection was called less than
50ms ago, if true do no attempt hang detection.

Change-Id: Iaeb2501316c4194957fbe211b6023eeb869bd0d5
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Locate index of recovery during initialization

When a hang happens locate the index in ringbuffer from where replay
of recovery needs to be re-tried during initialization of recevery.
If the hang detection is false then hang reported by postmortem and
snapshot may be different, but recovery will always start from the
index obtained during initialization. Also, this allows us to capture
data into the snapshot that is in line with the point from where
recovery occurred.

Change-Id: Ie3877f0c81dad2ede888db7cb7d3ff13e2761763
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>

Conflicts:
	drivers/gpu/msm/adreno.c
	drivers/gpu/msm/adreno.h
msm: kgsl: Recovery policy change

Recovery algorithm is changed to
step 1: retry the same commands that hung the GPU
step 2: if step 1 fails, nop just the IB that hung the GPU
	and retry
step 3: if step 2 fails, skip commands in current context
        till end of frame and retry
step 4: if step 3 fails mark context as bad and execute
        the remaining commands from good contexts.

Previously we used to return -EDEADLK when recovery succeeds,
this is the same error code if the context is not recoverable.
With new policy if recovery succeeds we return -EAGAIN so that
userspace treats recovered context differently from the ones
that are not recoverable. If recovery fails we mark the context
as bad and return -EDEADLK.

Change-Id: I9fa3c40801964186866b6002e62f19cf6aa41361
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>

Conflicts:
	drivers/gpu/msm/adreno.c
	drivers/gpu/msm/adreno.h
	drivers/gpu/msm/adreno_drawctxt.h
	drivers/gpu/msm/adreno_ringbuffer.c
msm: kgsl: Renaming recovery to fault tolerance

Renaming recovery to fault tolerance and modifying
the functions and log messages accordingly.

Change-Id: I5f249806026ac514c4aff7da45c3a4e8cc2f8c34
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>

Conflicts:
	drivers/gpu/msm/adreno.c
	drivers/gpu/msm/adreno_a3xx.c
	drivers/gpu/msm/adreno_drawctxt.h
	drivers/gpu/msm/adreno_ringbuffer.c
msm: kgsl: Store process id and name in context structure

Store process id and name in context structure, this
information is used to print the process name when
when we detect a error in the driver, example
GPU fault tolerance, commands from bad context
in issueibcmds.

Change-Id: I6acd63933754fdec80d8274d3e1380ff2c23770e
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Detect long running IBs

When expired global timestamp is not progressing,
check if an IB is talking more than 2 seconds
with no update in GPU read pointer, IB1 base
IB1 size, IB2 base, IB2 size and detect it as a
long running IB. Invalidate the context of the IB
and do not attempt fault tolerance on this context.

Change-Id: I7e9780f5aed73a5c8807069aa506bec16a1576b4
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>

Conflicts:
	drivers/gpu/msm/adreno.c
msm: kgsl: Run GPU fault tolerance at max clock

GPU fault tolerance should take minimal time,
set the GPU clock to max freqency to acheive this.
When we set GPU clock to max freqency we vote for
high CPU clock and bus bandwidth.

Change-Id: I98a3f7c24f0939c08f9b12257817d17414e3f128
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Reduce postmortem logs by default

Full postmortem logs take 600ms to 1sec and this affects
fault tolerance time. Reduce postmortem logs and print
only necessary information. Full postmortem logs can
be enabled using debugfs.

Change-Id: I9039746bbdcf67ceebc02f21e84ab873531035a5
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Allow fault tolerance userspace control

Allow userspace to control fault tolerance policy,
this allows fault tolerance policy to be controlled
using panel file.

Change-Id: I991edf6f082384bc69454058fe5df3b5f535aa4c
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: No fault tolerance if userspace sets a flag

If userspace requests no fault tolerance using context flag
KGSL_CONTEXT_NO_FAULT_TOLERANCE, do not attempt denial of
service detection and do not attempt fault tolerance when
a hang is detected.

Change-Id: I5de0e4ae6e8407365725c30fcb0e00a601460ebc
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>

Conflicts:
	drivers/gpu/msm/adreno_drawctxt.c
	include/linux/msm_kgsl.h
msm: kgsl: Limit pagefault logging to 1 per page

Log only one pagefault error per page. If we log all the
pagefault errors it causes lot of messages in kernel logs
and sometimes leads to watchdog timeouts.

Change-Id: If8ee4ee28f6289277eb98d4d8ba73dfda6fc1133
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: kgsl: Allow pagefault policy to be controlled by userspace

GPU pagefault policy can be set to below options:
   a) enable/disable GPU HALT on pagefaults
   b) log only one pagefault per page.
GPU pagefault policy can be controled using panel file
and debugfs.

Change-Id: I0613e0d087fc45eb5e519e1c834a33f32376672f
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>

Conflicts:
	drivers/gpu/msm/kgsl_iommu.c
msm: kgsl: Debugfs entity to switch on/off userspace FT policy control

When debugfs entity "ft_user_control" is set, it enables userspace to
control GPU fault tolerance policy. By default it is disabled.

Change-Id: Ia93ccf6d9595f6e7cda71863f9067819aaa0a68d
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Merge "msm: 8064: add configuration to prevent asserting ap2m_errfatal"
Merge "net: rmnet_usb: Support multiple instances"
Conflicts:
	drivers/net/usb/rmnet_usb_data.c
Merge "net: rmnet_usb: Add support for PID 0x9079"
msm: kgsl: Make the snapshot dumper more tolerant of corrupted IBs

If there are a lot of sequential commands in the ringbuffer for the
same context there is a high probablity that some of the memory
for the older commands has been reused and so the contents may not
be reliable. Increase robustness by making sure we don't parse the
same IB over and over again and be more tolerant of errors and
strange sizes.

Change-Id: Ic0dedbade8504ea258ceea40593cb75e7d6211c8
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>