From: Sasha Levin Date: Sat, 29 Feb 2020 03:59:14 +0000 (-0500) Subject: fixes for 4.19 X-Git-Tag: v4.19.108~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=22333571057a73c1f4eeeac3571102bdea577e6f;p=thirdparty%2Fkernel%2Fstable-queue.git fixes for 4.19 Signed-off-by: Sasha Levin --- 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 index 00000000000..1e34f91b99f --- /dev/null +++ b/queue-4.19/irqchip-gic-v3-its-fix-misuse-of-genmask-macro.patch @@ -0,0 +1,36 @@ +From 23c3957f72d1b65e2724f549b6d609522767d5e9 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 9 Jul 2019 22:04:18 -0700 +Subject: irqchip/gic-v3-its: Fix misuse of GENMASK macro + +From: Joe Perches + +[ Upstream commit 20faba848752901de23a4d45a1174d64d2069dde ] + +Arguments are supposed to be ordered high then low. + +Signed-off-by: Joe Perches +Signed-off-by: Thomas Gleixner +Acked-by: Marc Zyngier +Link: https://lkml.kernel.org/r/ab5deb4fc3cd604cb620054770b7d00016d736bc.1562734889.git.joe@perches.com +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..ea7cc1ecb2e --- /dev/null +++ b/queue-4.19/iwlwifi-pcie-fix-rb_allocator-workqueue-allocation.patch @@ -0,0 +1,66 @@ +From 70833e0c3bc728c72a339550f858d958922c5494 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Sat, 29 Feb 2020 04:54:53 +0530 +Subject: iwlwifi: pcie: fix rb_allocator workqueue allocation + +From: Johannes Berg + +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 +Signed-off-by: Luca Coelho +[Ajay: Modified to apply on v4.19.y and v4.14.y] +Signed-off-by: Ajay Kaher +Signed-off-by: Sasha Levin +--- + 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 index 00000000000..9de39244025 --- /dev/null +++ b/queue-4.19/series @@ -0,0 +1,2 @@ +irqchip-gic-v3-its-fix-misuse-of-genmask-macro.patch +iwlwifi-pcie-fix-rb_allocator-workqueue-allocation.patch