]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fixes for 4.19
authorSasha Levin <sashal@kernel.org>
Sat, 29 Feb 2020 03:59:14 +0000 (22:59 -0500)
committerSasha Levin <sashal@kernel.org>
Sat, 29 Feb 2020 03:59:14 +0000 (22:59 -0500)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/irqchip-gic-v3-its-fix-misuse-of-genmask-macro.patch [new file with mode: 0644]
queue-4.19/iwlwifi-pcie-fix-rb_allocator-workqueue-allocation.patch [new file with mode: 0644]
queue-4.19/series [new file with mode: 0644]

diff --git a/queue-4.19/irqchip-gic-v3-its-fix-misuse-of-genmask-macro.patch b/queue-4.19/irqchip-gic-v3-its-fix-misuse-of-genmask-macro.patch
new file mode 100644 (file)
index 0000000..1e34f91
--- /dev/null
@@ -0,0 +1,36 @@
+From 23c3957f72d1b65e2724f549b6d609522767d5e9 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Tue, 9 Jul 2019 22:04:18 -0700
+Subject: irqchip/gic-v3-its: Fix misuse of GENMASK macro
+
+From: Joe Perches <joe@perches.com>
+
+[ Upstream commit 20faba848752901de23a4d45a1174d64d2069dde ]
+
+Arguments are supposed to be ordered high then low.
+
+Signed-off-by: Joe Perches <joe@perches.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Acked-by: Marc Zyngier <marc.zyngier@arm.com>
+Link: https://lkml.kernel.org/r/ab5deb4fc3cd604cb620054770b7d00016d736bc.1562734889.git.joe@perches.com
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/irqchip/irq-gic-v3-its.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
+index bf7b69449b438..f9b73336a39ee 100644
+--- a/drivers/irqchip/irq-gic-v3-its.c
++++ b/drivers/irqchip/irq-gic-v3-its.c
+@@ -208,7 +208,7 @@ static struct its_collection *dev_event_to_col(struct its_device *its_dev,
+ static struct its_collection *valid_col(struct its_collection *col)
+ {
+-      if (WARN_ON_ONCE(col->target_address & GENMASK_ULL(0, 15)))
++      if (WARN_ON_ONCE(col->target_address & GENMASK_ULL(15, 0)))
+               return NULL;
+       return col;
+-- 
+2.20.1
+
diff --git a/queue-4.19/iwlwifi-pcie-fix-rb_allocator-workqueue-allocation.patch b/queue-4.19/iwlwifi-pcie-fix-rb_allocator-workqueue-allocation.patch
new file mode 100644 (file)
index 0000000..ea7cc1e
--- /dev/null
@@ -0,0 +1,66 @@
+From 70833e0c3bc728c72a339550f858d958922c5494 Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Sat, 29 Feb 2020 04:54:53 +0530
+Subject: iwlwifi: pcie: fix rb_allocator workqueue allocation
+
+From: Johannes Berg <johannes.berg@intel.com>
+
+commit 8188a18ee2e48c9a7461139838048363bfce3fef upstream
+
+We don't handle failures in the rb_allocator workqueue allocation
+correctly. To fix that, move the code earlier so the cleanup is
+easier and we don't have to undo all the interrupt allocations in
+this case.
+
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
+[Ajay: Modified to apply on v4.19.y and v4.14.y]
+Signed-off-by: Ajay Kaher <akaher@vmware.com>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 15 +++++++++++----
+ 1 file changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+index 4f5571123f70a..24da496151353 100644
+--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
++++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+@@ -3283,6 +3283,15 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
+       spin_lock_init(&trans_pcie->reg_lock);
+       mutex_init(&trans_pcie->mutex);
+       init_waitqueue_head(&trans_pcie->ucode_write_waitq);
++
++      trans_pcie->rba.alloc_wq = alloc_workqueue("rb_allocator",
++                                                 WQ_HIGHPRI | WQ_UNBOUND, 1);
++      if (!trans_pcie->rba.alloc_wq) {
++              ret = -ENOMEM;
++              goto out_free_trans;
++      }
++      INIT_WORK(&trans_pcie->rba.rx_alloc, iwl_pcie_rx_allocator_work);
++
+       trans_pcie->tso_hdr_page = alloc_percpu(struct iwl_tso_hdr_page);
+       if (!trans_pcie->tso_hdr_page) {
+               ret = -ENOMEM;
+@@ -3485,10 +3494,6 @@ struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev,
+               trans_pcie->inta_mask = CSR_INI_SET_MASK;
+        }
+-      trans_pcie->rba.alloc_wq = alloc_workqueue("rb_allocator",
+-                                                 WQ_HIGHPRI | WQ_UNBOUND, 1);
+-      INIT_WORK(&trans_pcie->rba.rx_alloc, iwl_pcie_rx_allocator_work);
+-
+ #ifdef CONFIG_IWLWIFI_PCIE_RTPM
+       trans->runtime_pm_mode = IWL_PLAT_PM_MODE_D0I3;
+ #else
+@@ -3501,6 +3506,8 @@ out_free_ict:
+       iwl_pcie_free_ict(trans);
+ out_no_pci:
+       free_percpu(trans_pcie->tso_hdr_page);
++      destroy_workqueue(trans_pcie->rba.alloc_wq);
++out_free_trans:
+       iwl_trans_free(trans);
+       return ERR_PTR(ret);
+ }
+-- 
+2.20.1
+
diff --git a/queue-4.19/series b/queue-4.19/series
new file mode 100644 (file)
index 0000000..9de3924
--- /dev/null
@@ -0,0 +1,2 @@
+irqchip-gic-v3-its-fix-misuse-of-genmask-macro.patch
+iwlwifi-pcie-fix-rb_allocator-workqueue-allocation.patch