From: Greg Kroah-Hartman Date: Fri, 21 Mar 2014 00:10:33 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.4.84~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0d0518576ddb26bd42b4f90b9c1792efc9aa0819;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: alsa-oxygen-modify-adjust_dg_dac_routing-function.patch jiffies-avoid-undefined-behavior-from-signed-overflow.patch --- 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 index 00000000000..e54d3942ab9 --- /dev/null +++ b/queue-3.4/alsa-oxygen-modify-adjust_dg_dac_routing-function.patch @@ -0,0 +1,44 @@ +From 1f91ecc14deea9461aca93273d78871ec4d98fcd Mon Sep 17 00:00:00 2001 +From: Roman Volkov +Date: Fri, 24 Jan 2014 16:18:11 +0400 +Subject: ALSA: oxygen: modify adjust_dg_dac_routing function + +From: Roman Volkov + +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 +Signed-off-by: Clemens Ladisch +Signed-off-by: Greg Kroah-Hartman + + +--- + 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 index 00000000000..c61685a9265 --- /dev/null +++ b/queue-3.4/jiffies-avoid-undefined-behavior-from-signed-overflow.patch @@ -0,0 +1,79 @@ +From 5a581b367b5df0531265311fc681c2abd377e5e6 Mon Sep 17 00:00:00 2001 +From: "Paul E. McKenney" +Date: Sat, 27 Jul 2013 03:53:54 -0700 +Subject: jiffies: Avoid undefined behavior from signed overflow + +From: "Paul E. McKenney" + +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 +Cc: John Stultz +Cc: "David S. Miller" +Cc: Arnd Bergmann +Cc: Ingo Molnar +Cc: Linus Torvalds +Cc: Eric Dumazet +Cc: Kevin Easton +[ paulmck: Included time_after64() and time_after_eq64(), as suggested + by Eric Dumazet, also fixed commit message.] +Reviewed-by: Josh Triplett +Ruchi Kandoi +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index b2f9c535d28..00000000000 --- a/queue-3.4/mac80211-send-control-port-protocol-frames-to-the-vo-queue.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 1bf4bbb4024dcdab5e57634dd8ae1072d42a53ac Mon Sep 17 00:00:00 2001 -From: Felix Fietkau -Date: Tue, 11 Feb 2014 16:02:47 +0100 -Subject: mac80211: send control port protocol frames to the VO queue - -From: Felix Fietkau - -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 -Signed-off-by: Johannes Berg -Signed-off-by: Greg Kroah-Hartman - ---- - 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); diff --git a/queue-3.4/series b/queue-3.4/series index b5deb13a29e..08f0884f662 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -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