]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2015 01:50:16 +0000 (10:50 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Jun 2015 01:50:16 +0000 (10:50 +0900)
added patches:
perf-x86-rapl-enable-broadwell-u-rapl-support.patch
staging-gdm724x-correction-of-variable-usage-after-applying-align.patch
staging-vt6655-device_free_tx_buf-use-only-ieee80211_tx_status_irqsafe.patch
staging-vt6655-fix-80211-control-and-management-status-reporting.patch
staging-vt6655-implement-ieee80211_tx_stat_noack_transmitted.patch
staging-vt6655-lock-macvwritebssidaddress.patch
staging-vt6655-vnt_tx_packet-correct-tx-order-of-owned_by_nic.patch
staging-vt6656-use-ieee80211_tx_info-to-select-packet-type.patch

queue-4.0/perf-x86-rapl-enable-broadwell-u-rapl-support.patch [new file with mode: 0644]
queue-4.0/series
queue-4.0/staging-gdm724x-correction-of-variable-usage-after-applying-align.patch [new file with mode: 0644]
queue-4.0/staging-vt6655-device_free_tx_buf-use-only-ieee80211_tx_status_irqsafe.patch [new file with mode: 0644]
queue-4.0/staging-vt6655-fix-80211-control-and-management-status-reporting.patch [new file with mode: 0644]
queue-4.0/staging-vt6655-implement-ieee80211_tx_stat_noack_transmitted.patch [new file with mode: 0644]
queue-4.0/staging-vt6655-lock-macvwritebssidaddress.patch [new file with mode: 0644]
queue-4.0/staging-vt6655-vnt_tx_packet-correct-tx-order-of-owned_by_nic.patch [new file with mode: 0644]
queue-4.0/staging-vt6656-use-ieee80211_tx_info-to-select-packet-type.patch [new file with mode: 0644]

diff --git a/queue-4.0/perf-x86-rapl-enable-broadwell-u-rapl-support.patch b/queue-4.0/perf-x86-rapl-enable-broadwell-u-rapl-support.patch
new file mode 100644 (file)
index 0000000..ba803ab
--- /dev/null
@@ -0,0 +1,46 @@
+From 44b11fee51711ca85aa2b121a49bf029d18a3722 Mon Sep 17 00:00:00 2001
+From: Stephane Eranian <eranian@google.com>
+Date: Thu, 23 Apr 2015 09:07:09 +0200
+Subject: perf/x86/rapl: Enable Broadwell-U RAPL support
+
+From: Stephane Eranian <eranian@google.com>
+
+commit 44b11fee51711ca85aa2b121a49bf029d18a3722 upstream.
+
+This patch enables RAPL counters (energy consumption counters)
+support for Intel Broadwell-U processors (Model 61):
+
+To use:
+
+  $ perf stat -a -I 1000 -e power/energy-cores/,power/energy-pkg/,power/energy-ram/ sleep 10
+
+Signed-off-by: Stephane Eranian <eranian@google.com>
+Cc: Andy Lutomirski <luto@amacapital.net>
+Cc: Borislav Petkov <bp@alien8.de>
+Cc: Brian Gerst <brgerst@gmail.com>
+Cc: Denys Vlasenko <dvlasenk@redhat.com>
+Cc: H. Peter Anvin <hpa@zytor.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: jacob.jun.pan@linux.intel.com
+Cc: kan.liang@intel.com
+Cc: peterz@infradead.org
+Cc: sonnyrao@chromium.org
+Link: http://lkml.kernel.org/r/20150423070709.GA4970@thinkpad
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/cpu/perf_event_intel_rapl.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/x86/kernel/cpu/perf_event_intel_rapl.c
++++ b/arch/x86/kernel/cpu/perf_event_intel_rapl.c
+@@ -680,6 +680,7 @@ static int __init rapl_pmu_init(void)
+               break;
+       case 60: /* Haswell */
+       case 69: /* Haswell-Celeron */
++      case 61: /* Broadwell */
+               rapl_cntr_mask = RAPL_IDX_HSW;
+               rapl_pmu_events_group.attrs = rapl_events_hsw_attr;
+               break;
index aed56eecee265dbe6883d1e47f03bee634fe712b..52b24309869bd61cfbcb52a1315598df497c34dd 100644 (file)
@@ -60,3 +60,11 @@ asoc-dapm-modify-widget-stream-name-according-to-prefix.patch
 asoc-wm8960-fix-rinput3-audio-route-error.patch
 asoc-wm8994-correct-bclk-div-348-to-384.patch
 rdma-core-fix-for-parsing-netlink-string-attribute.patch
+staging-gdm724x-correction-of-variable-usage-after-applying-align.patch
+staging-vt6656-use-ieee80211_tx_info-to-select-packet-type.patch
+staging-vt6655-device_free_tx_buf-use-only-ieee80211_tx_status_irqsafe.patch
+staging-vt6655-implement-ieee80211_tx_stat_noack_transmitted.patch
+staging-vt6655-fix-80211-control-and-management-status-reporting.patch
+staging-vt6655-vnt_tx_packet-correct-tx-order-of-owned_by_nic.patch
+staging-vt6655-lock-macvwritebssidaddress.patch
+perf-x86-rapl-enable-broadwell-u-rapl-support.patch
diff --git a/queue-4.0/staging-gdm724x-correction-of-variable-usage-after-applying-align.patch b/queue-4.0/staging-gdm724x-correction-of-variable-usage-after-applying-align.patch
new file mode 100644 (file)
index 0000000..2e88e02
--- /dev/null
@@ -0,0 +1,90 @@
+From 892c89d5d7ffd1bb794fe54d86c0eef18d215fab Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?S=C5=82awomir=20Demeszko?=
+ <s.demeszko@wireless-instruments.com>
+Date: Tue, 5 May 2015 17:49:54 +0200
+Subject: staging: gdm724x: Correction of variable usage after applying ALIGN()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: =?UTF-8?q?S=C5=82awomir=20Demeszko?=
+
+commit 892c89d5d7ffd1bb794fe54d86c0eef18d215fab upstream.
+
+Fix regression introduced by commit <29ef8a53542a>. After it writing
+AT commands to /dev/GCT-ATM0 is unsuccessful (no echo, no response)
+and dmesg show "gdmtty: invalid payload : 1 16 f011".
+
+Before that commit value of dummy_cnt was only a padding size. After using
+ALIGN() this value is increased by its first argument. So the following
+usage of this variable needs correction.
+
+Signed-off-by: SÅ‚awomir Demeszko <s.demeszko@wireless-instruments.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/gdm724x/gdm_mux.c |   16 +++++++---------
+ 1 file changed, 7 insertions(+), 9 deletions(-)
+
+--- a/drivers/staging/gdm724x/gdm_mux.c
++++ b/drivers/staging/gdm724x/gdm_mux.c
+@@ -158,7 +158,7 @@ static int up_to_host(struct mux_rx *r)
+       unsigned int start_flag;
+       unsigned int payload_size;
+       unsigned short packet_type;
+-      int dummy_cnt;
++      int total_len;
+       u32 packet_size_sum = r->offset;
+       int index;
+       int ret = TO_HOST_INVALID_PACKET;
+@@ -176,10 +176,10 @@ static int up_to_host(struct mux_rx *r)
+                       break;
+               }
+-              dummy_cnt = ALIGN(MUX_HEADER_SIZE + payload_size, 4);
++              total_len = ALIGN(MUX_HEADER_SIZE + payload_size, 4);
+               if (len - packet_size_sum <
+-                      MUX_HEADER_SIZE + payload_size + dummy_cnt) {
++                      total_len) {
+                       pr_err("invalid payload : %d %d %04x\n",
+                              payload_size, len, packet_type);
+                       break;
+@@ -202,7 +202,7 @@ static int up_to_host(struct mux_rx *r)
+                       break;
+               }
+-              packet_size_sum += MUX_HEADER_SIZE + payload_size + dummy_cnt;
++              packet_size_sum += total_len;
+               if (len - packet_size_sum <= MUX_HEADER_SIZE + 2) {
+                       ret = r->callback(NULL,
+                                       0,
+@@ -361,7 +361,6 @@ static int gdm_mux_send(void *priv_dev,
+       struct mux_pkt_header *mux_header;
+       struct mux_tx *t = NULL;
+       static u32 seq_num = 1;
+-      int dummy_cnt;
+       int total_len;
+       int ret;
+       unsigned long flags;
+@@ -374,9 +373,7 @@ static int gdm_mux_send(void *priv_dev,
+       spin_lock_irqsave(&mux_dev->write_lock, flags);
+-      dummy_cnt = ALIGN(MUX_HEADER_SIZE + len, 4);
+-
+-      total_len = len + MUX_HEADER_SIZE + dummy_cnt;
++      total_len = ALIGN(MUX_HEADER_SIZE + len, 4);
+       t = alloc_mux_tx(total_len);
+       if (!t) {
+@@ -392,7 +389,8 @@ static int gdm_mux_send(void *priv_dev,
+       mux_header->packet_type = __cpu_to_le16(packet_type[tty_index]);
+       memcpy(t->buf+MUX_HEADER_SIZE, data, len);
+-      memset(t->buf+MUX_HEADER_SIZE+len, 0, dummy_cnt);
++      memset(t->buf+MUX_HEADER_SIZE+len, 0, total_len - MUX_HEADER_SIZE -
++             len);
+       t->len = total_len;
+       t->callback = cb;
diff --git a/queue-4.0/staging-vt6655-device_free_tx_buf-use-only-ieee80211_tx_status_irqsafe.patch b/queue-4.0/staging-vt6655-device_free_tx_buf-use-only-ieee80211_tx_status_irqsafe.patch
new file mode 100644 (file)
index 0000000..e51316d
--- /dev/null
@@ -0,0 +1,34 @@
+From 3fa0917beb29d886550fcf61a6378563d1ce9684 Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Thu, 9 Apr 2015 20:53:43 +0100
+Subject: staging: vt6655: device_free_tx_buf use only ieee80211_tx_status_irqsafe
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit 3fa0917beb29d886550fcf61a6378563d1ce9684 upstream.
+
+TD_FLAGS_NETIF_SKB is only for data.
+
+Fixes issue of ack frames not being reported.
+
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6655/device_main.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/staging/vt6655/device_main.c
++++ b/drivers/staging/vt6655/device_main.c
+@@ -988,10 +988,8 @@ static void device_free_tx_buf(struct vn
+                                PCI_DMA_TODEVICE);
+       }
+-      if (pTDInfo->byFlags & TD_FLAGS_NETIF_SKB)
++      if (skb)
+               ieee80211_tx_status_irqsafe(pDevice->hw, skb);
+-      else
+-              dev_kfree_skb_irq(skb);
+       pTDInfo->skb_dma = 0;
+       pTDInfo->skb = NULL;
diff --git a/queue-4.0/staging-vt6655-fix-80211-control-and-management-status-reporting.patch b/queue-4.0/staging-vt6655-fix-80211-control-and-management-status-reporting.patch
new file mode 100644 (file)
index 0000000..2c8d581
--- /dev/null
@@ -0,0 +1,42 @@
+From ad3fee9b17b90b8f1ac94b615111b2f14dd90adb Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Sat, 11 Apr 2015 20:29:41 +0100
+Subject: staging: vt6655: Fix 80211 control and management status reporting.
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit ad3fee9b17b90b8f1ac94b615111b2f14dd90adb upstream.
+
+Currently only TD_FLAGS_NETIF_SKB are reported back to mac80211.
+
+Move vnt_int_report_rate to report all frame types.
+
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6655/device_main.c |    6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/staging/vt6655/device_main.c
++++ b/drivers/staging/vt6655/device_main.c
+@@ -940,9 +940,6 @@ static int device_tx_srv(struct vnt_priv
+               //Only the status of first TD in the chain is correct
+               if (pTD->m_td1TD1.byTCR & TCR_STP) {
+                       if ((pTD->pTDInfo->byFlags & TD_FLAGS_NETIF_SKB) != 0) {
+-
+-                              vnt_int_report_rate(pDevice, pTD->pTDInfo, byTsr0, byTsr1);
+-
+                               if (!(byTsr1 & TSR1_TERR)) {
+                                       if (byTsr0 != 0) {
+                                               pr_debug(" Tx[%d] OK but has error. tsr1[%02X] tsr0[%02X]\n",
+@@ -961,6 +958,9 @@ static int device_tx_srv(struct vnt_priv
+                                                (int)uIdx, byTsr1, byTsr0);
+                               }
+                       }
++
++                      vnt_int_report_rate(pDevice, pTD->pTDInfo, byTsr0, byTsr1);
++
+                       device_free_tx_buf(pDevice, pTD);
+                       pDevice->iTDUsed[uIdx]--;
+               }
diff --git a/queue-4.0/staging-vt6655-implement-ieee80211_tx_stat_noack_transmitted.patch b/queue-4.0/staging-vt6655-implement-ieee80211_tx_stat_noack_transmitted.patch
new file mode 100644 (file)
index 0000000..dfa6932
--- /dev/null
@@ -0,0 +1,33 @@
+From 6e44dc4be009eef60a1744e4a4b830131f6b9a8e Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Thu, 9 Apr 2015 20:53:44 +0100
+Subject: staging: vt6655: implement IEEE80211_TX_STAT_NOACK_TRANSMITTED
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit 6e44dc4be009eef60a1744e4a4b830131f6b9a8e upstream.
+
+Make use of this macro for non ack frames.
+
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6655/device_main.c |    6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/staging/vt6655/device_main.c
++++ b/drivers/staging/vt6655/device_main.c
+@@ -911,7 +911,11 @@ static int vnt_int_report_rate(struct vn
+       if (!(tsr1 & TSR1_TERR)) {
+               info->status.rates[0].idx = idx;
+-              info->flags |= IEEE80211_TX_STAT_ACK;
++
++              if (info->flags & IEEE80211_TX_CTL_NO_ACK)
++                      info->flags |= IEEE80211_TX_STAT_NOACK_TRANSMITTED;
++              else
++                      info->flags |= IEEE80211_TX_STAT_ACK;
+       }
+       return 0;
diff --git a/queue-4.0/staging-vt6655-lock-macvwritebssidaddress.patch b/queue-4.0/staging-vt6655-lock-macvwritebssidaddress.patch
new file mode 100644 (file)
index 0000000..33c5a0c
--- /dev/null
@@ -0,0 +1,41 @@
+From 664a5c1d1e33cd89cb7883e8c74638cc482b5da7 Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Tue, 21 Apr 2015 22:33:02 +0100
+Subject: staging: vt6655: lock MACvWriteBSSIDAddress.
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit 664a5c1d1e33cd89cb7883e8c74638cc482b5da7 upstream.
+
+This function selects page 1 and cause intermittent problems on
+interrupt handler.
+
+lock call with spin_lock_irqsave.
+
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6655/device_main.c |    9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/drivers/staging/vt6655/device_main.c
++++ b/drivers/staging/vt6655/device_main.c
+@@ -1414,9 +1414,16 @@ static void vnt_bss_info_changed(struct
+       priv->current_aid = conf->aid;
+-      if (changed & BSS_CHANGED_BSSID)
++      if (changed & BSS_CHANGED_BSSID) {
++              unsigned long flags;
++
++              spin_lock_irqsave(&priv->lock, flags);
++
+               MACvWriteBSSIDAddress(priv->PortOffset, (u8 *)conf->bssid);
++              spin_unlock_irqrestore(&priv->lock, flags);
++      }
++
+       if (changed & BSS_CHANGED_BASIC_RATES) {
+               priv->basic_rates = conf->basic_rates;
diff --git a/queue-4.0/staging-vt6655-vnt_tx_packet-correct-tx-order-of-owned_by_nic.patch b/queue-4.0/staging-vt6655-vnt_tx_packet-correct-tx-order-of-owned_by_nic.patch
new file mode 100644 (file)
index 0000000..7d331ed
--- /dev/null
@@ -0,0 +1,64 @@
+From d65d2b25d2761153390df8026cca1a528d9b6c5a Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Tue, 21 Apr 2015 22:33:00 +0100
+Subject: staging: vt6655: vnt_tx_packet Correct TX order of OWNED_BY_NIC
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit d65d2b25d2761153390df8026cca1a528d9b6c5a upstream.
+
+The state of m_td0TD0.f1Owner should change after the buff_addr
+has been filled otherwise the device grabs the buffer too early.
+
+m_td0TD0.f1Owner is protected by memory barriers on both sides
+of change.
+
+iTDUsed is best incremented after MACvTransmit.
+
+It appears that f1Owner actually polls to do the memory transfer.
+
+A back port patch will be needed for v3.19
+
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6655/device_main.c |   15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+--- a/drivers/staging/vt6655/device_main.c
++++ b/drivers/staging/vt6655/device_main.c
+@@ -1203,14 +1203,6 @@ static int vnt_tx_packet(struct vnt_priv
+       if (dma_idx == TYPE_AC0DMA)
+               head_td->pTDInfo->byFlags = TD_FLAGS_NETIF_SKB;
+-      priv->iTDUsed[dma_idx]++;
+-
+-      /* Take ownership */
+-      wmb();
+-      head_td->m_td0TD0.f1Owner = OWNED_BY_NIC;
+-
+-      /* get Next */
+-      wmb();
+       priv->apCurrTD[dma_idx] = head_td->next;
+       spin_unlock_irqrestore(&priv->lock, flags);
+@@ -1231,11 +1223,18 @@ static int vnt_tx_packet(struct vnt_priv
+       head_td->buff_addr = cpu_to_le32(head_td->pTDInfo->skb_dma);
++      /* Poll Transmit the adapter */
++      wmb();
++      head_td->m_td0TD0.f1Owner = OWNED_BY_NIC;
++      wmb(); /* second memory barrier */
++
+       if (head_td->pTDInfo->byFlags & TD_FLAGS_NETIF_SKB)
+               MACvTransmitAC0(priv->PortOffset);
+       else
+               MACvTransmit0(priv->PortOffset);
++      priv->iTDUsed[dma_idx]++;
++
+       spin_unlock_irqrestore(&priv->lock, flags);
+       return 0;
diff --git a/queue-4.0/staging-vt6656-use-ieee80211_tx_info-to-select-packet-type.patch b/queue-4.0/staging-vt6656-use-ieee80211_tx_info-to-select-packet-type.patch
new file mode 100644 (file)
index 0000000..e87a323
--- /dev/null
@@ -0,0 +1,48 @@
+From b23f14302e86628625ac3982a6d23e35888755f2 Mon Sep 17 00:00:00 2001
+From: Malcolm Priestley <tvboxspy@gmail.com>
+Date: Sat, 4 Apr 2015 20:49:10 +0100
+Subject: staging: vt6656: use ieee80211_tx_info to select packet type.
+
+From: Malcolm Priestley <tvboxspy@gmail.com>
+
+commit b23f14302e86628625ac3982a6d23e35888755f2 upstream.
+
+Information for packet type is in ieee80211_tx_info
+
+band IEEE80211_BAND_5GHZ for PK_TYPE_11A.
+
+IEEE80211_TX_RC_USE_CTS_PROTECT via tx_rate flags selects PK_TYPE_11GB
+
+This ensures that the packet is always the right type.
+
+Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/staging/vt6656/rxtx.c |   14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+--- a/drivers/staging/vt6656/rxtx.c
++++ b/drivers/staging/vt6656/rxtx.c
+@@ -805,10 +805,18 @@ int vnt_tx_packet(struct vnt_private *pr
+               vnt_schedule_command(priv, WLAN_CMD_SETPOWER);
+       }
+-      if (current_rate > RATE_11M)
+-              pkt_type = priv->packet_type;
+-      else
++      if (current_rate > RATE_11M) {
++              if (info->band == IEEE80211_BAND_5GHZ) {
++                      pkt_type = PK_TYPE_11A;
++              } else {
++                      if (tx_rate->flags & IEEE80211_TX_RC_USE_CTS_PROTECT)
++                              pkt_type = PK_TYPE_11GB;
++                      else
++                              pkt_type = PK_TYPE_11GA;
++              }
++      } else {
+               pkt_type = PK_TYPE_11B;
++      }
+       spin_lock_irqsave(&priv->lock, flags);