From: Greg Kroah-Hartman Date: Fri, 5 Dec 2014 18:00:59 +0000 (-0800) Subject: 3.17-stable patches X-Git-Tag: v3.10.62~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b267ca82191a96904f7b88f8ffed961f361c595;p=thirdparty%2Fkernel%2Fstable-queue.git 3.17-stable patches added patches: iwlwifi-mvm-check-tlv-flag-before-trying-to-use-hotspot.patch iwlwifi-mvm-roc-bug-fixes-around-time-events-and-locking.patch powerpc-powernv-honor-the-generic-no_64bit_msi-flag.patch --- diff --git a/queue-3.17/iwlwifi-mvm-check-tlv-flag-before-trying-to-use-hotspot.patch b/queue-3.17/iwlwifi-mvm-check-tlv-flag-before-trying-to-use-hotspot.patch new file mode 100644 index 00000000000..de55e231242 --- /dev/null +++ b/queue-3.17/iwlwifi-mvm-check-tlv-flag-before-trying-to-use-hotspot.patch @@ -0,0 +1,60 @@ +From 5ac6c72e594471acfa5b00210c51d533a73413ad Mon Sep 17 00:00:00 2001 +From: Luciano Coelho +Date: Tue, 21 Oct 2014 16:12:18 +0300 +Subject: iwlwifi: mvm: check TLV flag before trying to use hotspot + firmware commands + +From: Luciano Coelho + +commit 5ac6c72e594471acfa5b00210c51d533a73413ad upstream. + +Older firmwares do not provide support for the HOT_SPOT_CMD command. +Check for the appropriate TLV flag that declares hotspot support in +the firmware to prevent a firmware assertion failure that can be +triggered from the userspace, + +Signed-off-by: Luciano Coelho +Signed-off-by: Emmanuel Grumbach +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/iwl-fw.h | 4 +++- + drivers/net/wireless/iwlwifi/mvm/mac80211.c | 12 +++++++++--- + 2 files changed, 12 insertions(+), 4 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/iwl-fw.h ++++ b/drivers/net/wireless/iwlwifi/iwl-fw.h +@@ -138,9 +138,11 @@ enum iwl_ucode_tlv_api { + /** + * enum iwl_ucode_tlv_capa - ucode capabilities + * @IWL_UCODE_TLV_CAPA_D0I3_SUPPORT: supports D0i3 ++ * @IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT: supports Hot Spot Command + */ + enum iwl_ucode_tlv_capa { +- IWL_UCODE_TLV_CAPA_D0I3_SUPPORT = BIT(0), ++ IWL_UCODE_TLV_CAPA_D0I3_SUPPORT = BIT(0), ++ IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT = BIT(18), + }; + + /* The default calibrate table size if not specified by firmware file */ +--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c ++++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c +@@ -2476,9 +2476,15 @@ static int iwl_mvm_roc(struct ieee80211_ + + switch (vif->type) { + case NL80211_IFTYPE_STATION: +- /* Use aux roc framework (HS20) */ +- ret = iwl_mvm_send_aux_roc_cmd(mvm, channel, +- vif, duration); ++ if (mvm->fw->ucode_capa.capa[0] & ++ IWL_UCODE_TLV_CAPA_HOTSPOT_SUPPORT) { ++ /* Use aux roc framework (HS20) */ ++ ret = iwl_mvm_send_aux_roc_cmd(mvm, channel, ++ vif, duration); ++ goto out_unlock; ++ } ++ IWL_ERR(mvm, "hotspot not supported\n"); ++ ret = -EINVAL; + goto out_unlock; + case NL80211_IFTYPE_P2P_DEVICE: + /* handle below */ diff --git a/queue-3.17/iwlwifi-mvm-roc-bug-fixes-around-time-events-and-locking.patch b/queue-3.17/iwlwifi-mvm-roc-bug-fixes-around-time-events-and-locking.patch new file mode 100644 index 00000000000..7dc9bde2ad2 --- /dev/null +++ b/queue-3.17/iwlwifi-mvm-roc-bug-fixes-around-time-events-and-locking.patch @@ -0,0 +1,105 @@ +From a6cc5163149532734b84c86cbffa4994e527074b Mon Sep 17 00:00:00 2001 +From: Matti Gottlieb +Date: Mon, 29 Sep 2014 11:46:04 +0300 +Subject: iwlwifi: mvm: ROC - bug fixes around time events and locking + +From: Matti Gottlieb + +commit a6cc5163149532734b84c86cbffa4994e527074b upstream. + +Don't add the time event to the list. We added it several +times the same time event, which leads to an infinite loop +when walking the list. + +Since we (currently) don't support more than one ROC for STA +vif at a time, enforce this and don't add the time event +to any list. + +We were also missing the locking of the mutex which led to +a lockdep splat - fix that. + +Signed-off-by: Matti Gottlieb +Signed-off-by: Emmanuel Grumbach +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/mvm/mac80211.c | 25 ++++++++++++++++--------- + drivers/net/wireless/iwlwifi/mvm/time-event.c | 2 +- + 2 files changed, 17 insertions(+), 10 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c ++++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c +@@ -515,7 +515,8 @@ static void iwl_mvm_mac_tx(struct ieee80 + } + + if (IEEE80211_SKB_CB(skb)->hw_queue == IWL_MVM_OFFCHANNEL_QUEUE && +- !test_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status)) ++ !test_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status) && ++ !test_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status)) + goto drop; + + /* treat non-bufferable MMPDUs as broadcast if sta is sleeping */ +@@ -2403,14 +2404,19 @@ static int iwl_mvm_send_aux_roc_cmd(stru + /* Set the node address */ + memcpy(aux_roc_req.node_addr, vif->addr, ETH_ALEN); + ++ lockdep_assert_held(&mvm->mutex); ++ ++ spin_lock_bh(&mvm->time_event_lock); ++ ++ if (WARN_ON(te_data->id == HOT_SPOT_CMD)) { ++ spin_unlock_bh(&mvm->time_event_lock); ++ return -EIO; ++ } ++ + te_data->vif = vif; + te_data->duration = duration; + te_data->id = HOT_SPOT_CMD; + +- lockdep_assert_held(&mvm->mutex); +- +- spin_lock_bh(&mvm->time_event_lock); +- list_add_tail(&te_data->list, &mvm->time_event_list); + spin_unlock_bh(&mvm->time_event_lock); + + /* +@@ -2466,22 +2472,23 @@ static int iwl_mvm_roc(struct ieee80211_ + IWL_DEBUG_MAC80211(mvm, "enter (%d, %d, %d)\n", channel->hw_value, + duration, type); + ++ mutex_lock(&mvm->mutex); ++ + switch (vif->type) { + case NL80211_IFTYPE_STATION: + /* Use aux roc framework (HS20) */ + ret = iwl_mvm_send_aux_roc_cmd(mvm, channel, + vif, duration); +- return ret; ++ goto out_unlock; + case NL80211_IFTYPE_P2P_DEVICE: + /* handle below */ + break; + default: + IWL_ERR(mvm, "vif isn't P2P_DEVICE: %d\n", vif->type); +- return -EINVAL; ++ ret = -EINVAL; ++ goto out_unlock; + } + +- mutex_lock(&mvm->mutex); +- + for (i = 0; i < NUM_PHY_CTX; i++) { + phy_ctxt = &mvm->phy_ctxts[i]; + if (phy_ctxt->ref == 0 || mvmvif->phy_ctxt == phy_ctxt) +--- a/drivers/net/wireless/iwlwifi/mvm/time-event.c ++++ b/drivers/net/wireless/iwlwifi/mvm/time-event.c +@@ -303,8 +303,8 @@ static int iwl_mvm_aux_roc_te_handle_not + te_data->running = false; + te_data->vif = NULL; + te_data->uid = 0; ++ te_data->id = TE_MAX; + } else if (le32_to_cpu(notif->action) == TE_V2_NOTIF_HOST_EVENT_START) { +- set_bit(IWL_MVM_STATUS_ROC_RUNNING, &mvm->status); + set_bit(IWL_MVM_STATUS_ROC_AUX_RUNNING, &mvm->status); + te_data->running = true; + ieee80211_ready_on_channel(mvm->hw); /* Start TE */ diff --git a/queue-3.17/powerpc-powernv-honor-the-generic-no_64bit_msi-flag.patch b/queue-3.17/powerpc-powernv-honor-the-generic-no_64bit_msi-flag.patch new file mode 100644 index 00000000000..681fe58d5e1 --- /dev/null +++ b/queue-3.17/powerpc-powernv-honor-the-generic-no_64bit_msi-flag.patch @@ -0,0 +1,57 @@ +From 360743814c4082515581aa23ab1d8e699e1fbe88 Mon Sep 17 00:00:00 2001 +From: Benjamin Herrenschmidt +Date: Tue, 7 Oct 2014 16:12:36 +1100 +Subject: powerpc/powernv: Honor the generic "no_64bit_msi" flag + +From: Benjamin Herrenschmidt + +commit 360743814c4082515581aa23ab1d8e699e1fbe88 upstream. + +Instead of the arch specific quirk which we are deprecating +and that drivers don't understand. + +Signed-off-by: Benjamin Herrenschmidt +Signed-off-by: Greg Kroah-Hartman + +--- + arch/powerpc/platforms/powernv/pci-ioda.c | 3 +-- + arch/powerpc/platforms/powernv/pci.c | 4 ++-- + 2 files changed, 3 insertions(+), 4 deletions(-) + +--- a/arch/powerpc/platforms/powernv/pci-ioda.c ++++ b/arch/powerpc/platforms/powernv/pci-ioda.c +@@ -1311,7 +1311,6 @@ static int pnv_pci_ioda_msi_setup(struct + unsigned int is_64, struct msi_msg *msg) + { + struct pnv_ioda_pe *pe = pnv_ioda_get_pe(dev); +- struct pci_dn *pdn = pci_get_pdn(dev); + struct irq_data *idata; + struct irq_chip *ichip; + unsigned int xive_num = hwirq - phb->msi_base; +@@ -1327,7 +1326,7 @@ static int pnv_pci_ioda_msi_setup(struct + return -ENXIO; + + /* Force 32-bit MSI on some broken devices */ +- if (pdn && pdn->force_32bit_msi) ++ if (dev->no_64bit_msi) + is_64 = 0; + + /* Assign XIVE to PE */ +--- a/arch/powerpc/platforms/powernv/pci.c ++++ b/arch/powerpc/platforms/powernv/pci.c +@@ -1,3 +1,4 @@ ++ + /* + * Support PCI/PCIe on PowerNV platforms + * +@@ -50,9 +51,8 @@ static int pnv_msi_check_device(struct p + { + struct pci_controller *hose = pci_bus_to_host(pdev->bus); + struct pnv_phb *phb = hose->private_data; +- struct pci_dn *pdn = pci_get_pdn(pdev); + +- if (pdn && pdn->force_32bit_msi && !phb->msi32_support) ++ if (pdev->no_64bit_msi && !phb->msi32_support) + return -ENODEV; + + return (phb && phb->msi_bmp.bitmap) ? 0 : -ENODEV; diff --git a/queue-3.17/series b/queue-3.17/series index 6627039f17f..adeaff0aec8 100644 --- a/queue-3.17/series +++ b/queue-3.17/series @@ -113,3 +113,6 @@ drm-radeon-report-disconnected-for-lvds-edp-with-px-if-ddc-fails.patch gpu-radeon-set-flag-to-indicate-broken-64-bit-msi.patch drm-radeon-initialize-sadb-to-null-in-the-audio-code.patch bitops-fix-shift-overflow-in-genmask-macros.patch +powerpc-powernv-honor-the-generic-no_64bit_msi-flag.patch +iwlwifi-mvm-roc-bug-fixes-around-time-events-and-locking.patch +iwlwifi-mvm-check-tlv-flag-before-trying-to-use-hotspot.patch