diff options
author | Luca Coelho <luciano.coelho@intel.com> | 2018-09-20 14:28:32 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2018-09-24 09:28:43 +0200 |
commit | 2c8d25addbc99a9c72350671f39d86894d4c5637 (patch) | |
tree | b9abe7e9987fd349d6686669e759ee68cab54a88 /patches | |
parent | 9bc425e27ab9e46c2da4618658c3c6a86911f779 (diff) |
backport: add patch to ignore iwlwifi removal on < 3.14 kernels
The iwlwifi driver has a workaround for some PCI bugs that require it
to be removed and reinserted. Unfortunately, this doesn'w work on
kernels < 3.14, so ignore the actual work function in that case and
print out a message instead.
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
[rename patch to have a number prefix]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/0085-iwlwifi-pci-device-removal.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/patches/0085-iwlwifi-pci-device-removal.patch b/patches/0085-iwlwifi-pci-device-removal.patch new file mode 100644 index 00000000..c72cd09f --- /dev/null +++ b/patches/0085-iwlwifi-pci-device-removal.patch @@ -0,0 +1,24 @@ +diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +index 7229991ae70d..d77d0aa3bf7b 100644 +--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +@@ -1946,6 +1946,11 @@ static void iwl_trans_pcie_removal_wk(struct work_struct *wk) + struct iwl_trans_pcie_removal *removal = + container_of(wk, struct iwl_trans_pcie_removal, work); + struct pci_dev *pdev = removal->pdev; ++#if LINUX_VERSION_IS_LESS(3,14,0) ++ dev_err(&rescan->pdev->dev, ++ "Device disconnected - can't rescan on old kernels.\n"); ++ pci_dev_put(pdev); ++#else + char *prop[] = {"EVENT=INACCESSIBLE", NULL}; + + dev_err(&pdev->dev, "Device gone - attempting removal\n"); +@@ -1957,6 +1962,7 @@ static void iwl_trans_pcie_removal_wk(struct work_struct *wk) + + kfree(removal); + module_put(THIS_MODULE); ++#endif /* LINUX_VERSION_IS_LESS(3,14,0) */ + } + + static bool iwl_trans_pcie_grab_nic_access(struct iwl_trans *trans, |