backports.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/10] backports: misc fixes to improve support of 4.19
@ 2018-09-23 17:45 Hauke Mehrtens
  2018-09-23 17:45 ` [PATCH 01/10] backports: Remove ssb and bcma Hauke Mehrtens
                   ` (10 more replies)
  0 siblings, 11 replies; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

These patches are based on top of Luca's patches.

This was only basically tested that it compiles against kernel 4.4, 4.9 
and 4.14 on x86 and mips be in OpenWrt.

Hauke Mehrtens (10):
  backports: Remove ssb and bcma
  backports: Remove NFC support
  copy: Add crc32poly.h
  dependencies: Make RSI_COEX coexistence depend on kernel >= 4.17
  dependencies: Make WIL6210 depend on kernel >= 4.8
  dependencies: make hostap and atmel depend on kernel >= 4.18
  patches: make mt76 use skb_pad() instead of __skb_pad()
  patches: remove .coredump from struct driver for kernel < 4.16
  backports: Make netdev destructor spatch apply correctly again
  patches: Do not remove linux/kmemleak.h include

 backport/Kconfig.sources                           |  5 --
 backport/Makefile.kernel                           |  4 -
 .../linux/bcma/bcma_driver_chipcommon.h            | 23 ++++++
 backport/defconfigs/b43                            |  7 --
 backport/defconfigs/b43legacy                      |  5 --
 backport/defconfigs/brcmsmac                       |  2 -
 backport/defconfigs/nfc                            | 20 -----
 backport/defconfigs/wifi                           |  6 --
 copy-list                                          | 16 +---
 dependencies                                       | 66 +++------------
 patches/0013-fix-makefile-includes/mei_phy.patch   | 10 ---
 patches/0051-no-wakeup_path/ssb.patch              | 12 ---
 patches/0059-uuid-in-mei/nfc.patch                 | 32 --------
 patches/0061-termios_rwsem/nfc.patch               | 20 -----
 patches/0069-remove-of_irq/bcma.patch              | 24 ------
 patches/0079-netdev-destructor.cocci               | 32 ++++++++
 patches/0081-proto_ops-accept/nfc.patch            | 16 ----
 patches/0085-not-include-kmemleak.patch            | 11 ---
 patches/0088-coredump.cocci                        | 93 ++++++++++++++++++++++
 patches/0090-use-skb_pad.patch                     | 11 +++
 20 files changed, 169 insertions(+), 246 deletions(-)
 create mode 100644 backport/backport-include/linux/bcma/bcma_driver_chipcommon.h
 delete mode 100644 backport/defconfigs/nfc
 delete mode 100644 patches/0013-fix-makefile-includes/mei_phy.patch
 delete mode 100644 patches/0051-no-wakeup_path/ssb.patch
 delete mode 100644 patches/0059-uuid-in-mei/nfc.patch
 delete mode 100644 patches/0061-termios_rwsem/nfc.patch
 delete mode 100644 patches/0069-remove-of_irq/bcma.patch
 delete mode 100644 patches/0081-proto_ops-accept/nfc.patch
 delete mode 100644 patches/0085-not-include-kmemleak.patch
 create mode 100644 patches/0088-coredump.cocci
 create mode 100644 patches/0090-use-skb_pad.patch

-- 
2.11.0

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

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

* [PATCH 01/10] backports: Remove ssb and bcma
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-23 20:10   ` Johannes Berg
  2018-09-24 10:48   ` Johannes Berg
  2018-09-23 17:45 ` [PATCH 02/10] backports: Remove NFC support Hauke Mehrtens
                   ` (9 subsequent siblings)
  10 siblings, 2 replies; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

Use the versions shipped with the kernel instead.
bcma and ssb didn't change much in the last few years, most of the
changes were related to code only used on embedded devices. Removing
this reduces the number of parts we have to backport. b43, b43legacy and
brcmsmac work well with the in kernel version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/Kconfig.sources                           |  3 ---
 backport/Makefile.kernel                           |  2 --
 .../linux/bcma/bcma_driver_chipcommon.h            | 23 +++++++++++++++++++++
 backport/defconfigs/b43                            |  7 -------
 backport/defconfigs/b43legacy                      |  5 -----
 backport/defconfigs/brcmsmac                       |  2 --
 backport/defconfigs/wifi                           |  6 ------
 copy-list                                          |  5 -----
 dependencies                                       | 14 -------------
 patches/0051-no-wakeup_path/ssb.patch              | 12 -----------
 patches/0069-remove-of_irq/bcma.patch              | 24 ----------------------
 11 files changed, 23 insertions(+), 80 deletions(-)
 create mode 100644 backport/backport-include/linux/bcma/bcma_driver_chipcommon.h
 delete mode 100644 patches/0051-no-wakeup_path/ssb.patch
 delete mode 100644 patches/0069-remove-of_irq/bcma.patch

diff --git a/backport/Kconfig.sources b/backport/Kconfig.sources
index 93ca3cd8..3fc674e5 100644
--- a/backport/Kconfig.sources
+++ b/backport/Kconfig.sources
@@ -7,9 +7,6 @@ source "$BACKPORT_DIR/net/mac80211/Kconfig"
 source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
 source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
 
-source "$BACKPORT_DIR/drivers/ssb/Kconfig"
-source "$BACKPORT_DIR/drivers/bcma/Kconfig"
-
 source "$BACKPORT_DIR/net/nfc/Kconfig"
 
 source "$BACKPORT_DIR/drivers/usb/class/Kconfig"
diff --git a/backport/Makefile.kernel b/backport/Makefile.kernel
index a8aad0b1..e458f6d5 100644
--- a/backport/Makefile.kernel
+++ b/backport/Makefile.kernel
@@ -40,8 +40,6 @@ obj-y += compat/
 obj-$(CPTCFG_CFG80211) += net/wireless/
 obj-$(CPTCFG_MAC80211) += net/mac80211/
 obj-$(CPTCFG_WLAN) += drivers/net/wireless/
-obj-$(CPTCFG_SSB) += drivers/ssb/
-obj-$(CPTCFG_BCMA) += drivers/bcma/
 obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/
 obj-$(CPTCFG_NFC) += net/nfc/
 obj-$(CPTCFG_NFC) += drivers/nfc/
diff --git a/backport/backport-include/linux/bcma/bcma_driver_chipcommon.h b/backport/backport-include/linux/bcma/bcma_driver_chipcommon.h
new file mode 100644
index 00000000..47809853
--- /dev/null
+++ b/backport/backport-include/linux/bcma/bcma_driver_chipcommon.h
@@ -0,0 +1,23 @@
+#ifndef __BACKPORT_LINUX_BCMA_DRIVER_CC_H_
+#define __BACKPORT_LINUX_BCMA_DRIVER_CC_H_
+#include_next <linux/bcma/bcma_driver_chipcommon.h>
+
+#ifndef BCMA_CC_PMU_CHIPCTL_ADDR
+#define BCMA_CC_PMU_CHIPCTL_ADDR	0x0650
+#define BCMA_CC_PMU_CHIPCTL_DATA	0x0654
+#define BCMA_CC_PMU_REGCTL_ADDR		0x0658
+#define BCMA_CC_PMU_REGCTL_DATA		0x065C
+#define BCMA_CC_PMU_PLLCTL_ADDR		0x0660
+#define BCMA_CC_PMU_PLLCTL_DATA		0x0664
+#endif
+
+#ifndef BCMA_CC_CAP_EXT_AOB_PRESENT
+#define  BCMA_CC_CAP_EXT_SECI_PRESENT  0x00000001
+#define  BCMA_CC_CAP_EXT_GSIO_PRESENT  0x00000002
+#define  BCMA_CC_CAP_EXT_GCI_PRESENT   0x00000004
+#define  BCMA_CC_CAP_EXT_SECI_PUART_PRESENT            0x00000008    /* UART present */
+#define  BCMA_CC_CAP_EXT_AOB_PRESENT   0x00000040
+#endif
+
+
+#endif /* __BACKPORT_LINUX_BCMA_DRIVER_CC_H_ */
diff --git a/backport/defconfigs/b43 b/backport/defconfigs/b43
index 27bfb9e2..c486ca1e 100644
--- a/backport/defconfigs/b43
+++ b/backport/defconfigs/b43
@@ -11,10 +11,3 @@ CPTCFG_B43_SDIO=y
 CPTCFG_B43_PHY_N=y
 CPTCFG_B43_PHY_LP=y
 CPTCFG_B43_PHY_HT=y
-CPTCFG_BCMA=m
-CPTCFG_BCMA_HOST_PCI=y
-CPTCFG_SSB=m
-CPTCFG_SSB_PCIHOST=y
-CPTCFG_SSB_PCMCIAHOST=y
-CPTCFG_SSB_SDIOHOST=y
-CPTCFG_SSB_DRIVER_PCICORE=y
diff --git a/backport/defconfigs/b43legacy b/backport/defconfigs/b43legacy
index 71787081..552e13b2 100644
--- a/backport/defconfigs/b43legacy
+++ b/backport/defconfigs/b43legacy
@@ -6,8 +6,3 @@ CPTCFG_MAC80211_LEDS=y
 CPTCFG_WLAN=y
 CPTCFG_WLAN_VENDOR_BROADCOM=y
 CPTCFG_B43LEGACY=m
-CPTCFG_SSB=m
-CPTCFG_SSB_PCIHOST=y
-CPTCFG_SSB_PCMCIAHOST=y
-CPTCFG_SSB_SDIOHOST=y
-CPTCFG_SSB_DRIVER_PCICORE=y
diff --git a/backport/defconfigs/brcmsmac b/backport/defconfigs/brcmsmac
index 2c2edd23..20f429b6 100644
--- a/backport/defconfigs/brcmsmac
+++ b/backport/defconfigs/brcmsmac
@@ -5,5 +5,3 @@ CPTCFG_MAC80211_LEDS=y
 CPTCFG_WLAN=y
 CPTCFG_WLAN_VENDOR_BROADCOM=y
 CPTCFG_BRCMSMAC=m
-CPTCFG_BCMA=m
-CPTCFG_BCMA_HOST_PCI=y
diff --git a/backport/defconfigs/wifi b/backport/defconfigs/wifi
index 4034bb13..fb18e182 100644
--- a/backport/defconfigs/wifi
+++ b/backport/defconfigs/wifi
@@ -17,9 +17,6 @@ CPTCFG_B43=m
 CPTCFG_B43_PHY_HT=y
 CPTCFG_B43_PHY_N=y
 CPTCFG_B43_SDIO=y
-CPTCFG_BCMA_DRIVER_GPIO=y
-CPTCFG_BCMA_HOST_PCI=y
-CPTCFG_BCMA=m
 CPTCFG_BRCMFMAC=m
 CPTCFG_BRCMFMAC_PCIE=y
 CPTCFG_BRCMFMAC_USB=y
@@ -101,9 +98,6 @@ CPTCFG_RTL8723BE=m
 CPTCFG_RTL8821AE=m
 CPTCFG_RTL8XXXU=m
 CPTCFG_RTLWIFI=m
-CPTCFG_SSB=m
-CPTCFG_SSB_PCMCIAHOST=y
-CPTCFG_SSB_SDIOHOST=y
 CPTCFG_TMD_HERMES=m
 CPTCFG_USB_NET_RNDIS_WLAN=m
 CPTCFG_USB_ZD1201=m
diff --git a/copy-list b/copy-list
index f9f9396c..7f552b8d 100644
--- a/copy-list
+++ b/copy-list
@@ -37,7 +37,6 @@ include/linux/mmc/sdio_ids.h
 include/linux/ath9k_platform.h
 include/linux/wl12xx.h
 include/linux/rndis.h
-include/linux/bcm47xx_wdt.h
 include/linux/usb/usbnet.h
 include/linux/usb/cdc.h
 include/uapi/linux/usb/cdc.h
@@ -87,10 +86,6 @@ include/linux/mpls.h
 include/uapi/linux/mpls.h
 
 drivers/net/wireless/ath/
-drivers/ssb/
-include/linux/ssb/
-drivers/bcma/
-include/linux/bcma/
 drivers/net/wireless/cisco/
 drivers/net/wireless/atmel/
 drivers/net/wireless/broadcom/
diff --git a/dependencies b/dependencies
index 628f82bd..a87802ad 100644
--- a/dependencies
+++ b/dependencies
@@ -48,20 +48,6 @@ NFC_ST_NCI_I2C 3.19
 NFC_ST_NCI_SPI 3.19
 NFC_PN544_I2C 3.19
 
-BCMA_DRIVER_MIPS 3.3
-SSB_DRIVER_MIPS 3.3
-# needs GPIO stuff we didn't backport
-SSB_DRIVER_GPIO 4.5
-
-# the irq handler in the gpio driver uses 
-# irq_set_chip_and_handler_name() which gets exported starting with 
-# kernel 3.7. This code is only compiled if BCMA_DRIVER_GPIO and
-# BCMA_HOST_SOC are set.
-BCMA_HOST_SOC 3.7
-
-# Uses gpiochip_get_data()
-BCMA_DRIVER_GPIO 4.5
-
 # NFC core needs PF_NFC defined in socket.h which was
 # only introduced in kernel 3.1
 NFC 3.1
diff --git a/patches/0051-no-wakeup_path/ssb.patch b/patches/0051-no-wakeup_path/ssb.patch
deleted file mode 100644
index dcebbcdf..00000000
--- a/patches/0051-no-wakeup_path/ssb.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/drivers/ssb/pcihost_wrapper.c
-+++ b/drivers/ssb/pcihost_wrapper.c
-@@ -33,7 +33,9 @@ static int ssb_pcihost_suspend(struct de
- 
- 	/* if there is a wakeup enabled child device on ssb bus,
- 	   enable pci wakeup posibility. */
-+#if LINUX_VERSION_IS_GEQ(3,2,0)
- 	device_set_wakeup_enable(d, d->power.wakeup_path);
-+#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */
- 
- 	pci_prepare_to_sleep(dev);
- 
diff --git a/patches/0069-remove-of_irq/bcma.patch b/patches/0069-remove-of_irq/bcma.patch
deleted file mode 100644
index b8a05ae8..00000000
--- a/patches/0069-remove-of_irq/bcma.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/drivers/bcma/main.c
-+++ b/drivers/bcma/main.c
-@@ -156,6 +156,7 @@ static struct device_node *bcma_of_find_
- 	return NULL;
- }
- 
-+#if LINUX_VERSION_IS_GEQ(3,13,0)
- static int bcma_of_irq_parse(struct device *parent,
- 			     struct bcma_device *core,
- 			     struct of_phandle_args *out_irq, int num)
-@@ -195,6 +196,13 @@ static unsigned int bcma_of_get_irq(stru
- 
- 	return irq_create_of_mapping(&out_irq);
- }
-+#else
-+static unsigned int bcma_of_get_irq(struct device *parent,
-+				    struct bcma_device *core, int num)
-+{
-+	return 0;
-+}
-+#endif
- 
- static void bcma_of_fill_device(struct device *parent,
- 				struct bcma_device *core)
-- 
2.11.0

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

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

* [PATCH 02/10] backports: Remove NFC support
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
  2018-09-23 17:45 ` [PATCH 01/10] backports: Remove ssb and bcma Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-23 17:45 ` [PATCH 03/10] copy: Add crc32poly.h Hauke Mehrtens
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

I am not aware of any user of the NFC coded in backports, at least I
haven't seen any patches regarding this. Remove this code to reduce the
efforts needed in the backports project.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/Kconfig.sources                         |  2 --
 backport/Makefile.kernel                         |  2 --
 backport/defconfigs/nfc                          | 20 ------------
 copy-list                                        | 10 ------
 dependencies                                     | 41 ------------------------
 patches/0013-fix-makefile-includes/mei_phy.patch | 10 ------
 patches/0059-uuid-in-mei/nfc.patch               | 32 ------------------
 patches/0061-termios_rwsem/nfc.patch             | 20 ------------
 patches/0081-proto_ops-accept/nfc.patch          | 16 ---------
 9 files changed, 153 deletions(-)
 delete mode 100644 backport/defconfigs/nfc
 delete mode 100644 patches/0013-fix-makefile-includes/mei_phy.patch
 delete mode 100644 patches/0059-uuid-in-mei/nfc.patch
 delete mode 100644 patches/0061-termios_rwsem/nfc.patch
 delete mode 100644 patches/0081-proto_ops-accept/nfc.patch

diff --git a/backport/Kconfig.sources b/backport/Kconfig.sources
index 3fc674e5..347f1c56 100644
--- a/backport/Kconfig.sources
+++ b/backport/Kconfig.sources
@@ -7,8 +7,6 @@ source "$BACKPORT_DIR/net/mac80211/Kconfig"
 source "$BACKPORT_DIR/drivers/net/wireless/Kconfig"
 source "$BACKPORT_DIR/drivers/net/usb/Kconfig"
 
-source "$BACKPORT_DIR/net/nfc/Kconfig"
-
 source "$BACKPORT_DIR/drivers/usb/class/Kconfig"
 
 source "$BACKPORT_DIR/drivers/staging/Kconfig"
diff --git a/backport/Makefile.kernel b/backport/Makefile.kernel
index e458f6d5..6a9b854a 100644
--- a/backport/Makefile.kernel
+++ b/backport/Makefile.kernel
@@ -41,8 +41,6 @@ obj-$(CPTCFG_CFG80211) += net/wireless/
 obj-$(CPTCFG_MAC80211) += net/mac80211/
 obj-$(CPTCFG_WLAN) += drivers/net/wireless/
 obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/
-obj-$(CPTCFG_NFC) += net/nfc/
-obj-$(CPTCFG_NFC) += drivers/nfc/
 
 obj-$(CPTCFG_USB_WDM) += drivers/usb/class/
 obj-$(CPTCFG_USB_USBNET) += drivers/net/usb/
diff --git a/backport/defconfigs/nfc b/backport/defconfigs/nfc
deleted file mode 100644
index c00f10fd..00000000
--- a/backport/defconfigs/nfc
+++ /dev/null
@@ -1,20 +0,0 @@
-CPTCFG_NFC=m
-CPTCFG_NFC_DIGITAL=m
-CPTCFG_NFC_HCI=m
-CPTCFG_NFC_MEI_PHY=m
-CPTCFG_NFC_MICROREAD=m
-CPTCFG_NFC_MICROREAD_I2C=m
-CPTCFG_NFC_MICROREAD_MEI=m
-CPTCFG_NFC_MRVL=m
-CPTCFG_NFC_MRVL_USB=m
-CPTCFG_NFC_NCI=m
-CPTCFG_NFC_NCI_SPI=y
-CPTCFG_NFC_PN533=m
-CPTCFG_NFC_PN544=m
-CPTCFG_NFC_PN544_I2C=m
-CPTCFG_NFC_PN544_MEI=m
-CPTCFG_NFC_PORT100=m
-CPTCFG_NFC_SHDLC=y
-CPTCFG_NFC_SIM=m
-CPTCFG_NFC_TRF7970A=m
-CPTCFG_NFC_WILINK=m
diff --git a/copy-list b/copy-list
index 7f552b8d..b2ec0972 100644
--- a/copy-list
+++ b/copy-list
@@ -124,13 +124,3 @@ drivers/net/usb/cdc_mbim.c
 drivers/net/usb/cdc_ncm.c
 drivers/net/usb/sierra_net.c
 drivers/net/usb/qmi_wwan.c
-
-# NFC core
-net/nfc/
-include/net/nfc/
-include/uapi/linux/nfc.h
-
-# NFC drivers
-drivers/nfc/
-include/linux/platform_data/nfcmrvl.h
-include/linux/platform_data/nxp-nci.h
diff --git a/dependencies b/dependencies
index a87802ad..74f8a80f 100644
--- a/dependencies
+++ b/dependencies
@@ -20,17 +20,6 @@ HOSTAP 3.10
 AIRO 3.9
 AIRO_CS 3.9
 
-# missing linux/property.h
-NFC_ST95HF 3.18
-
-# missing devm_gpiod_get_optional()
-# this needs devm_gpiod_get_optional() with 3 arguments.
-NFC_PN544_I2C 3.17
-NFC_TRF7970A 3.17
-
-# this needs devm_gpiod_get_index() with 4 arguments.
-NFC_NXP_NCI_I2C 3.17
-
 # pci_error_handlers->reset_notify is missing
 MWIFIEX_PCIE 3.16
 
@@ -41,33 +30,6 @@ QTNFMAC_PEARL_PCIE 3.13
 # backported properly
 MWIFIEX 3.18
 
-# this needs device_property..() functions and struct acpi_gpio_mapping
-NFC_FDP_I2C 3.19
-NFC_ST21NFCA_I2C 3.19
-NFC_ST_NCI_I2C 3.19
-NFC_ST_NCI_SPI 3.19
-NFC_PN544_I2C 3.19
-
-# NFC core needs PF_NFC defined in socket.h which was
-# only introduced in kernel 3.1
-NFC 3.1
-
-# This needs of_find_property() and devm_gpio_free()
-NFC_MRVL 3.3
-NFC_MRVL_USB 3.3
-NFC_MRVL_UART 3.3
-
-NFC_TRF7970A 3.4
-
-INTEL_IPS 3.2
-
-# needs mei_cldev_register_rx_cb
-NFC_MEI_PHY 4.10
-
-# missing linux/gpio/consumer.h
-NFC_PN544_I2C 3.13
-NFC_FDP 3.13
-
 # tracing results in compile errors
 ATH10K_TRACING 3.4
 ATH_TRACEPOINTS 3.1
@@ -84,9 +46,6 @@ IPW2200 4.3
 HOSTAP 4.3
 LIBERTAS 4.3
 
-# some prototypes changed - might be fixable but I'm lazy
-NFC_WILINK 4.8
-
 # struct ethtool_link_ksettings is missing, I'm lazy
 USB_USBNET 4.6
 USB_NET_RNDIS_WLAN 4.6
diff --git a/patches/0013-fix-makefile-includes/mei_phy.patch b/patches/0013-fix-makefile-includes/mei_phy.patch
deleted file mode 100644
index c05f6eac..00000000
--- a/patches/0013-fix-makefile-includes/mei_phy.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/drivers/nfc/mei_phy.c
-+++ b/drivers/nfc/mei_phy.c
-@@ -19,6 +19,7 @@
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
- 
- #include <linux/module.h>
-+#include <linux/sched.h>
- #include <linux/slab.h>
- #include <linux/nfc.h>
- 
diff --git a/patches/0059-uuid-in-mei/nfc.patch b/patches/0059-uuid-in-mei/nfc.patch
deleted file mode 100644
index 9953c819..00000000
--- a/patches/0059-uuid-in-mei/nfc.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/drivers/nfc/microread/mei.c
-+++ b/drivers/nfc/microread/mei.c
-@@ -67,7 +67,13 @@ static int microread_mei_remove(struct m
- }
- 
- static struct mei_cl_device_id microread_mei_tbl[] = {
-+#if LINUX_VERSION_IS_GEQ(4,4,0)
- 	{ MICROREAD_DRIVER_NAME, MEI_NFC_UUID, MEI_CL_VERSION_ANY},
-+#elif LINUX_VERSION_IS_GEQ(4,2,0)
-+	{ MICROREAD_DRIVER_NAME, MEI_NFC_UUID},
-+#else
-+	{ MICROREAD_DRIVER_NAME},
-+#endif
- 
- 	/* required last entry */
- 	{ }
---- a/drivers/nfc/pn544/mei.c
-+++ b/drivers/nfc/pn544/mei.c
-@@ -67,7 +67,13 @@ static int pn544_mei_remove(struct mei_c
- }
- 
- static struct mei_cl_device_id pn544_mei_tbl[] = {
-+#if LINUX_VERSION_IS_GEQ(4,4,0)
- 	{ PN544_DRIVER_NAME, MEI_NFC_UUID, MEI_CL_VERSION_ANY},
-+#elif LINUX_VERSION_IS_GEQ(4,2,0)
-+	{ PN544_DRIVER_NAME, MEI_NFC_UUID},
-+#else
-+	{ PN544_DRIVER_NAME},
-+#endif
- 
- 	/* required last entry */
- 	{ }
diff --git a/patches/0061-termios_rwsem/nfc.patch b/patches/0061-termios_rwsem/nfc.patch
deleted file mode 100644
index c8ad8b46..00000000
--- a/patches/0061-termios_rwsem/nfc.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/nfc/nci/uart.c
-+++ b/net/nfc/nci/uart.c
-@@ -439,9 +439,17 @@ void nci_uart_set_config(struct nci_uart
- 	if (!nu->tty)
- 		return;
- 
-+#if LINUX_VERSION_IS_GEQ(3,12,0)
- 	down_read(&nu->tty->termios_rwsem);
-+#else
-+	mutex_lock(&nu->tty->termios_mutex);
-+#endif /* if LINUX_VERSION_IS_GEQ(3,12,0) */
- 	new_termios = nu->tty->termios;
-+#if LINUX_VERSION_IS_GEQ(3,12,0)
- 	up_read(&nu->tty->termios_rwsem);
-+#else
-+	mutex_unlock(&nu->tty->termios_mutex);
-+#endif /* if LINUX_VERSION_IS_GEQ(3,12,0) */
- 	tty_termios_encode_baud_rate(&new_termios, baudrate, baudrate);
- 
- 	if (flow_ctrl)
diff --git a/patches/0081-proto_ops-accept/nfc.patch b/patches/0081-proto_ops-accept/nfc.patch
deleted file mode 100644
index 05b55805..00000000
--- a/patches/0081-proto_ops-accept/nfc.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/net/nfc/llcp_sock.c b/net/nfc/llcp_sock.c
-index 043c6d3..5b4e44c 100644
---- a/net/nfc/llcp_sock.c
-+++ b/net/nfc/llcp_sock.c
-@@ -443,7 +443,11 @@ struct sock *nfc_llcp_accept_dequeue(str
- }
- 
- static int llcp_sock_accept(struct socket *sock, struct socket *newsock,
-+#if LINUX_VERSION_IS_GEQ(4,11,0)
- 			    int flags, bool kern)
-+#else
-+			    int flags)
-+#endif
- {
- 	DECLARE_WAITQUEUE(wait, current);
- 	struct sock *sk = sock->sk, *new_sk;
-- 
2.11.0

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

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

* [PATCH 03/10] copy: Add crc32poly.h
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
  2018-09-23 17:45 ` [PATCH 01/10] backports: Remove ssb and bcma Hauke Mehrtens
  2018-09-23 17:45 ` [PATCH 02/10] backports: Remove NFC support Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-23 17:45 ` [PATCH 04/10] dependencies: Make RSI_COEX coexistence depend on kernel >= 4.17 Hauke Mehrtens
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

This is used by the rtl8723bs driver. The implementation is completely
in this header file, so it is save to copy it

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

diff --git a/copy-list b/copy-list
index b2ec0972..9c522629 100644
--- a/copy-list
+++ b/copy-list
@@ -15,6 +15,7 @@ MAINTAINERS
 include/linux/unaligned/
 include/linux/hashtable.h
 include/linux/fixp-arith.h
+include/linux/crc32poly.h
 
 # This just defines some macros, simply take it
 include/linux/bitfield.h
-- 
2.11.0

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

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

* [PATCH 04/10] dependencies: Make RSI_COEX coexistence depend on kernel >= 4.17
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
                   ` (2 preceding siblings ...)
  2018-09-23 17:45 ` [PATCH 03/10] copy: Add crc32poly.h Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-23 20:20   ` Johannes Berg
  2018-09-23 17:45 ` [PATCH 05/10] dependencies: Make WIL6210 depend on kernel >= 4.8 Hauke Mehrtens
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

When RSI_COEX is activated the driver wants to link against the
rsi_bt_ops symbol from the bluetooth driver btrsi. This driver was only
added in kernel 4.17. Deactivate bluetooth coexistence support for older
kernel versions.

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

diff --git a/dependencies b/dependencies
index 74f8a80f..555f31fb 100644
--- a/dependencies
+++ b/dependencies
@@ -53,6 +53,9 @@ USB_NET_RNDIS_WLAN 4.6
 # depends on struct mmc_card::ocr
 RSI_SDIO 3.13
 
+# For Coexsitence the BT driver has to export rsi_bt_ops
+RSI_COEX 4.17
+
 # depends on devm_led_classdev_register()
 MT76_CORE 4.1
 MT76x2E 4.1
-- 
2.11.0

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

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

* [PATCH 05/10] dependencies: Make WIL6210 depend on kernel >= 4.8
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
                   ` (3 preceding siblings ...)
  2018-09-23 17:45 ` [PATCH 04/10] dependencies: Make RSI_COEX coexistence depend on kernel >= 4.17 Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-23 20:12   ` Johannes Berg
  2018-09-23 17:45 ` [PATCH 06/10] dependencies: make hostap and atmel depend on kernel >= 4.18 Hauke Mehrtens
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

The WIL6210 driver now uses pci_alloc_irq_vectors() which is only
available in kernel >= 4.8, only build this driver against such kernel
versions.

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

diff --git a/dependencies b/dependencies
index 555f31fb..42ed0e2f 100644
--- a/dependencies
+++ b/dependencies
@@ -63,3 +63,6 @@ MT76x2E 4.1
 # select_queue_fallback_t is missing
 RTL8723BS 3.14
 R8188EU  3.14
+
+# pci_alloc_irq_vectors is missing
+WIL6210 4.8
-- 
2.11.0

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

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

* [PATCH 06/10] dependencies: make hostap and atmel depend on kernel >= 4.18
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
                   ` (4 preceding siblings ...)
  2018-09-23 17:45 ` [PATCH 05/10] dependencies: Make WIL6210 depend on kernel >= 4.8 Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-23 20:17   ` Johannes Berg
  2018-09-23 17:45 ` [PATCH 07/10] patches: make mt76 use skb_pad() instead of __skb_pad() Hauke Mehrtens
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

The hostap and atmel wireless driver now make use of the
proc_create_single_data() function which can not easily be backported.
As these drivers are not used too often just deactivate them on older
kernel versions for now.

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

diff --git a/dependencies b/dependencies
index 42ed0e2f..cd644df7 100644
--- a/dependencies
+++ b/dependencies
@@ -13,8 +13,9 @@ WLCORE 3.2
 WL12XX 3.2
 WL18XX 3.2
 
-# hostapd uses proc_remove()
-HOSTAP 3.10
+# hostapd uses proc_create_single_data()
+HOSTAP 4.18
+ATMEL 4.18
 
 # This driver uses the remove_proc_subtree() function.
 AIRO 3.9
-- 
2.11.0

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

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

* [PATCH 07/10] patches: make mt76 use skb_pad() instead of __skb_pad()
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
                   ` (5 preceding siblings ...)
  2018-09-23 17:45 ` [PATCH 06/10] dependencies: make hostap and atmel depend on kernel >= 4.18 Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-23 17:45 ` [PATCH 08/10] patches: remove .coredump from struct driver for kernel < 4.16 Hauke Mehrtens
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

__skb_pad() was only added with kernel 4.13.
The free_on_error parameter of __skb_pad() is set to constant true,
which is also the setting used by skb_pad() so it should be save to use
skb_pad() instead.
This patch should be added to the mainline Linux kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0090-use-skb_pad.patch | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 patches/0090-use-skb_pad.patch

diff --git a/patches/0090-use-skb_pad.patch b/patches/0090-use-skb_pad.patch
new file mode 100644
index 00000000..086328c1
--- /dev/null
+++ b/patches/0090-use-skb_pad.patch
@@ -0,0 +1,11 @@
+--- a/drivers/net/wireless/mediatek/mt76/usb.c
++++ b/drivers/net/wireless/mediatek/mt76/usb.c
+@@ -535,7 +535,7 @@ int mt76u_skb_dma_info(struct sk_buff *s
+ 	}
+ 
+ 	if (unlikely(pad)) {
+-		if (__skb_pad(last, pad, true))
++		if (skb_pad(last, pad))
+ 			return -ENOMEM;
+ 		__skb_put(last, pad);
+ 	}
-- 
2.11.0

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

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

* [PATCH 08/10] patches: remove .coredump from struct driver for kernel < 4.16
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
                   ` (6 preceding siblings ...)
  2018-09-23 17:45 ` [PATCH 07/10] patches: make mt76 use skb_pad() instead of __skb_pad() Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-24  8:36   ` Johannes Berg
  2018-09-23 17:45 ` [PATCH 09/10] backports: Make netdev destructor spatch apply correctly again Hauke Mehrtens
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

Kernel 4.16 added a new .coredump member to the driver structure which
can be implemented by drivers. Remove this member on older kernel
versions as they do not support this feature.

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

diff --git a/patches/0088-coredump.cocci b/patches/0088-coredump.cocci
new file mode 100644
index 00000000..329e0315
--- /dev/null
+++ b/patches/0088-coredump.cocci
@@ -0,0 +1,93 @@
+@r1@
+identifier drv, fn;
+@@
+static struct pci_driver drv = {
+	.driver = {
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+		.coredump = fn,
++#endif
+		...
+	},
+	...
+};
+
+@r11 depends on r1@
+identifier r1.fn;
+@@
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+fn(...)
+{
+	...
+}
++#endif
+
+
+@r2@
+identifier drv, fn;
+@@
+ static struct pci_driver drv = {
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+	.driver.coredump = fn,
++#endif
+	...
+ };
+
+@r21 depends on r2@
+identifier r2.fn;
+@@
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+fn(...)
+{
+	...
+}
++#endif
+
+
+@r3@
+identifier drv, fn;
+@@
+static struct usb_driver drv = {
+	.drvwrap.driver = {
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+		.coredump = fn,
++#endif
+		...
+	},
+	...
+};
+
+
+@r31 depends on r3@
+identifier r3.fn;
+@@
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+fn(...)
+{
+	...
+}
++#endif
+
+
+@r4@
+identifier driver, fn;
+@@
+ static struct sdio_driver driver = {
+	.drv = {
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+		.coredump = fn,
++#endif
+		...
+	},
+	...
+};
+
+
+@r41 depends on r4@
+identifier r4.fn;
+@@
++#if LINUX_VERSION_IS_GEQ(4,16,0)
+fn(...)
+{
+	...
+}
++#endif
-- 
2.11.0

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

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

* [PATCH 09/10] backports: Make netdev destructor spatch apply correctly again
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
                   ` (7 preceding siblings ...)
  2018-09-23 17:45 ` [PATCH 08/10] patches: remove .coredump from struct driver for kernel < 4.16 Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-23 20:17   ` Johannes Berg
  2018-09-23 17:45 ` [PATCH 10/10] patches: Do not remove linux/kmemleak.h include Hauke Mehrtens
  2018-09-24  8:12 ` [PATCH 00/10] backports: misc fixes to improve support of 4.19 Johannes Berg
  10 siblings, 1 reply; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

The netdev destructor spatch did not apply to the wil6210 driver any
more, because there the calls were done in a different order compared to
the spatch. Add an additional rule which applies when the order is
changed.

Fixes: 30a378636e47 ("backports: speed up netdev destructor spatch by two orders of magnitude")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0079-netdev-destructor.cocci | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/patches/0079-netdev-destructor.cocci b/patches/0079-netdev-destructor.cocci
index f2bea35b..8d7228ec 100644
--- a/patches/0079-netdev-destructor.cocci
+++ b/patches/0079-netdev-destructor.cocci
@@ -67,6 +67,38 @@ if (<+... RET ...+>) {
 	...>
 }
 
+@r11@
+struct net_device *NDEV;
+identifier D, C;
+identifier TRUE =~ "true";
+@@
+C(...)
+{
+	<+...
+-	NDEV->priv_destructor = D;
+-	NDEV->needs_free_netdev = TRUE;
++	netdev_set_priv_destructor(NDEV, D);
+	...+>
+}
+
+@r12 depends on r11@
+identifier r11.D, r11.C;
+fresh identifier E = "__" ## D;
+@@
+
++#if LINUX_VERSION_IS_LESS(4,12,0)
++static void E(struct net_device *ndev)
++{
++	D(ndev);
++	free_netdev(ndev);
++}
++#endif
++
+C(...)
+{
+	...
+}
+
 @r5@
 struct net_device *NDEV;
 identifier TRUE =~ "true";
-- 
2.11.0

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

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

* [PATCH 10/10] patches: Do not remove linux/kmemleak.h include
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
                   ` (8 preceding siblings ...)
  2018-09-23 17:45 ` [PATCH 09/10] backports: Make netdev destructor spatch apply correctly again Hauke Mehrtens
@ 2018-09-23 17:45 ` Hauke Mehrtens
  2018-09-23 20:18   ` Johannes Berg
  2018-09-24  8:12 ` [PATCH 00/10] backports: misc fixes to improve support of 4.19 Johannes Berg
  10 siblings, 1 reply; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 17:45 UTC (permalink / raw)
  To: johannes; +Cc: backports, john, Hauke Mehrtens

This driver has to include linux/kmemleak.h to get kmemleak_not_leak in
kernel 4.19. I haven't seen any problem when compiling against multiple
other kernels, but didn't test all the 3.X versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0085-not-include-kmemleak.patch | 11 -----------
 1 file changed, 11 deletions(-)
 delete mode 100644 patches/0085-not-include-kmemleak.patch

diff --git a/patches/0085-not-include-kmemleak.patch b/patches/0085-not-include-kmemleak.patch
deleted file mode 100644
index d9f051f3..00000000
--- a/patches/0085-not-include-kmemleak.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
-+++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
-@@ -5,7 +5,7 @@
-  *
-  ******************************************************************************/
- #define _RTL8188EU_RECV_C_
--#include <linux/kmemleak.h>
-+#include <linux/slab.h>
- #include <osdep_service.h>
- #include <drv_types.h>
- #include <recv_osdep.h>
-- 
2.11.0

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

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

* Re: [PATCH 01/10] backports: Remove ssb and bcma
  2018-09-23 17:45 ` [PATCH 01/10] backports: Remove ssb and bcma Hauke Mehrtens
@ 2018-09-23 20:10   ` Johannes Berg
  2018-09-23 20:18     ` Hauke Mehrtens
  2018-09-24 10:48   ` Johannes Berg
  1 sibling, 1 reply; 28+ messages in thread
From: Johannes Berg @ 2018-09-23 20:10 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
> Use the versions shipped with the kernel instead.
> bcma and ssb didn't change much in the last few years, most of the
> changes were related to code only used on embedded devices. Removing
> this reduces the number of parts we have to backport. b43, b43legacy and
> brcmsmac work well with the in kernel version.

>  patches/0051-no-wakeup_path/ssb.patch              | 12 -----------
>  patches/0069-remove-of_irq/bcma.patch              | 24 ----------------------
>  11 files changed, 23 insertions(+), 80 deletions(-)

Is that really worth it?

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

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

* Re: [PATCH 05/10] dependencies: Make WIL6210 depend on kernel >= 4.8
  2018-09-23 17:45 ` [PATCH 05/10] dependencies: Make WIL6210 depend on kernel >= 4.8 Hauke Mehrtens
@ 2018-09-23 20:12   ` Johannes Berg
  2018-09-23 20:36     ` Hauke Mehrtens
  0 siblings, 1 reply; 28+ messages in thread
From: Johannes Berg @ 2018-09-23 20:12 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
> The WIL6210 driver now uses pci_alloc_irq_vectors() which is only
> available in kernel >= 4.8, only build this driver against such kernel
> versions.

>From the description of the function, it seems like it should be pretty
simple to backport?

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

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

* Re: [PATCH 06/10] dependencies: make hostap and atmel depend on kernel >= 4.18
  2018-09-23 17:45 ` [PATCH 06/10] dependencies: make hostap and atmel depend on kernel >= 4.18 Hauke Mehrtens
@ 2018-09-23 20:17   ` Johannes Berg
  2018-09-23 20:23     ` Hauke Mehrtens
  0 siblings, 1 reply; 28+ messages in thread
From: Johannes Berg @ 2018-09-23 20:17 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
> The hostap and atmel wireless driver now make use of the
> proc_create_single_data() function which can not easily be backported.
> As these drivers are not used too often just deactivate them on older
> kernel versions for now.

It should be pretty easy to backport based on proc_create_data(), which
has been around since 2.6.26?

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

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

* Re: [PATCH 09/10] backports: Make netdev destructor spatch apply correctly again
  2018-09-23 17:45 ` [PATCH 09/10] backports: Make netdev destructor spatch apply correctly again Hauke Mehrtens
@ 2018-09-23 20:17   ` Johannes Berg
  0 siblings, 0 replies; 28+ messages in thread
From: Johannes Berg @ 2018-09-23 20:17 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
> The netdev destructor spatch did not apply to the wil6210 driver any
> more, because there the calls were done in a different order compared to
> the spatch. Add an additional rule which applies when the order is
> changed.

Weird, thanks! I compared the diffstat, but perhaps wil6210 also changed
in the meantime ... dunno, but whatever, thanks for fixing.

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

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

* Re: [PATCH 01/10] backports: Remove ssb and bcma
  2018-09-23 20:10   ` Johannes Berg
@ 2018-09-23 20:18     ` Hauke Mehrtens
  0 siblings, 0 replies; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 20:18 UTC (permalink / raw)
  To: Johannes Berg; +Cc: backports, john


[-- Attachment #1.1: Type: text/plain, Size: 994 bytes --]

On 09/23/2018 10:10 PM, Johannes Berg wrote:
> On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
>> Use the versions shipped with the kernel instead.
>> bcma and ssb didn't change much in the last few years, most of the
>> changes were related to code only used on embedded devices. Removing
>> this reduces the number of parts we have to backport. b43, b43legacy and
>> brcmsmac work well with the in kernel version.
> 
>>  patches/0051-no-wakeup_path/ssb.patch              | 12 -----------
>>  patches/0069-remove-of_irq/bcma.patch              | 24 ----------------------
>>  11 files changed, 23 insertions(+), 80 deletions(-)
> 
> Is that really worth it?
> 
> johannes

There are sometimes some changes needed because of ssb and bmca, like
of_dma_configure() getting one additional parameter now. To reduce the
effort I just want to get rid of this.
In OpenWrt we take this from the mainline kernel anyway as it is build
in for some Broadcom SoCs.

Hauke


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 10/10] patches: Do not remove linux/kmemleak.h include
  2018-09-23 17:45 ` [PATCH 10/10] patches: Do not remove linux/kmemleak.h include Hauke Mehrtens
@ 2018-09-23 20:18   ` Johannes Berg
  0 siblings, 0 replies; 28+ messages in thread
From: Johannes Berg @ 2018-09-23 20:18 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
> This driver has to include linux/kmemleak.h to get kmemleak_not_leak in
> kernel 4.19. I haven't seen any problem when compiling against multiple
> other kernels, but didn't test all the 3.X versions.

Looks like kmemleak.h was added in 2.6.31, so ... should be fine.

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

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

* Re: [PATCH 04/10] dependencies: Make RSI_COEX coexistence depend on kernel >= 4.17
  2018-09-23 17:45 ` [PATCH 04/10] dependencies: Make RSI_COEX coexistence depend on kernel >= 4.17 Hauke Mehrtens
@ 2018-09-23 20:20   ` Johannes Berg
  0 siblings, 0 replies; 28+ messages in thread
From: Johannes Berg @ 2018-09-23 20:20 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
> When RSI_COEX is activated the driver wants to link against the
> rsi_bt_ops symbol from the bluetooth driver btrsi. This driver was only
> added in kernel 4.17. Deactivate bluetooth coexistence support for older
> kernel versions.
> 
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
> ---
>  dependencies | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/dependencies b/dependencies
> index 74f8a80f..555f31fb 100644
> --- a/dependencies
> +++ b/dependencies
> @@ -53,6 +53,9 @@ USB_NET_RNDIS_WLAN 4.6
>  # depends on struct mmc_card::ocr
>  RSI_SDIO 3.13
>  
> +# For Coexsitence the BT driver has to export rsi_bt_ops

Typo :)

But I guess I can fix it - I won't apply right now (need to sleep) but
hopefully tomorrow (though I'll probably have power cut some time during
the day, so who knows what'll happen)

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

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

* Re: [PATCH 06/10] dependencies: make hostap and atmel depend on kernel >= 4.18
  2018-09-23 20:17   ` Johannes Berg
@ 2018-09-23 20:23     ` Hauke Mehrtens
  2018-09-23 20:33       ` Johannes Berg
  0 siblings, 1 reply; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 20:23 UTC (permalink / raw)
  To: Johannes Berg; +Cc: backports, john


[-- Attachment #1.1: Type: text/plain, Size: 897 bytes --]

On 09/23/2018 10:17 PM, Johannes Berg wrote:
> On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
>> The hostap and atmel wireless driver now make use of the
>> proc_create_single_data() function which can not easily be backported.
>> As these drivers are not used too often just deactivate them on older
>> kernel versions for now.
> 
> It should be pretty easy to backport based on proc_create_data(), which
> has been around since 2.6.26?
> 
> johannes

One of the upstream commits is this:
https://git.kernel.org/linus/d51269592c327fcfe8ec80fd169a84f8dc0de73b

The problem is that these function also get some data so we would have
to provide the data and the show function pointer and store it
somewhere. Most of the proc structures are also private so we can not
easily abuse some unused member.

The affected drivers are anyway not used much any more.

Hauke


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 06/10] dependencies: make hostap and atmel depend on kernel >= 4.18
  2018-09-23 20:23     ` Hauke Mehrtens
@ 2018-09-23 20:33       ` Johannes Berg
  0 siblings, 0 replies; 28+ messages in thread
From: Johannes Berg @ 2018-09-23 20:33 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Sun, 2018-09-23 at 22:23 +0200, Hauke Mehrtens wrote:
> On 09/23/2018 10:17 PM, Johannes Berg wrote:
> > On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
> > > The hostap and atmel wireless driver now make use of the
> > > proc_create_single_data() function which can not easily be backported.
> > > As these drivers are not used too often just deactivate them on older
> > > kernel versions for now.
> > 
> > It should be pretty easy to backport based on proc_create_data(), which
> > has been around since 2.6.26?
> > 
> > johannes
> 
> One of the upstream commits is this:
> https://git.kernel.org/linus/d51269592c327fcfe8ec80fd169a84f8dc0de73b

Sure.

> The problem is that these function also get some data so we would have
> to provide the data and the show function pointer and store it
> somewhere. Most of the proc structures are also private so we can not
> easily abuse some unused member.

But proc_create_data() does pass the data to store, and PDE_DATA() to
get it back has been there also forever?

Ah, but yes, you'd also have to store the show pointer, and thus
probably allocate memory for the data, and then you even have to leak it
because you can't hook into the freeing thereof.

> The affected drivers are anyway not used much any more.

True.

I suppose if somebody really needed the drivers they'd be better off
reverting the patch linked above.

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

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

* Re: [PATCH 05/10] dependencies: Make WIL6210 depend on kernel >= 4.8
  2018-09-23 20:12   ` Johannes Berg
@ 2018-09-23 20:36     ` Hauke Mehrtens
  0 siblings, 0 replies; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-23 20:36 UTC (permalink / raw)
  To: Johannes Berg; +Cc: backports, john


[-- Attachment #1.1: Type: text/plain, Size: 480 bytes --]

On 09/23/2018 10:12 PM, Johannes Berg wrote:
> On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
>> The WIL6210 driver now uses pci_alloc_irq_vectors() which is only
>> available in kernel >= 4.8, only build this driver against such kernel
>> versions.
> 
> From the description of the function, it seems like it should be pretty
> simple to backport?
> 
> johannes

I haven't tried to backport this.
If someone wants to do it I would be happy.

Hauke




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 00/10] backports: misc fixes to improve support of 4.19
  2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
                   ` (9 preceding siblings ...)
  2018-09-23 17:45 ` [PATCH 10/10] patches: Do not remove linux/kmemleak.h include Hauke Mehrtens
@ 2018-09-24  8:12 ` Johannes Berg
  2018-09-24 20:27   ` Hauke Mehrtens
  10 siblings, 1 reply; 28+ messages in thread
From: Johannes Berg @ 2018-09-24  8:12 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

I applied pretty much everything, but the result isn't looking so
great...

But that's sort of looking only perhaps? 3.10-4.2 fail on skcipher
backport, which was pretty much always doomed given the crypto API
complexity ...

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

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

* Re: [PATCH 08/10] patches: remove .coredump from struct driver for kernel < 4.16
  2018-09-23 17:45 ` [PATCH 08/10] patches: remove .coredump from struct driver for kernel < 4.16 Hauke Mehrtens
@ 2018-09-24  8:36   ` Johannes Berg
  2018-09-24 20:20     ` Hauke Mehrtens
  0 siblings, 1 reply; 28+ messages in thread
From: Johannes Berg @ 2018-09-24  8:36 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
> Kernel 4.16 added a new .coredump member to the driver structure which
> can be implemented by drivers. Remove this member on older kernel
> versions as they do not support this feature.

Note that this isn't sufficient.

On 4.16, the return value was int, now it's void. I'll change this patch
to be for < 4.17, but if somebody wants to submit an spatch to fix up
the difference that would work too.

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

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

* Re: [PATCH 01/10] backports: Remove ssb and bcma
  2018-09-23 17:45 ` [PATCH 01/10] backports: Remove ssb and bcma Hauke Mehrtens
  2018-09-23 20:10   ` Johannes Berg
@ 2018-09-24 10:48   ` Johannes Berg
  2018-09-24 20:17     ` Hauke Mehrtens
  1 sibling, 1 reply; 28+ messages in thread
From: Johannes Berg @ 2018-09-24 10:48 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
> Use the versions shipped with the kernel instead.
> bcma and ssb didn't change much in the last few years, most of the
> changes were related to code only used on embedded devices. Removing
> this reduces the number of parts we have to backport. b43, b43legacy and
> brcmsmac work well with the in kernel version.

Looks like this broke b43 at least up to around 3.12:

b43/main.c:5331:25: error: ‘struct ssb_sprom’ has no member named ‘dev_id’

ssb: sprom: add dev_id field for value overriding standard ID

3.16, actually. I think I'll revert this.

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

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

* Re: [PATCH 01/10] backports: Remove ssb and bcma
  2018-09-24 10:48   ` Johannes Berg
@ 2018-09-24 20:17     ` Hauke Mehrtens
  0 siblings, 0 replies; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-24 20:17 UTC (permalink / raw)
  To: Johannes Berg; +Cc: backports, john


[-- Attachment #1.1: Type: text/plain, Size: 848 bytes --]

On 09/24/2018 12:48 PM, Johannes Berg wrote:
> On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
>> Use the versions shipped with the kernel instead.
>> bcma and ssb didn't change much in the last few years, most of the
>> changes were related to code only used on embedded devices. Removing
>> this reduces the number of parts we have to backport. b43, b43legacy and
>> brcmsmac work well with the in kernel version.
> 
> Looks like this broke b43 at least up to around 3.12:
> 
> b43/main.c:5331:25: error: ‘struct ssb_sprom’ has no member named ‘dev_id’
> 
> ssb: sprom: add dev_id field for value overriding standard ID
> 
> 3.16, actually. I think I'll revert this.
> 
> johannes
> 

Ok, no problem then we will stay with bcma and ssb.

With kernel < 4.0 it was expected to cause some problems.

Hauke


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 08/10] patches: remove .coredump from struct driver for kernel < 4.16
  2018-09-24  8:36   ` Johannes Berg
@ 2018-09-24 20:20     ` Hauke Mehrtens
  0 siblings, 0 replies; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-24 20:20 UTC (permalink / raw)
  To: Johannes Berg; +Cc: backports, john


[-- Attachment #1.1: Type: text/plain, Size: 775 bytes --]

On 09/24/2018 10:36 AM, Johannes Berg wrote:
> On Sun, 2018-09-23 at 19:45 +0200, Hauke Mehrtens wrote:
>> Kernel 4.16 added a new .coredump member to the driver structure which
>> can be implemented by drivers. Remove this member on older kernel
>> versions as they do not support this feature.
> 
> Note that this isn't sufficient.
> 
> On 4.16, the return value was int, now it's void. I'll change this patch
> to be for < 4.17, but if somebody wants to submit an spatch to fix up
> the difference that would work too.
> 
> johannes
> 
Thanks for fixing this, I didn't noticed that this changed between 4.16
and 4.17. I think it is ok to only provide this on kernel >= 4.17, this
is an not essential feature and 4.16 is not a long term kernel.

Hauke


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 00/10] backports: misc fixes to improve support of 4.19
  2018-09-24  8:12 ` [PATCH 00/10] backports: misc fixes to improve support of 4.19 Johannes Berg
@ 2018-09-24 20:27   ` Hauke Mehrtens
  2018-09-24 20:28     ` Johannes Berg
  0 siblings, 1 reply; 28+ messages in thread
From: Hauke Mehrtens @ 2018-09-24 20:27 UTC (permalink / raw)
  To: Johannes Berg; +Cc: backports, john


[-- Attachment #1.1: Type: text/plain, Size: 561 bytes --]

On 09/24/2018 10:12 AM, Johannes Berg wrote:
> I applied pretty much everything, but the result isn't looking so
> great...

Thanks for applying the patches.

> But that's sort of looking only perhaps? 3.10-4.2 fail on skcipher
> backport, which was pretty much always doomed given the crypto API
> complexity ...

If it is only needed for the drivers using lib80211, I think we can make
them depend on kernel >= 4.2.

Did you test compile it on drvbp1.linux-foundation.org, or do I have to
update the installed kernel versions there?

Hauke


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH 00/10] backports: misc fixes to improve support of 4.19
  2018-09-24 20:27   ` Hauke Mehrtens
@ 2018-09-24 20:28     ` Johannes Berg
  0 siblings, 0 replies; 28+ messages in thread
From: Johannes Berg @ 2018-09-24 20:28 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: backports, john

On Mon, 2018-09-24 at 22:27 +0200, Hauke Mehrtens wrote:

> > But that's sort of looking only perhaps? 3.10-4.2 fail on skcipher
> > backport, which was pretty much always doomed given the crypto API
> > complexity ...
> 
> If it is only needed for the drivers using lib80211, I think we can make
> them depend on kernel >= 4.2.

Indeed. I need to do a new run with that fixed (see my lib80211 skcipher
removal patch), but was waiting for Luca's updated iwlwifi patch since I
fail on that every time too.

> Did you test compile it on drvbp1.linux-foundation.org, or do I have to
> update the installed kernel versions there?

I did, but it's probably restricted to my account.

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

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

end of thread, other threads:[~2018-09-25  2:33 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-23 17:45 [PATCH 00/10] backports: misc fixes to improve support of 4.19 Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 01/10] backports: Remove ssb and bcma Hauke Mehrtens
2018-09-23 20:10   ` Johannes Berg
2018-09-23 20:18     ` Hauke Mehrtens
2018-09-24 10:48   ` Johannes Berg
2018-09-24 20:17     ` Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 02/10] backports: Remove NFC support Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 03/10] copy: Add crc32poly.h Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 04/10] dependencies: Make RSI_COEX coexistence depend on kernel >= 4.17 Hauke Mehrtens
2018-09-23 20:20   ` Johannes Berg
2018-09-23 17:45 ` [PATCH 05/10] dependencies: Make WIL6210 depend on kernel >= 4.8 Hauke Mehrtens
2018-09-23 20:12   ` Johannes Berg
2018-09-23 20:36     ` Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 06/10] dependencies: make hostap and atmel depend on kernel >= 4.18 Hauke Mehrtens
2018-09-23 20:17   ` Johannes Berg
2018-09-23 20:23     ` Hauke Mehrtens
2018-09-23 20:33       ` Johannes Berg
2018-09-23 17:45 ` [PATCH 07/10] patches: make mt76 use skb_pad() instead of __skb_pad() Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 08/10] patches: remove .coredump from struct driver for kernel < 4.16 Hauke Mehrtens
2018-09-24  8:36   ` Johannes Berg
2018-09-24 20:20     ` Hauke Mehrtens
2018-09-23 17:45 ` [PATCH 09/10] backports: Make netdev destructor spatch apply correctly again Hauke Mehrtens
2018-09-23 20:17   ` Johannes Berg
2018-09-23 17:45 ` [PATCH 10/10] patches: Do not remove linux/kmemleak.h include Hauke Mehrtens
2018-09-23 20:18   ` Johannes Berg
2018-09-24  8:12 ` [PATCH 00/10] backports: misc fixes to improve support of 4.19 Johannes Berg
2018-09-24 20:27   ` Hauke Mehrtens
2018-09-24 20:28     ` Johannes Berg

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