Commit graph

604065 commits

Author SHA1 Message Date
Linux Build Service Account
37481e48e5 Merge "Revert "rtc: alarm: Add power-on alarm feature"" 2019-01-01 07:05:39 -08:00
Linux Build Service Account
ed4ee6a29b Merge "msm: ais: Update request from kernel to lk" 2019-01-01 07:05:38 -08:00
Linux Build Service Account
b55df81c1b Merge "usb: diag_ipc_bridge: Fix kref_put handling in case of transfers" 2018-12-30 19:52:40 -08:00
Linux Build Service Account
b9e4e9fecc Merge "defconfig: msm: Enable earlydomain handoff support" 2018-12-29 20:51:35 -08:00
Linux Build Service Account
252c2feee7 Merge "usb: gadget: f_uac1: Add support for UAC1 function" 2018-12-29 20:51:26 -08:00
Mao Jinlong
5e0025e766 Revert "rtc: alarm: Add power-on alarm feature"
This reverts commit 2e1a4aefef66db901f9a906b79e30187f10dbecb.

Power off alarm is not set via alarmtimer now. Remove the changes
of power off alarm's previous design.

Change-Id: I0f60bec0d94c93c4f2a89ae86a1b0a0d04aa9e48
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2018-12-27 18:22:40 +05:30
Linux Build Service Account
86bc01ea1b Merge "usb: gadget: u_audio: Check return value from config_ep_by_speed()" 2018-12-26 02:52:51 -08:00
Linux Build Service Account
f1af8c5dc7 Merge "usb: gadget: u_audio: protect stream runtime fields with stream spinlock" 2018-12-26 02:52:50 -08:00
Linux Build Service Account
391be96e91 Merge "usb: gadget: u_audio: remove caching of stream buffer parameters" 2018-12-26 02:52:46 -08:00
Ajay Agarwal
45fbfdcafb usb: diag_ipc_bridge: Fix kref_put handling in case of transfers
Currently the driver puts kref in the read/write completion
callback irrespective of whether the transaction was successful
or not. This is fine for diag transfers because the read/write
function is not waiting for completion.
But in case of IPC transfers, the read/write function waits for
completion. If the transfer fails for some reason, then it will
do a kref_put as well, along with the completion callback. This
leads to double put of kref counter leading to null pointer
dereference from diag_bridge_disconnect(on cable disconnect).
Fix this by doing kref_put in the completion callback only if the
URB is submitted successfully. Else do it from the error handling
in read/write functions.

Change-Id: I50645cac757293dd0b1df9afb356281b2922401b
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-26 16:00:07 +05:30
Vivek Kumar
74746264e5 defconfig: msm: Enable earlydomain handoff support
Enable early domain handoff support for msm-auto
perf defconfig

Change-Id: I4364928a05299367906996d01782ea7fced099ba
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
2018-12-24 03:50:28 -08:00
Linux Build Service Account
cdd23bac5b Merge "msm: ais: Fix for OOB security CR" 2018-12-20 21:01:35 -08:00
Linux Build Service Account
f577a9e565 Merge "soc: qcom: glink: Initialize local state while fetching ctx" 2018-12-20 21:01:34 -08:00
Linux Build Service Account
b1d4cb984f Merge "Revert "ARM: dts: msm: Enabled dt entry for bmi160 and iam20680"" 2018-12-20 21:01:32 -08:00
Ajay Agarwal
b5c775efe4 usb: gadget: f_uac1: Add support for UAC1 function
Add support for the UAC1 function with the configfs framework
along with following other changes:
 - Add dynamic updation of AudioStreaming interface numbers in
   the AudioControl interface descriptor.
 - Add superspeed support.
 - Stop playback on func disable so that pending request's
   completion is called before request has been freed in unbind.
 - Fix minor compilation issue.

Change-Id: I5f60680c5795d77cf37f6db37cf5a8c8d3648b4b
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 21:06:37 +05:30
Hemant Kumar
108c841217 usb: gadget: u_audio: Check return value from config_ep_by_speed()
In case config_ep_by_speed() returns error, endpoint descriptors
would not get populated. This results into NULL pointer dereference
when ep desc is accessed later. Fix this by bailing out set_alt if
config_ep_by_speed() API returns error.

Change-Id: Iaf9a0001973753988ff200edad3ed8587b6a4181
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:45:25 +05:30
Vladimir Zapolskiy
5e5109f539 usb: gadget: u_audio: protect stream runtime fields with stream spinlock
The change protects almost the whole body of u_audio_iso_complete()
function by PCM stream lock, this is mainly sufficient to avoid a race
between USB request completion and stream termination, the change
prevents a possibility of invalid memory access in interrupt context
by memcpy():

    Unable to handle kernel paging request at virtual address 00004e80
    pgd = c0004000
    [00004e80] *pgd=00000000
    Internal error: Oops: 817 [#1] PREEMPT SMP ARM
    CPU: 0 PID: 3 Comm: ksoftirqd/0 Tainted: G         C   3.14.54+ #117
    task: da180b80 ti: da192000 task.ti: da192000
    PC is at memcpy+0x50/0x330
    LR is at 0xcdd92b0e
    pc : [<c029ef30>]    lr : [<cdd92b0e>]    psr: 20000193
    sp : da193ce4  ip : dd86ae26  fp : 0000b180
    r10: daf81680  r9 : 00000000  r8 : d58a01ea
    r7 : 2c0b43e4  r6 : acdfb08b  r5 : 01a271cf  r4 : 87389377
    r3 : 69469782  r2 : 00000020  r1 : daf82fe0  r0 : 00004e80
    Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
    Control: 10c5387d  Table: 2b70804a  DAC: 00000015
    Process ksoftirqd/0 (pid: 3, stack limit = 0xda192238)

Also added a check for potential !runtime condition, commonly it is
done by PCM_RUNTIME_CHECK(substream) in the beginning, however this
does not completely prevent from oopses in u_audio_iso_complete(),
because the proper protection scheme must be implemented in PCM
library functions.

An example of *not fixed* oops due to substream->runtime->*
dereference by snd_pcm_running(substream) from
snd_pcm_period_elapsed(), where substream->runtime is gone while
waiting the substream lock:

    Unable to handle kernel paging request at virtual address 6b6b6b6b
    pgd = db7e4000
    [6b6b6b6b] *pgd=00000000
    CPU: 0 PID: 193 Comm: klogd Tainted: G         C   3.14.54+ #118
    task: db5ac500 ti: db60c000 task.ti: db60c000
    PC is at snd_pcm_period_elapsed+0x48/0xd8 [snd_pcm]
    LR is at snd_pcm_period_elapsed+0x40/0xd8 [snd_pcm]
    pc : [<>]    lr : [<>]    psr: 60000193
    Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
    Control: 10c5387d  Table: 2b7e404a  DAC: 00000015
    Process klogd (pid: 193, stack limit = 0xdb60c238)
    [<>] (snd_pcm_period_elapsed [snd_pcm]) from [<>] (udc_irq+0x500/0xbbc)
    [<>] (udc_irq) from [<>] (ci_irq+0x280/0x304)
    [<>] (ci_irq) from [<>] (handle_irq_event_percpu+0xa4/0x40c)
    [<>] (handle_irq_event_percpu) from [<>] (handle_irq_event+0x3c/0x5c)
    [<>] (handle_irq_event) from [<>] (handle_fasteoi_irq+0xc4/0x110)
    [<>] (handle_fasteoi_irq) from [<>] (generic_handle_irq+0x20/0x30)
    [<>] (generic_handle_irq) from [<>] (handle_IRQ+0x80/0xc0)
    [<>] (handle_IRQ) from [<>] (gic_handle_irq+0x3c/0x60)
    [<>] (gic_handle_irq) from [<>] (__irq_svc+0x44/0x78)

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
[erosca: W/o this patch, with minimal instrumentation [1], I can
         consistently reproduce BUG: KASAN: use-after-free [2]]

[1] Instrumentation to reproduce issue [2]:
 diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c
 index a72295c953bb..bd0b308024fe 100644
 --- a/drivers/usb/gadget/function/u_audio.c
 +++ b/drivers/usb/gadget/function/u_audio.c
 @@ -16,6 +16,7 @@
  #include <sound/core.h>
  #include <sound/pcm.h>
  #include <sound/pcm_params.h>
 +#include <linux/delay.h>

  #include "u_audio.h"

 @@ -147,6 +148,8 @@ static void u_audio_iso_complete(struct usb_ep *ep, struct usb_request *req)

 	spin_unlock_irqrestore(&prm->lock, flags);

 +	udelay(500); //delay here to increase probability of parallel activities
 +
 	/* Pack USB load in ALSA ring buffer */
 	pending = prm->dma_bytes - hw_ptr;

[2] After applying [1], below BUG occurs on Rcar-H3-Salvator-X board:
==================================================================
BUG: KASAN: use-after-free in u_audio_iso_complete+0x24c/0x520 [u_audio]
Read of size 8 at addr ffff8006cafcc248 by task swapper/0/0

CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        WC      4.14.47+ #160
Hardware name: Renesas Salvator-X board based on r8a7795 ES2.0+ (DT)
Call trace:
[<ffff2000080925ac>] dump_backtrace+0x0/0x364
[<ffff200008092924>] show_stack+0x14/0x1c
[<ffff200008f8dbcc>] dump_stack+0x108/0x174
[<ffff2000083c71b8>] print_address_description+0x7c/0x32c
[<ffff2000083c78e8>] kasan_report+0x324/0x354
[<ffff2000083c6114>] __asan_load8+0x24/0x94
[<ffff2000021d1b34>] u_audio_iso_complete+0x24c/0x520 [u_audio]
[<ffff20000152fe50>] usb_gadget_giveback_request+0x480/0x4d0 [udc_core]
[<ffff200001860ab8>] usbhsg_queue_done+0x100/0x130 [renesas_usbhs]
[<ffff20000185f814>] usbhsf_pkt_handler+0x1a4/0x298 [renesas_usbhs]
[<ffff20000185fb38>] usbhsf_irq_ready+0x128/0x178 [renesas_usbhs]
[<ffff200001859cc8>] usbhs_interrupt+0x440/0x490 [renesas_usbhs]
[<ffff2000081a0288>] __handle_irq_event_percpu+0x594/0xa58
[<ffff2000081a07d0>] handle_irq_event_percpu+0x84/0x12c
[<ffff2000081a0928>] handle_irq_event+0xb0/0x10c
[<ffff2000081a8384>] handle_fasteoi_irq+0x1e0/0x2ec
[<ffff20000819e5f8>] generic_handle_irq+0x2c/0x44
[<ffff20000819f0d0>] __handle_domain_irq+0x190/0x194
[<ffff20000808177c>] gic_handle_irq+0x80/0xac
Exception stack(0xffff200009e97c80 to 0xffff200009e97dc0)
7c80: 0000000000000000 0000000000000000 0000000000000003 ffff200008179298
7ca0: ffff20000ae1c180 dfff200000000000 0000000000000000 ffff2000081f9a88
7cc0: ffff200009eb5960 ffff200009e97cf0 0000000000001600 ffff0400041b064b
7ce0: 0000000000000000 0000000000000002 0000000200000001 0000000000000001
7d00: ffff20000842197c 0000ffff958c4970 0000000000000000 ffff8006da0d5b80
7d20: ffff8006d4678498 0000000000000000 000000126bde0a8b ffff8006d4678480
7d40: 0000000000000000 000000126bdbea64 ffff200008fd0000 ffff8006fffff980
7d60: 00000000495f0018 ffff200009e97dc0 ffff200008b6c4ec ffff200009e97dc0
7d80: ffff200008b6c4f0 0000000020000145 ffff8006da0d5b80 ffff8006d4678498
7da0: ffffffffffffffff ffff8006d4678498 ffff200009e97dc0 ffff200008b6c4f0
[<ffff200008084034>] el1_irq+0xb4/0x12c
[<ffff200008b6c4f0>] cpuidle_enter_state+0x818/0x844
[<ffff200008b6c59c>] cpuidle_enter+0x18/0x20
[<ffff20000815f2e4>] call_cpuidle+0x98/0x9c
[<ffff20000815f674>] do_idle+0x214/0x264
[<ffff20000815facc>] cpu_startup_entry+0x20/0x24
[<ffff200008fb09d8>] rest_init+0x30c/0x320
[<ffff2000095f1338>] start_kernel+0x570/0x5b0
---<-snip->---

Change-Id: I1cfbc0de5590fefa2ad069b10df4e6cabc932546
Fixes: 132fcb4608 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 56bc61587daadef67712068f251c4ef2e3932d94
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:44:26 +05:30
Vladimir Zapolskiy
ad983d197d usb: gadget: u_audio: remove cached period bytes value
Substream period size potentially can be changed in runtime, however
this is not accounted in the data copying routine, the change replaces
the cached value with an actual value from substream runtime.

As a side effect the change also removes a potential division by zero
in u_audio_iso_complete() function, if there is a race with
uac_pcm_hw_free(), which sets prm->period_size to 0.

Change-Id: I27a98aa61544ba7cfd64be6bc1c2262fe1116598
Fixes: 132fcb4608 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 773e53d50e227b0c03d0bb434c1636f6c49c75b2
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:43:31 +05:30
Vladimir Zapolskiy
32c666f945 usb: gadget: u_audio: remove caching of stream buffer parameters
There is no necessity to copy PCM stream ring buffer area and size
properties to UAC private data structure, these values can be got
from substream itself.

The change gives more control on substream and avoid stale caching.

Change-Id: I305a3aab7c80efe153cb3e14d060d883d3637ab3
Fixes: 132fcb4608 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 96afb54ece0ee903d23a7ac04ddc461413b972c4
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:42:48 +05:30
Joshua Frkuska
06e25fbb83 usb: gadget: u_audio: update hw_ptr in iso_complete after data copied
In u_audio_iso_complete, the runtime hw_ptr is updated before the
data is actually copied over to/from the buffer/dma area. When
ALSA uses this hw_ptr, the data may not actually be available to
be used. This causes trash/stale audio to play/record. This
patch updates the hw_ptr after the data has been copied to avoid
this.

Change-Id: I94736e4ea899ac781076e9c425dda65eed7cc319
Fixes: 132fcb4608 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Joshua Frkuska <joshua_frkuska@mentor.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 6b37bd78d30c890e575a1bda22978d1d2a233362
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:41:17 +05:30
Eugeniu Rosca
2eb1ffe383 usb: gadget: u_audio: fix pcm/card naming in g_audio_setup()
Fix below smatch (v0.5.0-4443-g69e9094e11c1) warnings:
drivers/usb/gadget/function/u_audio.c:607 g_audio_setup() warn: strcpy() 'pcm_name' of unknown size might be too large for 'pcm->name'
drivers/usb/gadget/function/u_audio.c:614 g_audio_setup() warn: strcpy() 'card_name' of unknown size might be too large for 'card->driver'
drivers/usb/gadget/function/u_audio.c:615 g_audio_setup() warn: strcpy() 'card_name' of unknown size might be too large for 'card->shortname'

Below commits performed a similar 's/strcpy/strlcpy/' rework:
* v2.6.31 commit 8372d4980f ("ALSA: ctxfi - Fix PCM device naming")
* v4.14 commit 003d3e70dbeb ("ALSA: ad1848: fix format string overflow warning")
* v4.14 commit 6d8b04de87e1 ("ALSA: cs423x: fix format string overflow warning")

Change-Id: I4d98b36feb40530f3758189d4b0d0643569e6be7
Fixes: eb9fecb9e69b ("usb: gadget: f_uac2: split out audio core")
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: dfa042fa310caa475667b8c38d852f14439e0b01
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:40:00 +05:30
Bhumika Goyal
debfef9994 usb: gadget: make snd_pcm_hardware const
Make this const as it is only used during a copy operation.
Done using Coccinelle.

Change-Id: I3db5b880248aeee8f845148093f7d6768db009e6
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 2ab3c34c9c75331143d67042e826bdcde4d6ab37
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:39:14 +05:30
Arvind Yadav
54120399c6 usb: gadget: f_uac2: constify snd_pcm_ops structures
snd_pcm_ops are not supposed to change at runtime. All functions
working with snd_pcm_ops provided by <sound/pcm.h> work with
const snd_pcm_ops. So mark the non-const structs as const.

Change-Id: Ia05f088487fd410b1567353512e4c3d457aaf96f
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 640c0be81b9c33485559e716d914252228361b1c
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:38:32 +05:30
Ruslan Bilovol
f80170561b usb: gadget: f_uac1: endianness fixes.
As per USB spec, multiple-bytes fields are stored
in little-endian order. Use CPU<->LE helpers for
such fields.

Change-Id: Iba552e473a39be4adafd641692d5aca12f7adf06
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 42370b821168e6730ec4c7d988aeadc1260c7b4d
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:36:11 +05:30
Ajay Agarwal
8706efd809 usb: gadget: add f_uac1 variant based on a new u_audio api
This patch adds a new function 'f_uac1'
(f_uac1 with virtual "ALSA card") that
uses recently created u_audio API. Comparing
to legacy f_uac1 function implementation it
doesn't require any real Audio codec to be
present on the device. In f_uac1 audio
streams are simply sinked to and sourced
from a virtual ALSA sound card created
using u_audio API.

Legacy f_uac1 approach is to write audio
samples directly to existing ALSA sound
card

f_uac1 approach is more generic/flexible
one - create an ALSA sound card that
represents USB Audio function and allows to
be used by userspace application that
may choose to do whatever it wants with the
data received from the USB Host and choose
to provide whatever it wants as audio data
to the USB Host.

f_uac1 also has capture support (gadget->host)
thanks to easy implementation via u_audio.
By default, capture interface has 48000kHz/2ch
configuration, same as playback channel has.

f_uac1 descriptors naming convention
uses f_uac2 driver naming convention that
makes it more common and meaningful.

Comparing to f_uac1_legacy, the f_uac1 doesn't
have volume/mute functionality. This is because
the f_uac1 volume/mute feature unit was dummy
implementation since that driver creation (2009)
and never had any real volume control or mute
functionality, so there is no any difference
here.

Since f_uac1 functionality, exposed
interface to userspace (virtual ALSA card),
input parameters are so different comparing
to f_uac1_legacy, that there is no any
reason to keep them in the same file/module,
and separate function was created.

Change-Id: Ib40c144ef0f35ee7d906ce3489f3e7780f3d5e1b
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 0591bc2360152f851e29246884805bb77a2c3b9d
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:32:26 +05:30
Ajay Agarwal
8d17be60a0 usb: gadget: function: make current f_uac1 implementation legacy
Before introducing new f_uac1 function (with virtual
ALSA card) make current implementation legacy.

This includes renaming of existing files, some
variables, config options and documentation

Change-Id: Ie3a826f356cc6571ce5967cd0bf8263b630b7249
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: d355339eecd986648420e05f8c958fbc78dbb382
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:32:14 +05:30
Ajay Agarwal
e83bff7281 usb: gadget: split out audio core
Abstract the peripheral side ALSA sound card code into a
component that can be called by various functions, so the
various flavors can be split apart and selectively reused.

Visible changes:
 - add uac_params structure to pass audio paramteres for
   g_audio_setup
 - make ALSA sound card's name configurable
 - add [in/out]_ep_maxpsize
 - allocate snd_uac_chip structure during g_audio_setup
 - add u_audio_[start/stop]_[capture/playback] functions

This change differs from opensource patch in that it does not
modify the UAC2 driver to use u_audio helper file for ALSA
sound card support.

Change-Id: Ia67ec02ed442a67bc359efc2655aa9ba49b79368
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: eb9fecb9e69b0be8c267c55b0bb52a08e8fb6bee
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:25:47 +05:30
Ruslan Bilovol
a1f2b05323 usb: gadget: function: f_uac1: implement get_alt()
After commit 7e4da3fcf7c9 ("usb: gadget: composite:
Test get_alt() presence instead of set_alt()") f_uac1
function became broken because it doesn't have
get_alt() callback implementation and composite
framework never set altsetting 1 for audiostreaming
interface. On host site it looks like:

 [424339.017711] 21:1:1: usb_set_interface failed (-32)

Since host can't set altsetting 1, it can't start
playing audio.

In order to fix it implemented get_alt along with
minor improvements (error conditions checking)
similar to what existing f_uac2 has.

Change-Id: I0a8371ed74a1b27cbba2261e5dab28c8d4af44b2
Cc: Krzysztof Opasiak <k.opasiak@samsung.com>
Signed-off-by: Ruslan Bilovol <ruslan.bilovol@gmail.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 1fc4926d92b9515b44f35b339bab5d2ca474a723
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-20 20:25:24 +05:30
Linux Build Service Account
323f28a620 Merge "clk: msm: mmss: Add dev_pm_ops for MMSS PLL for 8996" 2018-12-20 06:51:25 -08:00
Dhoat Harpal
db15695b89 soc: qcom: glink: Initialize local state while fetching ctx
Initialization of channel's local state is not done at the time of
fetching context from list of channels. This leads to race condition
if remote close happens during this time. Remote close will check if
local state is not open then delete channel from list. This leads to
use after free scenerio.

Initialize local state at the time of fetching channel context from
list of channels.

CRs-Fixed: 2155992
Change-Id: If113daba129191bd67ef2460eb4e87c2d5614403
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
2018-12-20 02:37:00 -08:00
Puneet Yatnal
901178c7ed Revert "ARM: dts: msm: Enabled dt entry for bmi160 and iam20680"
BMI160 and IAM20680 sensor driver was used in automotive platform for
dead reckoning solution, reverting the change since QDR no longer
required.

This reverts commit b7d92272196b67b22a2aeda2080efe268e3609ab.

Change-Id: Id5e41b0fa7f0a145c40e01d1cc9a3869f4688b9a
Signed-off-by: Puneet Yatnal <puneet@codeaurora.org>
2018-12-20 01:00:40 -08:00
Linux Build Service Account
d67787b7c6 Merge "perf: Cancel the mux hrtimer during CPU hotplug to avoid migration" 2018-12-19 23:29:13 -08:00
Linux Build Service Account
16f7475b49 Merge "msm: adsprpc: Maintain the same structures in kernel and user-space" 2018-12-19 23:29:12 -08:00
Taniya Das
56ebcfcaca clk: msm: mmss: Add dev_pm_ops for MMSS PLL for 8996
Support early resume and late suspend for MMPLLs
to support hibernation. Without this change, the mmplls
were not getting restored to a sane state on the
hibernate resume.

Change-Id: I7edb7219149d2e96a9487cdaf19a0bc4b9ec709f
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2018-12-19 17:20:54 -08:00
Linux Build Service Account
c434e9712c Merge "ASoC: msm: Group mi2s driver support for msm8996" 2018-12-19 15:20:24 -08:00
Cong Tang
84b3d9aa80 ASoC: msm: Group mi2s driver support for msm8996
Support group mi2s driver for sec/tert/quat mi2s interface in
msm8996.

Change-Id: I656612ca104c80770e316bc4d541d2ae56164e61
Signed-off-by: Cong Tang <congt@codeaurora.org>
2018-12-18 23:08:40 -08:00
Linux Build Service Account
361feeef4f Merge "Merge android-4.4.167 (ad9ce19) into msm-4.4" 2018-12-18 16:11:27 -08:00
Linux Build Service Account
897db080e2 Merge "ARM: dts: msm: Update mi2s group port id for msm8996" 2018-12-18 09:07:03 -08:00
Linux Build Service Account
da5817740b Merge "ARM: dts: msm: Add dt node for earlydomain" 2018-12-18 09:07:02 -08:00
E V Ravi
01c1ac59d3 msm: ais: Fix for OOB security CR
If the user passes the arbitrary command with _IOC_DIR(cmd) == _IOC_NONE,
"arg" should point to any arbitrary address.
Check for invalid command and return error.

CRs-Fixed: 2299567
Change-Id: Ibd77adfe53ef0777ff4eb96c914e21f43dfd6749
Signed-off-by: E V Ravi <evenka@codeaurora.org>
2018-12-18 16:38:30 +05:30
Linux Build Service Account
a9881a148a Merge "drm: msm: sde: reorder call sequence in splash release thread" 2018-12-18 02:51:50 -08:00
Linux Build Service Account
9c95fa9215 Merge "Revert "ARM: dts: msm: Disable runtime PM in host mode for automotive"" 2018-12-18 02:51:48 -08:00
Linux Build Service Account
06345e29b3 Merge "drm: msm: sde: Update splash handoff with new APIs" 2018-12-18 02:51:46 -08:00
E V Ravi
8991119cc5 msm: ais: Update request from kernel to lk
Updating early shutdown request from kernel to lk

Change-Id: I398e278c683340dbe501f78e0f2aa902c9cdf606
Signed-off-by: E V Ravi <evenka@codeaurora.org>
2018-12-18 14:09:45 +05:30
Vivek Kumar
dd35c8ee45 ARM: dts: msm: Add dt node for earlydomain
Add DT node for early domain driver for msm8996 cdp
boards and remove reserved memory node for lk_pool
as it will be populated by bootloader if early domain
is enabled.

Change-Id: Iedcb4b47544a2355e98429a786d246351fdca75e
Signed-off-by: Vivek Kumar <vivekuma@codeaurora.org>
2018-12-17 21:27:03 -08:00
Tharun Kumar Merugu
4fbcbe6cb3 msm: adsprpc: Maintain the same structures in kernel and user-space
Mismatch in structures in user-space and kernel is leading to
unknown ioctl code and leading to failure in FASTRPC_IOCTL_CONTROL call.

Change-Id: I38537f128dc9a2815c1a98ec4ee59b2265c9159c
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2018-12-18 09:46:17 +05:30
Ajay Agarwal
c027a46841 Revert "ARM: dts: msm: Disable runtime PM in host mode for automotive"
'Commit f09d23c34f2f ("ARM: dts: msm: Disable runtime PM in host
mode for automotive")' was disabling runtime PM in host mode for
automotive targets. This lead to leakage being observed on 1.8V
regulator for the USB2 PHY in target RBSC state. Revert this to
avoid the leakage.

Change-Id: Ia5da723764c289612d74287af8cf87f22e852abb
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-12-17 20:13:30 +05:30
Cong Tang
24c58ec4d0 ARM: dts: msm: Update mi2s group port id for msm8996
Revise group afe port id for secondary and tertiary due to adsp
firmware definition change.

Change-Id: I829437bc7ac7ff5159a86f667b7a5b58f36e0c66
Signed-off-by: Cong Tang <congt@codeaurora.org>
2018-12-16 22:25:53 -08:00
Linux Build Service Account
082fa7fad6 Merge "ASoC: sdm660: Update VI sense sample rate to 8k" into msm-4.4 2018-12-15 00:20:34 -08:00
Linux Build Service Account
45e2d4d907 Merge "ASoC: msm_sdw: Update VI sense sample rate to 8k" 2018-12-14 17:35:58 -08:00