From 16843a48c0610f5a25b65b2d209be66492d9923d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 1 Mar 2016 15:38:48 -0800 Subject: [PATCH] 4.4-stable patches added patches: iwlwifi-dvm-fix-wowlan.patch iwlwifi-mvm-don-t-allow-sched-scans-without-matches-to-be-started.patch iwlwifi-pcie-properly-configure-the-debug-buffer-size-for-8000.patch iwlwifi-update-and-fix-7265-series-pci-ids.patch --- queue-4.4/iwlwifi-dvm-fix-wowlan.patch | 45 +++++++++++++ ...-scans-without-matches-to-be-started.patch | 38 +++++++++++ ...igure-the-debug-buffer-size-for-8000.patch | 63 +++++++++++++++++++ ...i-update-and-fix-7265-series-pci-ids.patch | 42 +++++++++++++ queue-4.4/series | 4 ++ 5 files changed, 192 insertions(+) create mode 100644 queue-4.4/iwlwifi-dvm-fix-wowlan.patch create mode 100644 queue-4.4/iwlwifi-mvm-don-t-allow-sched-scans-without-matches-to-be-started.patch create mode 100644 queue-4.4/iwlwifi-pcie-properly-configure-the-debug-buffer-size-for-8000.patch create mode 100644 queue-4.4/iwlwifi-update-and-fix-7265-series-pci-ids.patch diff --git a/queue-4.4/iwlwifi-dvm-fix-wowlan.patch b/queue-4.4/iwlwifi-dvm-fix-wowlan.patch new file mode 100644 index 00000000000..5ff20c9db5e --- /dev/null +++ b/queue-4.4/iwlwifi-dvm-fix-wowlan.patch @@ -0,0 +1,45 @@ +From a1cdb1c59c8c203de2731fc6910598ed19c97e41 Mon Sep 17 00:00:00 2001 +From: Emmanuel Grumbach +Date: Sun, 20 Dec 2015 08:45:40 +0200 +Subject: iwlwifi: dvm: fix WoWLAN + +From: Emmanuel Grumbach + +commit a1cdb1c59c8c203de2731fc6910598ed19c97e41 upstream. + +My commit below introduced a mutex in the transport to +prevent concurrent operations. To do so, it added a flag +(is_down) to make sure the transport is in the right state. +This uncoverred an bug that didn't cause any harm until +now: iwldvm calls stop_device and then starts the firmware +without calling start_hw in between. While this flow is +fine from the device configuration point of view (register, +etc...), it is now forbidden by the new is_down flag. +This led to this error to appear: +iwlwifi 0000:05:00.0: Can't start_fw since the HW hasn't been started +and the suspend would fail. + +This fixes: +https://bugzilla.kernel.org/show_bug.cgi?id=109591 + +Reported-by: Bogdan Bogush +Fixes=fa9f3281cbb1 ("iwlwifi: pcie: lock start_hw / start_fw / stop_device") +Signed-off-by: Emmanuel Grumbach +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/dvm/lib.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/net/wireless/iwlwifi/dvm/lib.c ++++ b/drivers/net/wireless/iwlwifi/dvm/lib.c +@@ -1154,6 +1154,9 @@ int iwlagn_suspend(struct iwl_priv *priv + + priv->ucode_loaded = false; + iwl_trans_stop_device(priv->trans); ++ ret = iwl_trans_start_hw(priv->trans); ++ if (ret) ++ goto out; + + priv->wowlan = true; + diff --git a/queue-4.4/iwlwifi-mvm-don-t-allow-sched-scans-without-matches-to-be-started.patch b/queue-4.4/iwlwifi-mvm-don-t-allow-sched-scans-without-matches-to-be-started.patch new file mode 100644 index 00000000000..be85df46e52 --- /dev/null +++ b/queue-4.4/iwlwifi-mvm-don-t-allow-sched-scans-without-matches-to-be-started.patch @@ -0,0 +1,38 @@ +From 5e56276e7555b34550d51459a801ff75eca8b907 Mon Sep 17 00:00:00 2001 +From: Luca Coelho +Date: Tue, 2 Feb 2016 15:11:15 +0200 +Subject: iwlwifi: mvm: don't allow sched scans without matches to be started + +From: Luca Coelho + +commit 5e56276e7555b34550d51459a801ff75eca8b907 upstream. + +The firmware can perform a scheduled scan with not matchsets passed, +but it can't send notification that results were found. Since the +userspace then cannot know when we got new results and the firmware +wouldn't trigger a wake in case we are sleeping, it's better not to +allow scans without matchsets. + +This fixes https://bugzilla.kernel.org/show_bug.cgi?id=110831 + +Signed-off-by: Luca Coelho +Signed-off-by: Emmanuel Grumbach +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/mvm/scan.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/net/wireless/iwlwifi/mvm/scan.c ++++ b/drivers/net/wireless/iwlwifi/mvm/scan.c +@@ -1267,6 +1267,10 @@ int iwl_mvm_sched_scan_start(struct iwl_ + return -EBUSY; + } + ++ /* we don't support "match all" in the firmware */ ++ if (!req->n_match_sets) ++ return -EOPNOTSUPP; ++ + ret = iwl_mvm_check_running_scans(mvm, type); + if (ret) + return ret; diff --git a/queue-4.4/iwlwifi-pcie-properly-configure-the-debug-buffer-size-for-8000.patch b/queue-4.4/iwlwifi-pcie-properly-configure-the-debug-buffer-size-for-8000.patch new file mode 100644 index 00000000000..2bd98da5821 --- /dev/null +++ b/queue-4.4/iwlwifi-pcie-properly-configure-the-debug-buffer-size-for-8000.patch @@ -0,0 +1,63 @@ +From 62d7476d958ce06d7a10b02bdb30006870286fe2 Mon Sep 17 00:00:00 2001 +From: Emmanuel Grumbach +Date: Tue, 5 Jan 2016 15:25:43 +0200 +Subject: iwlwifi: pcie: properly configure the debug buffer size for 8000 + +From: Emmanuel Grumbach + +commit 62d7476d958ce06d7a10b02bdb30006870286fe2 upstream. + +8000 device family has a new debug engine that needs to be +configured differently than 7000's. +The debug engine's DMA works in chunks of memory and the +size of the buffer really means the start of the last +chunk. Since one chunk is 256-byte long, we should +configure the device to write to buffer_size - 256. +This fixes a situation were the device would write to +memory it is not allowed to access. + +Signed-off-by: Emmanuel Grumbach +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/pcie/trans.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/pcie/trans.c ++++ b/drivers/net/wireless/iwlwifi/pcie/trans.c +@@ -7,6 +7,7 @@ + * + * Copyright(c) 2007 - 2015 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH ++ * Copyright(c) 2016 Intel Deutschland GmbH + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of version 2 of the GNU General Public License as +@@ -33,6 +34,7 @@ + * + * Copyright(c) 2005 - 2015 Intel Corporation. All rights reserved. + * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH ++ * Copyright(c) 2016 Intel Deutschland GmbH + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without +@@ -924,9 +926,16 @@ monitor: + if (dest->monitor_mode == EXTERNAL_MODE && trans_pcie->fw_mon_size) { + iwl_write_prph(trans, le32_to_cpu(dest->base_reg), + trans_pcie->fw_mon_phys >> dest->base_shift); +- iwl_write_prph(trans, le32_to_cpu(dest->end_reg), +- (trans_pcie->fw_mon_phys + +- trans_pcie->fw_mon_size) >> dest->end_shift); ++ if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) ++ iwl_write_prph(trans, le32_to_cpu(dest->end_reg), ++ (trans_pcie->fw_mon_phys + ++ trans_pcie->fw_mon_size - 256) >> ++ dest->end_shift); ++ else ++ iwl_write_prph(trans, le32_to_cpu(dest->end_reg), ++ (trans_pcie->fw_mon_phys + ++ trans_pcie->fw_mon_size) >> ++ dest->end_shift); + } + } + diff --git a/queue-4.4/iwlwifi-update-and-fix-7265-series-pci-ids.patch b/queue-4.4/iwlwifi-update-and-fix-7265-series-pci-ids.patch new file mode 100644 index 00000000000..7e3a1ffd297 --- /dev/null +++ b/queue-4.4/iwlwifi-update-and-fix-7265-series-pci-ids.patch @@ -0,0 +1,42 @@ +From 006bda75d81fd27a583a3b310e9444fea2aa6ef2 Mon Sep 17 00:00:00 2001 +From: Oren Givon +Date: Thu, 17 Dec 2015 14:17:00 +0200 +Subject: iwlwifi: update and fix 7265 series PCI IDs + +From: Oren Givon + +commit 006bda75d81fd27a583a3b310e9444fea2aa6ef2 upstream. + +Update and fix some 7265 PCI IDs entries. + +Signed-off-by: Oren Givon +Signed-off-by: Emmanuel Grumbach +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/pcie/drv.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/pcie/drv.c ++++ b/drivers/net/wireless/iwlwifi/pcie/drv.c +@@ -384,6 +384,7 @@ static const struct pci_device_id iwl_hw + {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_n_cfg)}, + {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)}, ++ {IWL_PCI_DEVICE(0x095A, 0x5C10, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095A, 0x5012, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095A, 0x5412, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)}, +@@ -401,10 +402,10 @@ static const struct pci_device_id iwl_hw + {IWL_PCI_DEVICE(0x095A, 0x900A, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095A, 0x9110, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095A, 0x9112, iwl7265_2ac_cfg)}, +- {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)}, ++ {IWL_PCI_DEVICE(0x095B, 0x9210, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095B, 0x9200, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095A, 0x9510, iwl7265_2ac_cfg)}, +- {IWL_PCI_DEVICE(0x095A, 0x9310, iwl7265_2ac_cfg)}, ++ {IWL_PCI_DEVICE(0x095B, 0x9310, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)}, + {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)}, + {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)}, diff --git a/queue-4.4/series b/queue-4.4/series index 5a5bbda5362..66700739317 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -336,3 +336,7 @@ x86-irq-call-irq_force_move_complete-with-irq-descriptor.patch x86-irq-plug-vector-cleanup-race.patch ib-cma-fix-rdma-port-validation-for-iwarp.patch security-let-security-modules-use-ptrace_mode_-with-bitmasks.patch +iwlwifi-dvm-fix-wowlan.patch +iwlwifi-pcie-properly-configure-the-debug-buffer-size-for-8000.patch +iwlwifi-update-and-fix-7265-series-pci-ids.patch +iwlwifi-mvm-don-t-allow-sched-scans-without-matches-to-be-started.patch -- 2.47.3