]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Mar 2014 00:10:33 +0000 (17:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Mar 2014 00:10:33 +0000 (17:10 -0700)
added patches:
alsa-oxygen-modify-adjust_dg_dac_routing-function.patch
jiffies-avoid-undefined-behavior-from-signed-overflow.patch

queue-3.4/alsa-oxygen-modify-adjust_dg_dac_routing-function.patch [new file with mode: 0644]
queue-3.4/jiffies-avoid-undefined-behavior-from-signed-overflow.patch [new file with mode: 0644]
queue-3.4/mac80211-send-control-port-protocol-frames-to-the-vo-queue.patch [deleted file]
queue-3.4/series

diff --git a/queue-3.4/alsa-oxygen-modify-adjust_dg_dac_routing-function.patch b/queue-3.4/alsa-oxygen-modify-adjust_dg_dac_routing-function.patch
new file mode 100644 (file)
index 0000000..e54d394
--- /dev/null
@@ -0,0 +1,44 @@
+From 1f91ecc14deea9461aca93273d78871ec4d98fcd Mon Sep 17 00:00:00 2001
+From: Roman Volkov <v1ron@mail.ru>
+Date: Fri, 24 Jan 2014 16:18:11 +0400
+Subject: ALSA: oxygen: modify adjust_dg_dac_routing function
+
+From: Roman Volkov <v1ron@mail.ru>
+
+commit 1f91ecc14deea9461aca93273d78871ec4d98fcd upstream.
+
+When selecting the audio output destinations (headphones,
+FP headphones, multichannel output), the channel routing
+should be changed depending on what destination selected.
+Also unnecessary I2S channels are digitally muted. This
+function called when the user selects the destination
+in the ALSA mixer.
+
+Signed-off-by: Roman Volkov <v1ron@mail.ru>
+Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+
+---
+ sound/pci/oxygen/xonar_dg.c |   10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+--- a/sound/pci/oxygen/xonar_dg.c
++++ b/sound/pci/oxygen/xonar_dg.c
+@@ -294,6 +294,16 @@ static int output_switch_put(struct snd_
+               oxygen_write16_masked(chip, OXYGEN_GPIO_DATA,
+                                     data->output_sel == 1 ? GPIO_HP_REAR : 0,
+                                     GPIO_HP_REAR);
++              oxygen_write8_masked(chip, OXYGEN_PLAY_ROUTING,
++                                   data->output_sel == 0 ?
++                                   OXYGEN_PLAY_MUTE01 :
++                                   OXYGEN_PLAY_MUTE23 |
++                                   OXYGEN_PLAY_MUTE45 |
++                                   OXYGEN_PLAY_MUTE67,
++                                   OXYGEN_PLAY_MUTE01 |
++                                   OXYGEN_PLAY_MUTE23 |
++                                   OXYGEN_PLAY_MUTE45 |
++                                   OXYGEN_PLAY_MUTE67);
+       }
+       mutex_unlock(&chip->mutex);
+       return changed;
diff --git a/queue-3.4/jiffies-avoid-undefined-behavior-from-signed-overflow.patch b/queue-3.4/jiffies-avoid-undefined-behavior-from-signed-overflow.patch
new file mode 100644 (file)
index 0000000..c61685a
--- /dev/null
@@ -0,0 +1,79 @@
+From 5a581b367b5df0531265311fc681c2abd377e5e6 Mon Sep 17 00:00:00 2001
+From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
+Date: Sat, 27 Jul 2013 03:53:54 -0700
+Subject: jiffies: Avoid undefined behavior from signed overflow
+
+From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
+
+commit 5a581b367b5df0531265311fc681c2abd377e5e6 upstream.
+
+According to the C standard 3.4.3p3, overflow of a signed integer results
+in undefined behavior.  This commit therefore changes the definitions
+of time_after(), time_after_eq(), time_after64(), and time_after_eq64()
+to avoid this undefined behavior.  The trick is that the subtraction
+is done using unsigned arithmetic, which according to 6.2.5p9 cannot
+overflow because it is defined as modulo arithmetic.  This has the added
+(though admittedly quite small) benefit of shortening four lines of code
+by four characters each.
+
+Note that the C standard considers the cast from unsigned to
+signed to be implementation-defined, see 6.3.1.3p3.  However, on a
+two's-complement system, an implementation that defines anything other
+than a reinterpretation of the bits is free to come to me, and I will be
+happy to act as a witness for its being committed to an insane asylum.
+(Although I have nothing against saturating arithmetic or signals in some
+cases, these things really should not be the default when compiling an
+operating-system kernel.)
+
+Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+Cc: John Stultz <john.stultz@linaro.org>
+Cc: "David S. Miller" <davem@davemloft.net>
+Cc: Arnd Bergmann <arnd@arndb.de>
+Cc: Ingo Molnar <mingo@kernel.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Eric Dumazet <eric.dumazet@gmail.com>
+Cc: Kevin Easton <kevin@guarana.org>
+[ paulmck: Included time_after64() and time_after_eq64(), as suggested
+  by Eric Dumazet, also fixed commit message.]
+Reviewed-by: Josh Triplett <josh@joshtriplett.org>
+Ruchi Kandoi <kandoiruchi@google.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/jiffies.h |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/include/linux/jiffies.h
++++ b/include/linux/jiffies.h
+@@ -106,13 +106,13 @@ static inline u64 get_jiffies_64(void)
+ #define time_after(a,b)               \
+       (typecheck(unsigned long, a) && \
+        typecheck(unsigned long, b) && \
+-       ((long)(b) - (long)(a) < 0))
++       ((long)((b) - (a)) < 0))
+ #define time_before(a,b)      time_after(b,a)
+ #define time_after_eq(a,b)    \
+       (typecheck(unsigned long, a) && \
+        typecheck(unsigned long, b) && \
+-       ((long)(a) - (long)(b) >= 0))
++       ((long)((a) - (b)) >= 0))
+ #define time_before_eq(a,b)   time_after_eq(b,a)
+ /*
+@@ -135,13 +135,13 @@ static inline u64 get_jiffies_64(void)
+ #define time_after64(a,b)     \
+       (typecheck(__u64, a) && \
+        typecheck(__u64, b) && \
+-       ((__s64)(b) - (__s64)(a) < 0))
++       ((__s64)((b) - (a)) < 0))
+ #define time_before64(a,b)    time_after64(b,a)
+ #define time_after_eq64(a,b)  \
+       (typecheck(__u64, a) && \
+        typecheck(__u64, b) && \
+-       ((__s64)(a) - (__s64)(b) >= 0))
++       ((__s64)((a) - (b)) >= 0))
+ #define time_before_eq64(a,b) time_after_eq64(b,a)
+ /*
diff --git a/queue-3.4/mac80211-send-control-port-protocol-frames-to-the-vo-queue.patch b/queue-3.4/mac80211-send-control-port-protocol-frames-to-the-vo-queue.patch
deleted file mode 100644 (file)
index b2f9c53..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-From 1bf4bbb4024dcdab5e57634dd8ae1072d42a53ac Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd@openwrt.org>
-Date: Tue, 11 Feb 2014 16:02:47 +0100
-Subject: mac80211: send control port protocol frames to the VO queue
-
-From: Felix Fietkau <nbd@openwrt.org>
-
-commit 1bf4bbb4024dcdab5e57634dd8ae1072d42a53ac upstream.
-
-Improves reliability of wifi connections with WPA, since authentication
-frames are prioritized over normal traffic and also typically exempt
-from aggregation.
-
-Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
----
- net/mac80211/wme.c |    5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/net/mac80211/wme.c
-+++ b/net/mac80211/wme.c
-@@ -132,6 +132,11 @@ u16 ieee80211_select_queue(struct ieee80
-               return IEEE80211_AC_BE;
-       }
-+      if (skb->protocol == sdata->control_port_protocol) {
-+              skb->priority = 7;
-+              return ieee80211_downgrade_queue(sdata, skb);
-+      }
-+
-       /* use the data classifier to determine what 802.1d tag the
-        * data frame has */
-       skb->priority = cfg80211_classify8021d(skb);
index b5deb13a29ede9751b34db5f981da86e7f207b92..08f0884f662067dc51d8dcd6ed2da1d6789cd7ef 100644 (file)
@@ -4,7 +4,6 @@ sched-fix-double-normalization-of-vruntime.patch
 virtio-net-alloc-big-buffers-also-when-guest-can-receive-ufo.patch
 tg3-don-t-check-undefined-error-bits-in-rxbd.patch
 net-sctp-fix-sctp_sf_do_5_1d_ce-to-verify-if-we-peer-is-auth-capable.patch
-mac80211-send-control-port-protocol-frames-to-the-vo-queue.patch
 mac80211-fix-ap-powersave-tx-vs.-wakeup-race.patch
 ath9k-fix-etsi-compliance-for-ar9462-2.0.patch
 mwifiex-copy-ap-s-ht-capability-info-correctly.patch
@@ -32,3 +31,5 @@ scsi-isci-correct-erroneous-for_each_isci_host-macro.patch
 scsi-qla2xxx-poll-during-initialization-for-isp25xx-and-isp83xx.patch
 scsi-storvsc-null-pointer-dereference-fix.patch
 btrfs-fix-data-corruption-when-reading-updating-compressed-extents.patch
+alsa-oxygen-modify-adjust_dg_dac_routing-function.patch
+jiffies-avoid-undefined-behavior-from-signed-overflow.patch