brcm2708: update linux 4.4 patches to latest version
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0463-snd-bcm2835-Don-t-allow-responses-from-VC-to-be-inte.patch
1 From f491fbf4315a1d4a7210450f835a6fe93880cd5b Mon Sep 17 00:00:00 2001
2 From: popcornmix <popcornmix@gmail.com>
3 Date: Fri, 12 Aug 2016 15:46:21 +0100
4 Subject: [PATCH] snd-bcm2835: Don't allow responses from VC to be interrupted
5 by user signals
6
7 There should always be a response, and retry after a signal interruption is not handled, so don't report
8 we are interruptible.
9
10 See: https://github.com/raspberrypi/linux/issues/1560
11 ---
12 sound/arm/bcm2835-vchiq.c | 25 ++++++-------------------
13 1 file changed, 6 insertions(+), 19 deletions(-)
14
15 --- a/sound/arm/bcm2835-vchiq.c
16 +++ b/sound/arm/bcm2835-vchiq.c
17 @@ -511,12 +511,7 @@ static int bcm2835_audio_set_ctls_chan(b
18 }
19
20 /* We are expecting a reply from the videocore */
21 - ret = wait_for_completion_interruptible(&instance->msg_avail_comp);
22 - if (ret) {
23 - LOG_DBG("%s: failed on waiting for event (status=%d)\n",
24 - __func__, success);
25 - goto unlock;
26 - }
27 + wait_for_completion(&instance->msg_avail_comp);
28
29 if (instance->result != 0) {
30 LOG_ERR("%s: result=%d\n", __func__, instance->result);
31 @@ -615,12 +610,7 @@ int bcm2835_audio_set_params(bcm2835_als
32 }
33
34 /* We are expecting a reply from the videocore */
35 - ret = wait_for_completion_interruptible(&instance->msg_avail_comp);
36 - if (ret) {
37 - LOG_DBG("%s: failed on waiting for event (status=%d)\n",
38 - __func__, success);
39 - goto unlock;
40 - }
41 + wait_for_completion(&instance->msg_avail_comp);
42
43 if (instance->result != 0) {
44 LOG_ERR("%s: result=%d", __func__, instance->result);
45 @@ -761,14 +751,11 @@ int bcm2835_audio_close(bcm2835_alsa_str
46 goto unlock;
47 }
48
49 - ret = wait_for_completion_interruptible(&instance->msg_avail_comp);
50 - if (ret) {
51 - LOG_DBG("%s: failed on waiting for event (status=%d)\n",
52 - __func__, success);
53 - goto unlock;
54 - }
55 + /* We are expecting a reply from the videocore */
56 + wait_for_completion(&instance->msg_avail_comp);
57 +
58 if (instance->result != 0) {
59 - LOG_ERR("%s: failed result (status=%d)\n",
60 + LOG_ERR("%s: failed result (result=%d)\n",
61 __func__, instance->result);
62
63 ret = -1;