backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] backports: Update to version 5.8-rc2
@ 2020-06-22 21:37 Hauke Mehrtens
  2020-06-22 21:37 ` [PATCH 1/7] backports: patches: Refresh on kernel 5.8-rc2 Hauke Mehrtens
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2020-06-22 21:37 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

This adds the missing changes to make backports work with kernel 5.8-rc2

1   3.12.74             [  FAIL  ]
2   3.13.11             [  FAIL  ]
3   3.14.79             [  LINK  ]
4   3.16.84             [  OK  ]
5   3.18.140            [  OK  ]
6   4.0.9               [  LINK  ]
7   4.1.52              [  OK  ]
8   4.2.8               [  LINK  ]
9   4.3.6               [  LINK  ]
10  4.4.226             [  OK  ]
11  4.5.7               [  OK  ]
12  4.6.7               [  OK  ]
13  4.7.10              [  OK  ]
14  4.8.17              [  OK  ]
15  4.9.226             [  OK  ]
16  4.10.17             [  OK  ]
17  4.11.12             [  OK  ]
18  4.12.14             [  OK  ]
19  4.13.16             [  OK  ]
20  4.14.177            [  OK  ]
21  4.15.18             [  OK  ]
22  4.16.18             [  OK  ]
23  4.17.19             [  OK  ]
24  4.18.20             [  OK  ]
25  4.19.127            [  OK  ]
26  4.20.17             [  OK  ]
27  5.0.21              [  OK  ]
28  5.1.21              [  OK  ]
29  5.2.21              [  OK  ]
30  5.3.18              [  OK  ]
31  5.4.45              [  OK  ]
32  5.5.19              [  OK  ]
33  5.6.17              [  OK  ]
34  5.7.1               [  OK  ]


Hauke Mehrtens (7):
  backports: patches: Refresh on kernel 5.8-rc2
  backports: Add fallthrough attribute
  backports: Add read_poll_timeout{_atomic}()
  backports: Add GUID_INIT()
  backports: Adapt acpi_evaluate_dsm()
  backports: dependencies: Add new mt76 driver options
  backports: Include missing header file for mt76

 backport/backport-include/acpi/acpi_bus.h     | 15 +++
 backport/backport-include/linux/compiler.h    |  2 +
 .../linux/compiler_attributes.h               | 34 +++++++
 backport/backport-include/linux/iopoll.h      | 98 +++++++++++++++++++
 backport/backport-include/linux/uuid.h        |  1 +
 dependencies                                  |  3 +
 ...2-disable-dump-adjust-on-old-kernels.patch |  4 +-
 .../include_net_cfg80211.patch                |  2 +-
 .../net_wireless_core.patch                   |  6 +-
 .../drivers_net_wireless_cw1200_sdio.patch    |  2 +-
 patches/0013-fix-makefile-includes/mt76.patch | 12 +++
 .../0013-fix-makefile-includes/rtw88.patch    | 20 ----
 .../net_wireless_nl80211.patch                |  2 +-
 patches/0024-led-blink-api/mac80211.patch     |  2 +-
 patches/0028-select_queue/mac80211.patch      |  4 +-
 patches/0053-possible_net_t.patch             |  2 +-
 patches/0055-name_assign_type/brcmfmac.patch  |  2 +-
 patches/0069-iwlwifi-pd-string-fix.patch      |  2 +-
 patches/0070-mac80211-fils.patch              |  2 +-
 patches/0071-skb-head_frag/wireless.patch     |  2 +-
 patches/0077-genl-ro-after-init/hwsim.patch   |  2 +-
 patches/0077-genl-ro-after-init/nl80211.patch |  2 +-
 patches/0079-netdev-destructor/brcmfmac.patch |  4 +-
 patches/0085-iwlwifi-pci-device-removal.patch |  4 +-
 patches/0092-listified-rx/iwlwifi.patch       |  2 +-
 25 files changed, 188 insertions(+), 43 deletions(-)
 create mode 100644 backport/backport-include/acpi/acpi_bus.h
 create mode 100644 backport/backport-include/linux/compiler_attributes.h
 create mode 100644 backport/backport-include/linux/iopoll.h
 create mode 100644 patches/0013-fix-makefile-includes/mt76.patch

-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/7] backports: patches: Refresh on kernel 5.8-rc2
  2020-06-22 21:37 [PATCH 0/7] backports: Update to version 5.8-rc2 Hauke Mehrtens
@ 2020-06-22 21:37 ` Hauke Mehrtens
  2020-06-22 21:37 ` [PATCH 2/7] backports: Add fallthrough attribute Hauke Mehrtens
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2020-06-22 21:37 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

The removed includes in rtw88 are not needed any more.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 ...2-disable-dump-adjust-on-old-kernels.patch |  4 ++--
 .../include_net_cfg80211.patch                |  2 +-
 .../net_wireless_core.patch                   |  6 +++---
 .../drivers_net_wireless_cw1200_sdio.patch    |  2 +-
 .../0013-fix-makefile-includes/rtw88.patch    | 20 -------------------
 .../net_wireless_nl80211.patch                |  2 +-
 patches/0024-led-blink-api/mac80211.patch     |  2 +-
 patches/0028-select_queue/mac80211.patch      |  4 ++--
 patches/0053-possible_net_t.patch             |  2 +-
 patches/0055-name_assign_type/brcmfmac.patch  |  2 +-
 patches/0069-iwlwifi-pd-string-fix.patch      |  2 +-
 patches/0070-mac80211-fils.patch              |  2 +-
 patches/0071-skb-head_frag/wireless.patch     |  2 +-
 patches/0077-genl-ro-after-init/hwsim.patch   |  2 +-
 patches/0077-genl-ro-after-init/nl80211.patch |  2 +-
 patches/0079-netdev-destructor/brcmfmac.patch |  4 ++--
 patches/0085-iwlwifi-pci-device-removal.patch |  4 ++--
 patches/0092-listified-rx/iwlwifi.patch       |  2 +-
 18 files changed, 23 insertions(+), 43 deletions(-)

diff --git a/patches/0002-disable-dump-adjust-on-old-kernels.patch b/patches/0002-disable-dump-adjust-on-old-kernels.patch
index 7ef4e282..ba34a516 100644
--- a/patches/0002-disable-dump-adjust-on-old-kernels.patch
+++ b/patches/0002-disable-dump-adjust-on-old-kernels.patch
@@ -28,7 +28,7 @@ Date:   Fri Mar 1 14:03:49 2013 +0100
 
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -2686,6 +2686,7 @@ static int nl80211_dump_wiphy(struct sk_
+@@ -2680,6 +2680,7 @@ static int nl80211_dump_wiphy(struct sk_
  						 cb->nlh->nlmsg_seq,
  						 NLM_F_MULTI, state);
  			if (ret < 0) {
@@ -36,7 +36,7 @@ Date:   Fri Mar 1 14:03:49 2013 +0100
  				/*
  				 * If sending the wiphy data didn't fit (ENOBUFS
  				 * or EMSGSIZE returned), this SKB is still
-@@ -2707,6 +2708,7 @@ static int nl80211_dump_wiphy(struct sk_
+@@ -2701,6 +2702,7 @@ static int nl80211_dump_wiphy(struct sk_
  					rtnl_unlock();
  					return 1;
  				}
diff --git a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch
index 678fdb79..c091180a 100644
--- a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch
+++ b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch
@@ -1,6 +1,6 @@
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -4695,6 +4695,9 @@ struct wiphy_iftype_akm_suites {
+@@ -4755,6 +4755,9 @@ struct wiphy_iftype_akm_suites {
  struct wiphy {
  	/* assign these fields before you register the wiphy */
  
diff --git a/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch b/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch
index 7d34737f..d16a1cb8 100644
--- a/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch
+++ b/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch
@@ -1,7 +1,7 @@
 --- a/net/wireless/core.c
 +++ b/net/wireless/core.c
-@@ -496,10 +496,6 @@ use_default_name:
- 	INIT_WORK(&rdev->mlme_unreg_wk, cfg80211_mlme_unreg_wk);
+@@ -493,10 +493,6 @@ use_default_name:
+ 	INIT_WORK(&rdev->scan_done_wk, __cfg80211_scan_done);
  	INIT_DELAYED_WORK(&rdev->dfs_update_channels_wk,
  			  cfg80211_dfs_channels_update_work);
 -#ifdef CONFIG_CFG80211_WEXT
@@ -11,7 +11,7 @@
  	device_initialize(&rdev->wiphy.dev);
  	rdev->wiphy.dev.class = &ieee80211_class;
  	rdev->wiphy.dev.platform_data = rdev;
-@@ -1302,6 +1298,15 @@ static int cfg80211_netdev_notifier_call
+@@ -1319,6 +1315,15 @@ static int cfg80211_netdev_notifier_call
  		}
  		wdev->netdev = dev;
  #ifdef CONFIG_CFG80211_WEXT
diff --git a/patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch b/patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch
index 175561f9..7fa04588 100644
--- a/patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch
+++ b/patches/0012-driver-quirks/drivers_net_wireless_cw1200_sdio.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/st/cw1200/cw1200_sdio.c
 +++ b/drivers/net/wireless/st/cw1200/cw1200_sdio.c
-@@ -251,6 +251,12 @@ static size_t cw1200_sdio_align_size(str
+@@ -244,6 +244,12 @@ static size_t cw1200_sdio_align_size(str
  	else
  		size = sdio_align_size(self->func, size);
  
diff --git a/patches/0013-fix-makefile-includes/rtw88.patch b/patches/0013-fix-makefile-includes/rtw88.patch
index 4e2ea808..62aac393 100644
--- a/patches/0013-fix-makefile-includes/rtw88.patch
+++ b/patches/0013-fix-makefile-includes/rtw88.patch
@@ -8,23 +8,3 @@
  
  unsigned int rtw_fw_lps_deep_mode;
  EXPORT_SYMBOL(rtw_fw_lps_deep_mode);
---- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
-+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
-@@ -14,6 +14,7 @@
- #include "reg.h"
- #include "debug.h"
- #include "bf.h"
-+#include <linux/module.h>
- 
- static void rtw8822b_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path,
- 				     u8 rx_path, bool is_tx2_path);
---- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c
-+++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c
-@@ -15,6 +15,7 @@
- #include "debug.h"
- #include "util.h"
- #include "bf.h"
-+#include <linux/module.h>
- 
- static void rtw8822c_config_trx_mode(struct rtw_dev *rtwdev, u8 tx_path,
- 				     u8 rx_path, bool is_tx2_path);
diff --git a/patches/0014-netlink_seq/net_wireless_nl80211.patch b/patches/0014-netlink_seq/net_wireless_nl80211.patch
index 0c3350b2..6410d71b 100644
--- a/patches/0014-netlink_seq/net_wireless_nl80211.patch
+++ b/patches/0014-netlink_seq/net_wireless_nl80211.patch
@@ -1,6 +1,6 @@
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -8998,7 +8998,9 @@ static int nl80211_dump_scan(struct sk_b
+@@ -9037,7 +9037,9 @@ static int nl80211_dump_scan(struct sk_b
  	if (start == 0)
  		cfg80211_bss_expire(rdev);
  
diff --git a/patches/0024-led-blink-api/mac80211.patch b/patches/0024-led-blink-api/mac80211.patch
index 1f183a84..f03b1b9c 100644
--- a/patches/0024-led-blink-api/mac80211.patch
+++ b/patches/0024-led-blink-api/mac80211.patch
@@ -1,6 +1,6 @@
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1314,6 +1314,7 @@ struct ieee80211_local {
+@@ -1319,6 +1319,7 @@ struct ieee80211_local {
  	struct mutex chanctx_mtx;
  
  #ifdef CONFIG_MAC80211_LEDS
diff --git a/patches/0028-select_queue/mac80211.patch b/patches/0028-select_queue/mac80211.patch
index be237b2a..32ab2a54 100644
--- a/patches/0028-select_queue/mac80211.patch
+++ b/patches/0028-select_queue/mac80211.patch
@@ -1,6 +1,6 @@
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -1127,9 +1127,29 @@ static void ieee80211_uninit(struct net_
+@@ -1132,9 +1132,29 @@ static void ieee80211_uninit(struct net_
  	ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
  }
  
@@ -30,7 +30,7 @@
  {
  	return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
  }
-@@ -1172,9 +1192,29 @@ static const struct net_device_ops ieee8
+@@ -1177,9 +1197,29 @@ static const struct net_device_ops ieee8
  	.ndo_get_stats64	= ieee80211_get_stats64,
  };
  
diff --git a/patches/0053-possible_net_t.patch b/patches/0053-possible_net_t.patch
index e2015172..4060a720 100644
--- a/patches/0053-possible_net_t.patch
+++ b/patches/0053-possible_net_t.patch
@@ -2,7 +2,7 @@ diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
 index 04e5785..a251da1 100644
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -4838,12 +4838,12 @@ struct wiphy {
+@@ -4898,12 +4898,12 @@ struct wiphy {
  
  static inline struct net *wiphy_net(struct wiphy *wiphy)
  {
diff --git a/patches/0055-name_assign_type/brcmfmac.patch b/patches/0055-name_assign_type/brcmfmac.patch
index c9619b1c..d9e710dc 100644
--- a/patches/0055-name_assign_type/brcmfmac.patch
+++ b/patches/0055-name_assign_type/brcmfmac.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
-@@ -2220,7 +2220,9 @@ struct wireless_dev *brcmf_p2p_add_vif(s
+@@ -2339,7 +2339,9 @@ struct wireless_dev *brcmf_p2p_add_vif(s
  	}
  
  	strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1);
diff --git a/patches/0069-iwlwifi-pd-string-fix.patch b/patches/0069-iwlwifi-pd-string-fix.patch
index bb05f4c4..6ae534dc 100644
--- a/patches/0069-iwlwifi-pd-string-fix.patch
+++ b/patches/0069-iwlwifi-pd-string-fix.patch
@@ -60,7 +60,7 @@
  						     mvm->debugfs_dir, buf);
 --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
 +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c
-@@ -2089,6 +2089,12 @@ void iwl_mvm_dbgfs_register(struct iwl_m
+@@ -2092,6 +2092,12 @@ void iwl_mvm_dbgfs_register(struct iwl_m
  	 * Create a symlink with mac80211. It will be removed when mac80211
  	 * exists (before the opmode exists which removes the target.)
  	 */
diff --git a/patches/0070-mac80211-fils.patch b/patches/0070-mac80211-fils.patch
index 9da4a8da..5fa5f54b 100644
--- a/patches/0070-mac80211-fils.patch
+++ b/patches/0070-mac80211-fils.patch
@@ -42,7 +42,7 @@
  #endif /* FILS_AEAD_H */
 --- a/net/mac80211/main.c
 +++ b/net/mac80211/main.c
-@@ -586,7 +586,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_
+@@ -591,7 +591,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_
  			   NL80211_FEATURE_MAC_ON_CREATE |
  			   NL80211_FEATURE_USERSPACE_MPM |
  			   NL80211_FEATURE_FULL_AP_CLIENT_STATE;
diff --git a/patches/0071-skb-head_frag/wireless.patch b/patches/0071-skb-head_frag/wireless.patch
index d14656e7..c4c49d99 100644
--- a/patches/0071-skb-head_frag/wireless.patch
+++ b/patches/0071-skb-head_frag/wireless.patch
@@ -1,6 +1,6 @@
 --- a/net/wireless/util.c
 +++ b/net/wireless/util.c
-@@ -666,7 +666,11 @@ void ieee80211_amsdu_to_8023s(struct sk_
+@@ -676,7 +676,11 @@ void ieee80211_amsdu_to_8023s(struct sk_
  	u8 *payload;
  	int offset = 0, remaining;
  	struct ethhdr eth;
diff --git a/patches/0077-genl-ro-after-init/hwsim.patch b/patches/0077-genl-ro-after-init/hwsim.patch
index 22ba14f4..36ac2118 100644
--- a/patches/0077-genl-ro-after-init/hwsim.patch
+++ b/patches/0077-genl-ro-after-init/hwsim.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/mac80211_hwsim.c
 +++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -3859,7 +3859,7 @@ static const struct genl_ops hwsim_ops[]
+@@ -3923,7 +3923,7 @@ static const struct genl_ops hwsim_ops[]
  	},
  };
  
diff --git a/patches/0077-genl-ro-after-init/nl80211.patch b/patches/0077-genl-ro-after-init/nl80211.patch
index 405df6ba..83a20094 100644
--- a/patches/0077-genl-ro-after-init/nl80211.patch
+++ b/patches/0077-genl-ro-after-init/nl80211.patch
@@ -1,6 +1,6 @@
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -15140,7 +15140,7 @@ static const struct genl_ops nl80211_ops
+@@ -15241,7 +15241,7 @@ static const struct genl_ops nl80211_ops
  	},
  };
  
diff --git a/patches/0079-netdev-destructor/brcmfmac.patch b/patches/0079-netdev-destructor/brcmfmac.patch
index 6e67bd4e..b11a0861 100644
--- a/patches/0079-netdev-destructor/brcmfmac.patch
+++ b/patches/0079-netdev-destructor/brcmfmac.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
-@@ -629,6 +629,23 @@ static const struct net_device_ops brcmf
+@@ -626,6 +626,23 @@ static const struct net_device_ops brcmf
  	.ndo_set_rx_mode = brcmf_netdev_set_multicast_list
  };
  
@@ -24,7 +24,7 @@
  int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked)
  {
  	struct brcmf_pub *drvr = ifp->drvr;
-@@ -879,7 +896,11 @@ struct brcmf_if *brcmf_add_if(struct brc
+@@ -876,7 +893,11 @@ struct brcmf_if *brcmf_add_if(struct brc
  		if (!ndev)
  			return ERR_PTR(-ENOMEM);
  
diff --git a/patches/0085-iwlwifi-pci-device-removal.patch b/patches/0085-iwlwifi-pci-device-removal.patch
index 08627746..c1c1dc39 100644
--- a/patches/0085-iwlwifi-pci-device-removal.patch
+++ b/patches/0085-iwlwifi-pci-device-removal.patch
@@ -2,7 +2,7 @@ diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wirel
 index f74281508197..3b11bd68f261 100644
 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
 +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
-@@ -2024,6 +2024,9 @@ static void iwl_trans_pcie_removal_wk(st
+@@ -2006,6 +2006,9 @@ static void iwl_trans_pcie_removal_wk(st
  	struct iwl_trans_pcie_removal *removal =
  		container_of(wk, struct iwl_trans_pcie_removal, work);
  	struct pci_dev *pdev = removal->pdev;
@@ -12,7 +12,7 @@ index f74281508197..3b11bd68f261 100644
  	static char *prop[] = {"EVENT=INACCESSIBLE", NULL};
  
  	dev_err(&pdev->dev, "Device gone - attempting removal\n");
-@@ -2032,6 +2035,7 @@ static void iwl_trans_pcie_removal_wk(st
+@@ -2014,6 +2017,7 @@ static void iwl_trans_pcie_removal_wk(st
  	pci_dev_put(pdev);
  	pci_stop_and_remove_bus_device(pdev);
  	pci_unlock_rescan_remove();
diff --git a/patches/0092-listified-rx/iwlwifi.patch b/patches/0092-listified-rx/iwlwifi.patch
index 4d3e25cc..0772aa0d 100644
--- a/patches/0092-listified-rx/iwlwifi.patch
+++ b/patches/0092-listified-rx/iwlwifi.patch
@@ -3,7 +3,7 @@ commit 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs")
 
 --- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
 +++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c
-@@ -1581,11 +1581,13 @@ out:
+@@ -1603,11 +1603,13 @@ out:
  	if (napi->poll) {
  		napi_gro_flush(napi, false);
  
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/7] backports: Add fallthrough attribute
  2020-06-22 21:37 [PATCH 0/7] backports: Update to version 5.8-rc2 Hauke Mehrtens
  2020-06-22 21:37 ` [PATCH 1/7] backports: patches: Refresh on kernel 5.8-rc2 Hauke Mehrtens
@ 2020-06-22 21:37 ` Hauke Mehrtens
  2020-06-22 21:38 ` [PATCH 3/7] backports: Add read_poll_timeout{_atomic}() Hauke Mehrtens
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2020-06-22 21:37 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

This adds the fallthrough attribute from Linux commit 294f69e662d1
("compiler_attributes.h: Add 'fallthrough' pseudo keyword for switch/case use")
This also adds the __has_attribute() define for older compilers like
GCC < 5.

linux/compiler_attributes.h needs to be included, this file was only
added in more recent kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/compiler.h    |  2 ++
 .../linux/compiler_attributes.h               | 34 +++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 backport/backport-include/linux/compiler_attributes.h

diff --git a/backport/backport-include/linux/compiler.h b/backport/backport-include/linux/compiler.h
index 53c069df..51a6ec2c 100644
--- a/backport/backport-include/linux/compiler.h
+++ b/backport/backport-include/linux/compiler.h
@@ -2,6 +2,8 @@
 #define __BACKPORT_LINUX_COMPILER_H
 #include_next <linux/compiler.h>
 
+#include <linux/compiler_attributes.h>
+
 #ifndef __rcu
 #define __rcu
 #endif
diff --git a/backport/backport-include/linux/compiler_attributes.h b/backport/backport-include/linux/compiler_attributes.h
new file mode 100644
index 00000000..31ddc163
--- /dev/null
+++ b/backport/backport-include/linux/compiler_attributes.h
@@ -0,0 +1,34 @@
+#ifndef _BACKPORTS_LINUX_COMPILER_ATTRIBUTES_H
+#define _BACKPORTS_LINUX_COMPILER_ATTRIBUTES_H 1
+
+#if LINUX_VERSION_IS_GEQ(4,20,0)
+#include_next <linux/compiler_attributes.h>
+#endif
+
+#ifndef __has_attribute
+# define __has_attribute(x) __GCC4_has_attribute_##x
+#endif
+
+#ifndef __GCC4_has_attribute___fallthrough__
+# define __GCC4_has_attribute___fallthrough__         0
+#endif /* __GCC4_has_attribute___fallthrough__ */
+
+#ifndef fallthrough
+/*
+ * Add the pseudo keyword 'fallthrough' so case statement blocks
+ * must end with any of these keywords:
+ *   break;
+ *   fallthrough;
+ *   goto <label>;
+ *   return [expression];
+ *
+ *  gcc: https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#Statement-Attributes
+ */
+#if __has_attribute(__fallthrough__)
+# define fallthrough                    __attribute__((__fallthrough__))
+#else
+# define fallthrough                    do {} while (0)  /* fallthrough */
+#endif
+#endif /* fallthrough */
+
+#endif /* _BACKPORTS_LINUX_COMPILER_ATTRIBUTES_H */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/7] backports: Add read_poll_timeout{_atomic}()
  2020-06-22 21:37 [PATCH 0/7] backports: Update to version 5.8-rc2 Hauke Mehrtens
  2020-06-22 21:37 ` [PATCH 1/7] backports: patches: Refresh on kernel 5.8-rc2 Hauke Mehrtens
  2020-06-22 21:37 ` [PATCH 2/7] backports: Add fallthrough attribute Hauke Mehrtens
@ 2020-06-22 21:38 ` Hauke Mehrtens
  2020-06-22 21:38 ` [PATCH 4/7] backports: Add GUID_INIT() Hauke Mehrtens
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2020-06-22 21:38 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

These defines are used by the rtw88 driver.

These defines are copied from Linux commit 5f5323a14cad ("iopoll:
introduce read_poll_timeout macro") and 57a29df34146 ("iopoll: Introduce
read_poll_timeout_atomic macro")

linux/iopoll.h was only added in kernel 4.20, do not include the
original file in older versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/iopoll.h | 98 ++++++++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 backport/backport-include/linux/iopoll.h

diff --git a/backport/backport-include/linux/iopoll.h b/backport/backport-include/linux/iopoll.h
new file mode 100644
index 00000000..f50187ad
--- /dev/null
+++ b/backport/backport-include/linux/iopoll.h
@@ -0,0 +1,98 @@
+#ifndef _BACKPORTS_LINUX_IOPOLL_H
+#define _BACKPORTS_LINUX_IOPOLL_H 1
+
+#if LINUX_VERSION_IS_GEQ(4,0,0)
+#include_next <linux/iopoll.h>
+#endif
+
+#ifndef read_poll_timeout
+/**
+ * read_poll_timeout - Periodically poll an address until a condition is
+ *			met or a timeout occurs
+ * @op: accessor function (takes @args as its arguments)
+ * @val: Variable to read the value into
+ * @cond: Break condition (usually involving @val)
+ * @sleep_us: Maximum time to sleep between reads in us (0
+ *            tight-loops).  Should be less than ~20ms since usleep_range
+ *            is used (see Documentation/timers/timers-howto.rst).
+ * @timeout_us: Timeout in us, 0 means never timeout
+ * @sleep_before_read: if it is true, sleep @sleep_us before read.
+ * @args: arguments for @op poll
+ *
+ * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
+ * case, the last read value at @args is stored in @val. Must not
+ * be called from atomic context if sleep_us or timeout_us are used.
+ *
+ * When available, you'll probably want to use one of the specialized
+ * macros defined below rather than this macro directly.
+ */
+#define read_poll_timeout(op, val, cond, sleep_us, timeout_us, \
+				sleep_before_read, args...) \
+({ \
+	u64 __timeout_us = (timeout_us); \
+	unsigned long __sleep_us = (sleep_us); \
+	ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
+	might_sleep_if((__sleep_us) != 0); \
+	if (sleep_before_read && __sleep_us) \
+		usleep_range((__sleep_us >> 2) + 1, __sleep_us); \
+	for (;;) { \
+		(val) = op(args); \
+		if (cond) \
+			break; \
+		if (__timeout_us && \
+		    ktime_compare(ktime_get(), __timeout) > 0) { \
+			(val) = op(args); \
+			break; \
+		} \
+		if (__sleep_us) \
+			usleep_range((__sleep_us >> 2) + 1, __sleep_us); \
+	} \
+	(cond) ? 0 : -ETIMEDOUT; \
+})
+#endif /* read_poll_timeout */
+
+#ifndef read_poll_timeout_atomic
+/**
+ * read_poll_timeout_atomic - Periodically poll an address until a condition is
+ * 				met or a timeout occurs
+ * @op: accessor function (takes @addr as its only argument)
+ * @addr: Address to poll
+ * @val: Variable to read the value into
+ * @cond: Break condition (usually involving @val)
+ * @delay_us: Time to udelay between reads in us (0 tight-loops).  Should
+ *            be less than ~10us since udelay is used (see
+ *            Documentation/timers/timers-howto.rst).
+ * @timeout_us: Timeout in us, 0 means never timeout
+ * @delay_before_read: if it is true, delay @delay_us before read.
+ *
+ * Returns 0 on success and -ETIMEDOUT upon a timeout. In either
+ * case, the last read value at @args is stored in @val.
+ *
+ * When available, you'll probably want to use one of the specialized
+ * macros defined below rather than this macro directly.
+ */
+#define read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, \
+					delay_before_read, args...) \
+({ \
+	u64 __timeout_us = (timeout_us); \
+	unsigned long __delay_us = (delay_us); \
+	ktime_t __timeout = ktime_add_us(ktime_get(), __timeout_us); \
+	if (delay_before_read && __delay_us) \
+		udelay(__delay_us); \
+	for (;;) { \
+		(val) = op(args); \
+		if (cond) \
+			break; \
+		if (__timeout_us && \
+		    ktime_compare(ktime_get(), __timeout) > 0) { \
+			(val) = op(args); \
+			break; \
+		} \
+		if (__delay_us) \
+			udelay(__delay_us); \
+	} \
+	(cond) ? 0 : -ETIMEDOUT; \
+})
+#endif /* read_poll_timeout_atomic */
+
+#endif /* _BACKPORTS_LINUX_IOPOLL_H */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/7] backports: Add GUID_INIT()
  2020-06-22 21:37 [PATCH 0/7] backports: Update to version 5.8-rc2 Hauke Mehrtens
                   ` (2 preceding siblings ...)
  2020-06-22 21:38 ` [PATCH 3/7] backports: Add read_poll_timeout{_atomic}() Hauke Mehrtens
@ 2020-06-22 21:38 ` Hauke Mehrtens
  2020-06-22 21:38 ` [PATCH 5/7] backports: Adapt acpi_evaluate_dsm() Hauke Mehrtens
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2020-06-22 21:38 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

Linux commit f9727a17db9b ("uuid: rename uuid types") added the
GUID_INIT() function, use the UUID_LE on older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/uuid.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/backport/backport-include/linux/uuid.h b/backport/backport-include/linux/uuid.h
index bc6fbe17..90352f1b 100644
--- a/backport/backport-include/linux/uuid.h
+++ b/backport/backport-include/linux/uuid.h
@@ -14,6 +14,7 @@
 #if LINUX_VERSION_IS_LESS(4,13,0)
 #define guid_t uuid_le
 #define uuid_t uuid_be
+#define GUID_INIT UUID_LE
 
 static inline void guid_gen(guid_t *u)
 {
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 5/7] backports: Adapt acpi_evaluate_dsm()
  2020-06-22 21:37 [PATCH 0/7] backports: Update to version 5.8-rc2 Hauke Mehrtens
                   ` (3 preceding siblings ...)
  2020-06-22 21:38 ` [PATCH 4/7] backports: Add GUID_INIT() Hauke Mehrtens
@ 2020-06-22 21:38 ` Hauke Mehrtens
  2020-06-22 21:38 ` [PATCH 6/7] backports: dependencies: Add new mt76 driver options Hauke Mehrtens
  2020-06-22 21:38 ` [PATCH 7/7] backports: Include missing header file for mt76 Hauke Mehrtens
  6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2020-06-22 21:38 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

The function signature of acpi_evaluate_dsm() changed in Linux
94116f8126de ("ACPI: Switch to use generic guid_t in
acpi_evaluate_dsm()"), add function to handle this new interface.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/acpi/acpi_bus.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 backport/backport-include/acpi/acpi_bus.h

diff --git a/backport/backport-include/acpi/acpi_bus.h b/backport/backport-include/acpi/acpi_bus.h
new file mode 100644
index 00000000..4c7404a2
--- /dev/null
+++ b/backport/backport-include/acpi/acpi_bus.h
@@ -0,0 +1,15 @@
+#ifndef _BACKPORTS_ACPI_BUS_H__
+#define _BACKPORTS_ACPI_BUS_H__ 1
+
+#include_next <acpi/acpi_bus.h>
+
+#if LINUX_VERSION_IN_RANGE(3,14,0, 4,13,0) 
+static inline union acpi_object *
+backport_acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4)
+{
+	return acpi_evaluate_dsm(handle, guid->b, rev, func, argv4);
+}
+#define acpi_evaluate_dsm LINUX_BACKPORT(acpi_evaluate_dsm)
+#endif /* 3.14 <= x < 4.13.0 */
+
+#endif /* _BACKPORTS_ACPI_BUS_H__ */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 6/7] backports: dependencies: Add new mt76 driver options
  2020-06-22 21:37 [PATCH 0/7] backports: Update to version 5.8-rc2 Hauke Mehrtens
                   ` (4 preceding siblings ...)
  2020-06-22 21:38 ` [PATCH 5/7] backports: Adapt acpi_evaluate_dsm() Hauke Mehrtens
@ 2020-06-22 21:38 ` Hauke Mehrtens
  2020-06-22 21:38 ` [PATCH 7/7] backports: Include missing header file for mt76 Hauke Mehrtens
  6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2020-06-22 21:38 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

Add the newly added mt76 driver options to the dependency list to
prevent building the mt76 driver against older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 dependencies | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dependencies b/dependencies
index cb6741c7..6d6829b2 100644
--- a/dependencies
+++ b/dependencies
@@ -81,6 +81,9 @@ MT76x2E 4.2
 MT76x2U 4.2
 MT7603E 4.2
 MT7615E 4.2
+MT7663U 4.2
+MT7915E 4.2
+MT7622_WMAC 4.2
 
 # select_queue_fallback_t is missing
 RTL8723BS 3.14
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 7/7] backports: Include missing header file for mt76
  2020-06-22 21:37 [PATCH 0/7] backports: Update to version 5.8-rc2 Hauke Mehrtens
                   ` (5 preceding siblings ...)
  2020-06-22 21:38 ` [PATCH 6/7] backports: dependencies: Add new mt76 driver options Hauke Mehrtens
@ 2020-06-22 21:38 ` Hauke Mehrtens
  6 siblings, 0 replies; 8+ messages in thread
From: Hauke Mehrtens @ 2020-06-22 21:38 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

MODULE_PARM_DESC() is not defined without this header file on some
kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0013-fix-makefile-includes/mt76.patch | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 patches/0013-fix-makefile-includes/mt76.patch

diff --git a/patches/0013-fix-makefile-includes/mt76.patch b/patches/0013-fix-makefile-includes/mt76.patch
new file mode 100644
index 00000000..b7628ff2
--- /dev/null
+++ b/patches/0013-fix-makefile-includes/mt76.patch
@@ -0,0 +1,12 @@
+additional include needed for kernel 4.2, 4.11, 4.12 and 4.13
+
+--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
++++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+@@ -6,6 +6,7 @@
+  */
+ 
+ #include <linux/firmware.h>
++#include <linux/module.h>
+ #include "mt7615.h"
+ #include "mcu.h"
+ #include "mac.h"
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-06-22 21:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 21:37 [PATCH 0/7] backports: Update to version 5.8-rc2 Hauke Mehrtens
2020-06-22 21:37 ` [PATCH 1/7] backports: patches: Refresh on kernel 5.8-rc2 Hauke Mehrtens
2020-06-22 21:37 ` [PATCH 2/7] backports: Add fallthrough attribute Hauke Mehrtens
2020-06-22 21:38 ` [PATCH 3/7] backports: Add read_poll_timeout{_atomic}() Hauke Mehrtens
2020-06-22 21:38 ` [PATCH 4/7] backports: Add GUID_INIT() Hauke Mehrtens
2020-06-22 21:38 ` [PATCH 5/7] backports: Adapt acpi_evaluate_dsm() Hauke Mehrtens
2020-06-22 21:38 ` [PATCH 6/7] backports: dependencies: Add new mt76 driver options Hauke Mehrtens
2020-06-22 21:38 ` [PATCH 7/7] backports: Include missing header file for mt76 Hauke Mehrtens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).