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

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

Hauke Mehrtens (9):
  backports: Refresh patches on kernel 5.7-rc2
  backports: pm_qos: Add cpu_latency_qos_* functions
  backports: genetlink: Add genlmsg_parse()
  backports: rculist: Add additional parameter to
    list_for_each_entry_rcu()
  backports: Add include/uapi/linux/virtio_ids.h
  backports: virtio_config: Add virtio_find_vqs()
  backports: patches: avoid struct spi_delay usage
  backports: patches: Avoid struct ethtool_ops.supported_coalesce_params
  backports: netdevice: Add netif_is_bridge_port()

 backport/backport-include/linux/netdevice.h   |  8 +++++
 backport/backport-include/linux/pm_qos.h      | 29 +++++++++++++++++
 backport/backport-include/linux/rculist.h     | 22 +++++++++++++
 .../backport-include/linux/virtio_config.h    | 31 +++++++++++++++++++
 backport/backport-include/net/genetlink.h     | 13 +++++++-
 copy-list                                     |  1 +
 ...2-disable-dump-adjust-on-old-kernels.patch |  4 +--
 .../include_net_cfg80211.patch                |  4 +--
 .../net_wireless_core.patch                   |  2 +-
 .../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/0069-iwlwifi-pd-string-fix.patch      |  2 +-
 patches/0070-mac80211-fils.patch              |  4 +--
 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 |  2 +-
 patches/0095-spi-delay/libertas.patch         | 17 ++++++++++
 ...96-ethtool-supported_coalesce_params.cocci |  9 ++++++
 21 files changed, 146 insertions(+), 18 deletions(-)
 create mode 100644 backport/backport-include/linux/virtio_config.h
 create mode 100644 patches/0095-spi-delay/libertas.patch
 create mode 100644 patches/0096-ethtool-supported_coalesce_params.cocci

-- 
2.20.1

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

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

* [PATCH 1/9] backports: Refresh patches on kernel 5.7-rc2
  2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
@ 2020-04-20 22:16 ` Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 2/9] backports: pm_qos: Add cpu_latency_qos_* functions Hauke Mehrtens
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Hauke Mehrtens @ 2020-04-20 22:16 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0002-disable-dump-adjust-on-old-kernels.patch         | 4 ++--
 patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch | 4 ++--
 .../0010-add-wext-handlers-to-netdev/net_wireless_core.patch  | 2 +-
 patches/0014-netlink_seq/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/0069-iwlwifi-pd-string-fix.patch                      | 2 +-
 patches/0070-mac80211-fils.patch                              | 4 ++--
 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                 | 2 +-
 13 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/patches/0002-disable-dump-adjust-on-old-kernels.patch b/patches/0002-disable-dump-adjust-on-old-kernels.patch
index 5a41edfb..7ef4e282 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
-@@ -2550,6 +2550,7 @@ static int nl80211_dump_wiphy(struct sk_
+@@ -2686,6 +2686,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
-@@ -2571,6 +2572,7 @@ static int nl80211_dump_wiphy(struct sk_
+@@ -2707,6 +2708,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 11c50887..678fdb79 100644
--- a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch
+++ b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch
@@ -1,12 +1,12 @@
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -4552,6 +4552,9 @@ struct cfg80211_pmsr_capabilities {
+@@ -4695,6 +4695,9 @@ struct wiphy_iftype_akm_suites {
  struct wiphy {
  	/* assign these fields before you register the wiphy */
  
 +#define WIPHY_COMPAT_PAD_SIZE	2048
 +	u8 padding[WIPHY_COMPAT_PAD_SIZE];
 +
- 	/* permanent MAC address(es) */
  	u8 perm_addr[ETH_ALEN];
  	u8 addr_mask[ETH_ALEN];
+ 
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 6b14d347..7d34737f 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
@@ -11,7 +11,7 @@
  	device_initialize(&rdev->wiphy.dev);
  	rdev->wiphy.dev.class = &ieee80211_class;
  	rdev->wiphy.dev.platform_data = rdev;
-@@ -1296,6 +1292,15 @@ static int cfg80211_netdev_notifier_call
+@@ -1302,6 +1298,15 @@ static int cfg80211_netdev_notifier_call
  		}
  		wdev->netdev = dev;
  #ifdef CONFIG_CFG80211_WEXT
diff --git a/patches/0014-netlink_seq/net_wireless_nl80211.patch b/patches/0014-netlink_seq/net_wireless_nl80211.patch
index c9442de4..0c3350b2 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
-@@ -8781,7 +8781,9 @@ static int nl80211_dump_scan(struct sk_b
+@@ -8998,7 +8998,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 99b78d0c..1f183a84 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
-@@ -1310,6 +1310,7 @@ struct ieee80211_local {
+@@ -1314,6 +1314,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 f488589d..be237b2a 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
-@@ -1128,9 +1128,29 @@ static void ieee80211_uninit(struct net_
+@@ -1127,9 +1127,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);
  }
-@@ -1173,9 +1193,29 @@ static const struct net_device_ops ieee8
+@@ -1172,9 +1192,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 596aa90d..e2015172 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
-@@ -4701,12 +4701,12 @@ struct wiphy {
+@@ -4838,12 +4838,12 @@ struct wiphy {
  
  static inline struct net *wiphy_net(struct wiphy *wiphy)
  {
diff --git a/patches/0069-iwlwifi-pd-string-fix.patch b/patches/0069-iwlwifi-pd-string-fix.patch
index f4580157..bb05f4c4 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
-@@ -2085,6 +2085,12 @@ void iwl_mvm_dbgfs_register(struct iwl_m
+@@ -2089,6 +2089,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 9a619c68..9da4a8da 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
-@@ -571,7 +571,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_
+@@ -586,7 +586,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_
  			   NL80211_FEATURE_MAC_ON_CREATE |
  			   NL80211_FEATURE_USERSPACE_MPM |
  			   NL80211_FEATURE_FULL_AP_CLIENT_STATE;
@@ -51,4 +51,4 @@
 +#endif
  	wiphy_ext_feature_set(wiphy,
  			      NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211);
- 
+ 	wiphy_ext_feature_set(wiphy,
diff --git a/patches/0071-skb-head_frag/wireless.patch b/patches/0071-skb-head_frag/wireless.patch
index f6999ad5..d14656e7 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
-@@ -661,7 +661,11 @@ void ieee80211_amsdu_to_8023s(struct sk_
+@@ -666,7 +666,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 f3f46e5a..22ba14f4 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
-@@ -3790,7 +3790,7 @@ static const struct genl_ops hwsim_ops[]
+@@ -3859,7 +3859,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 e4071840..405df6ba 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
-@@ -14768,7 +14768,7 @@ static const struct genl_ops nl80211_ops
+@@ -15140,7 +15140,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 6dc59043..6e67bd4e 100644
--- a/patches/0079-netdev-destructor/brcmfmac.patch
+++ b/patches/0079-netdev-destructor/brcmfmac.patch
@@ -24,7 +24,7 @@
  int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked)
  {
  	struct brcmf_pub *drvr = ifp->drvr;
-@@ -870,7 +887,11 @@ struct brcmf_if *brcmf_add_if(struct brc
+@@ -879,7 +896,11 @@ struct brcmf_if *brcmf_add_if(struct brc
  		if (!ndev)
  			return ERR_PTR(-ENOMEM);
  
-- 
2.20.1

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

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

* [PATCH 2/9] backports: pm_qos: Add cpu_latency_qos_* functions
  2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 1/9] backports: Refresh patches on kernel 5.7-rc2 Hauke Mehrtens
@ 2020-04-20 22:16 ` Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 3/9] backports: genetlink: Add genlmsg_parse() Hauke Mehrtens
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Hauke Mehrtens @ 2020-04-20 22:16 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

The upstream commit fa048c59bf1b ("PM: QoS: Add CPU latency QoS API
wrappers") add the new cpu_latency_qos_* functions. In the initial
commit they are just calling the functions from the old API. Use this
first step to backport these functions. They are used by the ath10k and
ipw2100 driver.

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

diff --git a/backport/backport-include/linux/pm_qos.h b/backport/backport-include/linux/pm_qos.h
index d5bfc9bc..18cbbace 100644
--- a/backport/backport-include/linux/pm_qos.h
+++ b/backport/backport-include/linux/pm_qos.h
@@ -13,4 +13,33 @@
 #define PM_QOS_DEFAULT_VALUE -1
 #endif
 
+#if LINUX_VERSION_IS_LESS(5,7,0)
+static inline void cpu_latency_qos_add_request(struct pm_qos_request *req,
+                                              s32 value)
+{
+	pm_qos_add_request(req, PM_QOS_CPU_DMA_LATENCY, value);
+}
+
+static inline void cpu_latency_qos_update_request(struct pm_qos_request *req,
+                                                 s32 new_value)
+{
+	pm_qos_update_request(req, new_value);
+}
+
+static inline void cpu_latency_qos_remove_request(struct pm_qos_request *req)
+{
+	pm_qos_remove_request(req);
+}
+
+static inline bool cpu_latency_qos_request_active(struct pm_qos_request *req)
+{
+	return pm_qos_request_active(req);
+}
+
+static inline s32 cpu_latency_qos_limit(void)
+{
+	return pm_qos_request(PM_QOS_CPU_DMA_LATENCY);
+}
+#endif /* < 5.7 */
+
 #endif	/* _COMPAT_LINUX_PM_QOS_H */
-- 
2.20.1

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

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

* [PATCH 3/9] backports: genetlink: Add genlmsg_parse()
  2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 1/9] backports: Refresh patches on kernel 5.7-rc2 Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 2/9] backports: pm_qos: Add cpu_latency_qos_* functions Hauke Mehrtens
@ 2020-04-20 22:16 ` Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 4/9] backports: rculist: Add additional parameter to list_for_each_entry_rcu() Hauke Mehrtens
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Hauke Mehrtens @ 2020-04-20 22:16 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

This adds the genlmsg_parse() function to the netlink backport. This was
added in upstream commit 8cb081746c03 ("netlink: make validation more
configurable for future strictness").

This function is used by the mac80211_hwsim driver.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/net/genetlink.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/backport/backport-include/net/genetlink.h b/backport/backport-include/net/genetlink.h
index 747b6dac..326b9992 100644
--- a/backport/backport-include/net/genetlink.h
+++ b/backport/backport-include/net/genetlink.h
@@ -249,6 +249,17 @@ static inline struct nlattr **genl_family_attrbuf(struct genl_family *family)
 
 	return family->attrbuf;
 }
-#endif /* LINUX_VERSION_IS_LESS(4,20,0) */
+
+#define genlmsg_parse LINUX_BACKPORT(genlmsg_parse)
+static inline int genlmsg_parse(const struct nlmsghdr *nlh,
+				const struct genl_family *family,
+				struct nlattr *tb[], int maxtype,
+				const struct nla_policy *policy,
+				struct netlink_ext_ack *extack)
+{
+	return __nlmsg_parse(nlh, family->hdrsize + GENL_HDRLEN, tb, maxtype,
+			     policy, NL_VALIDATE_STRICT, extack);
+}
+#endif /* LINUX_VERSION_IS_LESS(5,2,0) */
 
 #endif /* __BACKPORT_NET_GENETLINK_H */
-- 
2.20.1

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

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

* [PATCH 4/9] backports: rculist: Add additional parameter to list_for_each_entry_rcu()
  2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
                   ` (2 preceding siblings ...)
  2020-04-20 22:16 ` [PATCH 3/9] backports: genetlink: Add genlmsg_parse() Hauke Mehrtens
@ 2020-04-20 22:16 ` Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 5/9] backports: Add include/uapi/linux/virtio_ids.h Hauke Mehrtens
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Hauke Mehrtens @ 2020-04-20 22:16 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

Upstream commit 28875945ba98 ("rcu: Add support for consolidated-RCU
reader checking") adds a new paramater for lock checking to
list_for_each_entry_rcu().
Older kernel versions do not support CONFIG_PROVE_RCU_LIST, just
ignore the extra parameter.

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

diff --git a/backport/backport-include/linux/rculist.h b/backport/backport-include/linux/rculist.h
index 9671e7c4..967cdb86 100644
--- a/backport/backport-include/linux/rculist.h
+++ b/backport/backport-include/linux/rculist.h
@@ -1,6 +1,7 @@
 #ifndef __BACKPORT_RCULIST_H
 #define __BACKPORT_RCULIST_H
 #include_next <linux/rculist.h>
+#include <linux/version.h>
 
 #if LINUX_VERSION_IS_LESS(3,9,0)
 #include <backport/magic.h>
@@ -54,4 +55,25 @@
 })
 #endif /* list_first_or_null_rcu */
 
+
+#if LINUX_VERSION_IS_LESS(5,4,0)
+
+/**
+ * list_for_each_entry_rcu	-	iterate over rcu list of given type
+ * @pos:	the type * to use as a loop cursor.
+ * @head:	the head for your list.
+ * @member:	the name of the list_head within the struct.
+ * @cond...:	optional lockdep expression if called from non-RCU protection.
+ *
+ * This list-traversal primitive may safely run concurrently with
+ * the _rcu list-mutation primitives such as list_add_rcu()
+ * as long as the traversal is guarded by rcu_read_lock().
+ */
+#undef list_for_each_entry_rcu
+#define list_for_each_entry_rcu(pos, head, member, cond...)		\
+	for (pos = list_entry_rcu((head)->next, typeof(*pos), member); \
+		&pos->member != (head); \
+		pos = list_entry_rcu(pos->member.next, typeof(*pos), member))
+#endif /* < 5.4 */
+
 #endif /* __BACKPORT_RCULIST_H */
-- 
2.20.1

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

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

* [PATCH 5/9] backports: Add include/uapi/linux/virtio_ids.h
  2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
                   ` (3 preceding siblings ...)
  2020-04-20 22:16 ` [PATCH 4/9] backports: rculist: Add additional parameter to list_for_each_entry_rcu() Hauke Mehrtens
@ 2020-04-20 22:16 ` Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 6/9] backports: virtio_config: Add virtio_find_vqs() Hauke Mehrtens
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Hauke Mehrtens @ 2020-04-20 22:16 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

Add the missing constant VIRTIO_ID_MAC80211_HWSIM.

This is a stable user space API, so it should be save to copy this file.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 copy-list | 1 +
 1 file changed, 1 insertion(+)

diff --git a/copy-list b/copy-list
index ba10a0bf..6aeb9cc6 100644
--- a/copy-list
+++ b/copy-list
@@ -54,6 +54,7 @@ include/linux/platform_data/brcmfmac.h
 include/linux/platform_data/net-cw1200.h
 include/uapi/linux/nl80211.h
 include/net/rsi_91x.h
+include/uapi/linux/virtio_ids.h
 
 include/net/cfg80211.h
 include/net/cfg80211-wext.h
-- 
2.20.1

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

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

* [PATCH 6/9] backports: virtio_config: Add virtio_find_vqs()
  2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
                   ` (4 preceding siblings ...)
  2020-04-20 22:16 ` [PATCH 5/9] backports: Add include/uapi/linux/virtio_ids.h Hauke Mehrtens
@ 2020-04-20 22:16 ` Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 7/9] backports: patches: avoid struct spi_delay usage Hauke Mehrtens
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Hauke Mehrtens @ 2020-04-20 22:16 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

The virtio_find_vqs() function is now used by the mac80211_hwsim driver.
This is just a wrapper around the find_vqs callback. The find_vqs
callback changed over the time.
With kernel 4.10 the names parameter was changed from "const char
*names[]" to "const char * const names[]".
With kernel 4.11 the "struct irq_affinity *desc" was added. We have to
define struct irq_affinity here for older kernel versions, because it
is used in this new parameter in kernel >= 4.12 this is already done in
the upstream header file.

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

diff --git a/backport/backport-include/linux/virtio_config.h b/backport/backport-include/linux/virtio_config.h
new file mode 100644
index 00000000..aeb1ba10
--- /dev/null
+++ b/backport/backport-include/linux/virtio_config.h
@@ -0,0 +1,31 @@
+#ifndef _COMPAT_LINUX_VIRTIO_CONFIG_H
+#define _COMPAT_LINUX_VIRTIO_CONFIG_H
+#include_next <linux/virtio_config.h>
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_IS_LESS(4,11,0)
+struct irq_affinity;
+#endif
+
+#if LINUX_VERSION_IS_LESS(4,12,0)
+static inline
+int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
+			struct virtqueue *vqs[], vq_callback_t *callbacks[],
+#if LINUX_VERSION_IS_LESS(4,10,0)
+			const char * const names[],
+#else
+			const char *names[],
+#endif
+			struct irq_affinity *desc)
+{
+#if LINUX_VERSION_IS_LESS(4,11,0)
+	return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names);
+#else
+	return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, desc);
+#endif
+}
+#endif /* < 4.12 */
+
+
+#endif	/* _COMPAT_LINUX_VIRTIO_CONFIG_H */
-- 
2.20.1

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

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

* [PATCH 7/9] backports: patches: avoid struct spi_delay usage
  2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
                   ` (5 preceding siblings ...)
  2020-04-20 22:16 ` [PATCH 6/9] backports: virtio_config: Add virtio_find_vqs() Hauke Mehrtens
@ 2020-04-20 22:16 ` Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 8/9] backports: patches: Avoid struct ethtool_ops.supported_coalesce_params Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 9/9] backports: netdevice: Add netif_is_bridge_port() Hauke Mehrtens
  8 siblings, 0 replies; 10+ messages in thread
From: Hauke Mehrtens @ 2020-04-20 22:16 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

The struct spi_transfer got a new member "struct spi_delay delay" in
upstream commit bebcfd272df6 ("spi: introduce `delay` field for
`spi_transfer` + spi_transfer_delay_exec()"), use the older interface in
older kernel versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0095-spi-delay/libertas.patch | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 patches/0095-spi-delay/libertas.patch

diff --git a/patches/0095-spi-delay/libertas.patch b/patches/0095-spi-delay/libertas.patch
new file mode 100644
index 00000000..4a4e59a1
--- /dev/null
+++ b/patches/0095-spi-delay/libertas.patch
@@ -0,0 +1,17 @@
+--- a/drivers/net/wireless/marvell/libertas/if_spi.c
++++ b/drivers/net/wireless/marvell/libertas/if_spi.c
+@@ -235,9 +235,14 @@ static int spu_read(struct if_spi_card *
+ 		spi_message_add_tail(&dummy_trans, &m);
+ 	} else {
+ 		/* Busy-wait while the SPU fills the FIFO */
++#if LINUX_VERSION_IS_GEQ(5,5,0)
+ 		reg_trans.delay.value =
+ 			DIV_ROUND_UP((100 + (delay * 10)), 1000);
+ 		reg_trans.delay.unit = SPI_DELAY_UNIT_USECS;
++#else
++		reg_trans.delay_usecs =
++			DIV_ROUND_UP((100 + (delay * 10)), 1000);
++#endif /* >= 5.5 */
+ 	}
+ 
+ 	/* read in data */
-- 
2.20.1

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

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

* [PATCH 8/9] backports: patches: Avoid struct ethtool_ops.supported_coalesce_params
  2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
                   ` (6 preceding siblings ...)
  2020-04-20 22:16 ` [PATCH 7/9] backports: patches: avoid struct spi_delay usage Hauke Mehrtens
@ 2020-04-20 22:16 ` Hauke Mehrtens
  2020-04-20 22:16 ` [PATCH 9/9] backports: netdevice: Add netif_is_bridge_port() Hauke Mehrtens
  8 siblings, 0 replies; 10+ messages in thread
From: Hauke Mehrtens @ 2020-04-20 22:16 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

The supported_coalesce_params member was added to the struct ethtool_ops
in upstream commit 95cddcb5cc20 ("ethtool: add infrastructure for
centralized checking of coalescing parameters"). This prevents the usage
in kernel < 5.7.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0096-ethtool-supported_coalesce_params.cocci | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 patches/0096-ethtool-supported_coalesce_params.cocci

diff --git a/patches/0096-ethtool-supported_coalesce_params.cocci b/patches/0096-ethtool-supported_coalesce_params.cocci
new file mode 100644
index 00000000..9b1b090e
--- /dev/null
+++ b/patches/0096-ethtool-supported_coalesce_params.cocci
@@ -0,0 +1,9 @@
+@r@
+identifier s,expr;
+@@
+
+struct ethtool_ops s = {
++#if LINUX_VERSION_IS_GEQ(5,7,0)
+	.supported_coalesce_params = expr,
++#endif
+};
-- 
2.20.1

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

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

* [PATCH 9/9] backports: netdevice: Add netif_is_bridge_port()
  2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
                   ` (7 preceding siblings ...)
  2020-04-20 22:16 ` [PATCH 8/9] backports: patches: Avoid struct ethtool_ops.supported_coalesce_params Hauke Mehrtens
@ 2020-04-20 22:16 ` Hauke Mehrtens
  8 siblings, 0 replies; 10+ messages in thread
From: Hauke Mehrtens @ 2020-04-20 22:16 UTC (permalink / raw)
  To: backports; +Cc: johannes, Hauke Mehrtens

netif_is_bridge_port() was added in upstream Linux commit 28f9ee22bcdd
("vlan: Do not put vlan headers back on bridge and macvlan ports").

It is now used by the wireless subsystem.

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

diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index a71ed590..edb0aaf3 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -380,4 +380,12 @@ static inline int backport_dev_open(struct net_device *dev, struct netlink_ext_a
 #define dev_open LINUX_BACKPORT(dev_open)
 #endif
 
+#if LINUX_VERSION_IS_LESS(4,4,0)
+#define netif_is_bridge_port LINUX_BACKPORT(netif_is_bridge_port)
+static inline bool netif_is_bridge_port(const struct net_device *dev)
+{
+	return dev->priv_flags & IFF_BRIDGE_PORT;
+}
+#endif
+
 #endif /* __BACKPORT_NETDEVICE_H */
-- 
2.20.1

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

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

end of thread, other threads:[~2020-04-20 22:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 22:16 [PATCH 0/9] backports: Update to version 5.7-rc2 Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 1/9] backports: Refresh patches on kernel 5.7-rc2 Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 2/9] backports: pm_qos: Add cpu_latency_qos_* functions Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 3/9] backports: genetlink: Add genlmsg_parse() Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 4/9] backports: rculist: Add additional parameter to list_for_each_entry_rcu() Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 5/9] backports: Add include/uapi/linux/virtio_ids.h Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 6/9] backports: virtio_config: Add virtio_find_vqs() Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 7/9] backports: patches: avoid struct spi_delay usage Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 8/9] backports: patches: Avoid struct ethtool_ops.supported_coalesce_params Hauke Mehrtens
2020-04-20 22:16 ` [PATCH 9/9] backports: netdevice: Add netif_is_bridge_port() 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).