Skip to contentSkip to conversation

backports: synch up to next-20140311

PATCH In review Luis R. Rodriguez 3 participants 36 messages Apr 5, 2014 – Apr 7, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover backports: synch up to next-20140311

I'm back from Limbo! Thanks to Hauke for taking on backports while I was gone and to Johannes for taking on the first seires of SmPL patches. This series takes what I saw was pending on the backports mailing list and also puts out what I have been working on in collaboration with the folks at LIP6, in particular Julia Lawall, on the helping automate backport the Linux kernel further. I've put together a lenghty write up [0] of the series of changes that have been ongoing on the Linux backports project [1] which I hope can serve as both some form of ramp up education on using Coccinelle and writing grammar rules in Semantic Patch Language (SmPL) but also concerte evidence of how this technology can help us scale Linux and scale Linux backporting and extend the way we do automatic backporting.

This also puts us in synch with next-20140311 and I have some small changes which lets us create a linux-3.14.y branch ready for release provided I don't hear back with any issues or qualms observed. All this obviously goes compile tested against the last 30 Linux kernel releases.

At the Linux Collaboration Summit and on elsewhere I've been beeing poked about backports and if anyone was working on it and will continue to do so. There were some isues which I needed to get resolved, its all done and I'm back, now at SUSE. Now at SUSE I have other responsibilities but I'm going going to continue to extend backports but with a slightly different set of requirements and considerations, one of them being focusing on kernels >= 3.0. I understand there is still huge interest in upkeeping support for older kernels, I don't plan on removing those immediately but with your help I think we should strive to build consensus on only using kernels listed on kernel.org. The flexibility provided by Linux backports can hopefully be used to help persuade folks to abandon unsupported kernels. This won't happen overnight, but that's the goal.

If you want to test all this agains the latest master branch you can wget the all in one series of patches [2] and git am it.

[0] http://www.do-not-panic.com//2014/04/automatic-linux-kernel-backporting-with-coccinelle.html
[1] https://backports.wiki.kernel.org
[2] http://drvbp1.linux-foundation.org/~mcgrof/patches/backports/2014/05/synch-up-next-next-20140311.patch

Eliad Peller (1):
backports: ifdef some pci functions

Johannes Berg (2):
backports: fix compilation with CONFIG_OF
backports: add crypto/ccm backport

Luis R. Rodriguez (24):
backports: backport MPLS support
backports: make WL1251_SPI depend on >= 3.5
backports: bump kernel reqs for WL1251_SDIO and WLCORE_SDIO
backports: bump drivers dependency that require I2C bus classes
backports: define ETH_P_80221
backports: backport definition of struct frag_queue
backports: backport skb_unclone()
backports: backport frag helper functions for mem limit tracking
backports: backport inet_frag_maybe_warn_overflow()
backports: add threaded Coccinelle spatch support
backports: use --ignore-removal for git add
backports: add git diff support to lib/bpgit.py
backports: add support for testing only a single Coccinelle SmPL patch
backports: add Coccinelle SmPL profiling support to gentree.py
backports: add include/net/6lowpan.h to copy-list
backports: address move of 6lowpan.c to 6lowpan_rtnl.c
backports: address jump label and static key support
backports: backport net_get_random_once()
backports: 6lowpan domain specific backport of inet_frag_lru_move()
backports: backport ieee802154 6lowpan support down to 3.5
backports: refresh patches based on next-20140311
backports: backports: reshufle the threaded IRQ backport series
backports: convert threaded IRQ suport into an SmPL patch
backports: enhance 0001-netdev_ops.cocci with data structure specifics

 backport/backport-include/linux/if_ether.h         |   5 +
 backport/backport-include/linux/net.h              |  52 ++++++
 backport/backport-include/linux/of.h               |   3 +
 backport/backport-include/linux/pci.h              |   2 +
 backport/backport-include/linux/skbuff.h           |  11 ++
 backport/backport-include/linux/static_key.h       | 186 +++++++++++++++++++++
 backport/backport-include/linux/tracepoint.h       |   7 +
 backport/backport-include/net/inet_frag.h          |  44 +++++
 backport/backport-include/net/ipv6.h               |  19 +++
 backport/backport-include/net/net_namespace.h      |  22 ++-
 backport/compat/Kconfig                            |   9 +
 backport/compat/Makefile                           |   1 +
 backport/compat/backport-3.10.c                    |  28 ++++
 backport/compat/backport-3.13.c                    |  54 ++++++
 backport/compat/backport-3.15.c                    |  14 ++
 backport/compat/backports.h                        |  10 ++
 backport/compat/compat-3.8.c                       |  28 ----
 backport/compat/compat-3.9.c                       |  14 ++
 backport/compat/main.c                             |   8 +-
 copy-list                                          |   8 +
 dependencies                                       |  20 ++-
 gentree.py                                         |  64 +++++--
 lib/bpcoccinelle.py                                |  92 ++++++++++
 lib/bpgit.py                                       |  16 +-
 .../0001-6lowpan-namespace.patch                   | 143 ++++++++++++++++
 .../0002-include-new-netns-headers.patch           |  12 ++
 patches/backport-adjustments/crypto-ccm.patch      |  76 +++++++++
 .../media/0004-sysfs-api.patch                     |   2 +-
 .../network/0001-netdev_ops.cocci                  |   8 +-
 .../mac80211.patch                                 |   4 +-
 .../0006-disable-dump-adjust-on-old-kernels.patch  |   4 +-
 .../network/0010-disable-usb-net-asix.patch        |   2 +-
 .../0012-ieee802154-6lowpan-namespace.patch        |  63 +++++++
 .../network/0013-lowpan-inet_frag_lru_move.patch   |  59 +++++++
 .../network/0013-net-user-ns.patch                 |  17 ++
 .../network/0014-inet_frag_evictor.patch           |  20 +++
 .../network/0015-threaded-irq.cocci                |  75 +++++++++
 .../{09-threaded-irq => 0015-threaded-irq}/INFO    |   3 +-
 .../drivers_net_wireless_iwlwifi_iwl-trans.patch   |  12 ++
 .../network/0016-threaded-irq-one-shot.patch       |  38 +++++
 .../drivers_net_wireless_ti_wl1251_spi.patch       |   2 +-
 .../include_net_cfg80211.patch                     |   2 +-
 .../drivers_net_wireless_b43_b43.patch             |  12 --
 .../drivers_net_wireless_b43_main.patch            |  45 -----
 ...rivers_net_wireless_iwlwifi_pcie_internal.patch |  12 --
 .../drivers_net_wireless_iwlwifi_pcie_trans.patch  |  41 -----
 .../drivers_net_wireless_ti_wlcore_main.patch      |  55 ------
 .../drivers_net_wireless_ti_wlcore_wlcore.patch    |  13 --
 .../net_wireless_core.patch                        |   2 +-
 .../drivers_net_wireless_iwlegacy_3945-mac.patch   |   2 +-
 .../drivers_net_wireless_iwlegacy_4965-mac.patch   |   2 +-
 .../drivers_net_wireless_iwlegacy_common.patch     |   4 +-
 .../drivers_net_wireless_mwifiex_pcie.patch        |   2 +-
 .../16-bluetooth/drivers_bluetooth_hci_ldisc.patch |   4 +-
 .../17-netdev-queue/net_mac80211_iface.patch       |   4 +-
 .../24-pcmcia/drivers_bluetooth_bluecard_cs.patch  |  20 +--
 .../24-pcmcia/drivers_bluetooth_bt3c_cs.patch      |  14 +-
 .../24-pcmcia/drivers_bluetooth_btuart_cs.patch    |  20 +--
 .../24-pcmcia/drivers_bluetooth_dtl1_cs.patch      |  20 +--
 .../drivers_net_wireless_iwlwifi.patch             |   4 +-
 .../drivers_net_wireless_mwl8k.patch               |  10 +-
 .../drivers_net_wireless_rtl818x_rtl8180_dev.patch |   2 +-
 .../include_net_mac80211.patch                     |   2 +-
 .../net_mac80211_iface.patch                       |   4 +-
 .../drivers_net_wireless_mwifiex_sdio.patch        |  16 +-
 .../30-bridge-port/net_wireless_nl80211.patch      |   2 +-
 .../network/30-bridge-port/net_wireless_util.patch |   2 +-
 .../network/36-workqueue/net_mac80211_main.patch   |   2 +-
 .../42-netlink_seq/net_wireless_nl80211.patch      |   2 +-
 .../drivers_net_wireless_mwifiex_init.patch        |   2 +-
 .../52-tty-dev/drivers_bluetooth_hci_ldisc.patch   |   2 +-
 .../drivers_net_ethernet_broadcom_b44.patch        |   4 +-
 .../69-wowlan-no-socket/net_wireless_nl80211.patch |   2 +-
 .../network/81-genl-const/hwsim.patch              |   2 +-
 .../network/81-genl-const/nl80211.patch            |   6 +-
 .../network/83-select_queue/mac80211.patch         |   4 +-
 .../84-ethernet/0001-igb_net_device_ops.patch      |   8 +-
 .../84-ethernet/0002-igb_pci_sriov_configure.patch |  12 +-
 .../network/84-ethernet/0004-igb_err_handler.patch |   2 +-
 .../network/84-ethernet/0005-igb_mdi.patch         |  10 +-
 .../network/84-ethernet/0006-igb_eee.patch         |   6 +-
 .../network/84-ethernet/0007-igb_ethtool_ops.patch |  10 +-
 .../network/84-ethernet/0008-igb_no_fcs.patch      |   2 +-
 .../network/84-ethernet/0009-igb_vlan_rx_vid.patch |   8 +-
 .../network/84-ethernet/0010-igb_ethtool_ops.patch |  10 +-
 .../network/84-ethernet/0011-igb_ethtool_ops.patch |   6 +-
 .../84-ethernet/0012-igb_ndo_set_vf_spoofchk.patch |  10 +-
 .../network/84-ethernet/0013-igb_hwmon.patch       |   6 +-
 .../network/86-qdisc_tx_busylock/ieee802154.patch  |  10 +-
 89 files changed, 1317 insertions(+), 382 deletions(-)
 create mode 100644 backport/backport-include/linux/static_key.h
 create mode 100644 backport/backport-include/net/inet_frag.h
 create mode 100644 lib/bpcoccinelle.py
 create mode 100644 patches/0000-upstream-backport-changes/0001-6lowpan-namespace.patch
 create mode 100644 patches/0000-upstream-backport-changes/0002-include-new-netns-headers.patch
 create mode 100644 patches/backport-adjustments/crypto-ccm.patch
 create mode 100644 patches/collateral-evolutions/network/0012-ieee802154-6lowpan-namespace.patch
 create mode 100644 patches/collateral-evolutions/network/0013-lowpan-inet_frag_lru_move.patch
 create mode 100644 patches/collateral-evolutions/network/0013-net-user-ns.patch
 create mode 100644 patches/collateral-evolutions/network/0014-inet_frag_evictor.patch
 create mode 100644 patches/collateral-evolutions/network/0015-threaded-irq.cocci
 rename patches/collateral-evolutions/network/{09-threaded-irq => 0015-threaded-irq}/INFO (78%)
 create mode 100644 patches/collateral-evolutions/network/0015-threaded-irq/drivers_net_wireless_iwlwifi_iwl-trans.patch
 create mode 100644 patches/collateral-evolutions/network/0016-threaded-irq-one-shot.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_b43.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_main.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_internal.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_trans.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_wlcore.patch
Signature · 1 line
1.8.5.3
#1 lore raw

PATCH 1/27 backports: fix compilation with CONFIG_OF

From: Johannes Berg <[email protected]>

There are two users of of_find_property_value_of_size() which is originally static in the kernel, but we need it exposed (but not exported) so that multiple backport files can use it; do that.

---
 backport/backport-include/linux/of.h |  3 +++
 backport/compat/backport-3.10.c      | 28 ++++++++++++++++++++++++++++
 backport/compat/compat-3.8.c         | 28 ----------------------------
 3 files changed, 31 insertions(+), 28 deletions(-)
backport/backport-include/linux/of.h +3 -0
index e600055..e7f7ea7 100644
@@ -52,6 +52,9 @@ static inline int of_property_read_u8_array(const struct device_node *np,
 extern int of_property_read_u32_index(const struct device_node *np,
 				       const char *propname,
 				       u32 index, u32 *out_value);
+/* This is static in the kernel, but we need it in multiple places */
+void *of_find_property_value_of_size(const struct device_node *np,
+				     const char *propname, u32 len);
 #else
 static inline int of_property_read_u32_index(const struct device_node *np,
 			const char *propname, u32 index, u32 *out_value)
backport/compat/backport-3.10.c +28 -0
index 2e64228..c7a1c18 100644
@@ -178,6 +178,34 @@ EXPORT_SYMBOL_GPL(pci_vfs_assigned);
 
 #ifdef CONFIG_OF
 /**
+ * of_find_property_value_of_size
+ *
+ * @np:		device node from which the property value is to be read.
+ * @propname:	name of the property to be searched.
+ * @len:	requested length of property value
+ *
+ * Search for a property in a device node and valid the requested size.
+ * Returns the property value on success, -EINVAL if the property does not
+ *  exist, -ENODATA if property does not have a value, and -EOVERFLOW if the
+ * property data isn't large enough.
+ *
+ */
+void *of_find_property_value_of_size(const struct device_node *np,
+				     const char *propname, u32 len)
+{
+	struct property *prop = of_find_property(np, propname, NULL);
+
+	if (!prop)
+		return ERR_PTR(-EINVAL);
+	if (!prop->value)
+		return ERR_PTR(-ENODATA);
+	if (len > prop->length)
+		return ERR_PTR(-EOVERFLOW);
+
+	return prop->value;
+}
+
+/**
  * of_property_read_u32_index - Find and read a u32 from a multi-value property.
  *
  * @np:		device node from which the property value is to be read.
backport/compat/compat-3.8.c +0 -28
index d39e8d6..49dc44b 100644
@@ -457,34 +457,6 @@ EXPORT_SYMBOL_GPL(prandom_bytes);
 
 #ifdef CONFIG_OF
 /**
- * of_find_property_value_of_size
- *
- * @np:		device node from which the property value is to be read.
- * @propname:	name of the property to be searched.
- * @len:	requested length of property value
- *
- * Search for a property in a device node and valid the requested size.
- * Returns the property value on success, -EINVAL if the property does not
- *  exist, -ENODATA if property does not have a value, and -EOVERFLOW if the
- * property data isn't large enough.
- *
- */
-static void *of_find_property_value_of_size(const struct device_node *np,
-			const char *propname, u32 len)
-{
-	struct property *prop = of_find_property(np, propname, NULL);
-
-	if (!prop)
-		return ERR_PTR(-EINVAL);
-	if (!prop->value)
-		return ERR_PTR(-ENODATA);
-	if (len > prop->length)
-		return ERR_PTR(-EOVERFLOW);
-
-	return prop->value;
-}
-
-/**
  * of_property_read_u8_array - Find and read an array of u8 from a property.
  *
  * @np:		device node from which the property value is to be read.
Signature · 1 line
1.8.5.3
#2 lore raw

PATCH 2/27 backports: add crypto/ccm backport

In reply to Luis R. Rodriguez

From: Johannes Berg <[email protected]>

This seems to commonly be missing in the random kernels people use, so just provide a backport.

---
 backport/compat/Kconfig                       |  9 ++++
 backport/compat/Makefile                      |  1 +
 backport/compat/backports.h                   | 10 ++++
 backport/compat/main.c                        |  8 +--
 patches/backport-adjustments/crypto-ccm.patch | 76 +++++++++++++++++++++++++++
 5 files changed, 101 insertions(+), 3 deletions(-)
 create mode 100644 patches/backport-adjustments/crypto-ccm.patch
backport/compat/Kconfig +9 -0
index 28aef6c..1cec8ad 100644
@@ -175,3 +175,12 @@ config BACKPORT_USERSEL_BUILD_ALL
 
 	  It's only really useful for compat testing, so
 	  you probably shouldn't enable it.
+
+config BACKPORT_CRYPTO_CCM
+	bool
+
+config BACKPORT_BUILD_CRYPTO_CCM
+	bool
+	default n if CRYPTO_CCM
+	default y if BACKPORT_CRYPTO_CCM
+	#c-file crypto/ccm.c
backport/compat/Makefile +1 -0
index e2da341..3c46a1b 100644
@@ -32,6 +32,7 @@ compat-$(CPTCFG_BACKPORT_KERNEL_3_13) += backport-3.13.o
 compat-$(CPTCFG_BACKPORT_KERNEL_3_14) += backport-3.14.o
 compat-$(CPTCFG_BACKPORT_KERNEL_3_15) += backport-3.15.o
 
+compat-$(CPTCFG_BACKPORT_BUILD_CRYPTO_CCM) += crypto-ccm.o
 compat-$(CPTCFG_BACKPORT_BUILD_KFIFO) += kfifo.o
 compat-$(CPTCFG_BACKPORT_BUILD_GENERIC_ATOMIC64) += compat_atomic.o
 compat-$(CPTCFG_BACKPORT_BUILD_DMA_SHARED_HELPERS) += dma-shared-helpers.o
backport/compat/backports.h +10 -0
index b609058..9d76c95 100644
@@ -11,4 +11,14 @@ static inline int __init dma_buf_init(void) { return 0; }
 static inline void __exit dma_buf_deinit(void) { }
 #endif
 
+#ifdef CPTCFG_BACKPORT_BUILD_CRYPTO_CCM
+int crypto_ccm_module_init(void);
+void crypto_ccm_module_exit(void);
+#else
+static inline int crypto_ccm_module_init(void)
+{ return 0; }
+static inline void crypto_ccm_module_exit(void)
+{}
+#endif
+
 #endif /* LINUX_BACKPORTS_PRIVATE_H */
backport/compat/main.c +5 -3
index 9a82f72..07efc8c 100644
@@ -54,6 +54,10 @@ EXPORT_SYMBOL_GPL(backport_dependency_symbol);
 
 static int __init backport_init(void)
 {
+	int ret = crypto_ccm_module_init();
+	if (ret)
+		return ret;
+
 	backport_system_workqueue_create();
 	backport_init_mmc_pm_flags();
 	dma_buf_init();
@@ -76,8 +80,6 @@ subsys_initcall(backport_init);
 static void __exit backport_exit(void)
 {
 	backport_system_workqueue_destroy();
-
-        return;
+	crypto_ccm_module_exit();
 }
 module_exit(backport_exit);
-
patches/backport-adjustments/crypto-ccm.patch new file +76 -0

76 lines not on this page · raw message

Signature · 1 line
1.8.5.3
#3 lore raw

PATCH 3/27 backports: ifdef some pci functions

In reply to Luis R. Rodriguez

From: Eliad Peller <[email protected]>

struct msix_entry entry is defined only when CONFIG_PCI is defined, resulting in warnings like:

backport-include/linux/pci.h:256:16: warning: 'struct msix_entry' declared inside parameter list [enabled by default] backport-include/linux/pci.h:256:16: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]

wrap (also the mock function) with appropriate ifdef CONFIG_PCI.

---
 backport/backport-include/linux/pci.h | 2 ++
 1 file changed, 2 insertions(+)
backport/backport-include/linux/pci.h +2 -0
index 9eeb09b..e438f14 100644
@@ -245,6 +245,7 @@ static inline int pci_enable_msi_range(struct pci_dev *dev, int minvec,
 #endif
 #endif
 
+#ifdef CONFIG_PCI
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
 #define pci_enable_msix_range LINUX_BACKPORT(pci_enable_msix_range)
 #ifdef CONFIG_PCI_MSI
@@ -256,5 +257,6 @@ static inline int pci_enable_msix_range(struct pci_dev *dev,
 { return -ENOSYS; }
 #endif
 #endif
+#endif
 
 #endif /* _BACKPORT_LINUX_PCI_H */
Signature · 1 line
1.8.5.3
#4 lore raw

PATCH 4/27 backports: backport MPLS support

In reply to Luis R. Rodriguez

This simply the files that define the structures and defines used to decode MPLS on the skb. For an example usage see 960d97f95. The headers were added first via f3baa393ff.

commit f3baa393ffc9a7aefc0bf767729382085e81f606

Author: Simon Wunderlich <[email protected]>
Date:   Mon Mar 3 17:23:11 2014 +0100

UAPI: add MPLS label stack definition

Labels for the Multiprotocol Label Switching are defined in RFC 3032 which was superseded by RFC 5462. Add the definition to UAPI and a stub header for include/linux.

commit 960d97f9518ef6fb8ff87450d6b0c88ce5df9532

Author: Simon Wunderlich <[email protected]>
Date:   Mon Mar 3 17:23:12 2014 +0100

cfg80211: add MPLS and 802.21 classification

MPLS labels may contain traffic control information, which should be evaluated and used by the wireless subsystem if present.

Also check for IEEE 802.21 which is always network control traffic.

---
 copy-list | 6 ++++++
 1 file changed, 6 insertions(+)
copy-list +6 -0
index bde95a1..bec17a5 100644
@@ -191,3 +191,9 @@ include/linux/spi/at86rf230.h
 net/ieee802154/
 net/mac802154/
 drivers/net/ieee802154/
+
+# MPLS labels, checked on skb->protocol on the
+# respective 802 family, only ethernet seems to use
+# this right now, see 960d97f95
+include/linux/mpls.h
+include/uapi/linux/mpls.h
Signature · 1 line
1.8.5.3
#5 lore raw

PATCH 5/27 backports: make WL1251_SPI depend on >= 3.5

In reply to Luis R. Rodriguez

The WL1251_SPI driver now depends on EPROBE_DEFER and others which we canot backports that pushes it to require 3.4 but since it also relies on devm_gpio_request_one() we bump it to 3.5. The gpio layer has received quite a bit of updates and it doesn't make sense to backport them separately.

---
 dependencies | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
dependencies +3 -1
index 28c4873..13e8a75 100644
@@ -29,7 +29,9 @@ USB_NET_RNDIS_WLAN 2.6.29
 
 CARL9170 2.6.29
 
-WL1251_SPI 2.6.37
+
+# depends on -EPROBE_DEFER and others now
+WL1251_SPI 3.5
 
 WL1251_SDIO 2.6.37
 WLCORE_SDIO 2.6.38
Signature · 1 line
1.8.5.3
#6 lore raw

PATCH 6/27 backports: bump kernel reqs for WL1251_SDIO and WLCORE_SDIO

In reply to Luis R. Rodriguez

There has been quite a bit of updates to the gpio driver library, and while we can backport some of this it doesn't make much sense as folks using this driver are expected to be carrying over the required architecture changes. In particular the GPIO_DEVRES has been tucked under GPIO_LIB and later removed from depending on it (see b69ac5244 and 6a89a314a)

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains 6a89a314a v3.9-rc1~76^2~12^2~13

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains b69ac5244 v3.13-rc1~120^2~7

---
 dependencies | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
dependencies +2 -2
index 13e8a75..91bf503 100644
@@ -33,8 +33,8 @@ CARL9170 2.6.29
 # depends on -EPROBE_DEFER and others now
 WL1251_SPI 3.5
 
-WL1251_SDIO 2.6.37
-WLCORE_SDIO 2.6.38
+WL1251_SDIO 3.15
+WLCORE_SDIO 3.15
 
 CW1200_WLAN_SDIO 2.6.32
 CW1200_WLAN_SPI 2.6.35
Signature · 1 line
1.8.5.3
#7 lore raw

PATCH 7/27 backports: bump drivers dependency that require I2C bus classes

In reply to Luis R. Rodriguez

Drivers that depend on I2C bus segments behind multiplexers to have a class require quite a bit of collateral changes that I don't have time to address. For those interested in trying to backport this see commit eee543e8. This bumps the drivers that depend on this that we carry to require at least v3.7 when this collateral evolution was introduced. One driver is affected, rtl2832 -- defined under CONFIG_DVB_RTL2832.

mcgrof@ergon ~/linux (git::master)$ git describe --contains eee543e82481 v3.7-rc1~92^2~14

commit eee543e8248150e8fb833943c71f40c7b1724600

Author: Jean Delvare <[email protected]>
Date:   Fri Oct 5 22:23:51 2012 +0200

i2c-mux: Add support for device auto-detection

Let I2C bus segments behind multiplexers have a class. This allows for device auto-detection on these segments. As long as parent segments don't share the same class, it should be fine.

I implemented support in drivers i2c-mux-gpio and i2c-mux-pca954x. I left i2c-mux-pca9541 and i2c-mux-pinctrl alone for the moment as I don't know if this feature makes sense for the use cases of these drivers.

Cc Peter Korsgaard <[email protected]>
Cc David Daney <[email protected]>
Cc Michael Lawnick <[email protected]>
Cc Rodolfo Giometti <[email protected]>
---
 dependencies | 9 +++++++++
 1 file changed, 9 insertions(+)
dependencies +9 -0
index 91bf503..ec8348b 100644
@@ -170,6 +170,15 @@ USB_GSPCA DISABLE
 VIDEO_MXB DISABLE
 VIDEO_RENESAS_VSP1 3.6
 
+# Drivers that depend on I2C bus segments behind multiplexers to
+# have a clas, see eee543e8. This requires quite a bit of collateral,
+# folks involved in this and who want it can backport if it they wish.
+# This was added as of 3.7. Although we should be able to only enable
+# this for 3.7 DVB_USB_RTL28XXU ends up selecting DVB_RTL2832 and
+# that seems to currently require pegging both.
+DVB_RTL2832 3.7
+DVB_USB_RTL28XXU 3.7
+
 # struct gpio_chip only got the required members in 2.6.28
 BCMA_DRIVER_GPIO 2.6.28
 SSB_DRIVER_GPIO 2.6.28
Signature · 1 line
1.8.5.3
#8 lore raw

PATCH 8/27 backports: define ETH_P_80221

In reply to Luis R. Rodriguez

This is used by the bluetooth and ieee802154 subsystems later and added via commit b62faf3c available on next-20140311.

---
 backport/backport-include/linux/if_ether.h | 5 +++++
 1 file changed, 5 insertions(+)
backport/backport-include/linux/if_ether.h +5 -0
index d9a1464..e904001 100644
@@ -2,6 +2,11 @@
 #define __BACKPORT_IF_ETHER_H
 #include_next <linux/if_ether.h>
 
+/* See commit b62faf3c in next-20140311 */
+#ifndef ETH_P_80221
+#define ETH_P_80221	0x8917	/* IEEE 802.21 Media Independent Handover Protocol */
+#endif
+
 /*
  * backport of:
  * commit e5c5d22e8dcf7c2d430336cbf8e180bd38e8daf1
Signature · 1 line
1.8.5.3
#9 lore raw

PATCH 9/27 backports: backport definition of struct frag_queue

In reply to Luis R. Rodriguez

Commit b836c99f by Amerigo which got added on v3.7 generalized the conntrack struct frag_queue while unifying the conntrack reassembly expire code with a standard one. Although we won't use the expiry code, another subsystem which we backport, the ieee802154 6lowpan subsystem, makes use of this structure for its own reassembly code. This makes that structure available for older kernels.

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains b836c99f v3.7-rc1~145^2~136

---
 backport/backport-include/net/ipv6.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
backport/backport-include/net/ipv6.h +19 -0
index 9a370a0..51f55b4 100644
@@ -3,6 +3,25 @@
 #include_next <net/ipv6.h>
 #include <linux/version.h>
 #include <net/addrconf.h>
+#include <net/inet_frag.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0)
+/*
+ *	Equivalent of ipv4 struct ip
+ */
+struct frag_queue {
+	struct inet_frag_queue  q;
+
+	__be32                  id;             /* fragment id          */
+	u32                     user;
+	struct in6_addr         saddr;
+	struct in6_addr         daddr;
+
+	int                     iif;
+	unsigned int            csum;
+	__u16                   nhoffset;
+};
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0) */
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0)) && (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,25))
 #define ipv6_addr_hash LINUX_BACKPORT(ipv6_addr_hash)
Signature · 1 line
1.8.5.3
#10 lore raw

PATCH 10/27 backports: backport skb_unclone()

In reply to Luis R. Rodriguez

Pravin added this via commit 14bbd6a565 through v3.9. This is a straight forward backport using the LINUX_BACKPORT() namespace.

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains 14bbd6a565 v3.9-rc1~139^2~56

commit 14bbd6a565e1bcdc240d44687edb93f721cfdf99

Author: Pravin B Shelar <[email protected]>
Date:   Thu Feb 14 09:44:49 2013 +0000

net: Add skb_unclone() helper function.

This function will be used in next GRE_GSO patch. This patch does not change any functionality.

---
 backport/backport-include/linux/skbuff.h | 11 +++++++++++
 1 file changed, 11 insertions(+)
backport/backport-include/linux/skbuff.h +11 -0
index 7ea44f5..2a63e95 100644
@@ -300,4 +300,15 @@ static inline struct page *__skb_alloc_page(gfp_t gfp_mask,
 #endif
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
+#define skb_unclone LINUX_BACKPORT(skb_unclone)
+static inline int skb_unclone(struct sk_buff *skb, gfp_t pri)
+{
+	might_sleep_if(pri & __GFP_WAIT);
+	if (skb_cloned(skb))
+		return pskb_expand_head(skb, 0, 0, pri);
+       return 0;
+}
+#endif
+
 #endif /* __BACKPORT_SKBUFF_H */
Signature · 1 line
1.8.5.3
#11 lore raw

PATCH 11/27 backports: backport frag helper functions for mem limit tracking

In reply to Luis R. Rodriguez

Jesper added frag helper functions through commit d433673e5f added on. This is a straight forward backport using the LINUX_BACKPORT() namespace.

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains d433673e5f v3.9-rc1~139^2~232^2~2

commit d433673e5f9180e05a770c4b2ab18c08ad51cc21

Author: Jesper Dangaard Brouer <[email protected]>
Date:   Mon Jan 28 23:45:12 2013 +0000

net: frag helper functions for mem limit tracking

This change is primarily a preparation to ease the extension of memory limit tracking.

The change does reduce the number atomic operation, during freeing of a frag queue. This does introduce a some performance improvement, as these atomic operations are at the core of the performance problems seen on NUMA systems.

Cc Jesper Dangaard Brouer <[email protected]>
---
 backport/backport-include/net/inet_frag.h | 39 +++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 backport/backport-include/net/inet_frag.h
backport/backport-include/net/inet_frag.h new file +39 -0
new file mode 100644
index 0000000..167792b
@@ -0,0 +1,39 @@
+#ifndef __BACKPORT__NET_FRAG_H__
+#define __BACKPORT__NET_FRAG_H__
+#include_next <net/inet_frag.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
+/* Memory Tracking Functions. */
+#define frag_mem_limit LINUX_BACKPORT(frag_mem_limit)
+static inline int frag_mem_limit(struct netns_frags *nf)
+{
+	return atomic_read(&nf->mem);
+}
+
+#define sub_frag_mem_limit LINUX_BACKPORT(sub_frag_mem_limit)
+static inline void sub_frag_mem_limit(struct inet_frag_queue *q, int i)
+{
+	atomic_sub(i, &q->net->mem);
+}
+
+#define add_frag_mem_limit LINUX_BACKPORT(add_frag_mem_limit)
+static inline void add_frag_mem_limit(struct inet_frag_queue *q, int i)
+{
+	atomic_add(i, &q->net->mem);
+}
+
+#define init_frag_mem_limit LINUX_BACKPORT(init_frag_mem_limit)
+static inline void init_frag_mem_limit(struct netns_frags *nf)
+{
+	atomic_set(&nf->mem, 0);
+}
+
+#define sum_frag_mem_limit LINUX_BACKPORT(sum_frag_mem_limit)
+static inline int sum_frag_mem_limit(struct netns_frags *nf)
+{
+	return atomic_read(&nf->mem);
+}
+#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */
+
+#endif /* __BACKPORT__NET_FRAG_H__ */
Signature · 1 line
1.8.5.3
#12 lore raw

PATCH 12/27 backports: backport inet_frag_maybe_warn_overflow()

In reply to Luis R. Rodriguez

This is used by the ieee802154 reassembly code. This is a straight forward backport.

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains 5a3da1fe95 v3.9-rc4~27^2

commit 5a3da1fe9561828d0ca7eca664b16ec2b9bf0055

Author: Hannes Frederic Sowa <[email protected]>
Date:   Fri Mar 15 11:32:30 2013 +0000

inet: limit length of fragment queue hash table bucket lists

This patch introduces a constant limit of the fragment queue hash table bucket list lengths. Currently the limit 128 is choosen somewhat arbitrary and just ensures that we can fill up the fragment cache with empty packets up to the default ip_frag_high_thresh limits. It should just protect from list iteration eating considerable amounts of cpu.

If we reach the maximum length in one hash bucket a warning is printed. This is implemented on the caller side of inet_frag_find to distinguish between the different users of inet_fragment.c.

I dropped the out of memory warning in the ipv4 fragment lookup path, because we already get a warning by the slab allocator.

Cc Hannes Frederic Sowa <[email protected]>
---
 backport/backport-include/net/inet_frag.h |  5 +++++
 backport/compat/compat-3.9.c              | 14 ++++++++++++++
 2 files changed, 19 insertions(+)
backport/backport-include/net/inet_frag.h +5 -0
index 167792b..3c9e11a 100644
@@ -34,6 +34,11 @@ static inline int sum_frag_mem_limit(struct netns_frags *nf)
 {
 	return atomic_read(&nf->mem);
 }
+
+#define inet_frag_maybe_warn_overflow LINUX_BACKPORT(inet_frag_maybe_warn_overflow)
+void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
+				   const char *prefix);
 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */
 
+
 #endif /* __BACKPORT__NET_FRAG_H__ */
backport/compat/compat-3.9.c +14 -0
index df10d7d..5a4f523 100644
@@ -15,6 +15,8 @@
 #include <linux/if.h>
 #include <linux/if_ether.h>
 #include <linux/etherdevice.h>
+#include <net/inet_frag.h>
+#include <net/sock.h>
 
 void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res)
 {
@@ -56,3 +58,15 @@ void eth_commit_mac_addr_change(struct net_device *dev, void *p)
 	memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
 }
 EXPORT_SYMBOL_GPL(eth_commit_mac_addr_change);
+
+void inet_frag_maybe_warn_overflow(struct inet_frag_queue *q,
+				   const char *prefix)
+{
+	static const char msg[] = "inet_frag_find: Fragment hash bucket"
+		" list length grew over limit " __stringify(INETFRAGS_MAXDEPTH)
+		". Dropping fragment.\n";
+
+	if (PTR_ERR(q) == -ENOBUFS)
+		LIMIT_NETDEBUG(KERN_WARNING "%s%s", prefix, msg);
+}
+EXPORT_SYMBOL_GPL(inet_frag_maybe_warn_overflow);
Signature · 1 line
1.8.5.3
#13 lore raw

PATCH 13/27 backports: add threaded Coccinelle spatch support

In reply to Luis R. Rodriguez

Turns out Coccinelle has threaded support, it lets you break down the target code you need to parse for a spatch file into separate buckets, each bucket handling a subset of the target files needed to be evaluated. This adds support for that and shaves down the amount of time it gets to generate target code by 97.19%.

Using:

mcgrof@drvbp1 ~/backports (git::master)$ time \
	./gentree.py	--verbose \
			--clean \
			--refresh \
			/home/mcgrof/linux-next/ \
			/home/mcgrof/build/next-20140311

Before this patch:

real    19m34.867s
user    18m43.492s
sys     0m21.244s

After this patch by using num_cpus threads:

real    2m42.012s
user    21m53.616s
sys     0m22.748s

After this patch by using 3 * num_cpus threads:

real    1m33.316s
user    24m6.080s
sys     0m28.264s

Using num_cpus threads alone was giving 2m42.012s, its why I experimented in increasing this. I also experimented with 6 * num_cpus threads as well but the amount of time spent running didn't reduce, lets keep this at 3 * num_cpus for now and we can experiment and empirically find the best setting for any system or just make this configurable.

We had SmPL patch integration first committed via 86d99c9d4 back then we were able to scale to a reasonable similar time:

mcgrof@drvbp1 ~/backports (git::cocci-added)$ time \
	./gentree.py --verbsose \
		     --clean \
		     --refresh \
		     /home/mcgrof/linux-next
		     /home/mcgrof/build/next-20131113
real    1m1.967s
user    0m49.304s
sys     0m11.880s

For history's purpose here's our run time without Coccinelle on commit 338c4388cc:

mcgrof@drvbp1 ~/backports (git::before-smpl)$ time \
        ./gentree.py --verbose \
                     --clean \
                     --refresh \
                     /home/mcgrof/linux-next/ \
                     /home/mcgrof/build/next-20131029
real    0m29.639s
user    0m17.508s
sys     0m11.568s

This new changes sets us back on track with the timing for when we first introduced Coccinelle support we just have a lot 5 Coccinelle patches now. I hope this shows we should be able to scale with Coccinelle much more efficiently for collateral evolutions that sprinkle through tons of files.

Screenshots available using htop before [0] and after the patch [1] while coccinelle is running, this shows how the system is using resources much more efficiently when doing spatch evaluation for patch generation on target code.

[0] http://drvbp1.linux-foundation.org/~mcgrof/images/coccinelle-backports/before-threaded-cocci.png
[1] http://drvbp1.linux-foundation.org/~mcgrof/images/coccinelle-backports/after-threaded-cocci.png

Cc Peter Senna <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Gilles Muller <[email protected]>
---
 gentree.py          | 14 ++-------
 lib/bpcoccinelle.py | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+), 12 deletions(-)
 create mode 100644 lib/bpcoccinelle.py
gentree.py +2 -12
index f6f766f..8924b08 100755
@@ -14,6 +14,7 @@ from lib import kconfig, patch, make
 from lib import bpgit as git
 from lib import bpgpg as gpg
 from lib import bpkup as kup
+from lib import bpcoccinelle as coccinelle
 from lib.tempdir import tempdir
 
 def read_copy_list(copyfile):
@@ -699,24 +700,13 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
             if args.verbose:
                 logwrite("Applying patch %s" % print_name)
 
-            process = subprocess.Popen(['spatch', '--sp-file', cocci_file, '--in-place',
-                                        '--backup-suffix', '.cocci_backup', '--dir', '.'],
-                                       stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
-                                       close_fds=True, universal_newlines=True,
-                                       cwd=args.outdir)
-            output = process.communicate()[0]
+            output = coccinelle.threaded_spatch(cocci_file, args.outdir, logwrite, print_name)
             output = output.split('\n')
             if output[-1] == '':
                 output = output[:-1]
             if args.verbose:
                 for line in output:
                     logwrite('> %s' % line)
-            if process.returncode != 0:
-                if not args.verbose:
-                    logwrite("Failed to apply changes from %s" % print_name)
-                    for line in output:
-                        logwrite('> %s' % line)
-                return 2
 
             # remove cocci_backup files
             for root, dirs, files in os.walk(args.outdir):
lib/bpcoccinelle.py new file +87 -0

87 lines not on this page · raw message

Signature · 1 line
1.8.5.3
#14 lore raw

PATCH 14/27 backports: use --ignore-removal for git add

In reply to Luis R. Rodriguez

As of git 2.0 --ignore-removal is no longer default so just make it default tool, without which git will warn us about this change.

---
 lib/bpgit.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
lib/bpgit.py +2 -2
index 15089d7..f56e377 100644
@@ -142,7 +142,7 @@ def init(tree=None):
     _check(process)
 
 def add(path, tree=None):
-    process = subprocess.Popen(['git', 'add', path],
+    process = subprocess.Popen(['git', 'add', '--ignore-removal', path],
                                stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
                                close_fds=True, universal_newlines=True, cwd=tree)
     stdout = process.communicate()[0]
@@ -266,7 +266,7 @@ def ls_remote(branch, tree=None, remote='origin'):
     return sha
 
 def add(fn, tree=None):
-    process = subprocess.Popen(['git', 'add', fn], cwd=tree,
+    process = subprocess.Popen(['git', 'add', '--ignore-removal', fn], cwd=tree,
                                close_fds=True, universal_newlines=True)
     process.wait()
     _check(process)
Signature · 1 line
1.8.5.3
#15 lore raw

PATCH 15/27 backports: add git diff support to lib/bpgit.py

In reply to Luis R. Rodriguez

This will be used later for proving SmPL patches against legacy patch series.

---
 lib/bpgit.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)
lib/bpgit.py +12 -0
index f56e377..f4b53c4 100644
@@ -328,3 +328,15 @@ def reset(opts=[], tree=None):
                                close_fds=True, universal_newlines=True, cwd=tree)
     process.wait()
     _check(process)
+
+def diff(tree=None, extra_args=None):
+    cmd = ['git', 'diff', '--color=always'] + extra_args
+
+    process = subprocess.Popen(cmd,
+                               stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
+                               close_fds=True, universal_newlines=True, cwd=tree)
+    stdout = process.communicate()[0]
+    process.wait()
+    _check(process)
+
+    return stdout
Signature · 1 line
1.8.5.3
#16 lore raw

PATCH 16/27 backports: add support for testing only a single Coccinelle SmPL patch

In reply to Luis R. Rodriguez

You can just pass now one cocci file with the --test-cocci to test only that single Coccinelle SmPL patch. If you are not sure what an SmPL patch produces and you only want to study the results of applying only a single SmPL patch you can use this flag to trigger enabling git on the target directory, a commit will be done before applying the SmPL patch and then another commit will be performed after the SmPL patch is applied. You can then use git show as you'd expect to inspect the results.

Note that if you don't use --test-cocci and run gentree.py regularly you can always still use --git-debug to see atomically what is happening after each patch, including Coccinelle patches.

This modifies the coccinelle library to use 10 * num_cpus threads for when in testing Coccinelle mode.

$ time ./gentree.py --clean --verbose --test-cocci 11-dev-pm-ops.cocci \
        /home/mcgrof/linux-next/ \
        /home/mcgrof/build/next-20140311
real    0m28.964s
user    6m57.848s
sys     0m25.124s

Note that you can pass either a full path or the file name alone of the target Coccinelle SmPL patch you want to test.

Cc Peter Senna <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Gilles Muller <[email protected]>
---
 gentree.py          | 37 +++++++++++++++++++++++++++++++------
 lib/bpcoccinelle.py |  4 +++-
 2 files changed, 34 insertions(+), 7 deletions(-)
gentree.py +31 -6
index 8924b08..fc272b9 100755
@@ -474,6 +474,10 @@ def _main():
                              'however run `kup ls` on the target paths so ' +
                              'at the very least we test your kup configuration. ' +
                              'If this is your first time uploading use this first!')
+    parser.add_argument('--test-cocci', metavar='<sp_file>', type=str, default=None,
+                        help='Only use the cocci file passed for Coccinelle, don\'t do anything else, ' +
+                             'also creates a git repo on the target directory for easy inspection ' +
+                             'of changes done by Coccinelle.')
     args = parser.parse_args()
 
     def logwrite(msg):
@@ -488,19 +492,22 @@ def _main():
                    extra_driver=args.extra_driver,
                    kup=args.kup,
                    kup_test=args.kup_test,
+                   test_cocci=args.test_cocci,
                    logwrite=logwrite)
 
 def process(kerneldir, outdir, copy_list_file, git_revision=None,
             clean=False, refresh=False, base_name="Linux", gitdebug=False,
             verbose=False, extra_driver=[], kup=False,
             kup_test=False,
+            test_cocci=None,
             logwrite=lambda x:None,
             git_tracked_version=False):
     class Args(object):
         def __init__(self, kerneldir, outdir, copy_list_file,
                      git_revision, clean, refresh, base_name,
                      gitdebug, verbose, extra_driver, kup,
-                     kup_test):
+                     kup_test,
+                     test_cocci):
             self.kerneldir = kerneldir
             self.outdir = outdir
             self.copy_list = copy_list_file
@@ -513,6 +520,9 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
             self.extra_driver = extra_driver
             self.kup = kup
             self.kup_test = kup_test
+            self.test_cocci = test_cocci
+            if self.test_cocci:
+                self.gitdebug = True
     def git_paranoia(tree=None, logwrite=lambda x:None):
         data = git.paranoia(tree)
         if (data['r'] != 0):
@@ -524,7 +534,8 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
 
     args = Args(kerneldir, outdir, copy_list_file,
                 git_revision, clean, refresh, base_name,
-                gitdebug, verbose, extra_driver, kup, kup_test)
+                gitdebug, verbose, extra_driver, kup, kup_test,
+                test_cocci)
     rel_prep = None
 
     # start processing ...
@@ -594,14 +605,22 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
         bpcfg.disable_symbols(disable_list)
     git_debug_snapshot(args, 'Add automatic backports')
 
+    # Extend with other tests for Coccinelle
+    test_cocci = args.test_cocci
+
     logwrite('Apply patches ...')
     patches = []
     sempatches = []
     for root, dirs, files in os.walk(os.path.join(source_dir, 'patches')):
         for f in files:
-            if f.endswith('.patch'):
+            if not test_cocci and f.endswith('.patch'):
                 patches.append(os.path.join(root, f))
             if f.endswith('.cocci'):
+                if test_cocci:
+                    if f not in test_cocci:
+                        continue
+                    if args.test_cocci:
+                        logwrite("Testing Coccinelle SmPL patch: %s" % test_cocci)
                 sempatches.append(os.path.join(root, f))
     patches.sort()
     prefix_len = len(os.path.join(source_dir, 'patches')) + 1
@@ -698,9 +717,11 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
         for cocci_file in sempatches:
             print_name = cocci_file[prefix_len:]
             if args.verbose:
-                logwrite("Applying patch %s" % print_name)
+                logwrite("Applying SmPL patch %s" % print_name)
 
-            output = coccinelle.threaded_spatch(cocci_file, args.outdir, logwrite, print_name)
+            output = coccinelle.threaded_spatch(cocci_file, args.outdir,
+                                                logwrite, print_name,
+                                                test_cocci)
             output = output.split('\n')
             if output[-1] == '':
                 output = output[:-1]
@@ -713,7 +734,11 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
                 for f in files:
                     if f.endswith('.cocci_backup'):
                         os.unlink(os.path.join(root, f))
-            git_debug_snapshot(args, "apply backport patch %s" % print_name)
+            git_debug_snapshot(args, "apply backport SmPL patch %s" % print_name)
+
+    if test_cocci:
+        logwrite('Done!')
+        return 0
 
     # some post-processing is required
     configtree = kconfig.ConfigTree(os.path.join(args.outdir, 'Kconfig'))
lib/bpcoccinelle.py +3 -1
index d9a3cc8..77e9d6d 100644
@@ -52,9 +52,11 @@ def spatch(cocci_file, outdir,
     outfile.close()
     ret_q.put((sprocess.returncode, fn))
 
-def threaded_spatch(cocci_file, outdir, logwrite, print_name):
+def threaded_spatch(cocci_file, outdir, logwrite, print_name, test_cocci):
     num_cpus = cpu_count()
     threads = num_cpus * 3
+    if test_cocci:
+        threads = num_cpus * 10
     jobs = list()
     output = ''
     ret_q = Queue()
Signature · 1 line
1.8.5.3
#17 lore raw

PATCH 17/27 backports: add Coccinelle SmPL profiling support to gentree.py

In reply to Luis R. Rodriguez

This adds support to let you pass --profile when running Coccinelle. This will skip all patches, rewriting Makefiles, Kconfigs, etc, and it will also keep a copy of the original src directory prior to applying the spatch. You pass the spatch file as an argument when using this.

Screenshot of relevant output on 11-dev-pm-ops.cocci:

$ time ./gentree.py --clean --verbose --profile-cocci 11-dev-pm-ops.cocci \
        /home/mcgrof/linux-next/ \
        /home/mcgrof/build/backports-20140311

Copy original source files ...
Apply patches ...
Profiling Coccinelle SmPL patch: 11-dev-pm-ops.cocci Applying SmPL patch collateral-evolutions/network/11-dev-pm-ops.cocci

Quoted 28 lines

init_defs_builtins: /usr/local/share/coccinelle/standard.h
warning: line 15: should pci be a metavariable?
(ONCE) Expected tokens pm pci_driver driver pci SIMPLE_DEV_PM_OPS MODULE_DEVICE_TABLE Skipping:./net/mac802154/ieee802154_dev.c Skipping:./net/mac802154/mac_cmd.c Skipping:./net/mac802154/mib.c Skipping:./net/mac802154/monitor.c Skipping:./net/mac802154/rx.c Skipping:./net/mac802154/tx.c Skipping:./net/mac802154/wpan.c
starting: Common.group_assoc_bykey_eff
ending: Common.group_assoc_bykey_eff, 0.000114s
---------------------
profiling result
---------------------

Main total                               :      0.584 sec          1 count
parse cocci                              :      0.422 sec          1 count
pre_engine                               :      0.422 sec          1 count
Main.infiles computation                 :      0.156 sec          1 count
HACK                                     :      0.069 sec          1 count
C parsing.tokens                         :      0.043 sec          1 count
C parsing.fix_define                     :      0.022 sec          1 count
get_glimpse_constants                    :      0.021 sec          1 count
C parsing.lex_ident                      :      0.006 sec        673 count
Common.full_charpos_to_pos_large         :      0.006 sec          1 count
Main.outfiles computation                :      0.004 sec          1 count
worth_trying                             :      0.004 sec          7 count
Quoted 8 lines
Common.full_charpos_to_pos               :      0.003 sec          2 count
Common.=~                                :      0.000 sec          4 count
check_duplicate                          :      0.000 sec          1 count
Main.result analysis                     :      0.000 sec          1 count
Common.group_assoc_bykey_eff             :      0.000 sec          1 count
asttoctl2                                :      0.000 sec          1 count
post_engine                              :      0.000 sec          1 count
show_xxx                                 :      0.000 sec          2 count

This goes on... and a page per thread spawned and the results will be specific to the files tha the thread worked on. On the above results we can see Coccinelle spent little to no time working on the above files as it determined it had nothing to do there.

On big iron backports server:

real    0m31.226s
user    7m25.712s
sys     0m34.492s
Cc Peter Senna <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Gilles Muller <[email protected]>
---
 gentree.py          | 25 +++++++++++++++++++------
 lib/bpcoccinelle.py |  6 ++++--
 2 files changed, 23 insertions(+), 8 deletions(-)
gentree.py +19 -6
index fc272b9..bffa7e4 100755
@@ -478,6 +478,10 @@ def _main():
                         help='Only use the cocci file passed for Coccinelle, don\'t do anything else, ' +
                              'also creates a git repo on the target directory for easy inspection ' +
                              'of changes done by Coccinelle.')
+    parser.add_argument('--profile-cocci', metavar='<sp_file>', type=str, default=None,
+                        help='Only use the cocci file passed and pass --profile  to Coccinelle, ' +
+                             'also creates a git repo on the target directory for easy inspection ' +
+                             'of changes done by Coccinelle.')
     args = parser.parse_args()
 
     def logwrite(msg):
@@ -493,6 +497,7 @@ def _main():
                    kup=args.kup,
                    kup_test=args.kup_test,
                    test_cocci=args.test_cocci,
+                   profile_cocci=args.profile_cocci,
                    logwrite=logwrite)
 
 def process(kerneldir, outdir, copy_list_file, git_revision=None,
@@ -500,6 +505,7 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
             verbose=False, extra_driver=[], kup=False,
             kup_test=False,
             test_cocci=None,
+            profile_cocci=None,
             logwrite=lambda x:None,
             git_tracked_version=False):
     class Args(object):
@@ -507,7 +513,8 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
                      git_revision, clean, refresh, base_name,
                      gitdebug, verbose, extra_driver, kup,
                      kup_test,
-                     test_cocci):
+                     test_cocci,
+                     profile_cocci):
             self.kerneldir = kerneldir
             self.outdir = outdir
             self.copy_list = copy_list_file
@@ -521,7 +528,8 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
             self.kup = kup
             self.kup_test = kup_test
             self.test_cocci = test_cocci
-            if self.test_cocci:
+            self.profile_cocci = profile_cocci
+            if self.test_cocci or self.profile_cocci:
                 self.gitdebug = True
     def git_paranoia(tree=None, logwrite=lambda x:None):
         data = git.paranoia(tree)
@@ -535,7 +543,7 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
     args = Args(kerneldir, outdir, copy_list_file,
                 git_revision, clean, refresh, base_name,
                 gitdebug, verbose, extra_driver, kup, kup_test,
-                test_cocci)
+                test_cocci, profile_cocci)
     rel_prep = None
 
     # start processing ...
@@ -605,8 +613,7 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
         bpcfg.disable_symbols(disable_list)
     git_debug_snapshot(args, 'Add automatic backports')
 
-    # Extend with other tests for Coccinelle
-    test_cocci = args.test_cocci
+    test_cocci = args.test_cocci or args.profile_cocci
 
     logwrite('Apply patches ...')
     patches = []
@@ -621,6 +628,8 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
                         continue
                     if args.test_cocci:
                         logwrite("Testing Coccinelle SmPL patch: %s" % test_cocci)
+                    elif args.profile_cocci:
+                        logwrite("Profiling Coccinelle SmPL patch: %s" % test_cocci)
                 sempatches.append(os.path.join(root, f))
     patches.sort()
     prefix_len = len(os.path.join(source_dir, 'patches')) + 1
@@ -715,13 +724,17 @@ def process(kerneldir, outdir, copy_list_file, git_revision=None,
         else:
             prefix_len = len(os.path.join(source_dir, 'patches')) + 1
         for cocci_file in sempatches:
+            extra_spatch_args = []
+            if args.profile_cocci:
+                extra_spatch_args.append('--profile')
             print_name = cocci_file[prefix_len:]
             if args.verbose:
                 logwrite("Applying SmPL patch %s" % print_name)
 
             output = coccinelle.threaded_spatch(cocci_file, args.outdir,
                                                 logwrite, print_name,
-                                                test_cocci)
+                                                test_cocci,
+                                                extra_args=extra_spatch_args)
             output = output.split('\n')
             if output[-1] == '':
                 output = output[:-1]
lib/bpcoccinelle.py +4 -2
index 77e9d6d..37307d2 100644
@@ -52,7 +52,8 @@ def spatch(cocci_file, outdir,
     outfile.close()
     ret_q.put((sprocess.returncode, fn))
 
-def threaded_spatch(cocci_file, outdir, logwrite, print_name, test_cocci):
+def threaded_spatch(cocci_file, outdir, logwrite, print_name,
+                    test_cocci, extra_args=[]):
     num_cpus = cpu_count()
     threads = num_cpus * 3
     if test_cocci:
@@ -64,7 +65,8 @@ def threaded_spatch(cocci_file, outdir, logwrite, print_name, test_cocci):
 
         for num in range(threads):
             p = Process(target=spatch, args=(cocci_file, outdir,
-                                             threads, num, t, ret_q))
+                                             threads, num, t, ret_q,
+                                             extra_args))
             jobs.append(p)
         for p in jobs:
             p.start()
Signature · 1 line
1.8.5.3
#18 lore raw

PATCH 18/27 backports: add include/net/6lowpan.h to copy-list

In reply to Luis R. Rodriguez

We backport both the bluetooth and ieee802154 subsystems and commit cefc8c8a7c moved the 6lowpan it out under from net/ieee802154/6lowpan.h to include/net/6lowpan.h as bluetooth now uses it. Since we backport both subsystems just copy the header over.

commit cefc8c8a7c9e4867c45407f7f9a44fe80c5ea58a

Author: Alexander Aring <[email protected]>
Date:   Wed Mar 5 14:29:05 2014 +0100

6lowpan: move 6lowpan header to include/net

This header is used by bluetooth and ieee802154 branch. This patch move this header to the include/net directory to avoid a use of a relative path in include.

Cc Alexander Aring <[email protected]>
Cc Alexander Smirnov <[email protected]>
Cc Dmitry Eremin-Solenikov <[email protected]>
---
 copy-list | 1 +
 1 file changed, 1 insertion(+)
copy-list +1 -0
index bec17a5..ceb80ba 100644
@@ -180,6 +180,7 @@ drivers/media/
 include/linux/platform_data/vsp1.h
 include/linux/platform_data/camera-rcar.h
 
+include/net/6lowpan.h
 include/net/nl802154.h
 include/net/mac802154.h
 include/net/ieee802154.h
Signature · 1 line
1.8.5.3
#19 lore raw

PATCH 19/27 backports: address move of 6lowpan.c to 6lowpan_rtnl.c

In reply to Luis R. Rodriguez

Commit 01348b3448 moved 6lowpan.c to 6lowpan_rtnl.c which means we have to adjust the respective backport patches.

commit 01348b34485eceace5d9ca9756ba40679cf22ac6

Author: Alexander Aring <[email protected]>
Date:   Fri Feb 28 07:32:47 2014 +0100

6lowpan: move 6lowpan.c to 6lowpan_rtnl.c

We have a 6lowpan.c file and 6lowpan.ko file. To avoid confusing we should move 6lowpan.c to 6lowpan_rtnl.c. Then we can support multiple source files for 6lowpan module.

Cc Alexander Aring <[email protected]>
Cc Alexander Smirnov <[email protected]>
Cc Dmitry Eremin-Solenikov <[email protected]>
---
 .../network/86-qdisc_tx_busylock/ieee802154.patch              | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
patches/collateral-evolutions/network/86-qdisc_tx_busylock/ieee802154.patch +4 -6
index d685b3c..b4f319d 100644
@@ -1,8 +1,6 @@
-diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
-index 8edfea5..04f18ab 100644
---- a/net/ieee802154/6lowpan.c
-+++ b/net/ieee802154/6lowpan.c
-@@ -530,7 +530,9 @@ static struct header_ops lowpan_header_o
+--- a/net/ieee802154/6lowpan_rtnl.c
++++ b/net/ieee802154/6lowpan_rtnl.c
+@@ -374,7 +374,9 @@ static struct header_ops lowpan_header_o
  	.create	= lowpan_header_create,
  };
  
@@ -12,7 +10,7 @@ index 8edfea5..04f18ab 100644
  static struct lock_class_key lowpan_netdev_xmit_lock_key;
  
  static void lowpan_set_lockdep_class_one(struct net_device *dev,
-@@ -545,7 +547,9 @@ static void lowpan_set_lockdep_class_one
+@@ -389,7 +391,9 @@ static void lowpan_set_lockdep_class_one
  static int lowpan_dev_init(struct net_device *dev)
  {
  	netdev_for_each_tx_queue(dev, lowpan_set_lockdep_class_one, NULL);
Signature · 1 line
1.8.5.3
#20 lore raw

PATCH 20/27 backports: address jump label and static key support

In reply to Luis R. Rodriguez

The ieee802154 subsystem, which we backport, makes use of net_get_random_once() through net/ieee802154/reassembly.c and this in turn makes use of the static keys. Static keys were split out from the jump label support via commit c5905afb by Ingo through kernel v3.3 -- note that git describe --contains will disagree and say its v3.5. Jump label support was added by Jason via commit bf5438fc through kernel v2.6.37 but later Jason provided static branch optimizations via commit d430d3d7e added through v3.0. static_key_initialized and STATIC_KEY_CHECK_USE() were last added by Hannes through kernel v3.13 throughy c4b2c0c5f.

In order to backport static keys and jump label we need to provide name mapping for kernels that only had jump label support, but due to the static branch optimizations and since these are architecture specific we cannot backport them unless we start carrying around architecture replacement code -- or do some other trickery. For kernels that lacked jump label support and that don't have the static branch optimizations we simply carry in the kernel implmentation that assumes you have no architecture support for jump label which treats the labels as simply atomic drivers for branches. For older kernels then we don't backport usage of static_key_initialized and usage of STATIC_KEY_CHECK_USE().

This does leave a gap of kernels without static key / jump label support, I tried backporting it but ran into issues quickly. Those daring to continue to embark on this journey can pick up where I left off:

[0] drvbp1.linux-foundation.org/~mcgrof/examples/2014/04/01/backport-static-keys.patch

I will note that properly backporting this can have implications on how we backport tracing support as that is the main usage for jump labels. Real enthusiasts can go ahead an extend this with architecture / kernel revision specific changes -- but be warned -- we will have hard litmus test for compilation on backports using ckmake --allyesconfig on all supported kernels we carry.

This is a long way of saying -- we require at least 3.5 for static key support, we also support kernels older than 2.6.37 but this goes untested.

mcgrof@ergon ~/linux (git::master)$ git describe --contains bf5438fc v2.6.37-rc1~214^2~33^2~8

mcgrof@ergon ~/linux (git::master)$ git describe --contains d430d3d7e v3.0-rc1~404^2~18^2~2

mcgrof@ergon ~/linux (git::master)$ git describe --contains c5905afb v3.5-rc1~120^3~76^2 -- wrong! Its actually v3.3 try:
git checkout -b static-changes c5905afb; git describe

mcgrof@ergon ~/linux (git::master)$ git describe --contains c4b2c0c5f v3.13-rc1~105^2~157^2~6

Cc Ingo Molnar <[email protected]>
Cc Jason Baron <[email protected]>
CC Jason Baron <[email protected]>
Cc Hannes Frederic Sowa <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Alexander Smirnov <[email protected]>
Cc Dmitry Eremin-Solenikov <[email protected]>
---
 backport/backport-include/linux/static_key.h | 186 +++++++++++++++++++++++++++
 backport/backport-include/linux/tracepoint.h |   7 +
 2 files changed, 193 insertions(+)
 create mode 100644 backport/backport-include/linux/static_key.h
backport/backport-include/linux/static_key.h new file +186 -0
new file mode 100644
index 0000000..0bbb61e
@@ -0,0 +1,186 @@
+#ifndef _BACKPORTS_LINUX_STATIC_KEY_H
+#define _BACKPORTS_LINUX_STATIC_KEY_H 1
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) /* kernels >= 3.3 */
+/*
+ * XXX: NOTE!
+ *
+ * Some 3.3 kernels carry <linux/static.h> but some don't even though its
+ * its including <linux/jump_label.h>. What makes it more confusing is that
+ * later all this got shuffled. The safe thing to do then is to just assume
+ * kernels 3.3..3.4 don't have it and include <linux/jump_label.h> instead,
+ * and for newer kernels include <linux/static_key.h>.
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+#include_next <linux/static_key.h>
+#else
+#include <linux/jump_label.h>
+#endif
+
+#else /* kernels < 3.3 */
+/*
+ * in between 2.6.37 - 3.5 there's a slew of changes that make
+ * it hard to backport this properly. If you are interested in
+ * trying you can use this as reference:
+ *
+ * http://drvbp1.linux-foundation.org/~mcgrof/examples/2014/04/01/backport-static-keys.patch
+ *
+ * And these notes:
+ *
+ *           < v2.6.37 - No tracing support
+ * bf5438fc  - v2.6.37 - Jump label support added primarily for tracing but
+ *                       tracing was broken, later kernels started sporting
+ *                       functional tracing.
+ * d430d3d7e - v3.0    - Static branch optimizations for jump labels
+ * c5905afb  - v3.3    - Static keys split out, note on the below issue
+ * c5905afb  - v3.5    - git describe --contains c5905afb claims but not true!
+ * c4b2c0c5f - v3.13   - Adds static_key_initialized(), STATIC_KEY_CHECK_USE()
+ *
+ * Because all of this we skip 2.6.37 - 3.3 but and adding support for older
+ * can be done by of carrying over the non-architecture optimized code.
+ * Carrying new changes into this file is a burden though so if we really
+ * find use for this we could just split the non optimized versions upstream
+ * and copy that through an automatic process.
+ */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
+/*
+ * For kernels older than 2.6.37 we just take on the
+ * implementation in the kernel that assumes you have
+ * either no toolchain or architecture kernel support
+ * for the jump labels. Daring folks who wish to embark
+ * on a nutty journey may wish to see if they can backport
+ * architectural specific changes here.
+ *
+ * Jump label support was added via commit
+ * bf5438fca2950b03c21ad868090cc1a8fcd49536 through kernel
+ * v2.6.37-rc1~214^2~33^2~8
+ */
+
+/*
+ * Jump label support
+ *
+ * Copyright (C) 2009-2012 Jason Baron <[email protected]>
+ * Copyright (C) 2011-2012 Peter Zijlstra <[email protected]>
+ *
+ * Jump labels provide an interface to generate dynamic branches using
+ * self-modifying code. Assuming toolchain and architecture support the result
+ * of a "if (static_key_false(&key))" statement is a unconditional branch (which
+ * defaults to false - and the true block is placed out of line).
+ *
+ * However at runtime we can change the branch target using
+ * static_key_slow_{inc,dec}(). These function as a 'reference' count on the key
+ * object and for as long as there are references all branches referring to
+ * that particular key will point to the (out of line) true block.
+ *
+ * Since this relies on modifying code the static_key_slow_{inc,dec}() functions
+ * must be considered absolute slow paths (machine wide synchronization etc.).
+ * OTOH, since the affected branches are unconditional their runtime overhead
+ * will be absolutely minimal, esp. in the default (off) case where the total
+ * effect is a single NOP of appropriate size. The on case will patch in a jump
+ * to the out-of-line block.
+ *
+ * When the control is directly exposed to userspace it is prudent to delay the
+ * decrement to avoid high frequency code modifications which can (and do)
+ * cause significant performance degradation. Struct static_key_deferred and
+ * static_key_slow_dec_deferred() provide for this.
+ *
+ * Lacking toolchain and or architecture support, it falls back to a simple
+ * conditional branch.
+ *
+ * struct static_key my_key = STATIC_KEY_INIT_TRUE;
+ *
+ *   if (static_key_true(&my_key)) {
+ *   }
+ *
+ * will result in the true case being in-line and starts the key with a single
+ * reference. Mixing static_key_true() and static_key_false() on the same key is not
+ * allowed.
+ *
+ * Not initializing the key (static data is initialized to 0s anyway) is the
+ * same as using STATIC_KEY_INIT_FALSE.
+ *
+*/
+
+#include <linux/types.h>
+#include <linux/compiler.h>
+#include <linux/bug.h>
+
+/*
+ * For the backport we leave out static_key_initialized as
+ * no architecture code is provided to support jump labels, so
+ * we treat jump labels as simply atomic values which drive
+ * branches. Since we don't backport static_key_initialized
+ * we leave out all STATIC_KEY_CHECK_USE() uses.
+ */
+
+enum jump_label_type {
+	JUMP_LABEL_DISABLE = 0,
+	JUMP_LABEL_ENABLE,
+};
+
+struct module;
+
+#include <linux/atomic.h>
+
+struct static_key {
+	atomic_t enabled;
+};
+
+static __always_inline bool static_key_false(struct static_key *key)
+{
+	if (unlikely(atomic_read(&key->enabled) > 0))
+		return true;
+	return false;
+}
+
+static __always_inline bool static_key_true(struct static_key *key)
+{
+	if (likely(atomic_read(&key->enabled) > 0))
+		return true;
+	return false;
+}
+
+static inline void static_key_slow_inc(struct static_key *key)
+{
+	atomic_inc(&key->enabled);
+}
+
+static inline void static_key_slow_dec(struct static_key *key)
+{
+	atomic_dec(&key->enabled);
+}
+
+static inline int jump_label_text_reserved(void *start, void *end)
+{
+	return 0;
+}
+
+static inline void jump_label_lock(void) {}
+static inline void jump_label_unlock(void) {}
+
+static inline int jump_label_apply_nops(struct module *mod)
+{
+	return 0;
+}
+
+#define STATIC_KEY_INIT_TRUE ((struct static_key) \
+		{ .enabled = ATOMIC_INIT(1) })
+#define STATIC_KEY_INIT_FALSE ((struct static_key) \
+		{ .enabled = ATOMIC_INIT(0) })
+
+
+#define STATIC_KEY_INIT STATIC_KEY_INIT_FALSE
+#define jump_label_enabled static_key_enabled
+
+static inline bool static_key_enabled(struct static_key *key)
+{
+	return (atomic_read(&key->enabled) > 0);
+}
+
+#endif /* kernels older than 2.6.37  */
+#endif /* kernels < 3.3 */
+
+#endif /* _BACKPORTS_LINUX_STATIC_KEY_H */
backport/backport-include/linux/tracepoint.h +7 -0
index f67d8d3..0ed65b7 100644
@@ -10,6 +10,13 @@
  * 2.6.27		had broken tracing
  * 2.6.28-2.6.32	didn't have anything like DECLARE_EVENT_CLASS
  *			and faking it would be extremely difficult
+ * 2.6.37		moved to using jump labels
+ * 3.0			static branch optimiziations through d430d3d7e
+ * 3.3			Ingo splits up static key from jump labels,
+ *                      Note that git sees this as in v3.5 though!
+ * 3.5                  We can start relying on the static_key.h file
+ * 3.13			static_key_initialized() STATIC_KEY_CHECK_USE()
+ * 			added via commit c4b2c0c5f
  */
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
 /*
Signature · 1 line
1.8.5.3
#21 lore raw

PATCH 21/27 backports: backport net_get_random_once()

In reply to Luis R. Rodriguez

Commit a48e4292 introduced as of v3.13 is used by 6lowpan which we backport. We carry this over for older kernels that don't define it -- but we remain sane by requiring at least 3.5 which is where tons of the jump label / static key stuff seems to have last settled. Backporting this to any older kernel than 3.5 has a huge string of dependencies which although I was able to resovle the other depdendencies on 6lowpan on new net core re-architecture on skb fragment reassembly makes it pointless to carry. Mark my words:

!! do not try to backport this to kernels older than 3.5 !!

mcgrof@ergon ~/linux (git::master)$ git describe --contains a48e4292 v3.13-rc1~105^2~157^2~4

commit a48e42920ff38bc90bbf75143fff4555723d4540

Author: Hannes Frederic Sowa <[email protected]>
Date:   Sat Oct 19 21:48:55 2013 +0200

net: introduce new macro net_get_random_once

Cc Hannes Frederic Sowa <[email protected]>
Cc Alexander Smirnov <[email protected]>
Cc Dmitry Eremin-Solenikov <[email protected]>
---
 backport/backport-include/linux/net.h | 52 +++++++++++++++++++++++++++++++++
 backport/compat/backport-3.13.c       | 54 +++++++++++++++++++++++++++++++++++
 2 files changed, 106 insertions(+)
backport/backport-include/linux/net.h +52 -0
index 07981da..192f7b8 100644
@@ -1,6 +1,7 @@
 #ifndef __BACKPORT_LINUX_NET_H
 #define __BACKPORT_LINUX_NET_H
 #include_next <linux/net.h>
+#include <linux/static_key.h>
 
 /* This backports:
  *
@@ -46,4 +47,55 @@ do {								\
 	type dst = ({ __sockaddr_check_size(sizeof(*dst)); (type) src; })
 #endif
 
+/*
+ * Avoid backporting this if a distro did the work already, this
+ * takes the check a bit further than just using LINUX_BACKPORT()
+ * namespace, curious if any distro will hit a wall with this.
+ * Also curious if any distro will be daring enough to even try
+ * to backport this to a release older than 3.5.
+ */
+#ifndef ___NET_RANDOM_STATIC_KEY_INIT
+/*
+ * Backporting this before 3.5 is extremely tricky -- I tried, due
+ * to the fact that it relies on static keys, which were refactored
+ * and optimized through a series of generation of patches from jump
+ * labels. These in turn have also been optimized through kernel revisions
+ * and have architecture specific code, which if you commit to backporting
+ * may affect tracing. My recommendation is that if you have a need for
+ * static keys you just require at least 3.5 to remain sane.
+ */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
+#define __BACKPORT_NET_GET_RANDOM_ONCE 1
+#endif
+#endif /* ___NET_RANDOM_STATIC_KEY_INIT */
+
+#ifdef __BACKPORT_NET_GET_RANDOM_ONCE
+#define __net_get_random_once LINUX_BACKPORT(__net_get_random_once)
+bool __net_get_random_once(void *buf, int nbytes, bool *done,
+			   struct static_key *done_key);
+
+#ifdef HAVE_JUMP_LABEL
+#define ___NET_RANDOM_STATIC_KEY_INIT ((struct static_key) \
+		{ .enabled = ATOMIC_INIT(0), .entries = (void *)1 })
+#else /* !HAVE_JUMP_LABEL */
+#define ___NET_RANDOM_STATIC_KEY_INIT STATIC_KEY_INIT_FALSE
+#endif /* HAVE_JUMP_LABEL */
+
+#define net_get_random_once LINUX_BACKPORT(net_get_random_once)
+#define net_get_random_once(buf, nbytes)				\
+	({								\
+		bool ___ret = false;					\
+		static bool ___done = false;				\
+		static struct static_key ___done_key =			\
+			___NET_RANDOM_STATIC_KEY_INIT;			\
+		if (!static_key_true(&___done_key))			\
+			___ret = __net_get_random_once(buf,		\
+						       nbytes,		\
+						       &___done,	\
+						       &___done_key);	\
+		___ret;							\
+	})
+
+#endif /* __BACKPORT_NET_GET_RANDOM_ONCE */
+
 #endif /* __BACKPORT_LINUX_NET_H */
backport/compat/backport-3.13.c +54 -0

68 lines not on this page · raw message

Signature · 1 line
1.8.5.3
#22 lore raw

Re: [PATCH 21/27] backports: backport net_get_random_once()

backport/backport-include/linux/net.h do { \ · line 85

Quoted 2 lines · Luis R. Rodriguez
backport/backport-include/linux/net.h +2 -0
+#define net_get_random_once LINUX_BACKPORT(net_get_random_once)
+#define net_get_random_once(buf, nbytes)                               \

I had to remove the first define as its a double define, that means unless we use a static inline we'll have a clash with folks who decide to backport this on their own as well. I'd rather wait until we hit a clash to see who backported this, the static keys and if differently from our solution ;)

Luis

#23 lore raw

PATCH 22/27 backports: 6lowpan domain specific backport of inet_frag_lru_move()

In reply to Luis R. Rodriguez

We can't generalize a backport of inet_frag_lru_move() as it requires modifying an internal struct netns_frags struct. We work around this by extending the parent struct used within 6lowpan. We have two changes, one data structure change and then a domain specific defines. Other subsystems which require similar work can backport usage through similar techniques.

The respective change upstream that put the lock on struct netns_frags is commit 3ef0eb0db4 added by through v3.9.

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains 3ef0eb0db4 v3.9-rc1~139^2~232^2

commit 3ef0eb0db4bf92c6d2510fe5c4dc51852746f206

Author: Jesper Dangaard Brouer <[email protected]>
Date:   Mon Jan 28 23:45:51 2013 +0000

net: frag, move LRU list maintenance outside of rwlock

Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it.

Cc Jesper Dangaard Brouer <[email protected]>
Cc Alexander Smirnov <[email protected]>
Cc Dmitry Eremin-Solenikov <[email protected]>
---
 .../network/0013-lowpan-inet_frag_lru_move.patch   | 59 ++++++++++++++++++++++
 1 file changed, 59 insertions(+)
 create mode 100644 patches/collateral-evolutions/network/0013-lowpan-inet_frag_lru_move.patch
patches/collateral-evolutions/network/0013-lowpan-inet_frag_lru_move.patch new file +59 -0
new file mode 100644
index 0000000..9f1f0c1
@@ -0,0 +1,59 @@
+Domain specific backport for inet_frag_lru_move()
+This requires two parts, the data structure changes
+and then domain specific inet_frag_lru_move() define.
+
+--- a/net/ieee802154/reassembly.c
++++ b/net/ieee802154/reassembly.c
+@@ -81,6 +81,9 @@ void lowpan_frag_init(struct inet_frag_q
+ 	fq->d_size = arg->d_size;
+ 	fq->saddr = *arg->src;
+ 	fq->daddr = *arg->dst;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
++	spin_lock_init(&fq->lru_lock);
++#endif
+ }
+ EXPORT_SYMBOL(lowpan_frag_init);
+ 
+--- a/net/ieee802154/reassembly.h
++++ b/net/ieee802154/reassembly.h
+@@ -2,6 +2,7 @@
+ #define __IEEE802154_6LOWPAN_REASSEMBLY_H__
+ 
+ #include <net/inet_frag.h>
++#include <linux/spinlock.h>
+ 
+ struct lowpan_create_arg {
+ 	__be16 tag;
+@@ -19,8 +20,32 @@ struct lowpan_frag_queue {
+ 	u16			d_size;
+ 	struct ieee802154_addr	saddr;
+ 	struct ieee802154_addr	daddr;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
++	spinlock_t		lru_lock;
++#endif
+ };
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)
++/*
++ * XXX: this is a *domain* specific inet_frag_lru_move backport,
++ * note the added lowpan_ prefix, this requires a respective patch
++ * which extends struct lowpan_frag_queue with an lru_lock and
++ * initializes it. We add this helper here to reduce the backport.
++ * There is no way to generalize the other changes in the patch.
++ */
++#define inet_frag_lru_move LINUX_BACKPORT(lowpan_inet_frag_lru_move)
++static inline void inet_frag_lru_move(struct inet_frag_queue *q)
++{
++	struct lowpan_frag_queue *fq;
++
++	fq = container_of(q, struct lowpan_frag_queue, q);
++
++	spin_lock(&fq->lru_lock);
++	list_move_tail(&q->lru_list, &q->net->lru_list);
++	spin_unlock(&fq->lru_lock);
++}
++#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0) */
++
+ static inline u32 ieee802154_addr_hash(const struct ieee802154_addr *a)
+ {
+ 	switch (a->addr_type) {
Signature · 1 line
1.8.5.3
#24 lore raw

PATCH 23/27 backports: backport ieee802154 6lowpan support down to 3.5

In reply to Luis R. Rodriguez

Commit 633fc86ff62 added the ieee802154_6lowpan namespace and 7240cdec60b extended it (as on linux-next next-20140311). Its important to note though that 633fc86ff62 also extends the global net namespace. Since we cannot extend the global net namespace we define our own backport namespace for 6lowpan that can be used only be used by our backported subsystems, nothing more. Since ieee802154_6lowpan requires support for net_get_random_once() which uses static keys and a slew of new skb fragment support we simply require at least 3.5 to use 6lowpan. I did my best effort to backport this to kernels older than 3.5 but quickly ran into a slew of hairy issues.

The last thing we needed to address was usage of the helper inet_frag_evictor() added by Alexander via commit 6b102865e7 through v3.7. Since we can't backport that with macros or inline helpers we add a patch to carry the changes there. If that grows we can consider using Coccinelle.

If you are going to try to backport 6lowpan to kernels older than 3.5 be warned that the litmus test for patches will be to pass ckmake --allyesconfig for all supported kernels for every patch you provide.

Cc Alexander Aring <[email protected]>
Cc Alexander Smirnov <[email protected]>
Cc Dmitry Eremin-Solenikov <[email protected]>
Cc Amerigo Wang <[email protected]>
---
 backport/backport-include/net/net_namespace.h      |  22 +++-
 backport/compat/backport-3.15.c                    |  14 ++
 copy-list                                          |   1 +
 dependencies                                       |   3 +-
 .../0001-6lowpan-namespace.patch                   | 143 +++++++++++++++++++++
 .../0002-include-new-netns-headers.patch           |  12 ++
 .../0012-ieee802154-6lowpan-namespace.patch        |  63 +++++++++
 .../network/0013-net-user-ns.patch                 |  17 +++
 .../network/0014-inet_frag_evictor.patch           |  20 +++
 9 files changed, 291 insertions(+), 4 deletions(-)
 create mode 100644 patches/0000-upstream-backport-changes/0001-6lowpan-namespace.patch
 create mode 100644 patches/0000-upstream-backport-changes/0002-include-new-netns-headers.patch
 create mode 100644 patches/collateral-evolutions/network/0012-ieee802154-6lowpan-namespace.patch
 create mode 100644 patches/collateral-evolutions/network/0013-net-user-ns.patch
 create mode 100644 patches/collateral-evolutions/network/0014-inet_frag_evictor.patch
backport/backport-include/net/net_namespace.h +19 -3
index f23702f..efad88e 100644
@@ -2,10 +2,8 @@
 #define _COMPAT_NET_NET_NAMESPACE_H 1
 
 #include <linux/version.h>
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23))
+#include <net/netns/ieee802154_6lowpan.h>
 #include_next <net/net_namespace.h>
-#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)) */
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
 #ifdef CONFIG_NET_NS
@@ -60,4 +58,22 @@ struct net *sock_net(const struct sock *sk)
 }
 #endif /* < 2.6.26 */
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+/*
+ * we provide backport for 6lowpan as per the dependencies file
+ * down to 3.5 only.
+ */
+extern struct netns_ieee802154_lowpan ieee802154_lowpan;
+struct netns_ieee802154_lowpan *net_ieee802154_lowpan(struct net *net);
+#endif
+#else
+/* This can be removed once and if this gets upstream */
+static inline struct netns_ieee802154_lowpan *
+net_ieee802154_lowpan(struct net *net)
+{
+	return &net->ieee802154_lowpan;
+}
+#endif
+
 #endif	/* _COMPAT_NET_NET_NAMESPACE_H */
backport/compat/backport-3.15.c +14 -0
index 67d672b..545e0c2 100644
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2014  Hauke Mehrtens <[email protected]>
+ * Copyright (c) 2015  Luis R. Rodriguez <[email protected]>
  *
  * Backport functionality introduced in Linux 3.15.
  *
@@ -11,6 +12,19 @@
 #include <linux/kernel.h>
 #include <linux/device.h>
 #include <linux/of.h>
+#include <net/net_namespace.h>
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+/* the above kernel dependency is set to match the dependencies file */
+struct netns_ieee802154_lowpan ieee802154_lowpan;
+EXPORT_SYMBOL_GPL(ieee802154_lowpan);
+
+struct netns_ieee802154_lowpan *net_ieee802154_lowpan(struct net *net)
+{
+	return &ieee802154_lowpan;
+}
+EXPORT_SYMBOL_GPL(net_ieee802154_lowpan);
+#endif
 
 /**
  * devm_kstrdup - Allocate resource managed space and
copy-list +1 -0
index ceb80ba..76ce1c3 100644
@@ -181,6 +181,7 @@ include/linux/platform_data/vsp1.h
 include/linux/platform_data/camera-rcar.h
 
 include/net/6lowpan.h
+include/net/netns/ieee802154_6lowpan.h
 include/net/nl802154.h
 include/net/mac802154.h
 include/net/ieee802154.h
dependencies +2 -1
index ec8348b..f5f7229 100644
@@ -232,4 +232,5 @@ INTEL_IPS 3.2
 NFC_MEI_PHY 3.10
 
 IEEE802154_MRF24J40 3.5
-IEEE802154 2.6.38
+IEEE802154 3.1
+IEEE802154_6LOWPAN 3.5
patches/0000-upstream-backport-changes/0001-6lowpan-namespace.patch new file +143 -0

143 lines not on this page · raw message

patches/0000-upstream-backport-changes/0002-include-new-netns-headers.patch new file +12 -0
new file mode 100644
index 0000000..3b00450
@@ -0,0 +1,12 @@
+This can reasonably be sent upstream.
+
+--- a/include/net/6lowpan.h
++++ b/include/net/6lowpan.h
+@@ -54,6 +54,7 @@
+ #define __6LOWPAN_H__
+ 
+ #include <net/ipv6.h>
++#include <net/net_namespace.h>
+ 
+ #define UIP_802154_SHORTADDR_LEN	2  /* compressed ipv6 address length */
+ #define UIP_IPH_LEN			40 /* ipv6 fixed header size */
patches/collateral-evolutions/network/0012-ieee802154-6lowpan-namespace.patch new file +63 -0

63 lines not on this page · raw message

patches/collateral-evolutions/network/0013-net-user-ns.patch new file +17 -0
new file mode 100644
index 0000000..25752ca
@@ -0,0 +1,17 @@
+network namespaces didn't get usernamespaces pegged until 3.8
+via commit 038e7332b8.
+
+--- a/net/ieee802154/reassembly.c
++++ b/net/ieee802154/reassembly.c
+@@ -472,9 +472,11 @@ static int __net_init lowpan_frags_ns_sy
+ 		table[2].data = &ieee802154_lowpan->frags.timeout;
+ 		table[3].data = &ieee802154_lowpan->max_dsize;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
+ 		/* Don't export sysctls to unprivileged users */
+ 		if (net->user_ns != &init_user_ns)
+ 			table[0].procname = NULL;
++#endif /* LINUX_VERSION_CODE <= KERNEL_VERSION(3,8,0) */
+ 	}
+ 
+ 	hdr = register_net_sysctl(net, "net/ieee802154/6lowpan", table);
patches/collateral-evolutions/network/0014-inet_frag_evictor.patch new file +20 -0
new file mode 100644
index 0000000..cfcbb4d
@@ -0,0 +1,20 @@
+We can't backport this with a macro or inline helper, so just
+carry the patch and if this grows consider Coccinelle SmPL version.
+
+--- a/net/ieee802154/reassembly.c
++++ b/net/ieee802154/reassembly.c
+@@ -374,7 +374,14 @@ int lowpan_frag_rcv(struct sk_buff *skb,
+ 	if (frag_info->d_size > ieee802154_lowpan->max_dsize)
+ 		goto err;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
+ 	inet_frag_evictor(&ieee802154_lowpan->frags, &lowpan_frags, false);
++#else
++	if (atomic_read(&ieee802154_lowpan->frags.mem) <= &ieee802154_lowpan->frags.high_thresh)
++		return 0;
++	else
++		inet_frag_evictor(&ieee802154_lowpan->frags, &lowpan_frags);
++#endif
+ 
+ 	fq = fq_find(net, frag_info, &mac_cb(skb)->sa, &mac_cb(skb)->da);
+ 	if (fq != NULL) {
Signature · 1 line
1.8.5.3
#25 lore raw

Re: [PATCH 23/27] backports: backport ieee802154 6lowpan support down to 3.5

Hi,

Quoted 18 lines · Luis R. Rodriguez

Commit 633fc86ff62 added the ieee802154_6lowpan namespace and 7240cdec60b extended it (as on linux-next next-20140311). Its important to note though that 633fc86ff62 also extends the global net namespace. Since we cannot extend the global net namespace we define our own backport namespace for 6lowpan that can be used only be used by our backported subsystems, nothing more. Since ieee802154_6lowpan requires support for net_get_random_once() which uses static keys and a slew of new skb fragment support we simply require at least 3.5 to use 6lowpan. I did my best effort to backport this to kernels older than 3.5 but quickly ran into a slew of hairy issues.

The last thing we needed to address was usage of the helper inet_frag_evictor() added by Alexander via commit 6b102865e7 through v3.7. Since we can't backport that with macros or inline helpers we add a patch to carry the changes there. If that grows we can consider using Coccinelle.

Quoted 4 lines

If you are going to try to backport 6lowpan to kernels older than 3.5 be warned that the litmus test for patches will be to pass ckmake --allyesconfig for all supported kernels for every patch you provide.

thanks for this backport, but in the olders 6LoWPAN implementation too many things are broken. I stopped to fix issues in net and push my fixes in net-next. The current stack in net-next is in a more useable state.

For making a backport which make sense you need to take many other patches:

e5d966eff3ac364e4505c7c4da632321657029b3 ("6lowpan: fix udp byte ordering") 5cede84c9897f9db522699c4b3ff6ffe3d11e038 ("6lowpan: udp
use lowpan_push_hc_data function") c04fe5483df3b23beec9a21a285606f5e34768f1 ("6lowpan: set and use mac_len for mac header length")
...

Also some patches which aren't from me and which are in net-next:
8cfad496c4257441710735ccef622f3829870164 ("ieee802154: properly unshare skbs in ieee802154 *_rcv functions")
...

and some patches which has issues with 6LoWPAN upper layer protocols:
d1c53c8e870cdedb6fc9550f41c558bab45b5219 ("icmpv6_filter: allow ICMPv6 messages with bodies < 4 bytes")

... this will end in a huge list.

Sorry but I see no sense to backport these 6LoWPAN patches because there are too many issues and the active mainline IEEE 802.15.4 6LoWPAN developers hope that there are no users below net-next there.

If you are from a distribution I can give you the advice to disable IEEE 802.15.4 6LoWPAN until it's in a more useable state. Sorry!

- Alex

#26 lore raw

Re: [PATCH 23/27] backports: backport ieee802154 6lowpan support down to 3.5

Quoted 21 lines · Alexander Aring

Hi,

Quoted 18 lines · Luis R. Rodriguez

Commit 633fc86ff62 added the ieee802154_6lowpan namespace and 7240cdec60b extended it (as on linux-next next-20140311). Its important to note though that 633fc86ff62 also extends the global net namespace. Since we cannot extend the global net namespace we define our own backport namespace for 6lowpan that can be used only be used by our backported subsystems, nothing more. Since ieee802154_6lowpan requires support for net_get_random_once() which uses static keys and a slew of new skb fragment support we simply require at least 3.5 to use 6lowpan. I did my best effort to backport this to kernels older than 3.5 but quickly ran into a slew of hairy issues.

The last thing we needed to address was usage of the helper inet_frag_evictor() added by Alexander via commit 6b102865e7 through v3.7. Since we can't backport that with macros or inline helpers we add a patch to carry the changes there. If that grows we can consider using Coccinelle.

Quoted 8 lines
Quoted 4 lines

If you are going to try to backport 6lowpan to kernels older than 3.5 be warned that the litmus test for patches will be to pass ckmake --allyesconfig for all supported kernels for every patch you provide.

thanks for this backport, but in the olders 6LoWPAN implementation too many things are broken. I stopped to fix issues in net and push my fixes in net-next. The current stack in net-next is in a more useable state.

The way Linux backports works is we always backport the latest linux-next, this lets us branch out a stable release branch once Linus releases an rc1. There however has been a period of idleness on backports so we're only caught up to next-2014031, that said the delta for backporting 6lowpan is only applicable to the master branch of Linux backports right now as it didn't make it to v3.14. What this means is that as linux-next moves forward we keep on chugging and backporting any new collateral evolutions as they come along. We'll eventually catch up to to today's linux-next. In principle, once we're caught up we should not let go, and then its a daily thing.

Quoted 14 lines

For making a backport which make sense you need to take many other patches:

e5d966eff3ac364e4505c7c4da632321657029b3 ("6lowpan: fix udp byte ordering") 5cede84c9897f9db522699c4b3ff6ffe3d11e038 ("6lowpan: udp
use lowpan_push_hc_data function") c04fe5483df3b23beec9a21a285606f5e34768f1 ("6lowpan: set and use mac_len for mac header length")
...

Also some patches which aren't from me and which are in net-next:
8cfad496c4257441710735ccef622f3829870164 ("ieee802154: properly unshare skbs in ieee802154 *_rcv functions")
...

Quoted 5 lines

and some patches which has issues with 6LoWPAN upper layer protocols:
d1c53c8e870cdedb6fc9550f41c558bab45b5219 ("icmpv6_filter: allow ICMPv6 messages with bodies < 4 bytes")

... this will end in a huge list.

I'm sure :) Moving to a newer version is quit simple and is what we intend to do.

Quoted 3 lines

Sorry but I see no sense to backport these 6LoWPAN patches because there are too many issues and the active mainline IEEE 802.15.4 6LoWPAN developers hope that there are no users below net-next there.

The grunt work has been done, I'll bump linux-next today a bit further to see where we end up. The question should not be what version of linux-next we're on, as we'll catch up soon, the question should be does it make sense to provide a backport of the latest 6lowpan on linux-next to users. The next question is to what oldest kernel we we strive to backport to? Hauke Mehrtens had added the original first backport of the ieee802154 subsystem back in June 15, 2013. 6lowpan is new though, and as such I felt compelled to try to at least upkeep Hauke's port down to the kernel he had provided backport support for. It wasn't possible, so we bumped the required lowest kernel to 3.5,.

Quoted 2 lines

If you are from a distribution I can give you the advice to disable IEEE 802.15.4 6LoWPAN until it's in a more useable state. Sorry!

That's fine, at the point its ready it can be used by users. Not carrying over a subsytem to backport poses more work than to backport it later, so I'd like for you to consider us not carrying the current state but the latest state as of linux-next. When and if 6lowpan is ready upstream you'd just have to point users to daily snapshots of Linux backport based on linux-next, and once the stability train reaches Linus' tree, it'd go out into a respective stable Linux release. I'm curious more about your expected users and the types of kernels they run.

I'm happy for us to rip all this out though and not provide support if no users are found, but I suspect Hauke backported this with the expecation that OpenWrt would have some use for this in some embedded environments. Is there potential for usage of 6lowpan for OpenWrt ? They carry Linux backports.

Luis

#27 lore raw

PATCH 24/27 backports: refresh patches based on next-20140311

In reply to Luis R. Rodriguez
1   2.6.25              [  OK  ]
2   2.6.26              [  OK  ]
3   2.6.27              [  OK  ]
4   2.6.28              [  OK  ]
5   2.6.29              [  OK  ]
6   2.6.30              [  OK  ]
7   2.6.31              [  OK  ]
8   2.6.32              [  OK  ]
9   2.6.33              [  OK  ]
10  2.6.34              [  OK  ]
11  2.6.35              [  OK  ]
12  2.6.36              [  OK  ]
13  2.6.37              [  OK  ]
14  2.6.38              [  OK  ]
15  2.6.39              [  OK  ]
16  3.0.101             [  OK  ]
17  3.1.10              [  OK  ]
18  3.2.54              [  OK  ]
19  3.3.8               [  OK  ]
20  3.4.79              [  OK  ]
21  3.5.7               [  OK  ]
22  3.6.11              [  OK  ]
23  3.7.10              [  OK  ]
24  3.8.13              [  OK  ]
25  3.9.11              [  OK  ]
26  3.10.29             [  OK  ]
27  3.11.10             [  OK  ]
28  3.12.10             [  OK  ]
29  3.13.2              [  OK  ]
30  3.14-rc1            [  OK  ]

Generation time:

real    1m32.523s
user    23m51.796s
sys     0m28.872s
---
 .../0001-6lowpan-namespace.patch                     | 16 ++++++++--------
 .../collateral-evolutions/media/0004-sysfs-api.patch |  2 +-
 .../mac80211.patch                                   |  4 ++--
 .../0006-disable-dump-adjust-on-old-kernels.patch    |  4 ++--
 .../network/0010-disable-usb-net-asix.patch          |  2 +-
 .../network/0012-ieee802154-6lowpan-namespace.patch  |  2 +-
 .../drivers_net_wireless_ti_wl1251_spi.patch         |  2 +-
 .../include_net_cfg80211.patch                       |  2 +-
 .../drivers_net_wireless_ti_wlcore_main.patch        |  6 +++---
 .../net_wireless_core.patch                          |  2 +-
 .../drivers_net_wireless_iwlegacy_3945-mac.patch     |  2 +-
 .../drivers_net_wireless_iwlegacy_4965-mac.patch     |  2 +-
 .../drivers_net_wireless_iwlegacy_common.patch       |  4 ++--
 .../drivers_net_wireless_mwifiex_pcie.patch          |  2 +-
 .../16-bluetooth/drivers_bluetooth_hci_ldisc.patch   |  4 ++--
 .../network/17-netdev-queue/net_mac80211_iface.patch |  4 ++--
 .../24-pcmcia/drivers_bluetooth_bluecard_cs.patch    | 20 ++++++++++----------
 .../24-pcmcia/drivers_bluetooth_bt3c_cs.patch        | 14 +++++++-------
 .../24-pcmcia/drivers_bluetooth_btuart_cs.patch      | 20 ++++++++++----------
 .../24-pcmcia/drivers_bluetooth_dtl1_cs.patch        | 20 ++++++++++----------
 .../drivers_net_wireless_iwlwifi.patch               |  4 ++--
 .../drivers_net_wireless_mwl8k.patch                 | 10 +++++-----
 .../drivers_net_wireless_rtl818x_rtl8180_dev.patch   |  2 +-
 .../include_net_mac80211.patch                       |  2 +-
 .../25-multicast-list_head/net_mac80211_iface.patch  |  4 ++--
 .../drivers_net_wireless_mwifiex_sdio.patch          | 16 ++++++++--------
 .../30-bridge-port/net_wireless_nl80211.patch        |  2 +-
 .../network/30-bridge-port/net_wireless_util.patch   |  2 +-
 .../network/36-workqueue/net_mac80211_main.patch     |  2 +-
 .../42-netlink_seq/net_wireless_nl80211.patch        |  2 +-
 .../drivers_net_wireless_mwifiex_init.patch          |  2 +-
 .../52-tty-dev/drivers_bluetooth_hci_ldisc.patch     |  2 +-
 .../drivers_net_ethernet_broadcom_b44.patch          |  4 ++--
 .../69-wowlan-no-socket/net_wireless_nl80211.patch   |  2 +-
 .../network/81-genl-const/hwsim.patch                |  2 +-
 .../network/81-genl-const/nl80211.patch              |  6 +++---
 .../network/83-select_queue/mac80211.patch           |  4 ++--
 .../84-ethernet/0001-igb_net_device_ops.patch        |  8 ++++----
 .../84-ethernet/0002-igb_pci_sriov_configure.patch   | 12 ++++++------
 .../network/84-ethernet/0004-igb_err_handler.patch   |  2 +-
 .../network/84-ethernet/0005-igb_mdi.patch           | 10 +++++-----
 .../network/84-ethernet/0006-igb_eee.patch           |  6 +++---
 .../network/84-ethernet/0007-igb_ethtool_ops.patch   | 10 +++++-----
 .../network/84-ethernet/0008-igb_no_fcs.patch        |  2 +-
 .../network/84-ethernet/0009-igb_vlan_rx_vid.patch   |  8 ++++----
 .../network/84-ethernet/0010-igb_ethtool_ops.patch   | 10 +++++-----
 .../network/84-ethernet/0011-igb_ethtool_ops.patch   |  6 +++---
 .../84-ethernet/0012-igb_ndo_set_vf_spoofchk.patch   | 10 +++++-----
 .../network/84-ethernet/0013-igb_hwmon.patch         |  6 +++---
 49 files changed, 146 insertions(+), 146 deletions(-)
patches/0000-upstream-backport-changes/0001-6lowpan-namespace.patch +8 -8
index 2f88b28..a49ea02 100644
@@ -22,7 +22,7 @@ index f4ac957..0bcbef3 100644
 
 --- a/net/ieee802154/reassembly.c
 +++ b/net/ieee802154/reassembly.c
-@@ -123,6 +123,8 @@ fq_find(struct net *net, const struct ie
+@@ -116,6 +116,8 @@ fq_find(struct net *net, const struct ie
  	struct inet_frag_queue *q;
  	struct lowpan_create_arg arg;
  	unsigned int hash;
@@ -31,7 +31,7 @@ index f4ac957..0bcbef3 100644
  
  	arg.tag = frag_info->d_tag;
  	arg.d_size = frag_info->d_size;
-@@ -132,7 +134,7 @@ fq_find(struct net *net, const struct ie
+@@ -125,7 +127,7 @@ fq_find(struct net *net, const struct ie
  	read_lock(&lowpan_frags.lock);
  	hash = lowpan_hash_frag(frag_info->d_tag, frag_info->d_size, src, dst);
  
@@ -40,7 +40,7 @@ index f4ac957..0bcbef3 100644
  			   &lowpan_frags, &arg, hash);
  	if (IS_ERR_OR_NULL(q)) {
  		inet_frag_maybe_warn_overflow(q, pr_fmt());
-@@ -361,16 +363,18 @@ int lowpan_frag_rcv(struct sk_buff *skb,
+@@ -354,16 +356,18 @@ int lowpan_frag_rcv(struct sk_buff *skb,
  	struct lowpan_frag_queue *fq;
  	struct net *net = dev_net(skb->dev);
  	struct ieee802154_frag_info *frag_info = &mac_cb(skb)->frag_info;
@@ -61,7 +61,7 @@ index f4ac957..0bcbef3 100644
  
  	fq = fq_find(net, frag_info, &mac_cb(skb)->sa, &mac_cb(skb)->da);
  	if (fq != NULL) {
-@@ -453,6 +457,8 @@ static int __net_init lowpan_frags_ns_sy
+@@ -430,6 +434,8 @@ static int __net_init lowpan_frags_ns_sy
  {
  	struct ctl_table *table;
  	struct ctl_table_header *hdr;
@@ -70,7 +70,7 @@ index f4ac957..0bcbef3 100644
  
  	table = lowpan_frags_ns_ctl_table;
  	if (!net_eq(net, &init_net)) {
-@@ -461,10 +467,10 @@ static int __net_init lowpan_frags_ns_sy
+@@ -438,10 +444,10 @@ static int __net_init lowpan_frags_ns_sy
  		if (table == NULL)
  			goto err_alloc;
  
@@ -85,7 +85,7 @@ index f4ac957..0bcbef3 100644
  
  		/* Don't export sysctls to unprivileged users */
  		if (net->user_ns != &init_user_ns)
-@@ -475,7 +481,7 @@ static int __net_init lowpan_frags_ns_sy
+@@ -452,7 +458,7 @@ static int __net_init lowpan_frags_ns_sy
  	if (hdr == NULL)
  		goto err_reg;
  
@@ -94,7 +94,7 @@ index f4ac957..0bcbef3 100644
  	return 0;
  
  err_reg:
-@@ -488,9 +494,11 @@ err_alloc:
+@@ -465,9 +471,11 @@ err_alloc:
  static void __net_exit lowpan_frags_ns_sysctl_unregister(struct net *net)
  {
  	struct ctl_table *table;
@@ -108,7 +108,7 @@ index f4ac957..0bcbef3 100644
  	if (!net_eq(net, &init_net))
  		kfree(table);
  }
-@@ -531,20 +539,26 @@ static inline void lowpan_frags_sysctl_u
+@@ -508,20 +516,26 @@ static inline void lowpan_frags_sysctl_u
  
  static int __net_init lowpan_frags_init_net(struct net *net)
  {
patches/collateral-evolutions/media/0004-sysfs-api.patch +1 -1
index 23c445d..637ff3b 100644
@@ -25,7 +25,7 @@
  };
  
  struct video_device *video_devdata(struct file *file)
-@@ -990,6 +999,7 @@ static int __init videodev_init(void)
+@@ -1012,6 +1021,7 @@ static int __init videodev_init(void)
  		return ret;
  	}
  
patches/collateral-evolutions/network/0003-netdev-needed_headroom_tailroom/mac80211.patch +2 -2
index 3911ada..f2cad55 100644
@@ -1,6 +1,6 @@
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -1613,6 +1613,7 @@ int ieee80211_if_add(struct ieee80211_lo
+@@ -1608,6 +1608,7 @@ int ieee80211_if_add(struct ieee80211_lo
  			return -ENOMEM;
  		dev_net_set(ndev, wiphy_net(local->hw.wiphy));
  
@@ -8,7 +8,7 @@
  		ndev->needed_headroom = local->tx_headroom +
  					4*6 /* four MAC addresses */
  					+ 2 + 2 + 2 + 2 /* ctl, dur, seq, qos */
-@@ -1621,6 +1622,7 @@ int ieee80211_if_add(struct ieee80211_lo
+@@ -1616,6 +1617,7 @@ int ieee80211_if_add(struct ieee80211_lo
  					- ETH_HLEN /* ethernet hard_header_len */
  					+ IEEE80211_ENCRYPT_HEADROOM;
  		ndev->needed_tailroom = IEEE80211_ENCRYPT_TAILROOM;
patches/collateral-evolutions/network/0006-disable-dump-adjust-on-old-kernels.patch +2 -2
index 7a470cc..94dc764 100644
@@ -28,7 +28,7 @@ Date:   Fri Mar 1 14:03:49 2013 +0100
 
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -1726,6 +1726,7 @@ static int nl80211_dump_wiphy(struct sk_
+@@ -1727,6 +1727,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
-@@ -1747,6 +1748,7 @@ static int nl80211_dump_wiphy(struct sk_
+@@ -1748,6 +1749,7 @@ static int nl80211_dump_wiphy(struct sk_
  					rtnl_unlock();
  					return 1;
  				}
patches/collateral-evolutions/network/0010-disable-usb-net-asix.patch +1 -1
index 365ef0f..9d1ad08 100644
@@ -6,5 +6,5 @@
  obj-$(CONFIG_USB_NET_AX8817X)	+= asix.o
 -asix-y := asix_devices.o asix_common.o ax88172a.o
  obj-$(CONFIG_USB_NET_AX88179_178A)      += ax88179_178a.o
- obj-$(CONFIG_USB_NET_CDCETHER)	+= cdc_ether.o r815x.o
+ obj-$(CONFIG_USB_NET_CDCETHER)	+= cdc_ether.o
  obj-$(CONFIG_USB_NET_CDC_EEM)	+= cdc_eem.o
patches/collateral-evolutions/network/0012-ieee802154-6lowpan-namespace.patch +1 -1
index 218a768..e883d02 100644
@@ -16,7 +16,7 @@ idea yet.
  
  	lowpan_expire_frag_queue(fq, &lowpan_frags);
  }
-@@ -386,28 +390,44 @@ EXPORT_SYMBOL(lowpan_frag_rcv);
+@@ -390,28 +394,44 @@ EXPORT_SYMBOL(lowpan_frag_rcv);
  static struct ctl_table lowpan_frags_ns_ctl_table[] = {
  	{
  		.procname	= "6lowpanfrag_high_thresh",
patches/collateral-evolutions/network/06-header-changes/drivers_net_wireless_ti_wl1251_spi.patch +1 -1
index 97850f0..9dd6d6b 100644
@@ -9,4 +9,4 @@
 +#endif
  #include <linux/spi/spi.h>
  #include <linux/wl12xx.h>
- 
+ #include <linux/gpio.h>
patches/collateral-evolutions/network/09-cfg80211-wext-padding/include_net_cfg80211.patch +1 -1
index 690f4f5..23c6743 100644
@@ -1,6 +1,6 @@
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -2896,6 +2896,9 @@ struct wiphy_vendor_command {
+@@ -2906,6 +2906,9 @@ struct wiphy_vendor_command {
  struct wiphy {
  	/* assign these fields before you register the wiphy */
  
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.patch +3 -3
index 7f5137c..b3089b1 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ti/wlcore/main.c
 +++ b/drivers/net/wireless/ti/wlcore/main.c
-@@ -6079,15 +6079,27 @@ static void wlcore_nvs_cb(const struct f
+@@ -6081,15 +6081,27 @@ static void wlcore_nvs_cb(const struct f
  	wl->platform_quirks = pdata->platform_quirks;
  	wl->if_ops = pdev_data->if_ops;
  
@@ -28,7 +28,7 @@
  	if (ret < 0) {
  		wl1271_error("request_irq() failed: %d", ret);
  		goto out_free_nvs;
-@@ -6133,7 +6145,11 @@ out_unreg:
+@@ -6135,7 +6147,11 @@ out_unreg:
  	wl1271_unregister_hw(wl);
  
  out_irq:
@@ -40,7 +40,7 @@
  
  out_free_nvs:
  	kfree(wl->nvs);
-@@ -6179,7 +6195,12 @@ int wlcore_remove(struct platform_device
+@@ -6181,7 +6197,12 @@ int wlcore_remove(struct platform_device
  		disable_irq_wake(wl->irq);
  	}
  	wl1271_unregister_hw(wl);
patches/collateral-evolutions/network/10-add-wext-handlers-to-netdev/net_wireless_core.patch +1 -1
index a743052..1e7e6b2 100644
@@ -11,7 +11,7 @@
  	device_initialize(&rdev->wiphy.dev);
  	rdev->wiphy.dev.class = &ieee80211_class;
  	rdev->wiphy.dev.platform_data = rdev;
-@@ -846,6 +842,15 @@ static int cfg80211_netdev_notifier_call
+@@ -844,6 +840,15 @@ static int cfg80211_netdev_notifier_call
  		}
  		wdev->netdev = dev;
  #ifdef CONFIG_CFG80211_WEXT
patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_3945-mac.patch +1 -1
index b0cc1d5..08bb6d5 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/iwlegacy/3945-mac.c
 +++ b/drivers/net/wireless/iwlegacy/3945-mac.c
-@@ -3907,7 +3907,12 @@ static struct pci_driver il3945_driver =
+@@ -3902,7 +3902,12 @@ static struct pci_driver il3945_driver =
  	.id_table = il3945_hw_card_ids,
  	.probe = il3945_pci_probe,
  	.remove = il3945_pci_remove,
patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_4965-mac.patch +1 -1
index e0aa0e0..39ca434 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/iwlegacy/4965-mac.c
 +++ b/drivers/net/wireless/iwlegacy/4965-mac.c
-@@ -6823,7 +6823,12 @@ static struct pci_driver il4965_driver =
+@@ -6812,7 +6812,12 @@ static struct pci_driver il4965_driver =
  	.id_table = il4965_hw_card_ids,
  	.probe = il4965_pci_probe,
  	.remove = il4965_pci_remove,
patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_iwlegacy_common.patch +2 -2
index 0e2fcaf..4184e09 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/iwlegacy/common.c
 +++ b/drivers/net/wireless/iwlegacy/common.c
-@@ -4935,8 +4935,15 @@ il_pci_resume(struct device *device)
+@@ -4989,8 +4989,15 @@ il_pci_resume(struct device *device)
  	return 0;
  }
  
@@ -18,7 +18,7 @@
  
 --- a/drivers/net/wireless/iwlegacy/common.h
 +++ b/drivers/net/wireless/iwlegacy/common.h
-@@ -1835,7 +1835,14 @@ __le32 il_add_beacon_time(struct il_priv
+@@ -1836,7 +1836,14 @@ __le32 il_add_beacon_time(struct il_priv
  			  u32 beacon_interval);
  
  #ifdef CONFIG_PM_SLEEP
patches/collateral-evolutions/network/11-dev-pm-ops/drivers_net_wireless_mwifiex_pcie.patch +1 -1
index 0ba50bf..30d8797 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/mwifiex/pcie.c
 +++ b/drivers/net/wireless/mwifiex/pcie.c
-@@ -282,9 +282,14 @@ static struct pci_driver __refdata mwifi
+@@ -278,9 +278,14 @@ static struct pci_driver __refdata mwifi
  	.probe    = mwifiex_pcie_probe,
  	.remove   = mwifiex_pcie_remove,
  #ifdef CONFIG_PM_SLEEP
patches/collateral-evolutions/network/16-bluetooth/drivers_bluetooth_hci_ldisc.patch +2 -2
index c81496b..da96d99 100644
@@ -1,6 +1,6 @@
 --- a/drivers/bluetooth/hci_ldisc.c
 +++ b/drivers/bluetooth/hci_ldisc.c
-@@ -289,8 +289,13 @@ static int hci_uart_tty_open(struct tty_
+@@ -290,8 +290,13 @@ static int hci_uart_tty_open(struct tty_
  	/* FIXME: why is this needed. Note don't use ldisc_ref here as the
  	   open path is before the ldisc is referencable */
  
@@ -14,7 +14,7 @@
  	tty_driver_flush_buffer(tty);
  
  	return 0;
-@@ -519,7 +524,11 @@ static int hci_uart_tty_ioctl(struct tty
+@@ -520,7 +525,11 @@ static int hci_uart_tty_ioctl(struct tty
  		return hu->hdev_flags;
  
  	default:
patches/collateral-evolutions/network/17-netdev-queue/net_mac80211_iface.patch +2 -2
index abe38a3..70b407a 100644
@@ -1,6 +1,6 @@
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -1737,6 +1737,7 @@ void ieee80211_sdata_stop(struct ieee802
+@@ -1732,6 +1732,7 @@ void ieee80211_sdata_stop(struct ieee802
   * Remove all interfaces, may only be called at hardware unregistration
   * time because it doesn't do RCU-safe list removals.
   */
@@ -8,7 +8,7 @@
  void ieee80211_remove_interfaces(struct ieee80211_local *local)
  {
  	struct ieee80211_sub_if_data *sdata, *tmp;
-@@ -1773,6 +1774,22 @@ void ieee80211_remove_interfaces(struct
+@@ -1768,6 +1769,22 @@ void ieee80211_remove_interfaces(struct
  		kfree(sdata);
  	}
  }
patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bluecard_cs.patch +10 -10
index c21f22e..4bcad40 100644
@@ -37,7 +37,7 @@
  		unsigned int offset;
  		unsigned char command;
  		unsigned long ready_bit;
-@@ -378,7 +391,11 @@ static void bluecard_receive(bluecard_in
+@@ -379,7 +392,11 @@ static void bluecard_receive(bluecard_in
  		return;
  	}
  
@@ -49,7 +49,7 @@
  
  	if (test_bit(XMIT_SENDING_READY, &(info->tx_state)))
  		bluecard_enable_activity_led(info);
-@@ -506,7 +523,11 @@ static irqreturn_t bluecard_interrupt(in
+@@ -508,7 +525,11 @@ static irqreturn_t bluecard_interrupt(in
  	if (!test_bit(CARD_READY, &(info->hw_state)))
  		return IRQ_HANDLED;
  
@@ -61,7 +61,7 @@
  
  	spin_lock(&(info->lock));
  
-@@ -628,7 +649,11 @@ static int bluecard_hci_open(struct hci_
+@@ -631,7 +652,11 @@ static int bluecard_hci_open(struct hci_
  		return 0;
  
  	if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
@@ -73,7 +73,7 @@
  
  		/* Enable LED */
  		outb(0x08 | 0x20, iobase + 0x30);
-@@ -648,7 +673,11 @@ static int bluecard_hci_close(struct hci
+@@ -651,7 +676,11 @@ static int bluecard_hci_close(struct hci
  	bluecard_hci_flush(hdev);
  
  	if (test_bit(CARD_HAS_PCCARD_ID, &(info->hw_state))) {
@@ -85,7 +85,7 @@
  
  		/* Disable LED */
  		outb(0x00, iobase + 0x30);
-@@ -690,7 +719,11 @@ static int bluecard_hci_send_frame(struc
+@@ -693,7 +722,11 @@ static int bluecard_hci_send_frame(struc
  
  static int bluecard_open(bluecard_info_t *info)
  {
@@ -97,7 +97,7 @@
  	struct hci_dev *hdev;
  	unsigned char id;
  
-@@ -805,7 +838,11 @@ static int bluecard_open(bluecard_info_t
+@@ -808,7 +841,11 @@ static int bluecard_open(bluecard_info_t
  
  static int bluecard_close(bluecard_info_t *info)
  {
@@ -109,7 +109,7 @@
  	struct hci_dev *hdev = info->hdev;
  
  	if (!hdev)
-@@ -840,7 +877,18 @@ static int bluecard_probe(struct pcmcia_
+@@ -843,7 +880,18 @@ static int bluecard_probe(struct pcmcia_
  	info->p_dev = link;
  	link->priv = info;
  
@@ -128,7 +128,7 @@
  
  	return bluecard_config(link);
  }
-@@ -857,15 +905,30 @@ static int bluecard_config(struct pcmcia
+@@ -860,15 +908,30 @@ static int bluecard_config(struct pcmcia
  	bluecard_info_t *info = link->priv;
  	int i, n;
  
@@ -159,7 +159,7 @@
  		if (i == 0)
  			break;
  	}
-@@ -873,9 +936,15 @@ static int bluecard_config(struct pcmcia
+@@ -876,9 +939,15 @@ static int bluecard_config(struct pcmcia
  	if (i != 0)
  		goto failed;
  
@@ -175,7 +175,7 @@
  
  	i = pcmcia_enable_device(link);
  	if (i != 0)
-@@ -913,7 +982,13 @@ MODULE_DEVICE_TABLE(pcmcia, bluecard_ids
+@@ -916,7 +985,13 @@ MODULE_DEVICE_TABLE(pcmcia, bluecard_ids
  
  static struct pcmcia_driver bluecard_driver = {
  	.owner		= THIS_MODULE,
patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_bt3c_cs.patch +7 -7
index d2b3221..80ad588 100644
@@ -24,7 +24,7 @@
  
  	avail = bt3c_read(iobase, 0x7006);
  	//printk("bt3c_cs: receiving %d bytes\n", avail);
-@@ -344,7 +352,11 @@ static irqreturn_t bt3c_interrupt(int ir
+@@ -345,7 +353,11 @@ static irqreturn_t bt3c_interrupt(int ir
  		/* our irq handler is shared */
  		return IRQ_NONE;
  
@@ -36,7 +36,7 @@
  
  	spin_lock(&(info->lock));
  
-@@ -458,7 +470,11 @@ static int bt3c_load_firmware(bt3c_info_
+@@ -459,7 +471,11 @@ static int bt3c_load_firmware(bt3c_info_
  	unsigned int iobase, size, addr, fcs, tmp;
  	int i, err = 0;
  
@@ -48,7 +48,7 @@
  
  	/* Reset */
  	bt3c_io_write(iobase, 0x8040, 0x0404);
-@@ -629,8 +645,27 @@ static int bt3c_probe(struct pcmcia_devi
+@@ -630,8 +646,27 @@ static int bt3c_probe(struct pcmcia_devi
  	info->p_dev = link;
  	link->priv = info;
  
@@ -76,7 +76,7 @@
  
  	return bt3c_config(link);
  }
-@@ -641,6 +676,7 @@ static void bt3c_detach(struct pcmcia_de
+@@ -642,6 +677,7 @@ static void bt3c_detach(struct pcmcia_de
  	bt3c_release(link);
  }
  
@@ -84,7 +84,7 @@
  static int bt3c_check_config(struct pcmcia_device *p_dev, void *priv_data)
  {
  	int *try = priv_data;
-@@ -679,6 +715,63 @@ static int bt3c_check_config_notpicky(st
+@@ -680,6 +716,63 @@ static int bt3c_check_config_notpicky(st
  	}
  	return -ENODEV;
  }
@@ -148,7 +148,7 @@
  
  static int bt3c_config(struct pcmcia_device *link)
  {
-@@ -702,9 +795,15 @@ static int bt3c_config(struct pcmcia_dev
+@@ -703,9 +796,15 @@ static int bt3c_config(struct pcmcia_dev
  	goto failed;
  
  found_port:
@@ -164,7 +164,7 @@
  
  	i = pcmcia_enable_device(link);
  	if (i != 0)
-@@ -739,7 +838,13 @@ MODULE_DEVICE_TABLE(pcmcia, bt3c_ids);
+@@ -740,7 +839,13 @@ MODULE_DEVICE_TABLE(pcmcia, bt3c_ids);
  
  static struct pcmcia_driver bt3c_driver = {
  	.owner		= THIS_MODULE,
patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_btuart_cs.patch +10 -10
index be1a160..50941bf 100644
@@ -12,7 +12,7 @@
  		register struct sk_buff *skb;
  		int len;
  
-@@ -181,7 +185,11 @@ static void btuart_receive(btuart_info_t
+@@ -182,7 +186,11 @@ static void btuart_receive(btuart_info_t
  		return;
  	}
  
@@ -24,7 +24,7 @@
  
  	do {
  		info->hdev->stat.byte_rx++;
-@@ -294,7 +302,11 @@ static irqreturn_t btuart_interrupt(int
+@@ -296,7 +304,11 @@ static irqreturn_t btuart_interrupt(int
  		/* our irq handler is shared */
  		return IRQ_NONE;
  
@@ -36,7 +36,7 @@
  
  	spin_lock(&(info->lock));
  
-@@ -351,7 +363,11 @@ static void btuart_change_speed(btuart_i
+@@ -353,7 +365,11 @@ static void btuart_change_speed(btuart_i
  		return;
  	}
  
@@ -48,7 +48,7 @@
  
  	spin_lock_irqsave(&(info->lock), flags);
  
-@@ -456,7 +472,11 @@ static int btuart_hci_send_frame(struct
+@@ -458,7 +474,11 @@ static int btuart_hci_send_frame(struct
  static int btuart_open(btuart_info_t *info)
  {
  	unsigned long flags;
@@ -60,7 +60,7 @@
  	struct hci_dev *hdev;
  
  	spin_lock_init(&(info->lock));
-@@ -522,7 +542,11 @@ static int btuart_open(btuart_info_t *in
+@@ -524,7 +544,11 @@ static int btuart_open(btuart_info_t *in
  static int btuart_close(btuart_info_t *info)
  {
  	unsigned long flags;
@@ -72,7 +72,7 @@
  	struct hci_dev *hdev = info->hdev;
  
  	if (!hdev)
-@@ -558,8 +582,27 @@ static int btuart_probe(struct pcmcia_de
+@@ -560,8 +584,27 @@ static int btuart_probe(struct pcmcia_de
  	info->p_dev = link;
  	link->priv = info;
  
@@ -100,7 +100,7 @@
  
  	return btuart_config(link);
  }
-@@ -570,6 +613,7 @@ static void btuart_detach(struct pcmcia_
+@@ -572,6 +615,7 @@ static void btuart_detach(struct pcmcia_
  	btuart_release(link);
  }
  
@@ -108,7 +108,7 @@
  static int btuart_check_config(struct pcmcia_device *p_dev, void *priv_data)
  {
  	int *try = priv_data;
-@@ -608,6 +652,63 @@ static int btuart_check_config_notpicky(
+@@ -610,6 +654,63 @@ static int btuart_check_config_notpicky(
  	}
  	return -ENODEV;
  }
@@ -172,7 +172,7 @@
  
  static int btuart_config(struct pcmcia_device *link)
  {
-@@ -631,9 +732,15 @@ static int btuart_config(struct pcmcia_d
+@@ -633,9 +734,15 @@ static int btuart_config(struct pcmcia_d
  	goto failed;
  
  found_port:
@@ -188,7 +188,7 @@
  
  	i = pcmcia_enable_device(link);
  	if (i != 0)
-@@ -667,7 +774,13 @@ MODULE_DEVICE_TABLE(pcmcia, btuart_ids);
+@@ -669,7 +776,13 @@ MODULE_DEVICE_TABLE(pcmcia, btuart_ids);
  
  static struct pcmcia_driver btuart_driver = {
  	.owner		= THIS_MODULE,
patches/collateral-evolutions/network/24-pcmcia/drivers_bluetooth_dtl1_cs.patch +10 -10
index 4fccab6..66d4b2f 100644
@@ -12,7 +12,7 @@
  		register struct sk_buff *skb;
  		int len;
  
-@@ -209,7 +213,11 @@ static void dtl1_receive(dtl1_info_t *in
+@@ -210,7 +214,11 @@ static void dtl1_receive(dtl1_info_t *in
  		return;
  	}
  
@@ -24,7 +24,7 @@
  
  	do {
  		info->hdev->stat.byte_rx++;
-@@ -295,7 +303,11 @@ static irqreturn_t dtl1_interrupt(int ir
+@@ -298,7 +306,11 @@ static irqreturn_t dtl1_interrupt(int ir
  		/* our irq handler is shared */
  		return IRQ_NONE;
  
@@ -36,7 +36,7 @@
  
  	spin_lock(&(info->lock));
  
-@@ -436,7 +448,11 @@ static int dtl1_hci_send_frame(struct hc
+@@ -439,7 +451,11 @@ static int dtl1_hci_send_frame(struct hc
  static int dtl1_open(dtl1_info_t *info)
  {
  	unsigned long flags;
@@ -48,7 +48,7 @@
  	struct hci_dev *hdev;
  
  	spin_lock_init(&(info->lock));
-@@ -479,8 +495,13 @@ static int dtl1_open(dtl1_info_t *info)
+@@ -482,8 +498,13 @@ static int dtl1_open(dtl1_info_t *info)
  	outb(UART_LCR_WLEN8, iobase + UART_LCR);	/* Reset DLAB */
  	outb((UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2), iobase + UART_MCR);
  
@@ -62,7 +62,7 @@
  
  	/* Turn on interrupts */
  	outb(UART_IER_RLSI | UART_IER_RDI | UART_IER_THRI, iobase + UART_IER);
-@@ -505,7 +526,11 @@ static int dtl1_open(dtl1_info_t *info)
+@@ -508,7 +529,11 @@ static int dtl1_open(dtl1_info_t *info)
  static int dtl1_close(dtl1_info_t *info)
  {
  	unsigned long flags;
@@ -74,7 +74,7 @@
  	struct hci_dev *hdev = info->hdev;
  
  	if (!hdev)
-@@ -541,7 +566,24 @@ static int dtl1_probe(struct pcmcia_devi
+@@ -544,7 +569,24 @@ static int dtl1_probe(struct pcmcia_devi
  	info->p_dev = link;
  	link->priv = info;
  
@@ -99,7 +99,7 @@
  
  	return dtl1_config(link);
  }
-@@ -555,6 +597,7 @@ static void dtl1_detach(struct pcmcia_de
+@@ -558,6 +600,7 @@ static void dtl1_detach(struct pcmcia_de
  	pcmcia_disable_device(link);
  }
  
@@ -107,7 +107,7 @@
  static int dtl1_confcheck(struct pcmcia_device *p_dev, void *priv_data)
  {
  	if ((p_dev->resource[1]->end) || (p_dev->resource[1]->end < 8))
-@@ -565,6 +608,29 @@ static int dtl1_confcheck(struct pcmcia_
+@@ -568,6 +611,29 @@ static int dtl1_confcheck(struct pcmcia_
  
  	return pcmcia_request_io(p_dev);
  }
@@ -137,7 +137,7 @@
  
  static int dtl1_config(struct pcmcia_device *link)
  {
-@@ -572,14 +638,24 @@ static int dtl1_config(struct pcmcia_dev
+@@ -575,14 +641,24 @@ static int dtl1_config(struct pcmcia_dev
  	int ret;
  
  	/* Look for a generic full-sized window */
@@ -162,7 +162,7 @@
  
  	ret = pcmcia_enable_device(link);
  	if (ret)
-@@ -607,7 +683,13 @@ MODULE_DEVICE_TABLE(pcmcia, dtl1_ids);
+@@ -610,7 +686,13 @@ MODULE_DEVICE_TABLE(pcmcia, dtl1_ids);
  
  static struct pcmcia_driver dtl1_driver = {
  	.owner		= THIS_MODULE,
patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_iwlwifi.patch +2 -2
index 9a111b9..e10db58 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c
 +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c
-@@ -948,12 +948,21 @@ static void iwl_mvm_recalc_multicast(str
+@@ -952,12 +952,21 @@ static void iwl_mvm_recalc_multicast(str
  }
  
  static u64 iwl_mvm_prepare_multicast(struct ieee80211_hw *hw,
@@ -22,7 +22,7 @@
  	bool pass_all = false;
  	int len;
  
-@@ -972,11 +981,15 @@ static u64 iwl_mvm_prepare_multicast(str
+@@ -976,11 +985,15 @@ static u64 iwl_mvm_prepare_multicast(str
  		return (u64)(unsigned long)cmd;
  	}
  
patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_mwl8k.patch +5 -5
index a5e07e0..ccc8448 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/mwl8k.c
 +++ b/drivers/net/wireless/mwl8k.c
-@@ -2660,15 +2660,21 @@ struct mwl8k_cmd_mac_multicast_adr {
+@@ -2672,15 +2672,21 @@ struct mwl8k_cmd_mac_multicast_adr {
  
  static struct mwl8k_cmd_pkt *
  __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti,
@@ -22,7 +22,7 @@
  
  	if (allmulti || mc_count > priv->num_mcaddrs) {
  		allmulti = 1;
-@@ -2689,13 +2695,27 @@ __mwl8k_cmd_mac_multicast_adr(struct iee
+@@ -2701,13 +2707,27 @@ __mwl8k_cmd_mac_multicast_adr(struct iee
  	if (allmulti) {
  		cmd->action |= cpu_to_le16(MWL8K_ENABLE_RX_ALL_MULTICAST);
  	} else if (mc_count) {
@@ -50,7 +50,7 @@
  		}
  	}
  
-@@ -5030,7 +5050,11 @@ mwl8k_bss_info_changed(struct ieee80211_
+@@ -5158,7 +5178,11 @@ mwl8k_bss_info_changed(struct ieee80211_
  }
  
  static u64 mwl8k_prepare_multicast(struct ieee80211_hw *hw,
@@ -62,7 +62,7 @@
  {
  	struct mwl8k_cmd_pkt *cmd;
  
-@@ -5041,7 +5065,11 @@ static u64 mwl8k_prepare_multicast(struc
+@@ -5169,7 +5193,11 @@ static u64 mwl8k_prepare_multicast(struc
  	 * we'll end up throwing this packet away and creating a new
  	 * one in mwl8k_configure_filter().
  	 */
@@ -74,7 +74,7 @@
  
  	return (unsigned long)cmd;
  }
-@@ -5163,7 +5191,11 @@ static void mwl8k_configure_filter(struc
+@@ -5291,7 +5319,11 @@ static void mwl8k_configure_filter(struc
  	 */
  	if (*total_flags & FIF_ALLMULTI) {
  		kfree(cmd);
patches/collateral-evolutions/network/25-multicast-list_head/drivers_net_wireless_rtl818x_rtl8180_dev.patch +1 -1
index 5c19308..bf81529 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
 +++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
-@@ -834,10 +834,19 @@ static void rtl8180_bss_info_changed(str
+@@ -867,10 +867,19 @@ static void rtl8180_bss_info_changed(str
  	}
  }
  
patches/collateral-evolutions/network/25-multicast-list_head/include_net_mac80211.patch +1 -1
index dae04b3..53ef060 100644
@@ -1,6 +1,6 @@
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -2792,7 +2792,11 @@ struct ieee80211_ops {
+@@ -2780,7 +2780,11 @@ struct ieee80211_ops {
  	void (*stop_ap)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
  
  	u64 (*prepare_multicast)(struct ieee80211_hw *hw,
patches/collateral-evolutions/network/25-multicast-list_head/net_mac80211_iface.patch +2 -2
index 4814014..612d81b 100644
@@ -1,6 +1,6 @@
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -823,8 +823,13 @@ static void ieee80211_do_stop(struct iee
+@@ -818,8 +818,13 @@ static void ieee80211_do_stop(struct iee
  	if (sdata->dev) {
  		netif_addr_lock_bh(sdata->dev);
  		spin_lock_bh(&local->filter_lock);
@@ -14,7 +14,7 @@
  		spin_unlock_bh(&local->filter_lock);
  		netif_addr_unlock_bh(sdata->dev);
  	}
-@@ -1026,7 +1031,12 @@ static void ieee80211_set_multicast_list
+@@ -1021,7 +1026,12 @@ static void ieee80211_set_multicast_list
  		sdata->flags ^= IEEE80211_SDATA_PROMISC;
  	}
  	spin_lock_bh(&local->filter_lock);
patches/collateral-evolutions/network/29-sdio_no_suspend/drivers_net_wireless_mwifiex_sdio.patch +8 -8
index 21b8109..57ced06 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/mwifiex/sdio.c
 +++ b/drivers/net/wireless/mwifiex/sdio.c
-@@ -111,6 +111,7 @@ mwifiex_sdio_probe(struct sdio_func *fun
+@@ -112,6 +112,7 @@ mwifiex_sdio_probe(struct sdio_func *fun
  	return ret;
  }
  
@@ -8,7 +8,7 @@
  /*
   * SDIO resume.
   *
-@@ -155,6 +156,7 @@ static int mwifiex_sdio_resume(struct de
+@@ -156,6 +157,7 @@ static int mwifiex_sdio_resume(struct de
  
  	return 0;
  }
@@ -25,9 +25,9 @@
  			mwifiex_sdio_resume(adapter->dev);
 +#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)) */
  
- 		for (i = 0; i < adapter->priv_num; i++)
- 			if ((GET_BSS_ROLE(adapter->priv[i]) ==
-@@ -200,6 +204,7 @@ mwifiex_sdio_remove(struct sdio_func *fu
+ 		mwifiex_deauthenticate_all(adapter);
+ 
+@@ -196,6 +200,7 @@ mwifiex_sdio_remove(struct sdio_func *fu
  	mwifiex_remove_card(card->adapter, &add_remove_card_sem);
  }
  
@@ -35,7 +35,7 @@
  /*
   * SDIO suspend.
   *
-@@ -254,6 +259,7 @@ static int mwifiex_sdio_suspend(struct d
+@@ -250,6 +255,7 @@ static int mwifiex_sdio_suspend(struct d
  
  	return ret;
  }
@@ -43,7 +43,7 @@
  
  /* Device ID for SD8786 */
  #define SDIO_DEVICE_ID_MARVELL_8786   (0x9116)
-@@ -279,10 +285,12 @@ static const struct sdio_device_id mwifi
+@@ -275,10 +281,12 @@ static const struct sdio_device_id mwifi
  
  MODULE_DEVICE_TABLE(sdio, mwifiex_ids);
  
@@ -56,7 +56,7 @@
  
  static struct sdio_driver mwifiex_sdio = {
  	.name = "mwifiex_sdio",
-@@ -291,7 +299,9 @@ static struct sdio_driver mwifiex_sdio =
+@@ -287,7 +295,9 @@ static struct sdio_driver mwifiex_sdio =
  	.remove = mwifiex_sdio_remove,
  	.drv = {
  		.owner = THIS_MODULE,
patches/collateral-evolutions/network/30-bridge-port/net_wireless_nl80211.patch +1 -1
index e97b1af..ade2b0b 100644
@@ -1,6 +1,6 @@
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -2403,7 +2403,7 @@ static int nl80211_valid_4addr(struct cf
+@@ -2404,7 +2404,7 @@ static int nl80211_valid_4addr(struct cf
  			       enum nl80211_iftype iftype)
  {
  	if (!use_4addr) {
patches/collateral-evolutions/network/30-bridge-port/net_wireless_util.patch +1 -1
index 5b95a39..f0b1c9e 100644
@@ -1,6 +1,6 @@
 --- a/net/wireless/util.c
 +++ b/net/wireless/util.c
-@@ -866,7 +866,7 @@ int cfg80211_change_iface(struct cfg8021
+@@ -882,7 +882,7 @@ int cfg80211_change_iface(struct cfg8021
  		return -EOPNOTSUPP;
  
  	/* if it's part of a bridge, reject changing type to station/ibss */
patches/collateral-evolutions/network/36-workqueue/net_mac80211_main.patch +1 -1
index dca9153..31788e1 100644
@@ -1,6 +1,6 @@
 --- a/net/mac80211/main.c
 +++ b/net/mac80211/main.c
-@@ -1200,6 +1200,10 @@ static void __exit ieee80211_exit(void)
+@@ -1212,6 +1212,10 @@ static void __exit ieee80211_exit(void)
  	rc80211_minstrel_ht_exit();
  	rc80211_minstrel_exit();
  
patches/collateral-evolutions/network/42-netlink_seq/net_wireless_nl80211.patch +1 -1
index 2aa916c..c445ea0 100644
@@ -1,6 +1,6 @@
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -6067,7 +6067,9 @@ static int nl80211_dump_scan(struct sk_b
+@@ -6074,7 +6074,9 @@ static int nl80211_dump_scan(struct sk_b
  	spin_lock_bh(&rdev->bss_lock);
  	cfg80211_bss_expire(rdev);
  
patches/collateral-evolutions/network/47-no_trans_start_on_netdev_queue/drivers_net_wireless_mwifiex_init.patch +1 -1
index 9d8ab2c..e741007 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/mwifiex/init.c
 +++ b/drivers/net/wireless/mwifiex/init.c
-@@ -294,8 +294,10 @@ void mwifiex_set_trans_start(struct net_
+@@ -293,8 +293,10 @@ void mwifiex_set_trans_start(struct net_
  {
  	int i;
  
patches/collateral-evolutions/network/52-tty-dev/drivers_bluetooth_hci_ldisc.patch +1 -1
index cd2be92..611b633 100644
@@ -1,6 +1,6 @@
 --- a/drivers/bluetooth/hci_ldisc.c
 +++ b/drivers/bluetooth/hci_ldisc.c
-@@ -416,7 +416,10 @@ static int hci_uart_register_dev(struct
+@@ -417,7 +417,10 @@ static int hci_uart_register_dev(struct
  	hdev->close = hci_uart_close;
  	hdev->flush = hci_uart_flush;
  	hdev->send  = hci_uart_send_frame;
patches/collateral-evolutions/network/64-b44-32bit-stats/drivers_net_ethernet_broadcom_b44.patch +2 -2
index a16ba7d..7fb9718 100644
@@ -8,7 +8,7 @@
  
  #include <asm/uaccess.h>
  #include <asm/io.h>
-@@ -1670,10 +1671,17 @@ static int b44_close(struct net_device *
+@@ -1677,10 +1678,17 @@ static int b44_close(struct net_device *
  	return 0;
  }
  
@@ -26,7 +26,7 @@
  	struct b44_hw_stats *hwstat = &bp->hw_stats;
  	unsigned int start;
  
-@@ -2183,7 +2191,11 @@ static const struct net_device_ops b44_n
+@@ -2190,7 +2198,11 @@ static const struct net_device_ops b44_n
  	.ndo_open		= b44_open,
  	.ndo_stop		= b44_close,
  	.ndo_start_xmit		= b44_start_xmit,
patches/collateral-evolutions/network/69-wowlan-no-socket/net_wireless_nl80211.patch +1 -1
index c5b78d2..1452a4b 100644
@@ -1,6 +1,6 @@
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -8308,7 +8308,7 @@ static int nl80211_parse_wowlan_tcp(stru
+@@ -8319,7 +8319,7 @@ static int nl80211_parse_wowlan_tcp(stru
  		port = nla_get_u16(tb[NL80211_WOWLAN_TCP_SRC_PORT]);
  	else
  		port = 0;
patches/collateral-evolutions/network/81-genl-const/hwsim.patch +1 -1
index c48b65b..925b391 100644
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/mac80211_hwsim.c
 +++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -2466,7 +2466,7 @@ static int hwsim_destroy_radio_nl(struct
+@@ -2478,7 +2478,7 @@ static int hwsim_destroy_radio_nl(struct
  }
  
  /* Generic Netlink operations array */
patches/collateral-evolutions/network/81-genl-const/nl80211.patch +3 -3
index 0e8d703..3fbd8df 100644
@@ -21,7 +21,7 @@
  	[NL80211_MCGRP_CONFIG] = { .name = "config", },
  	[NL80211_MCGRP_SCAN] = { .name = "scan", },
  	[NL80211_MCGRP_REGULATORY] = { .name = "regulatory", },
-@@ -9259,7 +9259,7 @@ static int nl80211_set_qos_map(struct sk
+@@ -9270,7 +9270,7 @@ static int nl80211_set_qos_map(struct sk
  #define NL80211_FLAG_NEED_WDEV_UP	(NL80211_FLAG_NEED_WDEV |\
  					 NL80211_FLAG_CHECK_NETDEV_UP)
  
@@ -30,7 +30,7 @@
  			    struct genl_info *info)
  {
  	struct cfg80211_registered_device *rdev;
-@@ -9328,7 +9328,7 @@ static int nl80211_pre_doit(const struct
+@@ -9339,7 +9339,7 @@ static int nl80211_pre_doit(const struct
  	return 0;
  }
  
@@ -39,7 +39,7 @@
  			      struct genl_info *info)
  {
  	if (info->user_ptr[1]) {
-@@ -9345,7 +9345,7 @@ static void nl80211_post_doit(const stru
+@@ -9356,7 +9356,7 @@ static void nl80211_post_doit(const stru
  		rtnl_unlock();
  }
  
patches/collateral-evolutions/network/83-select_queue/mac80211.patch +2 -2
index ce087cc..b4b8151 100644
@@ -2,7 +2,7 @@ diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
 index 088111a..dcf149a 100644
 --- a/net/mac80211/iface.c
 +++ b/net/mac80211/iface.c
-@@ -1067,10 +1067,19 @@ static void ieee80211_uninit(struct net_
+@@ -1062,10 +1062,19 @@ static void ieee80211_uninit(struct net_
  	ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev));
  }
  
@@ -22,7 +22,7 @@ index 088111a..dcf149a 100644
  {
  	return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb);
  }
-@@ -1086,10 +1095,19 @@ static const struct net_device_ops ieee8
+@@ -1081,10 +1090,19 @@ static const struct net_device_ops ieee8
  	.ndo_select_queue	= ieee80211_netdev_select_queue,
  };
  
patches/collateral-evolutions/network/84-ethernet/0001-igb_net_device_ops.patch +4 -4
index f4f79cf..0b61f5c 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/in
 index 14ad4c7..f2a5abf 100644
 --- a/drivers/net/ethernet/intel/igb/igb_main.c
 +++ b/drivers/net/ethernet/intel/igb/igb_main.c
-@@ -161,8 +161,13 @@ static int igb_ioctl(struct net_device *
+@@ -160,8 +160,13 @@ static int igb_ioctl(struct net_device *
  static void igb_tx_timeout(struct net_device *);
  static void igb_reset_task(struct work_struct *);
  static void igb_vlan_mode(struct net_device *netdev, netdev_features_t features);
@@ -16,7 +16,7 @@ index 14ad4c7..f2a5abf 100644
  static void igb_restore_vlan(struct igb_adapter *);
  static void igb_rar_set_qsel(struct igb_adapter *, u8 *, u32 , u8);
  static void igb_ping_all_vfs(struct igb_adapter *);
-@@ -7169,8 +7174,12 @@ static void igb_vlan_mode(struct net_dev
+@@ -7168,8 +7173,12 @@ static void igb_vlan_mode(struct net_dev
  	igb_rlpml_set(adapter);
  }
  
@@ -29,7 +29,7 @@ index 14ad4c7..f2a5abf 100644
  {
  	struct igb_adapter *adapter = netdev_priv(netdev);
  	struct e1000_hw *hw = &adapter->hw;
-@@ -7187,8 +7196,12 @@ static int igb_vlan_rx_add_vid(struct ne
+@@ -7186,8 +7195,12 @@ static int igb_vlan_rx_add_vid(struct ne
  	return 0;
  }
  
@@ -42,7 +42,7 @@ index 14ad4c7..f2a5abf 100644
  {
  	struct igb_adapter *adapter = netdev_priv(netdev);
  	struct e1000_hw *hw = &adapter->hw;
-@@ -7214,7 +7227,11 @@ static void igb_restore_vlan(struct igb_
+@@ -7213,7 +7226,11 @@ static void igb_restore_vlan(struct igb_
  	igb_vlan_mode(adapter->netdev, adapter->netdev->features);
  
  	for_each_set_bit(vid, adapter->active_vlans, VLAN_N_VID)
patches/collateral-evolutions/network/84-ethernet/0002-igb_pci_sriov_configure.patch +6 -6
index 9046191..d4e5796 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/in
 index f2a5abf..dd878b6 100644
 --- a/drivers/net/ethernet/intel/igb/igb_main.c
 +++ b/drivers/net/ethernet/intel/igb/igb_main.c
-@@ -207,7 +207,9 @@ static const struct dev_pm_ops igb_pm_op
+@@ -206,7 +206,9 @@ static const struct dev_pm_ops igb_pm_op
  };
  #endif
  static void igb_shutdown(struct pci_dev *);
@@ -12,7 +12,7 @@ index f2a5abf..dd878b6 100644
  #ifdef CONFIG_IGB_DCA
  static int igb_notify_dca(struct notifier_block *, unsigned long, void *);
  static struct notifier_block dca_notifier = {
-@@ -249,7 +251,9 @@ static struct pci_driver igb_driver = {
+@@ -248,7 +250,9 @@ static struct pci_driver igb_driver = {
  	.driver.pm = &igb_pm_ops,
  #endif
  	.shutdown = igb_shutdown,
@@ -22,7 +22,7 @@ index f2a5abf..dd878b6 100644
  	.err_handler = &igb_err_handler
  };
  
-@@ -7520,6 +7524,7 @@ static int igb_sriov_reinit(struct pci_d
+@@ -7519,6 +7523,7 @@ static int igb_sriov_reinit(struct pci_d
  	return 0;
  }
  
@@ -30,7 +30,7 @@ index f2a5abf..dd878b6 100644
  static int igb_pci_disable_sriov(struct pci_dev *dev)
  {
  	int err = igb_disable_sriov(dev);
-@@ -7529,6 +7534,7 @@ static int igb_pci_disable_sriov(struct
+@@ -7528,6 +7533,7 @@ static int igb_pci_disable_sriov(struct
  
  	return err;
  }
@@ -38,7 +38,7 @@ index f2a5abf..dd878b6 100644
  
  static int igb_pci_enable_sriov(struct pci_dev *dev, int num_vfs)
  {
-@@ -7546,6 +7552,8 @@ out:
+@@ -7545,6 +7551,8 @@ out:
  }
  
  #endif
@@ -47,7 +47,7 @@ index f2a5abf..dd878b6 100644
  static int igb_pci_sriov_configure(struct pci_dev *dev, int num_vfs)
  {
  #ifdef CONFIG_PCI_IOV
-@@ -7556,6 +7564,7 @@ static int igb_pci_sriov_configure(struc
+@@ -7555,6 +7563,7 @@ static int igb_pci_sriov_configure(struc
  #endif
  	return 0;
  }
patches/collateral-evolutions/network/84-ethernet/0004-igb_err_handler.patch +1 -1
index ada1372..db096f8 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/in
 index 67441f2..4df7bce 100644
 --- a/drivers/net/ethernet/intel/igb/igb_main.c
 +++ b/drivers/net/ethernet/intel/igb/igb_main.c
-@@ -234,7 +234,11 @@ static pci_ers_result_t igb_io_error_det
+@@ -233,7 +233,11 @@ static pci_ers_result_t igb_io_error_det
  static pci_ers_result_t igb_io_slot_reset(struct pci_dev *);
  static void igb_io_resume(struct pci_dev *);
  
patches/collateral-evolutions/network/84-ethernet/0005-igb_mdi.patch +5 -5
index c062d01..4af023d 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet
 index c3143da..05fd6f8 100644
 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
 +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
-@@ -249,10 +249,12 @@ static int igb_get_settings(struct net_d
+@@ -248,10 +248,12 @@ static int igb_get_settings(struct net_d
  	else
  		ecmd->eth_tp_mdix = ETH_TP_MDI_INVALID;
  
@@ -15,7 +15,7 @@ index c3143da..05fd6f8 100644
  
  	return 0;
  }
-@@ -271,6 +273,7 @@ static int igb_set_settings(struct net_d
+@@ -270,6 +272,7 @@ static int igb_set_settings(struct net_d
  		return -EINVAL;
  	}
  
@@ -23,7 +23,7 @@ index c3143da..05fd6f8 100644
  	/* MDI setting is only allowed when autoneg enabled because
  	 * some hardware doesn't allow MDI setting when speed or
  	 * duplex is forced.
-@@ -285,6 +288,7 @@ static int igb_set_settings(struct net_d
+@@ -284,6 +287,7 @@ static int igb_set_settings(struct net_d
  			return -EINVAL;
  		}
  	}
@@ -31,7 +31,7 @@ index c3143da..05fd6f8 100644
  
  	while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
  		msleep(1);
-@@ -328,6 +332,7 @@ static int igb_set_settings(struct net_d
+@@ -327,6 +331,7 @@ static int igb_set_settings(struct net_d
  		}
  	}
  
@@ -39,7 +39,7 @@ index c3143da..05fd6f8 100644
  	/* MDI-X => 2; MDI => 1; Auto => 3 */
  	if (ecmd->eth_tp_mdix_ctrl) {
  		/* fix up the value for auto (3 => 0) as zero is mapped
-@@ -338,6 +343,7 @@ static int igb_set_settings(struct net_d
+@@ -337,6 +342,7 @@ static int igb_set_settings(struct net_d
  		else
  			hw->phy.mdix = ecmd->eth_tp_mdix_ctrl;
  	}
patches/collateral-evolutions/network/84-ethernet/0006-igb_eee.patch +3 -3
index 334ca44..b4f91a3 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet
 index 9b15820..9767f11 100644
 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
 +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
-@@ -2590,6 +2590,7 @@ static int igb_set_rxnfc(struct net_devi
+@@ -2589,6 +2589,7 @@ static int igb_set_rxnfc(struct net_devi
  	return ret;
  }
  
@@ -10,7 +10,7 @@ index 9b15820..9767f11 100644
  static int igb_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
  {
  	struct igb_adapter *adapter = netdev_priv(netdev);
-@@ -2718,6 +2719,7 @@ static int igb_set_eee(struct net_device
+@@ -2717,6 +2718,7 @@ static int igb_set_eee(struct net_device
  
  	return 0;
  }
@@ -18,7 +18,7 @@ index 9b15820..9767f11 100644
  
  static int igb_get_module_info(struct net_device *netdev,
  			       struct ethtool_modinfo *modinfo)
-@@ -3006,8 +3008,10 @@ static const struct ethtool_ops igb_etht
+@@ -3005,8 +3007,10 @@ static const struct ethtool_ops igb_etht
  	.get_ts_info		= igb_get_ts_info,
  	.get_rxnfc		= igb_get_rxnfc,
  	.set_rxnfc		= igb_set_rxnfc,
patches/collateral-evolutions/network/84-ethernet/0007-igb_ethtool_ops.patch +5 -5
index b4e666c..feaab02 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet
 index 9767f11..3cf9600 100644
 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
 +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
-@@ -2355,6 +2355,7 @@ static void igb_get_strings(struct net_d
+@@ -2354,6 +2354,7 @@ static void igb_get_strings(struct net_d
  	}
  }
  
@@ -10,7 +10,7 @@ index 9767f11..3cf9600 100644
  static int igb_get_ts_info(struct net_device *dev,
  			   struct ethtool_ts_info *info)
  {
-@@ -2410,6 +2411,7 @@ static int igb_get_ts_info(struct net_de
+@@ -2409,6 +2410,7 @@ static int igb_get_ts_info(struct net_de
  		return -EOPNOTSUPP;
  	}
  }
@@ -18,7 +18,7 @@ index 9767f11..3cf9600 100644
  
  static int igb_get_rss_hash_opts(struct igb_adapter *adapter,
  				 struct ethtool_rxnfc *cmd)
-@@ -2721,6 +2723,7 @@ static int igb_set_eee(struct net_device
+@@ -2720,6 +2722,7 @@ static int igb_set_eee(struct net_device
  }
  #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
  
@@ -26,7 +26,7 @@ index 9767f11..3cf9600 100644
  static int igb_get_module_info(struct net_device *netdev,
  			       struct ethtool_modinfo *modinfo)
  {
-@@ -2799,6 +2802,7 @@ static int igb_get_module_eeprom(struct
+@@ -2798,6 +2801,7 @@ static int igb_get_module_eeprom(struct
  
  	return 0;
  }
@@ -34,7 +34,7 @@ index 9767f11..3cf9600 100644
  
  static int igb_ethtool_begin(struct net_device *netdev)
  {
-@@ -3005,15 +3009,19 @@ static const struct ethtool_ops igb_etht
+@@ -3004,15 +3008,19 @@ static const struct ethtool_ops igb_etht
  	.get_ethtool_stats	= igb_get_ethtool_stats,
  	.get_coalesce		= igb_get_coalesce,
  	.set_coalesce		= igb_set_coalesce,
patches/collateral-evolutions/network/84-ethernet/0008-igb_no_fcs.patch +1 -1
index a47238e..772b319 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/in
 index fd6a103..a919cfa 100644
 --- a/drivers/net/ethernet/intel/igb/igb_main.c
 +++ b/drivers/net/ethernet/intel/igb/igb_main.c
-@@ -4692,9 +4692,10 @@ static u32 igb_tx_cmd_type(struct sk_buf
+@@ -4691,9 +4691,10 @@ static u32 igb_tx_cmd_type(struct sk_buf
  	cmd_type |= IGB_SET_FLAG(tx_flags, IGB_TX_FLAGS_TSTAMP,
  				 (E1000_ADVTXD_MAC_TSTAMP));
  
patches/collateral-evolutions/network/84-ethernet/0009-igb_vlan_rx_vid.patch +4 -4
index 3c2d939..63d8658 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/in
 index 37e6062..6bf0a88 100644
 --- a/drivers/net/ethernet/intel/igb/igb_main.c
 +++ b/drivers/net/ethernet/intel/igb/igb_main.c
-@@ -164,10 +164,13 @@ static void igb_vlan_mode(struct net_dev
+@@ -163,10 +163,13 @@ static void igb_vlan_mode(struct net_dev
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
  static int igb_vlan_rx_add_vid(struct net_device *, __be16, u16);
  static int igb_vlan_rx_kill_vid(struct net_device *, __be16, u16);
@@ -18,7 +18,7 @@ index 37e6062..6bf0a88 100644
  static void igb_restore_vlan(struct igb_adapter *);
  static void igb_rar_set_qsel(struct igb_adapter *, u8 *, u32 , u8);
  static void igb_ping_all_vfs(struct igb_adapter *);
-@@ -7186,8 +7189,10 @@ static void igb_vlan_mode(struct net_dev
+@@ -7185,8 +7188,10 @@ static void igb_vlan_mode(struct net_dev
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
  static int igb_vlan_rx_add_vid(struct net_device *netdev,
  			       __be16 proto, u16 vid)
@@ -30,7 +30,7 @@ index 37e6062..6bf0a88 100644
  #endif
  {
  	struct igb_adapter *adapter = netdev_priv(netdev);
-@@ -7202,15 +7207,19 @@ static int igb_vlan_rx_add_vid(struct ne
+@@ -7201,15 +7206,19 @@ static int igb_vlan_rx_add_vid(struct ne
  
  	set_bit(vid, adapter->active_vlans);
  
@@ -52,7 +52,7 @@ index 37e6062..6bf0a88 100644
  {
  	struct igb_adapter *adapter = netdev_priv(netdev);
  	struct e1000_hw *hw = &adapter->hw;
-@@ -7226,7 +7235,9 @@ static int igb_vlan_rx_kill_vid(struct n
+@@ -7225,7 +7234,9 @@ static int igb_vlan_rx_kill_vid(struct n
  
  	clear_bit(vid, adapter->active_vlans);
  
patches/collateral-evolutions/network/84-ethernet/0010-igb_ethtool_ops.patch +5 -5
index aa50dd1..c847a4c 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet
 index 3cf9600..5e519ce 100644
 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
 +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
-@@ -2817,6 +2817,7 @@ static void igb_ethtool_complete(struct
+@@ -2816,6 +2816,7 @@ static void igb_ethtool_complete(struct
  	pm_runtime_put(&adapter->pdev->dev);
  }
  
@@ -10,7 +10,7 @@ index 3cf9600..5e519ce 100644
  static u32 igb_get_rxfh_indir_size(struct net_device *netdev)
  {
  	return IGB_RETA_SIZE;
-@@ -2832,6 +2833,7 @@ static int igb_get_rxfh_indir(struct net
+@@ -2831,6 +2832,7 @@ static int igb_get_rxfh_indir(struct net
  
  	return 0;
  }
@@ -18,7 +18,7 @@ index 3cf9600..5e519ce 100644
  
  void igb_write_rss_indir_tbl(struct igb_adapter *adapter)
  {
-@@ -2868,6 +2870,7 @@ void igb_write_rss_indir_tbl(struct igb_
+@@ -2867,6 +2869,7 @@ void igb_write_rss_indir_tbl(struct igb_
  	}
  }
  
@@ -26,7 +26,7 @@ index 3cf9600..5e519ce 100644
  static int igb_set_rxfh_indir(struct net_device *netdev, const u32 *indir)
  {
  	struct igb_adapter *adapter = netdev_priv(netdev);
-@@ -2900,6 +2903,7 @@ static int igb_set_rxfh_indir(struct net
+@@ -2899,6 +2902,7 @@ static int igb_set_rxfh_indir(struct net
  
  	return 0;
  }
@@ -34,7 +34,7 @@ index 3cf9600..5e519ce 100644
  
  static unsigned int igb_max_channels(struct igb_adapter *adapter)
  {
-@@ -3022,9 +3026,11 @@ static const struct ethtool_ops igb_etht
+@@ -3021,9 +3025,11 @@ static const struct ethtool_ops igb_etht
  	.get_module_info	= igb_get_module_info,
  	.get_module_eeprom	= igb_get_module_eeprom,
  #endif
patches/collateral-evolutions/network/84-ethernet/0011-igb_ethtool_ops.patch +3 -3
index 81fc2df..cd0f6d4 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet
 index 5e519ce..9f61f1d 100644
 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
 +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
-@@ -2413,6 +2413,7 @@ static int igb_get_ts_info(struct net_de
+@@ -2412,6 +2412,7 @@ static int igb_get_ts_info(struct net_de
  }
  #endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0) */
  
@@ -10,7 +10,7 @@ index 5e519ce..9f61f1d 100644
  static int igb_get_rss_hash_opts(struct igb_adapter *adapter,
  				 struct ethtool_rxnfc *cmd)
  {
-@@ -2591,6 +2592,7 @@ static int igb_set_rxnfc(struct net_devi
+@@ -2590,6 +2591,7 @@ static int igb_set_rxnfc(struct net_devi
  
  	return ret;
  }
@@ -18,7 +18,7 @@ index 5e519ce..9f61f1d 100644
  
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
  static int igb_get_eee(struct net_device *netdev, struct ethtool_eee *edata)
-@@ -3016,8 +3018,10 @@ static const struct ethtool_ops igb_etht
+@@ -3015,8 +3017,10 @@ static const struct ethtool_ops igb_etht
  #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
  	.get_ts_info		= igb_get_ts_info,
  #endif
patches/collateral-evolutions/network/84-ethernet/0012-igb_ndo_set_vf_spoofchk.patch +5 -5
index 64dd97b..c309699 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/in
 index 35ac7d8..e609f71 100644
 --- a/drivers/net/ethernet/intel/igb/igb_main.c
 +++ b/drivers/net/ethernet/intel/igb/igb_main.c
-@@ -182,8 +182,10 @@ static int igb_ndo_set_vf_mac(struct net
+@@ -181,8 +181,10 @@ static int igb_ndo_set_vf_mac(struct net
  static int igb_ndo_set_vf_vlan(struct net_device *netdev,
  			       int vf, u16 vlan, u8 qos);
  static int igb_ndo_set_vf_bw(struct net_device *netdev, int vf, int tx_rate);
@@ -13,7 +13,7 @@ index 35ac7d8..e609f71 100644
  static int igb_ndo_get_vf_config(struct net_device *netdev, int vf,
  				 struct ifla_vf_info *ivi);
  static void igb_check_vf_rate_limit(struct igb_adapter *);
-@@ -2057,7 +2059,9 @@ static const struct net_device_ops igb_n
+@@ -2056,7 +2058,9 @@ static const struct net_device_ops igb_n
  	.ndo_set_vf_mac		= igb_ndo_set_vf_mac,
  	.ndo_set_vf_vlan	= igb_ndo_set_vf_vlan,
  	.ndo_set_vf_tx_rate	= igb_ndo_set_vf_bw,
@@ -23,7 +23,7 @@ index 35ac7d8..e609f71 100644
  	.ndo_get_vf_config	= igb_ndo_get_vf_config,
  #ifdef CONFIG_NET_POLL_CONTROLLER
  	.ndo_poll_controller	= igb_netpoll,
-@@ -7855,6 +7859,7 @@ static int igb_ndo_set_vf_bw(struct net_
+@@ -7854,6 +7858,7 @@ static int igb_ndo_set_vf_bw(struct net_
  	return 0;
  }
  
@@ -31,7 +31,7 @@ index 35ac7d8..e609f71 100644
  static int igb_ndo_set_vf_spoofchk(struct net_device *netdev, int vf,
  				   bool setting)
  {
-@@ -7881,6 +7886,7 @@ static int igb_ndo_set_vf_spoofchk(struc
+@@ -7880,6 +7885,7 @@ static int igb_ndo_set_vf_spoofchk(struc
  	adapter->vf_data[vf].spoofchk_enabled = setting;
  	return E1000_SUCCESS;
  }
@@ -39,7 +39,7 @@ index 35ac7d8..e609f71 100644
  
  static int igb_ndo_get_vf_config(struct net_device *netdev,
  				 int vf, struct ifla_vf_info *ivi)
-@@ -7893,7 +7899,9 @@ static int igb_ndo_get_vf_config(struct
+@@ -7892,7 +7898,9 @@ static int igb_ndo_get_vf_config(struct
  	ivi->tx_rate = adapter->vf_data[vf].tx_rate;
  	ivi->vlan = adapter->vf_data[vf].pf_vlan;
  	ivi->qos = adapter->vf_data[vf].pf_qos;
patches/collateral-evolutions/network/84-ethernet/0013-igb_hwmon.patch +3 -3
index fd85a01..f164ab8 100644
@@ -2,7 +2,7 @@ diff --git a/drivers/net/ethernet/intel/igb/igb_hwmon.c b/drivers/net/ethernet/i
 index fdf2b82..99507de 100644
 --- a/drivers/net/ethernet/intel/igb/igb_hwmon.c
 +++ b/drivers/net/ethernet/intel/igb/igb_hwmon.c
-@@ -177,7 +177,9 @@ int igb_sysfs_init(struct igb_adapter *a
+@@ -176,7 +176,9 @@ int igb_sysfs_init(struct igb_adapter *a
  {
  	struct hwmon_buff *igb_hwmon;
  	struct i2c_client *client;
@@ -12,7 +12,7 @@ index fdf2b82..99507de 100644
  	unsigned int i;
  	int rc = 0;
  
-@@ -234,6 +236,7 @@ int igb_sysfs_init(struct igb_adapter *a
+@@ -233,6 +235,7 @@ int igb_sysfs_init(struct igb_adapter *a
  	igb_hwmon->groups[0] = &igb_hwmon->group;
  	igb_hwmon->group.attrs = igb_hwmon->attrs;
  
@@ -20,7 +20,7 @@ index fdf2b82..99507de 100644
  	hwmon_dev = devm_hwmon_device_register_with_groups(&adapter->pdev->dev,
  							   client->name,
  							   igb_hwmon,
-@@ -246,6 +249,7 @@ int igb_sysfs_init(struct igb_adapter *a
+@@ -245,6 +248,7 @@ int igb_sysfs_init(struct igb_adapter *a
  	goto exit;
  
  err:
Signature · 1 line
1.8.5.3
#28 lore raw

PATCH 25/27 backports: backports: reshufle the threaded IRQ backport series

In reply to Luis R. Rodriguez

This reshufles the patches that deal with backported threaded IRQ support. The purpose of this reshufle is to try get them into a consistent style. Only the b43 driver takes a major change in that the the workqueue used for threading work is now also destroyed upon its b43_wireless_core_stop() call. This change was tested by pkgadd from #linux-wireless on b43 on an older kernel. The b43 driver just fails to unload but that issue was present before this change.

The non-general changes to the b43 driver are also moved out to a helper patch to help separate the general collateral evolution changes from driver specific required changes.

Cc Peter Senna <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Gilles Muller <[email protected]>
---
 .../drivers_net_wireless_b43_b43.patch             | 14 ++++----
 .../drivers_net_wireless_b43_main.patch            | 37 +++++++++-----------
 ...rivers_net_wireless_iwlwifi_pcie_internal.patch | 14 ++++----
 .../drivers_net_wireless_ti_wlcore_main.patch      | 39 ++++++++--------------
 ...drivers_net_wireless_ti_wlcore_main_extra.patch | 21 ++++++++++++
 5 files changed, 64 insertions(+), 61 deletions(-)
 create mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main_extra.patch
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_b43.patch +7 -7
index 8889d23..43d1672 100644
@@ -1,12 +1,12 @@
 --- a/drivers/net/wireless/b43/b43.h
 +++ b/drivers/net/wireless/b43/b43.h
-@@ -872,6 +872,9 @@ struct b43_wldev {
- 	unsigned int tx_count;
- 	unsigned int rx_count;
- #endif
+@@ -805,6 +805,9 @@ enum {
+ 
+ /* Data structure for one wireless device (802.11 core) */
+ struct b43_wldev {
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
 +	struct compat_threaded_irq irq_compat;
 +#endif
- };
- 
- /* Data structure for the WLAN parts (802.11 cores) of the b43 chip. */
+ 	struct b43_bus_dev *dev;
+ 	struct b43_wl *wl;
+ 	/* a completion event structure needed if this call is asynchronous */
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_main.patch +15 -22
index d8c85d4..70e1b4b 100644
@@ -1,45 +1,38 @@
 --- a/drivers/net/wireless/b43/main.c
 +++ b/drivers/net/wireless/b43/main.c
-@@ -4243,8 +4243,13 @@ redo:
+@@ -4243,8 +4243,17 @@ redo:
  	if (b43_bus_host_is_sdio(dev->dev)) {
  		b43_sdio_free_irq(dev);
  	} else {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
-+		compat_synchronize_threaded_irq(&dev->irq_compat);
-+		compat_free_threaded_irq(&dev->irq_compat);
-+#else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
  		synchronize_irq(dev->dev->irq);
++#else
++		compat_synchronize_threaded_irq(&dev->irq_compat);
++#endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
  		free_irq(dev->dev->irq, dev);
++#else
++		compat_free_threaded_irq(&dev->irq_compat);
++		compat_destroy_threaded_irq(&dev->irq_compat);
 +#endif
  	}
  	mutex_lock(&wl->mutex);
  	dev = wl->current_dev;
-@@ -4290,9 +4295,17 @@ static int b43_wireless_core_start(struc
+@@ -4290,9 +4299,17 @@ static int b43_wireless_core_start(struc
  			goto out;
  		}
  	} else {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+ 		err = request_threaded_irq(dev->dev->irq, b43_interrupt_handler,
+ 					   b43_interrupt_thread_handler,
+ 					   IRQF_SHARED, KBUILD_MODNAME, dev);
++#else
 +		err = compat_request_threaded_irq(&dev->irq_compat,
 +						  dev->dev->irq,
 +						  b43_interrupt_handler,
 +						  b43_interrupt_thread_handler,
 +						  IRQF_SHARED, KBUILD_MODNAME, dev);
-+#else
- 		err = request_threaded_irq(dev->dev->irq, b43_interrupt_handler,
- 					   b43_interrupt_thread_handler,
- 					   IRQF_SHARED, KBUILD_MODNAME, dev);
 +#endif
  		if (err) {
  			b43err(dev->wl, "Cannot request IRQ-%d\n",
  			       dev->dev->irq);
-@@ -5123,6 +5136,10 @@ static int b43_setup_bands(struct b43_wl
- 
- static void b43_wireless_core_detach(struct b43_wldev *dev)
- {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
-+	if (dev->dev->sdev->bus->bustype != SSB_BUSTYPE_SDIO)
-+		compat_destroy_threaded_irq(&dev->irq_compat);
-+#endif
- 	/* We release firmware that late to not be required to re-request
- 	 * is all the time when we reinit the core. */
- 	b43_release_firmware(dev);
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_internal.patch +7 -7
index b12b28d..666f521 100644
@@ -1,12 +1,12 @@
 --- a/drivers/net/wireless/iwlwifi/pcie/internal.h
 +++ b/drivers/net/wireless/iwlwifi/pcie/internal.h
-@@ -312,6 +312,9 @@ struct iwl_trans_pcie {
- 	/*protect hw register */
- 	spinlock_t reg_lock;
- 	bool cmd_in_flight;
+@@ -265,6 +265,9 @@ iwl_pcie_get_scratchbuf_dma(struct iwl_t
+  * @cmd_in_flight: true when we have a host command in flight
+  */
+ struct iwl_trans_pcie {
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
 +	struct compat_threaded_irq irq_compat;
 +#endif
- };
- 
- #define IWL_TRANS_GET_PCIE_TRANS(_iwl_trans) \
+ 	struct iwl_rxq rxq;
+ 	struct work_struct rx_replenish;
+ 	struct iwl_trans *trans;
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.patch +14 -25
index b3089b1..603bd0b 100644
@@ -1,54 +1,43 @@
 --- a/drivers/net/wireless/ti/wlcore/main.c
 +++ b/drivers/net/wireless/ti/wlcore/main.c
-@@ -6081,15 +6081,27 @@ static void wlcore_nvs_cb(const struct f
- 	wl->platform_quirks = pdata->platform_quirks;
- 	wl->if_ops = pdev_data->if_ops;
- 
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
-+	irqflags = IRQF_TRIGGER_RISING;
-+	hardirq_fn = wlcore_hardirq;
-+#else
- 	if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) {
- 		irqflags = IRQF_TRIGGER_RISING;
- 		hardirq_fn = wlcore_hardirq;
- 	} else {
+@@ -6088,8 +6088,15 @@ static void wlcore_nvs_cb(const struct f
  		irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
  	}
-+#endif
  
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+ 	ret = request_threaded_irq(wl->irq, hardirq_fn, wlcore_irq,
+ 				   irqflags, pdev->name, wl);
++#else
 +	ret = compat_request_threaded_irq(&wl->irq_compat, wl->irq,
 +					  hardirq_fn, wlcore_irq,
 +					  irqflags,
 +					  pdev->name, wl);
-+#else
- 	ret = request_threaded_irq(wl->irq, hardirq_fn, wlcore_irq,
- 				   irqflags, pdev->name, wl);
 +#endif
  	if (ret < 0) {
  		wl1271_error("request_irq() failed: %d", ret);
  		goto out_free_nvs;
-@@ -6135,7 +6147,11 @@ out_unreg:
+@@ -6135,7 +6142,12 @@ out_unreg:
  	wl1271_unregister_hw(wl);
  
  out_irq:
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
-+	compat_free_threaded_irq(&wl->irq_compat);
-+#else
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
  	free_irq(wl->irq, wl);
++#else
++	compat_free_threaded_irq(&wl->irq_compat);
++	compat_destroy_threaded_irq(&wl->irq_compat);
 +#endif
  
  out_free_nvs:
  	kfree(wl->nvs);
-@@ -6181,7 +6197,12 @@ int wlcore_remove(struct platform_device
+@@ -6181,7 +6193,12 @@ int wlcore_remove(struct platform_device
  		disable_irq_wake(wl->irq);
  	}
  	wl1271_unregister_hw(wl);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+ 	free_irq(wl->irq, wl);
++#else
 +	compat_free_threaded_irq(&wl->irq_compat);
 +	compat_destroy_threaded_irq(&wl->irq_compat);
-+#else
- 	free_irq(wl->irq, wl);
 +#endif
  	wlcore_free_hw(wl);
  
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main_extra.patch new file +21 -0
new file mode 100644
index 0000000..c320242
@@ -0,0 +1,21 @@
+--- a/drivers/net/wireless/ti/wlcore/main.c
++++ b/drivers/net/wireless/ti/wlcore/main.c
+@@ -6080,6 +6080,10 @@ static void wlcore_nvs_cb(const struct f
+ 	wl->irq = platform_get_irq(pdev, 0);
+ 	wl->platform_quirks = pdata->platform_quirks;
+ 	wl->if_ops = pdev_data->if_ops;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
++	irqflags = IRQF_TRIGGER_RISING;
++	hardirq_fn = wlcore_hardirq;
++#else
+ 
+ 	if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) {
+ 		irqflags = IRQF_TRIGGER_RISING;
+@@ -6087,6 +6091,7 @@ static void wlcore_nvs_cb(const struct f
+ 	} else {
+ 		irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
+ 	}
++#endif
+ 
+ 	ret = request_threaded_irq(wl->irq, hardirq_fn, wlcore_irq,
+ 				   irqflags, pdev->name, wl);
Signature · 1 line
1.8.5.3
#29 lore raw

PATCH 26/27 backports: convert threaded IRQ suport into an SmPL patch

In reply to Luis R. Rodriguez

We leave two patches under the 09-threaded-irq series, but there are six things worth mentioning on this commit that are important. I'll clarify that this SmPL port is simply done as a proof of concept on testing the complexity of a backport for with Coccinelle, this backport is only relevant for kernels older than 2.6.31 which at this point is ancient and we should probably stop caring for soon.

1) patches/collateral-evolutions/network/0015-threaded-irq.cocci

We rename the collateral evolution backport from the 09-threaded-irq as this backport is now formalized and properly atomically split up. We use 4 digit prefixes for formalized and atomically split up collateral evolutions. The rest of the patch series that do not have 4 digits imply that those series could use some love to be formally split up atomically.

2) 0015-threaded-irq/

We keep a directory for backported collateral evolutions for either legacy backports without SmPL Coccinelle patches *or* for series that are addressed with SmPL but that had some shortcomings with Coccinelle that we are looking to address. Legacy backports also had an INFO file in its directory, we keep it around for now for this series as we have one legacy patch lingering around still but since Coccinelle lets us put comments on top and the series is for all drivers we can just rely on the comment section of an SmPL patch for this as patches get translated.

3) Rename of 09-threaded-irq/drivers_net_wireless_ti_wlcore_main_extra.patch

    to
    0016-threaded-irq-one-shot.patch

This patch is kept as it deals with driver specific IRQ changes which are completely unrelated to the 09-threaded-irq series but that we had tucked under in the older legacy backport. Because of this we make emphasis by moving out out under the series. This can be generalized as another backport series if other drivers wish to backport.

This new seires backports commit b25c340c1 added by Thomas through kernel v2.6.32 which added support for IRQF_ONESHOT. This lets drivers that use threaded IRQ support to request that the IRQ is not masked after the hard interrupt handler as this requires device access in hard IRQ context and for buses such as i2c and spi this at times is not possible.

Note that the TI driver uses this when a platform quirk with WL12XX_PLATFORM_QUIRK_EDGE_IRQ is detected. In retrospect this quirk does not seem backportable unless IRQF_ONESHOT is really not a requirement, but desired. If WL12XX_PLATFORM_QUIRK_EDGE_IRQ is indeed a requirement for IRQF_ONESHOT then we should not probe complete. Its unclear if this is a universal thing or not.

mcgrof@ergon ~/linux-next (git::master)$ git describe --contains b25c340c1 v2.6.32-rc1~722^2~3

4) 0015-threaded-irq/drivers_net_wireless_iwlwifi_iwl-trans.patch

A data structure change to struct iwl_trans is not being done by Coccinelle given that the driver's Makefile for iwlwifi uses this for its includes:

ccflags-y += -D__CHECK_ENDIAN__ -I$(src)

Coccinelle doesn't pick up on this even if we use --recursive-includes. This issue has been reported. An interesting thing about this is that struct iwl_trans was *not* used before this patch which is why you see the removal of the file drivers_net_wireless_iwlwifi_pcie_internal.patch and as a replacement have added drivers_net_wireless_iwlwifi_iwl-trans.patch. What happened is Coccinelle is consistent and the change, as expressed in grammar, which reveleas that we were *not* consistent with our manual backport! The older backport still worked though as it did not really matter what data structure got changed so long as its an internal data structure. This also means this backport could be modified to use a generic backport data structure, which we don't yet have but could be a good idea to stuff in general backport data structure extensions, which we typically have not been able to address through backports unless we use #ifdef's. This would however require some sort of driver specific backport_device_alloc(), backport_device_init() and a respective backport_device_free(). The overhead would need to be considered unless some fancy trickery is introduced. Since 09-threaded-irq is a backport for kernels >= 2.6.31 I don't recommend we consider this now. The effort for using SmPL for this series was done simply as a way to demonstrate the power of Coccinelle.

5) Space fixes for extra code on Coccinelle modified branches:

This SmPL patch does some space modifications on the wil6210 [0], the reason could be that Coccinelle is introducing some code on a branch and when it detects this it puts the code it is adding with braces. This is another great feature of Coccinelle but the space fixes that Julia has completed may not be treated in that situation yet.

6) This requires at least spatch 1.0.0-rc20.

[0] hunk in question shown below:

@@ -499,11 +518,21 @@ int wil6210_init_irq(struct wil6210_priv *wil, int irq)
int rc;
if (wil->n_msi == 3)
rc = wil6210_request_3msi(wil, irq);
- else
+ else {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
rc = request_threaded_irq(irq, wil6210_hardirq,
- wil6210_thread_irq,
- wil->n_msi ? 0 : IRQF_SHARED,
- WIL_NAME, wil);
+ wil6210_thread_irq,
+ wil->n_msi ? 0 : IRQF_SHARED,
+ WIL_NAME, wil);
+#else
+ rc = compat_request_threaded_irq(&wil->irq_compat, irq,
+ wil6210_hardirq,
+ wil6210_thread_irq,
+ wil->n_msi ? 0 :
IRQF_SHARED,
+ WIL_NAME,
+ wil);
+#endif
+ }
if (rc)
return rc;

Code generation time:

real    1m6.023s
user    10m0.276s
sys     0m26.196s
$ time ckmake --allyesconfig
1   2.6.25              [  OK  ]
2   2.6.26              [  OK  ]
3   2.6.27              [  OK  ]
4   2.6.28              [  OK  ]
5   2.6.29              [  OK  ]
6   2.6.30              [  OK  ]
7   2.6.31              [  OK  ]
8   2.6.32              [  OK  ]
9   2.6.33              [  OK  ]
10  2.6.34              [  OK  ]
11  2.6.35              [  OK  ]
12  2.6.36              [  OK  ]
13  2.6.37              [  OK  ]
14  2.6.38              [  OK  ]
15  2.6.39              [  OK  ]
16  3.0.101             [  OK  ]
17  3.1.10              [  OK  ]
18  3.2.54              [  OK  ]
19  3.3.8               [  OK  ]
20  3.4.79              [  OK  ]
21  3.5.7               [  OK  ]
22  3.6.11              [  OK  ]
23  3.7.10              [  OK  ]
24  3.8.13              [  OK  ]
25  3.9.11              [  OK  ]
26  3.10.29             [  OK  ]
27  3.11.10             [  OK  ]
28  3.12.10             [  OK  ]
29  3.13.2              [  OK  ]
30  3.14-rc1            [  OK  ]
real    41m12.052s
user    1125m30.996s
sys     151m39.096s
Cc Peter Senna <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Gilles Muller <[email protected]>
---
 .../network/0015-threaded-irq.cocci                | 75 ++++++++++++++++++++++
 .../{09-threaded-irq => 0015-threaded-irq}/INFO    |  3 +-
 .../drivers_net_wireless_iwlwifi_iwl-trans.patch   | 12 ++++
 .../network/0016-threaded-irq-one-shot.patch       | 38 +++++++++++
 .../drivers_net_wireless_b43_b43.patch             | 12 ----
 .../drivers_net_wireless_b43_main.patch            | 38 -----------
 ...rivers_net_wireless_iwlwifi_pcie_internal.patch | 12 ----
 .../drivers_net_wireless_iwlwifi_pcie_trans.patch  | 41 ------------
 .../drivers_net_wireless_ti_wlcore_main.patch      | 44 -------------
 ...drivers_net_wireless_ti_wlcore_main_extra.patch | 21 ------
 .../drivers_net_wireless_ti_wlcore_wlcore.patch    | 13 ----
 11 files changed, 126 insertions(+), 183 deletions(-)
 create mode 100644 patches/collateral-evolutions/network/0015-threaded-irq.cocci
 rename patches/collateral-evolutions/network/{09-threaded-irq => 0015-threaded-irq}/INFO (78%)
 create mode 100644 patches/collateral-evolutions/network/0015-threaded-irq/drivers_net_wireless_iwlwifi_iwl-trans.patch
 create mode 100644 patches/collateral-evolutions/network/0016-threaded-irq-one-shot.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_b43.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_main.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_internal.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_trans.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main_extra.patch
 delete mode 100644 patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_wlcore.patch
patches/collateral-evolutions/network/0015-threaded-irq.cocci new file +75 -0
new file mode 100644
index 0000000..9cc668d
@@ -0,0 +1,75 @@
+/*
+Backports threaded IRQ support
+
+The 2.6.31 kernel introduced threaded IRQ support, in order to
+backport threaded IRSs on older kernels we built our own struct
+compat_threaded_irq to queue_work() onto it as the kernel thread
+will be running the thread in process context as well.
+
+For now each driver's private data structure is modified to add
+the their own struct compat_threaded_irq, and that is used by
+the backports module to queue_work() onto it. We can likely avoid
+having to backport this feature by requiring to modify the private
+driver's data structure by relying on an internal worker thread
+within the backports module, this should be revised later.
+*/
+
+@ threaded_irq @
+identifier ret;
+expression irq, irq_handler, irq_thread_handler, flags, name;
+type T;
+T *private;
+@@
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+ret = request_threaded_irq(irq,
+			   irq_handler,
+			   irq_thread_handler,
+			   flags,
+			   name,
+			   private);
++#else
++ret = compat_request_threaded_irq(&private->irq_compat,
++				   irq,
++				   irq_handler,
++				   irq_thread_handler,
++				   flags,
++				   name,
++				   private);
++#endif
+
+@ sync_irq depends on threaded_irq @
+expression irq;
+type threaded_irq.T;
+T *threaded_irq.private;
+@@
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+synchronize_irq(irq);
++#else
++compat_synchronize_threaded_irq(&private->irq_compat);
++#endif
+
+@ free depends on threaded_irq @
+expression irq, dev;
+type threaded_irq.T;
+T *threaded_irq.private;
+@@
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
+free_irq(irq, dev);
++#else
++compat_free_threaded_irq(&private->irq_compat);
++compat_destroy_threaded_irq(&dev->irq_compat);
++#endif
+
+@ modify_private_header depends on threaded_irq @
+type threaded_irq.T;
+@@
+
+T {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++      struct compat_threaded_irq irq_compat;
++#endif
+...
+};
patches/collateral-evolutions/network/0015-threaded-irq/INFO renamed from patches/collateral-evolutions/network/09-threaded-irq/INFO +1 -2
similarity index 78%
rename from patches/collateral-evolutions/network/09-threaded-irq/INFO
rename to patches/collateral-evolutions/network/0015-threaded-irq/INFO
index 3da69ef..fe0845a 100644
@@ -1,6 +1,5 @@
 The 2.6.31 kernel has threaded IRQ support and b43 is the first
 wireless driver that makes use of it. To support threaded IRSs
 on older kernels we built our own struct compat_threaded_irq
-to queue_work() onto it as the kernel thread be running the
+to queue_work() onto it as the kernel thread will running the
 thread in process context as well.
-
patches/collateral-evolutions/network/0015-threaded-irq/drivers_net_wireless_iwlwifi_iwl-trans.patch new file +12 -0
new file mode 100644
index 0000000..519645a
@@ -0,0 +1,12 @@
+--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
++++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
+@@ -549,6 +549,9 @@ enum iwl_trans_state {
+  * @dflt_pwr_limit: default power limit fetched from the platform (ACPI)
+  */
+ struct iwl_trans {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
++	struct compat_threaded_irq irq_compat;
++#endif
+ 	const struct iwl_trans_ops *ops;
+ 	struct iwl_op_mode *op_mode;
+ 	const struct iwl_cfg *cfg;
patches/collateral-evolutions/network/0016-threaded-irq-one-shot.patch new file +38 -0
new file mode 100644
index 0000000..c43995e
@@ -0,0 +1,38 @@
+This backports commit b25c340c1 added by Thomas through kernel v2.6.32
+which added support for IRQF_ONESHOT. This lets drivers that use
+threaded IRQ support to request that the IRQ is not masked after the
+hard interrupt handler as this requires access times devices in hard
+IRQ context and for buses such as i2c and spi this at times is not
+possible.
+
+Note that the TI driver reports this as a platform quirk with
+WL12XX_PLATFORM_QUIRK_EDGE_IRQ. In retrospect this quirk does not
+seem backportable unless IRQF_ONESHOT is really not a requirement,
+but desired. If WL12XX_PLATFORM_QUIRK_EDGE_IRQ is indeed a requirement
+for IRQF_ONESHOT then we should not net probe complete. Its unclear
+if this is a universal thing or not.
+
+mcgrof@ergon ~/linux-next (git::master)$ git describe --contains b25c340c1
+v2.6.32-rc1~722^2~3
+
+--- a/drivers/net/wireless/ti/wlcore/main.c
++++ b/drivers/net/wireless/ti/wlcore/main.c
+@@ -6080,6 +6080,10 @@ static void wlcore_nvs_cb(const struct f
+ 	wl->irq = platform_get_irq(pdev, 0);
+ 	wl->platform_quirks = pdata->platform_quirks;
+ 	wl->if_ops = pdev_data->if_ops;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
++	irqflags = IRQF_TRIGGER_RISING;
++	hardirq_fn = wlcore_hardirq;
++#else
+ 
+ 	if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) {
+ 		irqflags = IRQF_TRIGGER_RISING;
+@@ -6087,6 +6091,7 @@ static void wlcore_nvs_cb(const struct f
+ 	} else {
+ 		irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
+ 	}
++#endif
+ 
+ 	ret = request_threaded_irq(wl->irq, hardirq_fn, wlcore_irq,
+ 				   irqflags, pdev->name, wl);
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_b43.patch deleted +0 -12
deleted file mode 100644
index 43d1672..0000000
@@ -1,12 +0,0 @@
---- a/drivers/net/wireless/b43/b43.h
-+++ b/drivers/net/wireless/b43/b43.h
-@@ -805,6 +805,9 @@ enum {
- 
- /* Data structure for one wireless device (802.11 core) */
- struct b43_wldev {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
-+	struct compat_threaded_irq irq_compat;
-+#endif
- 	struct b43_bus_dev *dev;
- 	struct b43_wl *wl;
- 	/* a completion event structure needed if this call is asynchronous */
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_b43_main.patch deleted +0 -38
deleted file mode 100644
index 70e1b4b..0000000
@@ -1,38 +0,0 @@
---- a/drivers/net/wireless/b43/main.c
-+++ b/drivers/net/wireless/b43/main.c
-@@ -4243,8 +4243,17 @@ redo:
- 	if (b43_bus_host_is_sdio(dev->dev)) {
- 		b43_sdio_free_irq(dev);
- 	} else {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
- 		synchronize_irq(dev->dev->irq);
-+#else
-+		compat_synchronize_threaded_irq(&dev->irq_compat);
-+#endif
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
- 		free_irq(dev->dev->irq, dev);
-+#else
-+		compat_free_threaded_irq(&dev->irq_compat);
-+		compat_destroy_threaded_irq(&dev->irq_compat);
-+#endif
- 	}
- 	mutex_lock(&wl->mutex);
- 	dev = wl->current_dev;
-@@ -4290,9 +4299,17 @@ static int b43_wireless_core_start(struc
- 			goto out;
- 		}
- 	} else {
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
- 		err = request_threaded_irq(dev->dev->irq, b43_interrupt_handler,
- 					   b43_interrupt_thread_handler,
- 					   IRQF_SHARED, KBUILD_MODNAME, dev);
-+#else
-+		err = compat_request_threaded_irq(&dev->irq_compat,
-+						  dev->dev->irq,
-+						  b43_interrupt_handler,
-+						  b43_interrupt_thread_handler,
-+						  IRQF_SHARED, KBUILD_MODNAME, dev);
-+#endif
- 		if (err) {
- 			b43err(dev->wl, "Cannot request IRQ-%d\n",
- 			       dev->dev->irq);
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_internal.patch deleted +0 -12
deleted file mode 100644
index 666f521..0000000
@@ -1,12 +0,0 @@
---- a/drivers/net/wireless/iwlwifi/pcie/internal.h
-+++ b/drivers/net/wireless/iwlwifi/pcie/internal.h
-@@ -265,6 +265,9 @@ iwl_pcie_get_scratchbuf_dma(struct iwl_t
-  * @cmd_in_flight: true when we have a host command in flight
-  */
- struct iwl_trans_pcie {
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
-+	struct compat_threaded_irq irq_compat;
-+#endif
- 	struct iwl_rxq rxq;
- 	struct work_struct rx_replenish;
- 	struct iwl_trans *trans;
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_iwlwifi_pcie_trans.patch deleted +0 -41

41 lines not on this page · raw message

patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main.patch deleted +0 -44

44 lines not on this page · raw message

patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_main_extra.patch deleted +0 -21
deleted file mode 100644
index c320242..0000000
@@ -1,21 +0,0 @@
---- a/drivers/net/wireless/ti/wlcore/main.c
-+++ b/drivers/net/wireless/ti/wlcore/main.c
-@@ -6080,6 +6080,10 @@ static void wlcore_nvs_cb(const struct f
- 	wl->irq = platform_get_irq(pdev, 0);
- 	wl->platform_quirks = pdata->platform_quirks;
- 	wl->if_ops = pdev_data->if_ops;
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
-+	irqflags = IRQF_TRIGGER_RISING;
-+	hardirq_fn = wlcore_hardirq;
-+#else
- 
- 	if (wl->platform_quirks & WL12XX_PLATFORM_QUIRK_EDGE_IRQ) {
- 		irqflags = IRQF_TRIGGER_RISING;
-@@ -6087,6 +6091,7 @@ static void wlcore_nvs_cb(const struct f
- 	} else {
- 		irqflags = IRQF_TRIGGER_HIGH | IRQF_ONESHOT;
- 	}
-+#endif
- 
- 	ret = request_threaded_irq(wl->irq, hardirq_fn, wlcore_irq,
- 				   irqflags, pdev->name, wl);
patches/collateral-evolutions/network/09-threaded-irq/drivers_net_wireless_ti_wlcore_wlcore.patch deleted +0 -13
deleted file mode 100644
index 29e1d1e..0000000
@@ -1,13 +0,0 @@
---- a/drivers/net/wireless/ti/wlcore/wlcore.h
-+++ b/drivers/net/wireless/ti/wlcore/wlcore.h
-@@ -178,7 +178,9 @@ struct wl1271 {
- 	bool initialized;
- 	struct ieee80211_hw *hw;
- 	bool mac80211_registered;
--
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
-+	struct compat_threaded_irq irq_compat;
-+#endif
- 	struct device *dev;
- 	struct platform_device *pdev;
- 
Signature · 1 line
1.8.5.3
#30 lore raw

Re: [PATCH 26/27] backports: convert threaded IRQ suport into an SmPL patch

Quoted 1 line · Luis R. Rodriguez

++ret = compat_request_threaded_irq(&private->irq_compat,

Whhy not go to backport namespace too?

johannes

#31 lore raw

Re: [PATCH 26/27] backports: convert threaded IRQ suport into an SmPL patch

Quoted 5 lines · Johannes Berg
Quoted 1 line · Luis R. Rodriguez

++ret = compat_request_threaded_irq(&private->irq_compat,

Whhy not go to backport namespace too?

Sure, how about as a second patch?

Luis

#32 lore raw

Re: [PATCH 26/27] backports: convert threaded IRQ suport into an SmPL patch

Quoted 8 lines · Luis R. Rodriguez
Quoted 5 lines · Johannes Berg
Quoted 1 line · Luis R. Rodriguez

++ret = compat_request_threaded_irq(&private->irq_compat,

Whhy not go to backport namespace too?

Sure, how about as a second patch?

Sure, I was just wondering if there was a particular reason you didn't while you rewrote the whole thing anyway.

johannes

#33 lore raw

Re: [PATCH 26/27] backports: convert threaded IRQ suport into an SmPL patch

Quoted 4 lines · Johannes Berg
Quoted 3 lines · Luis R. Rodriguez
Quoted 2 lines · Johannes Berg

On Sat, 2014-04-05 at 05:41 -0700, Luis R. Rodriguez wrote:

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Quoted 1 line

++ret = compat_request_threaded_irq(&private->irq_compat,

Whhy not go to backport namespace too?

Sure, how about as a second patch?

Sure, I was just wondering if there was a particular reason you didn't while you rewrote the whole thing anyway.

Well this patch didn't touch the header files, just the usage, that's all.

Luis

#34 lore raw

PATCH 27/27 backports: enhance 0001-netdev_ops.cocci with data structure specifics

In reply to Luis R. Rodriguez

The 0001-netdev_ops.cocci is fine but is uses Expression which makes the interpretation loose. We can reduce the namespace of the change by using struct. We have to keep expression on the right hand side as that can even be macros.

For a full example test coverage of this change see the test netdev-ops github tree and run:

make test1

git checkout -f

make test2

The benefits should be clear, we are *not* modifying data structures that have similar names. This increases accuracy and security of our changes. The added run time penalty however is 50 seconds since we had to use --recursive-includes. The time penatly is worth it for the accuracy provided and since we'll likley need this flag elsewhere for other rules.

mcgrof@drvbp1 ~/backports (git::master)$ time \
	./gentree.py --clean --refresh \
	/home/mcgrof/linux-next \
	/home/mcgrof/build/next-20140311

Copy original source files ...
Apply patches ...
Modify Kconfig tree ...
Rewrite Makefiles and Kconfig files ...
Done!

real    1m56.339s
user    19m31.428s
sys     0m50.100s
1   2.6.25              [  OK  ]
2   2.6.26              [  OK  ]
3   2.6.27              [  OK  ]
4   2.6.28              [  OK  ]
5   2.6.29              [  OK  ]
6   2.6.30              [  OK  ]
7   2.6.31              [  OK  ]
8   2.6.32              [  OK  ]
9   2.6.33              [  OK  ]
10  2.6.34              [  OK  ]
11  2.6.35              [  OK  ]
12  2.6.36              [  OK  ]
13  2.6.37              [  OK  ]
14  2.6.38              [  OK  ]
15  2.6.39              [  OK  ]
16  3.0.101             [  OK  ]
17  3.1.10              [  OK  ]
18  3.2.54              [  OK  ]
19  3.3.8               [  OK  ]
20  3.4.79              [  OK  ]
21  3.5.7               [  OK  ]
22  3.6.11              [  OK  ]
23  3.7.10              [  OK  ]
24  3.8.13              [  OK  ]
25  3.9.11              [  OK  ]
26  3.10.29             [  OK  ]
27  3.11.10             [  OK  ]
28  3.12.10             [  OK  ]
29  3.13.2              [  OK  ]
30  3.14-rc1            [  OK  ]

[0] https://github.com/mcgrof/netdev-ops

Cc Peter Senna <[email protected]>
Cc Julia Lawall <[email protected]>
Cc Gilles Muller <[email protected]>
---
 lib/bpcoccinelle.py                                         | 1 +
 patches/collateral-evolutions/network/0001-netdev_ops.cocci | 8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)
lib/bpcoccinelle.py +1 -0
index 37307d2..a71f425 100644
@@ -32,6 +32,7 @@ class ExecutionErrorThread(CoccinelleError):
 def spatch(cocci_file, outdir,
            max_threads, thread_id, temp_dir, ret_q, extra_args=[]):
     cmd = ['spatch', '--sp-file', cocci_file, '--in-place',
+            '--recursive-includes',
             '--backup-suffix', '.cocci_backup', '--dir', '.']
 
     if (max_threads > 1):
patches/collateral-evolutions/network/0001-netdev_ops.cocci +4 -4
index f3d2e63..7c3d03a 100644
@@ -1,6 +1,6 @@
 @@
-expression dev;
-expression ops;
+struct net_device *dev;
+struct net_device_ops ops;
 @@
--dev->netdev_ops = ops;
-+netdev_attach_ops(dev, ops);
+-dev->netdev_ops = &ops;
++netdev_attach_ops(dev, &ops);
Signature · 1 line
1.8.5.3
#35 lore raw

cover backports: synch up to next-20140311

In reply to Luis R. Rodriguez

I'm back from Limbo! Thanks to Hauke for taking on backports while I was gone and to Johannes for taking on the first seires of SmPL patches. This series takes what I saw was pending on the backports mailing list and also puts out what I have been working on in collaboration with the folks at LIP6, in particular Julia Lawall, on the helping automate backport the Linux kernel further. I've put together a lenghty write up [0] of the series of changes that have been ongoing on the Linux backports project [1] which I hope can serve as both some form of ramp up education on using Coccinelle and writing grammar rules in Semantic Patch Language (SmPL) but also concerte evidence of how this technology can help us scale Linux and scale Linux backporting and extend the way we do automatic backporting.

This also puts us in synch with next-20140311 and I have some small changes which lets us create a linux-3.14.y branch ready for release provided I don't hear back with any issues or qualms observed. All this obviously goes compile tested against the last 30 Linux kernel releases.

At the Linux Collaboration Summit and on elsewhere I've been beeing poked about backports and if anyone was working on it and will continue to do so. There were some isues which I needed to get resolved, its all done and I'm back, now at SUSE. Now at SUSE I have other responsibilities but I'm going going to continue to extend backports but with a slightly different set of requirements and considerations, one of them being focusing on kernels >= 3.0. I understand there is still huge interest in upkeeping support for older kernels, I don't plan on removing those immediately but with your help I think we should strive to build consensus on only using kernels listed on kernel.org. The flexibility provided by Linux backports can hopefully be used to help persuade folks to abandon unsupported kernels. This won't happen overnight, but that's the goal.

If you want to test all this agains the latest master branch you can wget the all in one series of patches [2] and git am it.

[0] http://www.do-not-panic.com//2014/04/automatic-linux-kernel-backporting-with-coccinelle.html
[1] https://backports.wiki.kernel.org
[2] http://drvbp1.linux-foundation.org/~mcgrof/patches/backports/2014/05/synch-up-next-next-20140311.patch