From patchwork Mon Sep 17 21:31:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10603449 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 78A456CB for ; Mon, 17 Sep 2018 21:32:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 668F229DA9 for ; Mon, 17 Sep 2018 21:32:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A3CD2A838; Mon, 17 Sep 2018 21:32:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7538729DA9 for ; Mon, 17 Sep 2018 21:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727698AbeIRDBG (ORCPT ); Mon, 17 Sep 2018 23:01:06 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:56174 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728273AbeIRDBF (ORCPT ); Mon, 17 Sep 2018 23:01:05 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id C43EB41BCE; Mon, 17 Sep 2018 23:31:49 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id CPFT_SauA3eK; Mon, 17 Sep 2018 23:31:45 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, john@phrozen.org, Hauke Mehrtens Subject: [PATCH 1/7] backports: Remove unused parts Date: Mon, 17 Sep 2018 23:31:36 +0200 Message-Id: <20180917213142.7875-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This removes parts which were only used by subsystems which are not included in backports any more, for example media, bluetooth and Ethernet. The patches which are removed in this commit are not applied to the kernel tree anyway with the default configuration because non of the files get copied. The freezer, media, regulator and sound parts were only used by the already removed media drivers. The flow dissector file is not copied any more. Signed-off-by: Hauke Mehrtens --- backport/Kconfig.sources | 4 - backport/Makefile.kernel | 4 - backport/backport-include/linux/freezer.h | 32 --- backport/backport-include/linux/mm.h | 44 ---- .../linux/platform_data/media/si4713.h | 10 - .../platform_data/media/soc_camera_platform.h | 10 - .../linux/platform_data/media/timb_radio.h | 10 - .../linux/platform_data/media/timb_video.h | 10 - backport/backport-include/linux/regulator/driver.h | 33 --- backport/backport-include/sound/core.h | 20 -- backport/backport-include/sound/pcm.h | 29 --- backport/compat/Kconfig | 25 --- backport/compat/backport-3.13.c | 75 ------- dependencies | 55 ----- patches/0001-v4l2-dma_mmap_coherent-revert.patch | 88 -------- patches/0013-fix-makefile-includes/bluetooth.patch | 10 - .../0013-fix-makefile-includes/frame_vector.patch | 10 - patches/0013-fix-makefile-includes/igb.patch | 12 -- .../0020-tty-termios/net_bluetooth_hci_ldisc.patch | 67 ------ .../net_bluetooth_rfcomm_tty.patch | 14 -- .../drivers_net_wireless_ath_ath9k_debug.patch | 14 -- .../net_bluetooth_hidp_core.patch | 29 --- patches/0030-qdisc_tx_busylock/bluetooth.patch | 22 -- .../0032-sriov_configure/igb_sriov_configure.patch | 18 -- .../0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch | 83 -------- .../0038-ethtool_rxfh_indir/igb_rxfh_indir.patch | 92 -------- patches/0042-pci_error_handlers/atl1e.patch | 14 -- patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch | 28 --- patches/0047-write_iter/bluetooth.patch | 83 -------- patches/0050-iov_iter/bluetooth.patch | 197 ----------------- patches/0052-deactivate-ptp-pin/igb.patch | 136 ------------ .../0053-remove_wait_on_bit_timeout/btusb.patch | 110 ---------- .../hci_intel.patch | 180 ---------------- patches/0062-acpi-gpio-remove/hci_bcm.patch | 78 ------- patches/0062-acpi-gpio-remove/hci_intel.patch | 67 ------ patches/0072-netdevice-ndo_fdb_add/igb.patch | 14 -- patches/flow_dissector.patch | 234 --------------------- 37 files changed, 1961 deletions(-) delete mode 100644 backport/backport-include/linux/freezer.h delete mode 100644 backport/backport-include/linux/platform_data/media/si4713.h delete mode 100644 backport/backport-include/linux/platform_data/media/soc_camera_platform.h delete mode 100644 backport/backport-include/linux/platform_data/media/timb_radio.h delete mode 100644 backport/backport-include/linux/platform_data/media/timb_video.h delete mode 100644 backport/backport-include/linux/regulator/driver.h delete mode 100644 backport/backport-include/sound/core.h delete mode 100644 backport/backport-include/sound/pcm.h delete mode 100644 patches/0001-v4l2-dma_mmap_coherent-revert.patch delete mode 100644 patches/0013-fix-makefile-includes/bluetooth.patch delete mode 100644 patches/0013-fix-makefile-includes/frame_vector.patch delete mode 100644 patches/0013-fix-makefile-includes/igb.patch delete mode 100644 patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch delete mode 100644 patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch delete mode 100644 patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch delete mode 100644 patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch delete mode 100644 patches/0030-qdisc_tx_busylock/bluetooth.patch delete mode 100644 patches/0032-sriov_configure/igb_sriov_configure.patch delete mode 100644 patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch delete mode 100644 patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch delete mode 100644 patches/0042-pci_error_handlers/atl1e.patch delete mode 100644 patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch delete mode 100644 patches/0047-write_iter/bluetooth.patch delete mode 100644 patches/0050-iov_iter/bluetooth.patch delete mode 100644 patches/0052-deactivate-ptp-pin/igb.patch delete mode 100644 patches/0053-remove_wait_on_bit_timeout/btusb.patch delete mode 100644 patches/0053-remove_wait_on_bit_timeout/hci_intel.patch delete mode 100644 patches/0062-acpi-gpio-remove/hci_bcm.patch delete mode 100644 patches/0062-acpi-gpio-remove/hci_intel.patch delete mode 100644 patches/0072-netdevice-ndo_fdb_add/igb.patch delete mode 100644 patches/flow_dissector.patch diff --git a/backport/Kconfig.sources b/backport/Kconfig.sources index b4083a6d..93ca3cd8 100644 --- a/backport/Kconfig.sources +++ b/backport/Kconfig.sources @@ -4,9 +4,7 @@ source "$BACKPORT_DIR/compat/Kconfig" # these are copied from the kernel source "$BACKPORT_DIR/net/wireless/Kconfig" source "$BACKPORT_DIR/net/mac80211/Kconfig" -source "$BACKPORT_DIR/net/bluetooth/Kconfig" source "$BACKPORT_DIR/drivers/net/wireless/Kconfig" -source "$BACKPORT_DIR/drivers/net/ethernet/Kconfig" source "$BACKPORT_DIR/drivers/net/usb/Kconfig" source "$BACKPORT_DIR/drivers/ssb/Kconfig" @@ -14,8 +12,6 @@ source "$BACKPORT_DIR/drivers/bcma/Kconfig" source "$BACKPORT_DIR/net/nfc/Kconfig" -source "$BACKPORT_DIR/drivers/media/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 6eb62cb9..a8aad0b1 100644 --- a/backport/Makefile.kernel +++ b/backport/Makefile.kernel @@ -40,15 +40,11 @@ obj-y += compat/ obj-$(CPTCFG_CFG80211) += net/wireless/ obj-$(CPTCFG_MAC80211) += net/mac80211/ obj-$(CPTCFG_WLAN) += drivers/net/wireless/ -obj-$(CPTCFG_BT) += net/bluetooth/ -obj-$(CPTCFG_BT) += drivers/bluetooth/ obj-$(CPTCFG_SSB) += drivers/ssb/ obj-$(CPTCFG_BCMA) += drivers/bcma/ -obj-$(CPTCFG_ETHERNET) += drivers/net/ethernet/ obj-$(CPTCFG_USB_NET_RNDIS_WLAN) += drivers/net/usb/ obj-$(CPTCFG_NFC) += net/nfc/ obj-$(CPTCFG_NFC) += drivers/nfc/ -obj-$(CPTCFG_MEDIA_SUPPORT) += drivers/media/ obj-$(CPTCFG_USB_WDM) += drivers/usb/class/ obj-$(CPTCFG_USB_USBNET) += drivers/net/usb/ diff --git a/backport/backport-include/linux/freezer.h b/backport/backport-include/linux/freezer.h deleted file mode 100644 index c6053f30..00000000 --- a/backport/backport-include/linux/freezer.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __BACKPORT_FREEZER_H_INCLUDED -#define __BACKPORT_FREEZER_H_INCLUDED -#include_next - -#ifdef CONFIG_FREEZER -#if LINUX_VERSION_IS_LESS(3,11,0) -/* - * Like schedule_hrtimeout_range(), but should not block the freezer. Do not - * call this with locks held. - */ -#define freezable_schedule_hrtimeout_range LINUX_BACKPORT(freezable_schedule_hrtimeout_range) -static inline int freezable_schedule_hrtimeout_range(ktime_t *expires, - unsigned long delta, const enum hrtimer_mode mode) -{ - int __retval; - freezer_do_not_count(); - __retval = schedule_hrtimeout_range(expires, delta, mode); - freezer_count(); - return __retval; -} -#endif /* LINUX_VERSION_IS_LESS(3,11,0) */ - -#else /* !CONFIG_FREEZER */ - -#ifndef freezable_schedule_hrtimeout_range -#define freezable_schedule_hrtimeout_range(expires, delta, mode) \ - schedule_hrtimeout_range(expires, delta, mode) -#endif - -#endif /* !CONFIG_FREEZER */ - -#endif /* __BACKPORT_FREEZER_H_INCLUDED */ diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h index 6ee5c7d8..7e69b873 100644 --- a/backport/backport-include/linux/mm.h +++ b/backport/backport-include/linux/mm.h @@ -73,50 +73,6 @@ long backport_get_user_pages(unsigned long start, unsigned long nr_pages, #define FOLL_TRIED 0x800 /* a retry, previous pass started an IO */ #endif -#ifdef CPTCFG_BPAUTO_BUILD_FRAME_VECTOR -/* Container for pinned pfns / pages */ -struct frame_vector { - unsigned int nr_allocated; /* Number of frames we have space for */ - unsigned int nr_frames; /* Number of frames stored in ptrs array */ - bool got_ref; /* Did we pin pages by getting page ref? */ - bool is_pfns; /* Does array contain pages or pfns? */ - void *ptrs[0]; /* Array of pinned pfns / pages. Use - * pfns_vector_pages() or pfns_vector_pfns() - * for access */ -}; - -struct frame_vector *frame_vector_create(unsigned int nr_frames); -void frame_vector_destroy(struct frame_vector *vec); -int get_vaddr_frames(unsigned long start, unsigned int nr_pfns, - bool write, bool force, struct frame_vector *vec); -void put_vaddr_frames(struct frame_vector *vec); -int frame_vector_to_pages(struct frame_vector *vec); -void frame_vector_to_pfns(struct frame_vector *vec); - -static inline unsigned int frame_vector_count(struct frame_vector *vec) -{ - return vec->nr_frames; -} - -static inline struct page **frame_vector_pages(struct frame_vector *vec) -{ - if (vec->is_pfns) { - int err = frame_vector_to_pages(vec); - - if (err) - return ERR_PTR(err); - } - return (struct page **)(vec->ptrs); -} - -static inline unsigned long *frame_vector_pfns(struct frame_vector *vec) -{ - if (!vec->is_pfns) - frame_vector_to_pfns(vec); - return (unsigned long *)(vec->ptrs); -} -#endif - #if LINUX_VERSION_IS_LESS(4,1,9) && \ LINUX_VERSION_IS_GEQ(3,6,0) #define page_is_pfmemalloc LINUX_BACKPORT(page_is_pfmemalloc) diff --git a/backport/backport-include/linux/platform_data/media/si4713.h b/backport/backport-include/linux/platform_data/media/si4713.h deleted file mode 100644 index 3d49c32f..00000000 --- a/backport/backport-include/linux/platform_data/media/si4713.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __BACKPORT_SI4713_H -#define __BACKPORT_SI4713_H -#include -#if LINUX_VERSION_IS_GEQ(4,5,0) -#include_next -#else -#include -#endif /* < 4.5 */ - -#endif /* __BACKPORT_SI4713_H */ diff --git a/backport/backport-include/linux/platform_data/media/soc_camera_platform.h b/backport/backport-include/linux/platform_data/media/soc_camera_platform.h deleted file mode 100644 index 927bf8fa..00000000 --- a/backport/backport-include/linux/platform_data/media/soc_camera_platform.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __BACKPORT_SOC_CAMERA_H__ -#define __BACKPORT_SOC_CAMERA_H__ -#include -#if LINUX_VERSION_IS_GEQ(4,5,0) -#include_next -#else -#include -#endif /* < 4.5 */ - -#endif /* __BACKPORT_SOC_CAMERA_H__ */ diff --git a/backport/backport-include/linux/platform_data/media/timb_radio.h b/backport/backport-include/linux/platform_data/media/timb_radio.h deleted file mode 100644 index f1fb47a2..00000000 --- a/backport/backport-include/linux/platform_data/media/timb_radio.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __BACKPORT_TIMB_RADIO_ -#define __BACKPORT_TIMB_RADIO_ -#include -#if LINUX_VERSION_IS_GEQ(4,5,0) -#include_next -#else -#include -#endif /* < 4.5 */ - -#endif /* __BACKPORT_TIMB_RADIO_ */ diff --git a/backport/backport-include/linux/platform_data/media/timb_video.h b/backport/backport-include/linux/platform_data/media/timb_video.h deleted file mode 100644 index 82ff7887..00000000 --- a/backport/backport-include/linux/platform_data/media/timb_video.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __BACKPORT_TIMB_VIDEO_ -#define __BACKPORT_TIMB_VIDEO_ -#include -#if LINUX_VERSION_IS_GEQ(4,5,0) -#include_next -#else -#include -#endif /* < 4.5 */ - -#endif /* __BACKPORT_TIMB_VIDEO_ */ diff --git a/backport/backport-include/linux/regulator/driver.h b/backport/backport-include/linux/regulator/driver.h deleted file mode 100644 index f88d9bef..00000000 --- a/backport/backport-include/linux/regulator/driver.h +++ /dev/null @@ -1,33 +0,0 @@ -/* - * driver.h -- SoC Regulator driver support. - * - * Copyright (C) 2007, 2008 Wolfson Microelectronics PLC. - * - * Author: Liam Girdwood - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * Regulator Driver Interface. - */ - -#ifndef __BACKPORT_LINUX_REGULATOR_DRIVER_H_ -#define __BACKPORT_LINUX_REGULATOR_DRIVER_H_ - -#include -#include_next - -#if LINUX_VERSION_IS_LESS(3,13,0) && \ - LINUX_VERSION_IS_GEQ(3,5,0) -#define devm_regulator_register LINUX_BACKPORT(devm_regulator_register) -struct regulator_dev * -devm_regulator_register(struct device *dev, - const struct regulator_desc *regulator_desc, - const struct regulator_config *config); -#define devm_regulator_unregister LINUX_BACKPORT(devm_regulator_unregister) -void devm_regulator_unregister(struct device *dev, struct regulator_dev *rdev); -#endif /* LINUX_VERSION_IS_LESS(3,13,0) && - LINUX_VERSION_IS_GEQ(3,5,0) */ - -#endif /* __BACKPORT_LINUX_REGULATOR_DRIVER_H_ */ diff --git a/backport/backport-include/sound/core.h b/backport/backport-include/sound/core.h deleted file mode 100644 index 79f8b319..00000000 --- a/backport/backport-include/sound/core.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _BACKPORT_SOUND_CORE_H -#define _BACKPORT_SOUND_CORE_H -#include_next - -#if LINUX_VERSION_IS_LESS(3,15,0) -#define snd_card_new LINUX_BACKPORT(snd_card_new) -static inline -int snd_card_new(struct device *parent, int idx, const char *xid, - struct module *module, int extra_size, - struct snd_card **card_ret) -{ - int ret; - - ret = snd_card_create(idx, xid, module, extra_size, card_ret); - snd_card_set_dev(*card_ret, parent); - return ret; -} -#endif - -#endif /* _BACKPORT_SOUND_CORE_H */ diff --git a/backport/backport-include/sound/pcm.h b/backport/backport-include/sound/pcm.h deleted file mode 100644 index d5794ef9..00000000 --- a/backport/backport-include/sound/pcm.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __BACKPORT_SOUND_PCM_H -#define __BACKPORT_SOUND_PCM_H -#include_next -#include - -#if LINUX_VERSION_IS_LESS(3,19,0) -/** - * snd_pcm_stop_xrun - stop the running streams as XRUN - * @substream: the PCM substream instance - * - * This stops the given running substream (and all linked substreams) as XRUN. - * Unlike snd_pcm_stop(), this function takes the substream lock by itself. - * - * Return: Zero if successful, or a negative error code. - */ -static inline int snd_pcm_stop_xrun(struct snd_pcm_substream *substream) -{ - unsigned long flags; - int ret = 0; - - snd_pcm_stream_lock_irqsave(substream, flags); - if (snd_pcm_running(substream)) - ret = snd_pcm_stop(substream, SNDRV_PCM_STATE_XRUN); - snd_pcm_stream_unlock_irqrestore(substream, flags); - return ret; -} -#endif /* LINUX_VERSION_IS_LESS(3,19,0) */ - -#endif /* __BACKPORT_SOUND_PCM_H */ diff --git a/backport/compat/Kconfig b/backport/compat/Kconfig index d73e9a9e..ed3a5872 100644 --- a/backport/compat/Kconfig +++ b/backport/compat/Kconfig @@ -139,31 +139,6 @@ config BPAUTO_BUCKET_LOCKS default y if BPAUTO_RHASHTABLE #c-file lib/bucket_locks.c -config BPAUTO_BUILD_HDMI - bool - # the hdmi driver got some new apis like hdmi_infoframe_unpack() in - # kernel 4.0 which are used by some drivers - depends on KERNEL_4_0 - #h-file linux/hdmi.h - #c-file drivers/video/hdmi.c - -config BPAUTO_HDMI - bool - select BPAUTO_BUILD_HDMI if KERNEL_4_0 - # these drivers are using the new features of the hdmi driver. - default y if BACKPORTED_VIDEO_ADV7511 - default y if BACKPORTED_VIDEO_ADV7604 - default y if BACKPORTED_VIDEO_ADV7842 - -config BPAUTO_FRAME_VECTOR - bool - -config BPAUTO_BUILD_FRAME_VECTOR - bool - default n if FRAME_VECTOR - default y if BPAUTO_FRAME_VECTOR - #c-file mm/frame_vector.c - config BPAUTO_REFCOUNT bool default y diff --git a/backport/compat/backport-3.13.c b/backport/compat/backport-3.13.c index 496bee60..9e5076fb 100644 --- a/backport/compat/backport-3.13.c +++ b/backport/compat/backport-3.13.c @@ -17,81 +17,6 @@ #include #include -#if LINUX_VERSION_IS_GEQ(3,5,0) -#ifdef CONFIG_REGULATOR -#include -#include -#include -#include - -static void devm_rdev_release(struct device *dev, void *res) -{ - regulator_unregister(*(struct regulator_dev **)res); -} - -/** - * devm_regulator_register - Resource managed regulator_register() - * @regulator_desc: regulator to register - * @config: runtime configuration for regulator - * - * Called by regulator drivers to register a regulator. Returns a - * valid pointer to struct regulator_dev on success or an ERR_PTR() on - * error. The regulator will automatically be released when the device - * is unbound. - */ -struct regulator_dev *devm_regulator_register(struct device *dev, - const struct regulator_desc *regulator_desc, - const struct regulator_config *config) -{ - struct regulator_dev **ptr, *rdev; - - ptr = devres_alloc(devm_rdev_release, sizeof(*ptr), - GFP_KERNEL); - if (!ptr) - return ERR_PTR(-ENOMEM); - - rdev = regulator_register(regulator_desc, config); - if (!IS_ERR(rdev)) { - *ptr = rdev; - devres_add(dev, ptr); - } else { - devres_free(ptr); - } - - return rdev; -} -EXPORT_SYMBOL_GPL(devm_regulator_register); - -static int devm_rdev_match(struct device *dev, void *res, void *data) -{ - struct regulator_dev **r = res; - if (!r || !*r) { - WARN_ON(!r || !*r); - return 0; - } - return *r == data; -} - -/** - * devm_regulator_unregister - Resource managed regulator_unregister() - * @regulator: regulator to free - * - * Unregister a regulator registered with devm_regulator_register(). - * Normally this function will not need to be called and the resource - * management code will ensure that the resource is freed. - */ -void devm_regulator_unregister(struct device *dev, struct regulator_dev *rdev) -{ - int rc; - - rc = devres_release(dev, devm_rdev_release, devm_rdev_match, rdev); - if (rc != 0) - WARN_ON(rc); -} -EXPORT_SYMBOL_GPL(devm_regulator_unregister); -#endif /* CONFIG_REGULATOR */ -#endif /* LINUX_VERSION_IS_GEQ(3,5,0) */ - /************* generic netlink backport *****************/ #if RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,0) diff --git a/dependencies b/dependencies index 80e72c8a..628f82bd 100644 --- a/dependencies +++ b/dependencies @@ -1,8 +1,6 @@ # List the minimum kernel version required for each # of the listed Kconfig symbols -ATL1C 3.5 - # depends on -EPROBE_DEFER and others now WL1251_SPI 3.5 @@ -22,37 +20,11 @@ HOSTAP 3.10 AIRO 3.9 AIRO_CS 3.9 -# Media -MEDIA_SUPPORT 3.8 -# someone has to backport "firewire: introduce fw_driver.probe and .remove methods" -DVB_FIREDTV 3.11 - -SOC_CAMERA_PLATFORM 3.9 - -# missing linux/gpio/consumer.h -# consumer.h cannot be backported currently, as functions rely -# on in-kernel functionality (GPIO_DEVRES), we can now backport -# in-kernel functionality but we'd need to make that depend on -# integration only and figure out a way to easily split that. -# This does not seem like a good test desirable test case to -# start that work with. -VIDEO_ADP1653 3.13 -VIDEO_TC358743 3.13 -VIDEO_MT9P031 3.13 - # missing linux/property.h NFC_ST95HF 3.18 # missing devm_gpiod_get_optional() # this needs devm_gpiod_get_optional() with 3 arguments. -I2C_SI4713 3.17 -USB_SI4713 3.17 -PLATFORM_SI4713 3.17 -SOC_CAMERA_OV2640 3.17 -VIDEO_ADV7604 3.17 -VIDEO_COBALT 3.17 -VIDEO_TVP5150 3.17 -VIDEO_EM28XX_V4L2 3.17 NFC_PN544_I2C 3.17 NFC_TRF7970A 3.17 @@ -76,17 +48,6 @@ NFC_ST_NCI_I2C 3.19 NFC_ST_NCI_SPI 3.19 NFC_PN544_I2C 3.19 -# for whoever wants to backport this: GPIOF_EXPORT was redefined via commit -# 79a9becd on v3.13-rc1~120^2~15, before this it was redefined via commit -# f567fde2 on v3.5-rc7~32^2~4 and finally added via commit fc3a1f04 on -# v3.5-rc1~93^2~25. We don't address any of these changes yet so we require -# the latest interpretation. -VIDEO_S5K6AA 3.13 -VIDEO_S5K6A3 3.13 - -# this needs arch_phys_wc_add(), arch_phys_wc_del() and pat_enabled() -VIDEO_FB_IVTV 4.2 - BCMA_DRIVER_MIPS 3.3 SSB_DRIVER_MIPS 3.3 # needs GPIO stuff we didn't backport @@ -100,9 +61,6 @@ BCMA_HOST_SOC 3.7 # Uses gpiochip_get_data() BCMA_DRIVER_GPIO 4.5 -VIDEO_EM28XX_DVB 4.5 -DVB_CXD2820R 4.5 -DVB_USB_ANYSEE 4.5 # NFC core needs PF_NFC defined in socket.h which was # only introduced in kernel 3.1 @@ -124,12 +82,6 @@ NFC_MEI_PHY 4.10 NFC_PN544_I2C 3.13 NFC_FDP 3.13 -IR_IMG 3.5 - -# missing include/linux/mfd/syscon.h file -IR_HIX5HD2 3.7 -IR_HIX5HD2 kconfig: CONFIG_MFD_SYSCON - # tracing results in compile errors ATH10K_TRACING 3.4 ATH_TRACEPOINTS 3.1 @@ -137,13 +89,6 @@ ATH_TRACEPOINTS 3.1 # missigng add_hwgenerator_randomness() ATH9K_HWRNG 3.17 -# depends on netdev_rss_key_fill() which uses net_get_random_once() -# and since net_get_random_once() depends on static keys we've decided -# to backport that only down to 3.5. For full details refer to backports -# commit 8cb8816d -# mpls_features was added with kernel 3.11 -IGB 3.11 - # This driver needs mmc_hw_reset() which was added in kernel version 3.2 MWIFIEX_SDIO 3.2 diff --git a/patches/0001-v4l2-dma_mmap_coherent-revert.patch b/patches/0001-v4l2-dma_mmap_coherent-revert.patch deleted file mode 100644 index 85c1bb01..00000000 --- a/patches/0001-v4l2-dma_mmap_coherent-revert.patch +++ /dev/null @@ -1,88 +0,0 @@ -Commit c60520fa needs to be reverted for older kernels because -although we can backport some new DMA changes some other -larger changes ended up extending some core dma data -structures, for details see bca0fa5f as an example. We're -aided with this revert by having added vb2_mmap_pfn_range() to -compat. The main reason to revert is usage of the new -dma_mmap_coherent() and core changes required via -bca0fa5f. - -commit c60520fa50cd86d64bc8ebb34300ddc4ca91393d -Author: Marek Szyprowski -Date: Thu Jun 14 11:32:21 2012 -0300 - - [media] v4l: vb2-dma-contig: let mmap method to use dma_mmap_coherent call - - Let mmap method to use dma_mmap_coherent call. Moreover, this patch removes - vb2_mmap_pfn_range from videobuf2 helpers as it was suggested by Laurent - Pinchart. The function is no longer used in vb2 code. - - Signed-off-by: Marek Szyprowski - Signed-off-by: Tomasz Stanislawski - Acked-by: Laurent Pinchart - Acked-by: Hans Verkuil - Signed-off-by: Mauro Carvalho Chehab - ---- a/drivers/media/v4l2-core/videobuf2-dma-contig.c -+++ b/drivers/media/v4l2-core/videobuf2-dma-contig.c -@@ -177,6 +177,52 @@ static void *vb2_dc_alloc(void *alloc_ct - return buf; - } - -+#if LINUX_VERSION_IS_LESS(3,9,0) -+#if LINUX_VERSION_IS_GEQ(3,2,0) -+static int -+backport_vb2_mmap_pfn_range(struct vm_area_struct *vma, unsigned long paddr, -+ unsigned long size, -+ const struct vm_operations_struct *vm_ops, -+ void *priv) -+{ -+ int ret; -+ -+ size = min_t(unsigned long, vma->vm_end - vma->vm_start, size); -+ -+ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); -+ ret = remap_pfn_range(vma, vma->vm_start, paddr >> PAGE_SHIFT, -+ size, vma->vm_page_prot); -+ if (ret) { -+ printk(KERN_ERR "Remapping memory failed, error: %d\n", ret); -+ return ret; -+ } -+ -+ vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP; -+ vma->vm_private_data = priv; -+ vma->vm_ops = vm_ops; -+ -+ vma->vm_ops->open(vma); -+ -+ pr_debug("%s: mapped paddr 0x%08lx at 0x%08lx, size %ld\n", -+ __func__, paddr, vma->vm_start, size); -+ -+ return 0; -+} -+ -+static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma) -+{ -+ struct vb2_dc_buf *buf = buf_priv; -+ -+ if (!buf) { -+ printk(KERN_ERR "No buffer to map\n"); -+ return -EINVAL; -+ } -+ -+ return backport_vb2_mmap_pfn_range(vma, buf->dma_addr, buf->size, -+ &vb2_common_vm_ops, &buf->handler); -+} -+#endif /* LINUX_VERSION_IS_GEQ(3,2,0) */ -+#else - static int vb2_dc_mmap(void *buf_priv, struct vm_area_struct *vma) - { - struct vb2_dc_buf *buf = buf_priv; -@@ -213,6 +259,7 @@ static int vb2_dc_mmap(void *buf_priv, s - - return 0; - } -+#endif /* LINUX_VERSION_IS_LESS(3,9,0) */ - - /*********************************************/ - /* DMABUF ops for exporters */ diff --git a/patches/0013-fix-makefile-includes/bluetooth.patch b/patches/0013-fix-makefile-includes/bluetooth.patch deleted file mode 100644 index db732995..00000000 --- a/patches/0013-fix-makefile-includes/bluetooth.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/net/bluetooth/6lowpan.c -+++ b/net/bluetooth/6lowpan.c -@@ -18,6 +18,7 @@ - #include - - #include -+#include - #include - #include - diff --git a/patches/0013-fix-makefile-includes/frame_vector.patch b/patches/0013-fix-makefile-includes/frame_vector.patch deleted file mode 100644 index 66d9eaf3..00000000 --- a/patches/0013-fix-makefile-includes/frame_vector.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/compat/mm-frame_vector.c -+++ b/compat/mm-frame_vector.c -@@ -6,6 +6,7 @@ - #include - #include - #include -+#include - - /** - * get_vaddr_frames() - map virtual addresses to pfns diff --git a/patches/0013-fix-makefile-includes/igb.patch b/patches/0013-fix-makefile-includes/igb.patch deleted file mode 100644 index a0804dc8..00000000 --- a/patches/0013-fix-makefile-includes/igb.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c -index 55a1405c..1409e20 100644 ---- a/drivers/net/ethernet/intel/igb/igb_main.c -+++ b/drivers/net/ethernet/intel/igb/igb_main.c -@@ -34,6 +34,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch b/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch deleted file mode 100644 index 81371523..00000000 --- a/patches/0020-tty-termios/net_bluetooth_hci_ldisc.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/drivers/bluetooth/hci_ldisc.c -+++ b/drivers/bluetooth/hci_ldisc.c -@@ -24,6 +24,7 @@ - */ - - #include -+#include - - #include - #include -@@ -269,7 +270,11 @@ void hci_uart_set_flow_control(struct hc - - if (enable) { - /* Disable hardware flow control */ -+#if LINUX_VERSION_IS_GEQ(3,7,0) - ktermios = tty->termios; -+#else -+ ktermios = *tty->termios; -+#endif - ktermios.c_cflag &= ~CRTSCTS; - status = tty_set_termios(tty, &ktermios); - BT_DBG("Disabling hardware flow control: %s", -@@ -303,7 +308,11 @@ void hci_uart_set_flow_control(struct hc - BT_DBG("Setting RTS: %s", status ? "failed" : "success"); - - /* Re-enable hardware flow control */ -+#if LINUX_VERSION_IS_GEQ(3,7,0) - ktermios = tty->termios; -+#else -+ ktermios = *tty->termios; -+#endif - ktermios.c_cflag |= CRTSCTS; - status = tty_set_termios(tty, &ktermios); - BT_DBG("Enabling hardware flow control: %s", -@@ -324,7 +333,11 @@ void hci_uart_init_tty(struct hci_uart * - struct ktermios ktermios; - - /* Bring the UART into a known 8 bits no parity hw fc state */ -+#if LINUX_VERSION_IS_GEQ(3,7,0) - ktermios = tty->termios; -+#else -+ ktermios = *tty->termios; -+#endif - ktermios.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | - INLCR | IGNCR | ICRNL | IXON); - ktermios.c_oflag &= ~OPOST; -@@ -342,7 +355,11 @@ void hci_uart_set_baudrate(struct hci_ua - struct tty_struct *tty = hu->tty; - struct ktermios ktermios; - -+#if LINUX_VERSION_IS_GEQ(3,7,0) - ktermios = tty->termios; -+#else -+ ktermios = *tty->termios; -+#endif - ktermios.c_cflag &= ~CBAUD; - tty_termios_encode_baud_rate(&ktermios, speed, speed); - -@@ -350,7 +367,7 @@ void hci_uart_set_baudrate(struct hci_ua - tty_set_termios(tty, &ktermios); - - BT_DBG("%s: New tty speeds: %d/%d", hu->hdev->name, -- tty->termios.c_ispeed, tty->termios.c_ospeed); -+ ktermios.c_ispeed, ktermios.c_ospeed); - } - - static int hci_uart_setup(struct hci_dev *hdev) diff --git a/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch b/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch deleted file mode 100644 index 71aa75dd..00000000 --- a/patches/0020-tty-termios/net_bluetooth_rfcomm_tty.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/net/bluetooth/rfcomm/tty.c -+++ b/net/bluetooth/rfcomm/tty.c -@@ -869,7 +869,11 @@ static int rfcomm_tty_ioctl(struct tty_s - - static void rfcomm_tty_set_termios(struct tty_struct *tty, struct ktermios *old) - { -+#if LINUX_VERSION_IS_GEQ(3,7,0) - struct ktermios *new = &tty->termios; -+#else -+ struct ktermios *new = tty->termios; -+#endif - int old_baud_rate = tty_termios_baud_rate(old); - int new_baud_rate = tty_termios_baud_rate(new); - diff --git a/patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch b/patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch deleted file mode 100644 index a64c0290..00000000 --- a/patches/0021-umode_t-api-change/drivers_net_wireless_ath_ath9k_debug.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/drivers/net/wireless/ath/ath9k/spectral.c -+++ b/drivers/net/wireless/ath/ath9k/spectral.c -@@ -478,7 +478,11 @@ static const struct file_operations fops - - static struct dentry *create_buf_file_handler(const char *filename, - struct dentry *parent, -+#if LINUX_VERSION_IS_GEQ(3,3,0) - umode_t mode, -+#else -+ int mode, -+#endif - struct rchan_buf *buf, - int *is_global) - { diff --git a/patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch b/patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch deleted file mode 100644 index 6cccf460..00000000 --- a/patches/0029-struct_hid_ll_driver-extensions/net_bluetooth_hidp_core.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- a/net/bluetooth/hidp/core.c -+++ b/net/bluetooth/hidp/core.c -@@ -224,6 +224,7 @@ static void hidp_input_report(struct hid - input_sync(dev); - } - -+#if LINUX_VERSION_IS_GEQ(3,15,0) - static int hidp_get_raw_report(struct hid_device *hid, - unsigned char report_number, - unsigned char *data, size_t count, -@@ -396,6 +397,7 @@ static int hidp_raw_request(struct hid_d - return -EIO; - } - } -+#endif - - static void hidp_idle_timeout(unsigned long arg) - { -@@ -739,8 +741,10 @@ static struct hid_ll_driver hidp_hid_dri - .stop = hidp_stop, - .open = hidp_open, - .close = hidp_close, -+#if LINUX_VERSION_IS_GEQ(3,15,0) - .raw_request = hidp_raw_request, - .output_report = hidp_output_report, -+#endif - }; - - /* This function sets up the hid device. It does not add it diff --git a/patches/0030-qdisc_tx_busylock/bluetooth.patch b/patches/0030-qdisc_tx_busylock/bluetooth.patch deleted file mode 100644 index 1025f03b..00000000 --- a/patches/0030-qdisc_tx_busylock/bluetooth.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/net/bluetooth/6lowpan.c -+++ b/net/bluetooth/6lowpan.c -@@ -628,7 +628,9 @@ static netdev_tx_t bt_xmit(struct sk_buf - return err < 0 ? NET_XMIT_DROP : err; - } - -+#if LINUX_VERSION_IS_GEQ(3,7,0) - static struct lock_class_key bt_tx_busylock; -+#endif - static struct lock_class_key bt_netdev_xmit_lock_key; - - static void bt_set_lockdep_class_one(struct net_device *dev, -@@ -641,7 +643,9 @@ static void bt_set_lockdep_class_one(str - static int bt_dev_init(struct net_device *dev) - { - netdev_for_each_tx_queue(dev, bt_set_lockdep_class_one, NULL); -+#if LINUX_VERSION_IS_GEQ(3,7,0) - dev->qdisc_tx_busylock = &bt_tx_busylock; -+#endif - - return 0; - } diff --git a/patches/0032-sriov_configure/igb_sriov_configure.patch b/patches/0032-sriov_configure/igb_sriov_configure.patch deleted file mode 100644 index 77e5eac9..00000000 --- a/patches/0032-sriov_configure/igb_sriov_configure.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/drivers/net/ethernet/intel/igb/igb_main.c -+++ b/drivers/net/ethernet/intel/igb/igb_main.c -@@ -7682,6 +7682,7 @@ static int igb_sriov_reinit(struct pci_d - return 0; - } - -+#if LINUX_VERSION_IS_GEQ(3,8,0) - static int igb_pci_disable_sriov(struct pci_dev *dev) - { - int err = igb_disable_sriov(dev); -@@ -7691,6 +7692,7 @@ static int igb_pci_disable_sriov(struct - - return err; - } -+#endif /* LINUX_VERSION_IS_GEQ(3,8,0) */ - - static int igb_pci_enable_sriov(struct pci_dev *dev, int num_vfs) - { diff --git a/patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch b/patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch deleted file mode 100644 index 093af647..00000000 --- a/patches/0033-ndo_vlan_rx_vid/igb_ndo_vlan_rx_vid.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- a/drivers/net/ethernet/intel/igb/igb_main.c -+++ b/drivers/net/ethernet/intel/igb/igb_main.c -@@ -158,8 +158,16 @@ static void igb_tx_timeout(struct net_de - static void igb_reset_task(struct work_struct *); - static void igb_vlan_mode(struct net_device *netdev, - netdev_features_t features); -+#if LINUX_VERSION_IS_GEQ(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); -+#elif LINUX_VERSION_IS_GEQ(3,3,0) -+static int igb_vlan_rx_add_vid(struct net_device *, u16); -+static int igb_vlan_rx_kill_vid(struct net_device *, u16); -+#else -+static void igb_vlan_rx_add_vid(struct net_device *, u16); -+static void igb_vlan_rx_kill_vid(struct net_device *, u16); -+#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */ - 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 *); -@@ -7349,8 +7357,14 @@ static void igb_vlan_mode(struct net_dev - igb_set_vf_vlan_strip(adapter, adapter->vfs_allocated_count, enable); - } - -+#if LINUX_VERSION_IS_GEQ(3,10,0) - static int igb_vlan_rx_add_vid(struct net_device *netdev, - __be16 proto, u16 vid) -+#elif LINUX_VERSION_IS_GEQ(3,3,0) -+static int igb_vlan_rx_add_vid(struct net_device *netdev, u16 vid) -+#else -+static void igb_vlan_rx_add_vid(struct net_device *netdev, u16 vid) -+#endif - { - struct igb_adapter *adapter = netdev_priv(netdev); - struct e1000_hw *hw = &adapter->hw; -@@ -7362,11 +7376,19 @@ static int igb_vlan_rx_add_vid(struct ne - - set_bit(vid, adapter->active_vlans); - -+#if LINUX_VERSION_IS_GEQ(3,3,0) - return 0; -+#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */ - } - -+#if LINUX_VERSION_IS_GEQ(3,10,0) - static int igb_vlan_rx_kill_vid(struct net_device *netdev, - __be16 proto, u16 vid) -+#elif LINUX_VERSION_IS_GEQ(3,3,0) -+static int igb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) -+#else -+static void igb_vlan_rx_kill_vid(struct net_device *netdev, u16 vid) -+#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */ - { - struct igb_adapter *adapter = netdev_priv(netdev); - int pf_id = adapter->vfs_allocated_count; -@@ -7378,7 +7400,9 @@ static int igb_vlan_rx_kill_vid(struct n - - clear_bit(vid, adapter->active_vlans); - -+#if LINUX_VERSION_IS_GEQ(3,3,0) - return 0; -+#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */ - } - - static void igb_restore_vlan(struct igb_adapter *adapter) -@@ -7386,10 +7410,18 @@ static void igb_restore_vlan(struct igb_ - u16 vid = 1; - - igb_vlan_mode(adapter->netdev, adapter->netdev->features); -+#if LINUX_VERSION_IS_GEQ(3,10,0) - igb_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), 0); -+#else -+ igb_vlan_rx_add_vid(adapter->netdev, 0); -+#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */ - - for_each_set_bit_from(vid, adapter->active_vlans, VLAN_N_VID) -+#if LINUX_VERSION_IS_GEQ(3,10,0) - igb_vlan_rx_add_vid(adapter->netdev, htons(ETH_P_8021Q), vid); -+#else -+ igb_vlan_rx_add_vid(adapter->netdev, vid); -+#endif /* LINUX_VERSION_IS_GEQ(3,10,0) */ - } - - int igb_set_spd_dplx(struct igb_adapter *adapter, u32 spd, u8 dplx) diff --git a/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch b/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch deleted file mode 100644 index 73666630..00000000 --- a/patches/0038-ethtool_rxfh_indir/igb_rxfh_indir.patch +++ /dev/null @@ -1,92 +0,0 @@ ---- a/drivers/net/ethernet/intel/igb/igb_ethtool.c -+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c -@@ -2860,19 +2860,28 @@ static void igb_ethtool_complete(struct - pm_runtime_put(&adapter->pdev->dev); - } - -+#if LINUX_VERSION_IS_GEQ(3,3,0) - static u32 igb_get_rxfh_indir_size(struct net_device *netdev) - { - return IGB_RETA_SIZE; - } - -+#if LINUX_VERSION_IS_GEQ(3,19,0) - static int igb_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key, - u8 *hfunc) -+#elif LINUX_VERSION_IS_GEQ(3,16,0) -+static int igb_get_rxfh(struct net_device *netdev, u32 *indir, u8 *key) -+#else -+static int igb_get_rxfh(struct net_device *netdev, u32 *indir) -+#endif - { - struct igb_adapter *adapter = netdev_priv(netdev); - int i; - -+#if LINUX_VERSION_IS_GEQ(3,19,0) - if (hfunc) - *hfunc = ETH_RSS_HASH_TOP; -+#endif - if (!indir) - return 0; - for (i = 0; i < IGB_RETA_SIZE; i++) -@@ -2880,6 +2889,7 @@ static int igb_get_rxfh(struct net_devic - - return 0; - } -+#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */ - - void igb_write_rss_indir_tbl(struct igb_adapter *adapter) - { -@@ -2916,18 +2926,28 @@ void igb_write_rss_indir_tbl(struct igb_ - } - } - -+#if LINUX_VERSION_IS_GEQ(3,3,0) -+#if LINUX_VERSION_IS_GEQ(3,19,0) - static int igb_set_rxfh(struct net_device *netdev, const u32 *indir, - const u8 *key, const u8 hfunc) -+#elif LINUX_VERSION_IS_GEQ(3,16,0) -+static int igb_set_rxfh(struct net_device *netdev, const u32 *indir, -+ const u8 *key) -+#else -+static int igb_set_rxfh(struct net_device *netdev, const u32 *indir) -+#endif - { - struct igb_adapter *adapter = netdev_priv(netdev); - struct e1000_hw *hw = &adapter->hw; - int i; - u32 num_queues; - -+#if LINUX_VERSION_IS_GEQ(3,19,0) - /* We do not allow change in unsupported parameters */ - if (key || - (hfunc != ETH_RSS_HASH_NO_CHANGE && hfunc != ETH_RSS_HASH_TOP)) - return -EOPNOTSUPP; -+#endif - if (!indir) - return 0; - -@@ -2956,6 +2976,7 @@ static int igb_set_rxfh(struct net_devic - - return 0; - } -+#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */ - - static unsigned int igb_max_channels(struct igb_adapter *adapter) - { -@@ -3075,9 +3096,15 @@ static const struct ethtool_ops igb_etht - .set_eee = igb_set_eee, - .get_module_info = igb_get_module_info, - .get_module_eeprom = igb_get_module_eeprom, -+#if LINUX_VERSION_IS_GEQ(3,16,0) - .get_rxfh_indir_size = igb_get_rxfh_indir_size, - .get_rxfh = igb_get_rxfh, - .set_rxfh = igb_set_rxfh, -+#elif LINUX_VERSION_IS_GEQ(3,3,0) -+ .get_rxfh_indir_size = igb_get_rxfh_indir_size, -+ .get_rxfh_indir = igb_get_rxfh, -+ .set_rxfh_indir = igb_set_rxfh, -+#endif /* LINUX_VERSION_IS_GEQ(3,3,0) */ - .get_channels = igb_get_channels, - .set_channels = igb_set_channels, - .begin = igb_ethtool_begin, diff --git a/patches/0042-pci_error_handlers/atl1e.patch b/patches/0042-pci_error_handlers/atl1e.patch deleted file mode 100644 index 2bfc1d5e..00000000 --- a/patches/0042-pci_error_handlers/atl1e.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -+++ b/drivers/net/ethernet/atheros/atl1e/atl1e_main.c -@@ -2555,7 +2555,11 @@ static void atl1e_io_resume(struct pci_d - netif_device_attach(netdev); - } - -+#if LINUX_VERSION_IS_GEQ(3,7,0) - static const struct pci_error_handlers atl1e_err_handler = { -+#else -+static struct pci_error_handlers atl1e_err_handler = { -+#endif /* LINUX_VERSION_IS_GEQ(3,7,0) */ - .error_detected = atl1e_io_error_detected, - .slot_reset = atl1e_io_slot_reset, - .resume = atl1e_io_resume, diff --git a/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch b/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch deleted file mode 100644 index 5e086bff..00000000 --- a/patches/0043-ndo_set_vf_rate/igb_set_vf_rate.patch +++ /dev/null @@ -1,28 +0,0 @@ ---- a/drivers/net/ethernet/intel/igb/igb_main.c -+++ b/drivers/net/ethernet/intel/igb/igb_main.c -@@ -8013,6 +8013,7 @@ static int igb_ndo_set_vf_bw(struct net_ - if (hw->mac.type != e1000_82576) - return -EOPNOTSUPP; - -+#if LINUX_VERSION_IS_GEQ(3,16,0) - if (min_tx_rate) - return -EINVAL; - -@@ -8026,7 +8027,17 @@ static int igb_ndo_set_vf_bw(struct net_ - adapter->vf_rate_link_speed = actual_link_speed; - adapter->vf_data[vf].tx_rate = (u16)max_tx_rate; - igb_set_vf_rate_limit(hw, vf, max_tx_rate, actual_link_speed); -+#else -+ actual_link_speed = igb_link_mbps(adapter->link_speed); -+ if ((vf >= adapter->vfs_allocated_count) || -+ (!(rd32(E1000_STATUS) & E1000_STATUS_LU)) || -+ (tx_rate < 0) || (tx_rate > actual_link_speed)) -+ return -EINVAL; - -+ adapter->vf_rate_link_speed = actual_link_speed; -+ adapter->vf_data[vf].tx_rate = (u16)tx_rate; -+ igb_set_vf_rate_limit(hw, vf, tx_rate, actual_link_speed); -+#endif /* LINUX_VERSION_IS_GEQ(3,16,0) */ - return 0; - } - diff --git a/patches/0047-write_iter/bluetooth.patch b/patches/0047-write_iter/bluetooth.patch deleted file mode 100644 index 093b526c..00000000 --- a/patches/0047-write_iter/bluetooth.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- a/drivers/bluetooth/hci_vhci.c -+++ b/drivers/bluetooth/hci_vhci.c -@@ -151,6 +151,7 @@ static int vhci_create_device(struct vhc - return 0; - } - -+#if LINUX_VERSION_IS_GEQ(3,18,0) - static inline ssize_t vhci_get_user(struct vhci_data *data, - struct iov_iter *from) - { -@@ -158,6 +159,17 @@ static inline ssize_t vhci_get_user(stru - struct sk_buff *skb; - __u8 pkt_type, opcode; - int ret; -+#else -+static inline ssize_t vhci_get_user(struct vhci_data *data, -+ const struct iovec *iov, -+ unsigned long count) -+{ -+ size_t len = iov_length(iov, count); -+ struct sk_buff *skb; -+ __u8 pkt_type, opcode; -+ unsigned long i; -+ int ret; -+#endif - - if (len < 2 || len > HCI_MAX_FRAME_SIZE) - return -EINVAL; -@@ -166,10 +178,20 @@ static inline ssize_t vhci_get_user(stru - if (!skb) - return -ENOMEM; - -+#if LINUX_VERSION_IS_GEQ(3,18,0) - if (copy_from_iter(skb_put(skb, len), len, from) != len) { - kfree_skb(skb); - return -EFAULT; - } -+#else -+ for (i = 0; i < count; i++) { -+ if (copy_from_user(skb_put(skb, iov[i].iov_len), -+ iov[i].iov_base, iov[i].iov_len)) { -+ kfree_skb(skb); -+ return -EFAULT; -+ } -+ } -+#endif - - pkt_type = *((__u8 *) skb->data); - skb_pull(skb, 1); -@@ -281,12 +303,21 @@ static ssize_t vhci_read(struct file *fi - return ret; - } - -+#if LINUX_VERSION_IS_GEQ(3,18,0) - static ssize_t vhci_write(struct kiocb *iocb, struct iov_iter *from) -+#else -+static ssize_t vhci_write(struct kiocb *iocb, const struct iovec *iov, -+ unsigned long count, loff_t pos) -+#endif - { - struct file *file = iocb->ki_filp; - struct vhci_data *data = file->private_data; - -+#if LINUX_VERSION_IS_GEQ(3,18,0) - return vhci_get_user(data, from); -+#else -+ return vhci_get_user(data, iov, count); -+#endif - } - - static unsigned int vhci_poll(struct file *file, poll_table *wait) -@@ -351,7 +382,11 @@ static int vhci_release(struct inode *in - static const struct file_operations vhci_fops = { - .owner = THIS_MODULE, - .read = vhci_read, -+#if LINUX_VERSION_IS_GEQ(3,18,0) - .write_iter = vhci_write, -+#else -+ .aio_write = vhci_write, -+#endif - .poll = vhci_poll, - .open = vhci_open, - .release = vhci_release, diff --git a/patches/0050-iov_iter/bluetooth.patch b/patches/0050-iov_iter/bluetooth.patch deleted file mode 100644 index 87506ff1..00000000 --- a/patches/0050-iov_iter/bluetooth.patch +++ /dev/null @@ -1,197 +0,0 @@ ---- a/include/net/bluetooth/l2cap.h -+++ b/include/net/bluetooth/l2cap.h -@@ -619,6 +619,12 @@ struct l2cap_ops { - struct sk_buff *(*alloc_skb) (struct l2cap_chan *chan, - unsigned long hdr_len, - unsigned long len, int nb); -+#if LINUX_VERSION_IS_LESS(3,19,0) -+ int (*memcpy_fromiovec) (struct l2cap_chan *chan, -+ unsigned char *kdata, -+ struct iovec *iov, -+ int len); -+#endif - }; - - struct l2cap_conn { -@@ -912,6 +918,33 @@ static inline long l2cap_chan_no_get_snd - return 0; - } - -+#if LINUX_VERSION_IS_LESS(3,19,0) -+static inline int l2cap_chan_no_memcpy_fromiovec(struct l2cap_chan *chan, -+ unsigned char *kdata, -+ struct iovec *iov, -+ int len) -+{ -+ /* Following is safe since for compiler definitions of kvec and -+ * iovec are identical, yielding the same in-core layout and alignment -+ */ -+ struct kvec *vec = (struct kvec *)iov; -+ -+ while (len > 0) { -+ if (vec->iov_len) { -+ int copy = min_t(unsigned int, len, vec->iov_len); -+ memcpy(kdata, vec->iov_base, copy); -+ len -= copy; -+ kdata += copy; -+ vec->iov_base += copy; -+ vec->iov_len -= copy; -+ } -+ vec++; -+ } -+ -+ return 0; -+} -+#endif -+ - extern bool disable_ertm; - - int l2cap_init_sockets(void); ---- a/net/bluetooth/6lowpan.c -+++ b/net/bluetooth/6lowpan.c -@@ -515,11 +515,18 @@ static int send_pkt(struct l2cap_chan *c - */ - chan->data = skb; - -+#if LINUX_VERSION_IS_LESS(3,19,0) -+ memset(&msg, 0, sizeof(msg)); -+ msg.msg_iov = (struct iovec *) &iv; -+ msg.msg_iovlen = 1; -+#endif - iv.iov_base = skb->data; - iv.iov_len = skb->len; - -+#if LINUX_VERSION_IS_GEQ(3,19,0) - memset(&msg, 0, sizeof(msg)); - iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iv, 1, skb->len); -+#endif - - err = l2cap_chan_send(chan, &msg, skb->len); - if (err > 0) { -@@ -1017,6 +1024,9 @@ static const struct l2cap_ops bt_6lowpan - .suspend = chan_suspend_cb, - .get_sndtimeo = chan_get_sndtimeo_cb, - .alloc_skb = chan_alloc_skb_cb, -+#if LINUX_VERSION_IS_LESS(3,19,0) -+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec, -+#endif - - .teardown = l2cap_chan_no_teardown, - .defer = l2cap_chan_no_defer, ---- a/net/bluetooth/a2mp.c -+++ b/net/bluetooth/a2mp.c -@@ -63,7 +63,12 @@ static void a2mp_send(struct amp_mgr *mg - - memset(&msg, 0, sizeof(msg)); - -+#if LINUX_VERSION_IS_GEQ(3,19,0) - iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, &iv, 1, total_len); -+#else -+ msg.msg_iov = (struct iovec *) &iv; -+ msg.msg_iovlen = 1; -+#endif - - l2cap_chan_send(chan, &msg, total_len); - -@@ -753,6 +758,9 @@ static const struct l2cap_ops a2mp_chan_ - .resume = l2cap_chan_no_resume, - .set_shutdown = l2cap_chan_no_set_shutdown, - .get_sndtimeo = l2cap_chan_no_get_sndtimeo, -+#if LINUX_VERSION_IS_LESS(3,19,0) -+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec, -+#endif - }; - - static struct l2cap_chan *a2mp_chan_open(struct l2cap_conn *conn, bool locked) ---- a/net/bluetooth/l2cap_core.c -+++ b/net/bluetooth/l2cap_core.c -@@ -2126,7 +2126,12 @@ static inline int l2cap_skbuff_fromiovec - struct sk_buff **frag; - int sent = 0; - -+#if LINUX_VERSION_IS_GEQ(3,19,0) - if (copy_from_iter(skb_put(skb, count), count, &msg->msg_iter) != count) -+#else -+ if (chan->ops->memcpy_fromiovec(chan, skb_put(skb, count), -+ msg->msg_iov, count)) -+#endif - return -EFAULT; - - sent += count; -@@ -2146,8 +2151,13 @@ static inline int l2cap_skbuff_fromiovec - - *frag = tmp; - -+#if LINUX_VERSION_IS_GEQ(3,19,0) - if (copy_from_iter(skb_put(*frag, count), count, - &msg->msg_iter) != count) -+#else -+ if (chan->ops->memcpy_fromiovec(chan, skb_put(*frag, count), -+ msg->msg_iov, count)) -+#endif - return -EFAULT; - - sent += count; ---- a/net/bluetooth/l2cap_sock.c -+++ b/net/bluetooth/l2cap_sock.c -@@ -1383,6 +1383,15 @@ static struct sk_buff *l2cap_sock_alloc_ - return skb; - } - -+#if LINUX_VERSION_IS_LESS(3,19,0) -+static int l2cap_sock_memcpy_fromiovec_cb(struct l2cap_chan *chan, -+ unsigned char *kdata, -+ struct iovec *iov, int len) -+{ -+ return memcpy_fromiovec(kdata, iov, len); -+} -+#endif -+ - static void l2cap_sock_ready_cb(struct l2cap_chan *chan) - { - struct sock *sk = chan->data; -@@ -1467,6 +1476,9 @@ static const struct l2cap_ops l2cap_chan - .set_shutdown = l2cap_sock_set_shutdown_cb, - .get_sndtimeo = l2cap_sock_get_sndtimeo_cb, - .alloc_skb = l2cap_sock_alloc_skb_cb, -+#if LINUX_VERSION_IS_LESS(3,19,0) -+ .memcpy_fromiovec = l2cap_sock_memcpy_fromiovec_cb, -+#endif - }; - - static void l2cap_sock_destruct(struct sock *sk) ---- a/net/bluetooth/smp.c -+++ b/net/bluetooth/smp.c -@@ -612,7 +612,12 @@ static void smp_send_cmd(struct l2cap_co - - memset(&msg, 0, sizeof(msg)); - -+#if LINUX_VERSION_IS_GEQ(3,19,0) - iov_iter_kvec(&msg.msg_iter, WRITE | ITER_KVEC, iv, 2, 1 + len); -+#else -+ msg.msg_iov = (struct iovec *) &iv; -+ msg.msg_iovlen = 2; -+#endif - - l2cap_chan_send(chan, &msg, 1 + len); - -@@ -3066,6 +3071,9 @@ static const struct l2cap_ops smp_chan_o - .suspend = l2cap_chan_no_suspend, - .set_shutdown = l2cap_chan_no_set_shutdown, - .get_sndtimeo = l2cap_chan_no_get_sndtimeo, -+#if LINUX_VERSION_IS_LESS(3,19,0) -+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec, -+#endif - }; - - static inline struct l2cap_chan *smp_new_conn_cb(struct l2cap_chan *pchan) -@@ -3114,6 +3122,9 @@ static const struct l2cap_ops smp_root_c - .resume = l2cap_chan_no_resume, - .set_shutdown = l2cap_chan_no_set_shutdown, - .get_sndtimeo = l2cap_chan_no_get_sndtimeo, -+#if LINUX_VERSION_IS_LESS(3,19,0) -+ .memcpy_fromiovec = l2cap_chan_no_memcpy_fromiovec, -+#endif - }; - - static struct l2cap_chan *smp_add_cid(struct hci_dev *hdev, u16 cid) diff --git a/patches/0052-deactivate-ptp-pin/igb.patch b/patches/0052-deactivate-ptp-pin/igb.patch deleted file mode 100644 index a82dd754..00000000 --- a/patches/0052-deactivate-ptp-pin/igb.patch +++ /dev/null @@ -1,136 +0,0 @@ ---- a/drivers/net/ethernet/intel/igb/igb.h -+++ b/drivers/net/ethernet/intel/igb/igb.h -@@ -443,7 +443,9 @@ struct igb_adapter { - u32 tx_hwtstamp_timeouts; - u32 rx_hwtstamp_cleared; - -+#if LINUX_VERSION_IS_GEQ(3,15,0) - struct ptp_pin_desc sdp_config[IGB_N_SDP]; -+#endif - struct { - struct timespec64 start; - struct timespec64 period; ---- a/drivers/net/ethernet/intel/igb/igb_ptp.c -+++ b/drivers/net/ethernet/intel/igb/igb_ptp.c -@@ -115,6 +115,7 @@ static cycle_t igb_ptp_read_82580(const - return val; - } - -+#if LINUX_VERSION_IS_GEQ(3,15,0) - /* SYSTIM read access for I210/I211 */ - static void igb_ptp_read_i210(struct igb_adapter *adapter, - struct timespec64 *ts) -@@ -133,6 +134,7 @@ static void igb_ptp_read_i210(struct igb - ts->tv_sec = sec; - ts->tv_nsec = nsec; - } -+#endif - - static void igb_ptp_write_i210(struct igb_adapter *adapter, - const struct timespec64 *ts) -@@ -265,6 +267,7 @@ static int igb_ptp_adjtime_82576(struct - return 0; - } - -+#if LINUX_VERSION_IS_GEQ(3,15,0) - static int igb_ptp_adjtime_i210(struct ptp_clock_info *ptp, s64 delta) - { - struct igb_adapter *igb = container_of(ptp, struct igb_adapter, -@@ -282,6 +285,7 @@ static int igb_ptp_adjtime_i210(struct p - - return 0; - } -+#endif - - static int igb_ptp_gettime_82576(struct ptp_clock_info *ptp, - struct timespec64 *ts) -@@ -302,6 +306,7 @@ static int igb_ptp_gettime_82576(struct - return 0; - } - -+#if LINUX_VERSION_IS_GEQ(3,15,0) - static int igb_ptp_gettime_i210(struct ptp_clock_info *ptp, - struct timespec64 *ts) - { -@@ -317,6 +322,7 @@ static int igb_ptp_gettime_i210(struct p - - return 0; - } -+#endif - - static int igb_ptp_settime_82576(struct ptp_clock_info *ptp, - const struct timespec64 *ts) -@@ -337,6 +343,7 @@ static int igb_ptp_settime_82576(struct - return 0; - } - -+#if LINUX_VERSION_IS_GEQ(3,15,0) - static int igb_ptp_settime_i210(struct ptp_clock_info *ptp, - const struct timespec64 *ts) - { -@@ -598,6 +605,7 @@ static int igb_ptp_feature_enable_i210(s - - return -EOPNOTSUPP; - } -+#endif - - static int igb_ptp_feature_enable(struct ptp_clock_info *ptp, - struct ptp_clock_request *rq, int on) -@@ -605,6 +613,7 @@ static int igb_ptp_feature_enable(struct - return -EOPNOTSUPP; - } - -+#if LINUX_VERSION_IS_GEQ(3,15,0) - static int igb_ptp_verify_pin(struct ptp_clock_info *ptp, unsigned int pin, - enum ptp_pin_function func, unsigned int chan) - { -@@ -618,6 +627,7 @@ static int igb_ptp_verify_pin(struct ptp - } - return 0; - } -+#endif - - /** - * igb_ptp_tx_work -@@ -1010,7 +1020,9 @@ void igb_ptp_init(struct igb_adapter *ad - { - struct e1000_hw *hw = &adapter->hw; - struct net_device *netdev = adapter->netdev; -+#if LINUX_VERSION_IS_GEQ(3,15,0) - int i; -+#endif - - switch (hw->mac.type) { - case e1000_82576: -@@ -1051,6 +1063,7 @@ void igb_ptp_init(struct igb_adapter *ad - /* Enable the timer functions by clearing bit 31. */ - wr32(E1000_TSAUXC, 0x0); - break; -+#if LINUX_VERSION_IS_GEQ(3,15,0) - case e1000_i210: - case e1000_i211: - for (i = 0; i < IGB_N_SDP; i++) { -@@ -1077,6 +1090,7 @@ void igb_ptp_init(struct igb_adapter *ad - /* Enable the timer functions by clearing bit 31. */ - wr32(E1000_TSAUXC, 0x0); - break; -+#endif - default: - adapter->ptp_clock = NULL; - return; -@@ -1088,11 +1102,14 @@ void igb_ptp_init(struct igb_adapter *ad - INIT_WORK(&adapter->ptp_tx_work, igb_ptp_tx_work); - - /* Initialize the clock and overflow work for devices that need it. */ -+#if LINUX_VERSION_IS_GEQ(3,15,0) - if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211)) { - struct timespec64 ts = ktime_to_timespec64(ktime_get_real()); - - igb_ptp_settime_i210(&adapter->ptp_caps, &ts); -- } else { -+ } else -+#endif -+ { - timecounter_init(&adapter->tc, &adapter->cc, - ktime_to_ns(ktime_get_real())); - diff --git a/patches/0053-remove_wait_on_bit_timeout/btusb.patch b/patches/0053-remove_wait_on_bit_timeout/btusb.patch deleted file mode 100644 index 52ed8b12..00000000 --- a/patches/0053-remove_wait_on_bit_timeout/btusb.patch +++ /dev/null @@ -1,110 +0,0 @@ ---- a/drivers/bluetooth/btusb.c -+++ b/drivers/bluetooth/btusb.c -@@ -1845,8 +1845,12 @@ static void btusb_intel_bootup(struct bt - return; - - if (test_and_clear_bit(BTUSB_BOOTING, &data->flags)) { -+#if LINUX_VERSION_IS_GEQ(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&data->flags, BTUSB_BOOTING); -+#else -+ wake_up_interruptible(&data->hdev->req_wait_q); -+#endif - } - } - -@@ -1863,8 +1867,12 @@ static void btusb_intel_secure_send_resu - - if (test_and_clear_bit(BTUSB_DOWNLOADING, &data->flags) && - test_bit(BTUSB_FIRMWARE_LOADED, &data->flags)) { -+#if LINUX_VERSION_IS_GEQ(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&data->flags, BTUSB_DOWNLOADING); -+#else -+ wake_up_interruptible(&data->hdev->req_wait_q); -+#endif - } - } - -@@ -2208,6 +2216,7 @@ static int btusb_setup_intel_new(struct - * and thus just timeout if that happens and fail the setup - * of this device. - */ -+#if LINUX_VERSION_IS_GEQ(3,17,0) - err = wait_on_bit_timeout(&data->flags, BTUSB_DOWNLOADING, - TASK_INTERRUPTIBLE, - msecs_to_jiffies(5000)); -@@ -2222,6 +2231,31 @@ static int btusb_setup_intel_new(struct - err = -ETIMEDOUT; - goto done; - } -+#else -+ if (test_bit(BTUSB_DOWNLOADING, &data->flags)) { -+ DECLARE_WAITQUEUE(wait, current); -+ signed long timeout; -+ -+ add_wait_queue(&hdev->req_wait_q, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ timeout = schedule_timeout(msecs_to_jiffies(5000)); -+ -+ remove_wait_queue(&hdev->req_wait_q, &wait); -+ -+ if (signal_pending(current)) { -+ BT_ERR("%s: Firmware loading interrupted", hdev->name); -+ err = -EINTR; -+ goto done; -+ } -+ -+ if (!timeout) { -+ BT_ERR("%s: Firmware loading timeout", hdev->name); -+ err = -ETIMEDOUT; -+ goto done; -+ } -+ } -+#endif - - if (test_bit(BTUSB_FIRMWARE_FAILED, &data->flags)) { - BT_ERR("%s: Firmware loading failed", hdev->name); -@@ -2261,6 +2295,7 @@ done: - */ - BT_INFO("%s: Waiting for device to boot", hdev->name); - -+#if LINUX_VERSION_IS_GEQ(3,17,0) - err = wait_on_bit_timeout(&data->flags, BTUSB_BOOTING, - TASK_INTERRUPTIBLE, - msecs_to_jiffies(1000)); -@@ -2274,6 +2309,33 @@ done: - BT_ERR("%s: Device boot timeout", hdev->name); - return -ETIMEDOUT; - } -+#else -+ if (test_bit(BTUSB_BOOTING, &data->flags)) { -+ DECLARE_WAITQUEUE(wait, current); -+ signed long timeout; -+ -+ add_wait_queue(&hdev->req_wait_q, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ /* Booting into operational firmware should not take -+ * longer than 1 second. However if that happens, then -+ * just fail the setup since something went wrong. -+ */ -+ timeout = schedule_timeout(msecs_to_jiffies(1000)); -+ -+ remove_wait_queue(&hdev->req_wait_q, &wait); -+ -+ if (signal_pending(current)) { -+ BT_ERR("%s: Device boot interrupted", hdev->name); -+ return -EINTR; -+ } -+ -+ if (!timeout) { -+ BT_ERR("%s: Device boot timeout", hdev->name); -+ return -ETIMEDOUT; -+ } -+ } -+#endif - - rettime = ktime_get(); - delta = ktime_sub(rettime, calltime); diff --git a/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch b/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch deleted file mode 100644 index c32df12c..00000000 --- a/patches/0053-remove_wait_on_bit_timeout/hci_intel.patch +++ /dev/null @@ -1,180 +0,0 @@ ---- a/drivers/bluetooth/hci_intel.c -+++ b/drivers/bluetooth/hci_intel.c -@@ -122,8 +122,9 @@ static u8 intel_convert_speed(unsigned i - static int intel_wait_booting(struct hci_uart *hu) - { - struct intel_data *intel = hu->priv; -- int err; -+ int err = 0; - -+#if LINUX_VERSION_IS_GEQ(3,17,0) - err = wait_on_bit_timeout(&intel->flags, STATE_BOOTING, - TASK_INTERRUPTIBLE, - msecs_to_jiffies(1000)); -@@ -137,6 +138,33 @@ static int intel_wait_booting(struct hci - bt_dev_err(hu->hdev, "Device boot timeout"); - return -ETIMEDOUT; - } -+#else -+ if (test_bit(STATE_BOOTING, &intel->flags)) { -+ DECLARE_WAITQUEUE(wait, current); -+ signed long timeout; -+ -+ add_wait_queue(&hu->hdev->req_wait_q, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ /* Booting into operational firmware should not take -+ * longer than 1 second. However if that happens, then -+ * just fail the setup since something went wrong. -+ */ -+ timeout = schedule_timeout(msecs_to_jiffies(1000)); -+ -+ remove_wait_queue(&hu->hdev->req_wait_q, &wait); -+ -+ if (signal_pending(current)) { -+ BT_ERR("%s: Device boot interrupted", hu->hdev->name); -+ return -EINTR; -+ } -+ -+ if (!timeout) { -+ BT_ERR("%s: Device boot timeout", hu->hdev->name); -+ return -ETIMEDOUT; -+ } -+ } -+#endif - - return err; - } -@@ -145,8 +173,9 @@ static int intel_wait_booting(struct hci - static int intel_wait_lpm_transaction(struct hci_uart *hu) - { - struct intel_data *intel = hu->priv; -- int err; -+ int err = 0; - -+#if LINUX_VERSION_IS_GEQ(3,17,0) - err = wait_on_bit_timeout(&intel->flags, STATE_LPM_TRANSACTION, - TASK_INTERRUPTIBLE, - msecs_to_jiffies(1000)); -@@ -160,6 +189,29 @@ static int intel_wait_lpm_transaction(st - bt_dev_err(hu->hdev, "LPM transaction timeout"); - return -ETIMEDOUT; - } -+#else -+ if (test_bit(STATE_LPM_TRANSACTION, &intel->flags)) { -+ DECLARE_WAITQUEUE(wait, current); -+ signed long timeout; -+ -+ add_wait_queue(&hu->hdev->req_wait_q, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ timeout = schedule_timeout(msecs_to_jiffies(1000)); -+ -+ remove_wait_queue(&hu->hdev->req_wait_q, &wait); -+ -+ if (signal_pending(current)) { -+ BT_ERR("%s: LPM transaction interrupted", hu->hdev->name); -+ return -EINTR; -+ } -+ -+ if (!timeout) { -+ BT_ERR("%s: LPM transaction timeout", hu->hdev->name); -+ return -ETIMEDOUT; -+ } -+ } -+#endif - - return err; - } -@@ -812,6 +864,7 @@ static int intel_setup(struct hci_uart * - * and thus just timeout if that happens and fail the setup - * of this device. - */ -+#if LINUX_VERSION_IS_GEQ(3,17,0) - err = wait_on_bit_timeout(&intel->flags, STATE_DOWNLOADING, - TASK_INTERRUPTIBLE, - msecs_to_jiffies(5000)); -@@ -826,6 +879,33 @@ static int intel_setup(struct hci_uart * - err = -ETIMEDOUT; - goto done; - } -+#else -+ if (test_bit(STATE_DOWNLOADING, &intel->flags)) { -+ DECLARE_WAITQUEUE(wait, current); -+ signed long timeout; -+ -+ add_wait_queue(&hdev->req_wait_q, &wait); -+ set_current_state(TASK_INTERRUPTIBLE); -+ -+ /* Booting into operational firmware should not take -+ * longer than 1 second. However if that happens, then -+ * just fail the setup since something went wrong. -+ */ -+ timeout = schedule_timeout(msecs_to_jiffies(5000)); -+ -+ remove_wait_queue(&hdev->req_wait_q, &wait); -+ -+ if (signal_pending(current)) { -+ BT_ERR("%s: Firmware loading interrupted", hdev->name); -+ return -EINTR; -+ } -+ -+ if (!timeout) { -+ BT_ERR("%s: Firmware loading timeout", hdev->name); -+ return -ETIMEDOUT; -+ } -+ } -+#endif - - if (test_bit(STATE_FIRMWARE_FAILED, &intel->flags)) { - bt_dev_err(hdev, "Firmware loading failed"); -@@ -957,8 +1037,12 @@ static int intel_recv_event(struct hci_d - - if (test_and_clear_bit(STATE_DOWNLOADING, &intel->flags) && - test_bit(STATE_FIRMWARE_LOADED, &intel->flags)) { -+#if LINUX_VERSION_IS_GEQ(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&intel->flags, STATE_DOWNLOADING); -+#else -+ wake_up_interruptible(&hu->hdev->req_wait_q); -+#endif - } - - /* When switching to the operational firmware the device -@@ -968,8 +1052,12 @@ static int intel_recv_event(struct hci_d - } else if (skb->len == 9 && hdr->evt == 0xff && hdr->plen == 0x07 && - skb->data[2] == 0x02) { - if (test_and_clear_bit(STATE_BOOTING, &intel->flags)) { -+#if LINUX_VERSION_IS_GEQ(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&intel->flags, STATE_BOOTING); -+#else -+ wake_up_interruptible(&hu->hdev->req_wait_q); -+#endif - } - } - recv: -@@ -1008,15 +1096,23 @@ static int intel_recv_lpm(struct hci_dev - case LPM_OP_SUSPEND_ACK: - set_bit(STATE_SUSPENDED, &intel->flags); - if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) { -+#if LINUX_VERSION_IS_GEQ(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); -+#else -+ wake_up_interruptible(&hu->hdev->req_wait_q); -+#endif - } - break; - case LPM_OP_RESUME_ACK: - clear_bit(STATE_SUSPENDED, &intel->flags); - if (test_and_clear_bit(STATE_LPM_TRANSACTION, &intel->flags)) { -+#if LINUX_VERSION_IS_GEQ(3,17,0) - smp_mb__after_atomic(); - wake_up_bit(&intel->flags, STATE_LPM_TRANSACTION); -+#else -+ wake_up_interruptible(&hu->hdev->req_wait_q); -+#endif - } - break; - default: diff --git a/patches/0062-acpi-gpio-remove/hci_bcm.patch b/patches/0062-acpi-gpio-remove/hci_bcm.patch deleted file mode 100644 index 77e343ee..00000000 --- a/patches/0062-acpi-gpio-remove/hci_bcm.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/drivers/bluetooth/hci_bcm.c -+++ b/drivers/bluetooth/hci_bcm.c -@@ -29,7 +29,9 @@ - #include - #include - #include -+#if LINUX_VERSION_IS_GEQ(3,13,0) - #include -+#endif - #include - #include - #include -@@ -148,8 +150,10 @@ static int bcm_gpio_set_power(struct bcm - if (powered && !IS_ERR(dev->clk) && !dev->clk_enabled) - clk_enable(dev->clk); - -+#if LINUX_VERSION_IS_GEQ(3,13,0) - gpiod_set_value(dev->shutdown, powered); - gpiod_set_value(dev->device_wakeup, powered); -+#endif - - if (!powered && !IS_ERR(dev->clk) && dev->clk_enabled) - clk_disable(dev->clk); -@@ -520,7 +524,9 @@ static int bcm_suspend_device(struct dev - - /* Suspend the device */ - if (bdev->device_wakeup) { -+#if LINUX_VERSION_IS_GEQ(3,13,0) - gpiod_set_value(bdev->device_wakeup, false); -+#endif - bt_dev_dbg(bdev, "suspend, delaying 15 ms"); - mdelay(15); - } -@@ -535,7 +541,9 @@ static int bcm_resume_device(struct devi - bt_dev_dbg(bdev, ""); - - if (bdev->device_wakeup) { -+#if LINUX_VERSION_IS_GEQ(3,13,0) - gpiod_set_value(bdev->device_wakeup, true); -+#endif - bt_dev_dbg(bdev, "resume, delaying 15 ms"); - mdelay(15); - } -@@ -618,6 +626,7 @@ unlock: - } - #endif - -+#if defined(CONFIG_ACPI) && LINUX_VERSION_IS_GEQ(3,19,0) - static const struct acpi_gpio_params device_wakeup_gpios = { 0, 0, false }; - static const struct acpi_gpio_params shutdown_gpios = { 1, 0, false }; - static const struct acpi_gpio_params host_wakeup_gpios = { 2, 0, false }; -@@ -629,7 +638,6 @@ static const struct acpi_gpio_mapping ac - { }, - }; - --#ifdef CONFIG_ACPI - static u8 acpi_active_low = ACPI_ACTIVE_LOW; - - /* IRQ polarity of some chipsets are not defined correctly in ACPI table. */ -@@ -812,7 +820,7 @@ static const struct hci_uart_proto bcm_p - .dequeue = bcm_dequeue, - }; - --#ifdef CONFIG_ACPI -+#if defined(CONFIG_ACPI) && LINUX_VERSION_IS_GEQ(3,19,0) - static const struct acpi_device_id bcm_acpi_match[] = { - { "BCM2E1A", 0 }, - { "BCM2E39", 0 }, -@@ -843,7 +851,9 @@ static struct platform_driver bcm_driver - .remove = bcm_remove, - .driver = { - .name = "hci_bcm", -+#if LINUX_VERSION_IS_GEQ(3,19,0) - .acpi_match_table = ACPI_PTR(bcm_acpi_match), -+#endif - .pm = &bcm_pm_ops, - }, - }; diff --git a/patches/0062-acpi-gpio-remove/hci_intel.patch b/patches/0062-acpi-gpio-remove/hci_intel.patch deleted file mode 100644 index 9237ce97..00000000 --- a/patches/0062-acpi-gpio-remove/hci_intel.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- a/drivers/bluetooth/hci_intel.c -+++ b/drivers/bluetooth/hci_intel.c -@@ -29,7 +29,9 @@ - #include - #include - #include -+#if LINUX_VERSION_IS_GEQ(3,13,0) - #include -+#endif - #include - #include - #include -@@ -379,7 +381,9 @@ static int intel_set_power(struct hci_ua - BT_INFO("hu %p, Switching compatible pm device (%s) to %u", - hu, dev_name(&idev->pdev->dev), powered); - -+#if LINUX_VERSION_IS_GEQ(3,13,0) - gpiod_set_value(idev->reset, powered); -+#endif - - /* Provide to idev a hu reference which is used to run LPM - * transactions (lpm suspend/resume) from PM callbacks. -@@ -1306,14 +1310,17 @@ static int intel_probe(struct platform_d - - idev->pdev = pdev; - -+#if LINUX_VERSION_IS_GEQ(3,17,0) - idev->reset = devm_gpiod_get_optional(&pdev->dev, "reset", - GPIOD_OUT_LOW); - if (IS_ERR(idev->reset)) { - dev_err(&pdev->dev, "Unable to retrieve gpio\n"); - return PTR_ERR(idev->reset); - } -+#endif - - idev->irq = platform_get_irq(pdev, 0); -+#if LINUX_VERSION_IS_GEQ(3,17,0) - if (idev->irq < 0) { - struct gpio_desc *host_wake; - -@@ -1332,12 +1339,15 @@ static int intel_probe(struct platform_d - goto no_irq; - } - } -+#endif - - /* Only enable wake-up/irq when controller is powered */ - device_set_wakeup_capable(&pdev->dev, true); - device_wakeup_disable(&pdev->dev); - -+#if LINUX_VERSION_IS_GEQ(3,17,0) - no_irq: -+#endif - platform_set_drvdata(pdev, idev); - - /* Place this instance on the device list */ -@@ -1345,8 +1355,10 @@ no_irq: - list_add_tail(&idev->list, &intel_device_list); - mutex_unlock(&intel_device_list_lock); - -+#if LINUX_VERSION_IS_GEQ(3,13,0) - dev_info(&pdev->dev, "registered, gpio(%d)/irq(%d).\n", - desc_to_gpio(idev->reset), idev->irq); -+#endif - - return 0; - } diff --git a/patches/0072-netdevice-ndo_fdb_add/igb.patch b/patches/0072-netdevice-ndo_fdb_add/igb.patch deleted file mode 100644 index 9dcac3d2..00000000 --- a/patches/0072-netdevice-ndo_fdb_add/igb.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- a/drivers/net/ethernet/intel/igb/igb_main.c -+++ b/drivers/net/ethernet/intel/igb/igb_main.c -@@ -2078,7 +2078,11 @@ static int igb_set_features(struct net_d - - static int igb_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[], - struct net_device *dev, -+#if LINUX_VERSION_IS_LESS(3,19,0) -+ const unsigned char *addr, -+#else - const unsigned char *addr, u16 vid, -+#endif - u16 flags) - { - /* guarantee we can provide a unique filter for the unicast address */ diff --git a/patches/flow_dissector.patch b/patches/flow_dissector.patch deleted file mode 100644 index 189a5c7a..00000000 --- a/patches/flow_dissector.patch +++ /dev/null @@ -1,234 +0,0 @@ ---- a/compat/net-core-flow_dissector.c -+++ b/compat/net-core-flow_dissector.c -@@ -177,229 +177,10 @@ ipv6: - - flow->ip_proto = ip_proto; - flow->ports = skb_flow_get_ports(skb, nhoff, ip_proto); -+#if LINUX_VERSION_IS_GEQ(3,9,0) - flow->thoff = (u16) nhoff; -+#endif - - return true; - } - EXPORT_SYMBOL(skb_flow_dissect); -- --static u32 hashrnd __read_mostly; --static __always_inline void __flow_hash_secret_init(void) --{ -- net_get_random_once(&hashrnd, sizeof(hashrnd)); --} -- --static __always_inline u32 __flow_hash_3words(u32 a, u32 b, u32 c) --{ -- __flow_hash_secret_init(); -- return jhash_3words(a, b, c, hashrnd); --} -- --static __always_inline u32 __flow_hash_1word(u32 a) --{ -- __flow_hash_secret_init(); -- return jhash_1word(a, hashrnd); --} -- --/* -- * __skb_get_hash: calculate a flow hash based on src/dst addresses -- * and src/dst port numbers. Sets hash in skb to non-zero hash value -- * on success, zero indicates no valid hash. Also, sets l4_hash in skb -- * if hash is a canonical 4-tuple hash over transport ports. -- */ --void __skb_get_hash(struct sk_buff *skb) --{ -- struct flow_keys keys; -- u32 hash; -- -- if (!skb_flow_dissect(skb, &keys)) -- return; -- -- if (keys.ports) -- skb->l4_hash = 1; -- -- /* get a consistent hash (same value on both flow directions) */ -- if (((__force u32)keys.dst < (__force u32)keys.src) || -- (((__force u32)keys.dst == (__force u32)keys.src) && -- ((__force u16)keys.port16[1] < (__force u16)keys.port16[0]))) { -- swap(keys.dst, keys.src); -- swap(keys.port16[0], keys.port16[1]); -- } -- -- hash = __flow_hash_3words((__force u32)keys.dst, -- (__force u32)keys.src, -- (__force u32)keys.ports); -- if (!hash) -- hash = 1; -- -- skb->hash = hash; --} --EXPORT_SYMBOL(__skb_get_hash); -- --/* -- * Returns a Tx hash based on the given packet descriptor a Tx queues' number -- * to be used as a distribution range. -- */ --u16 __skb_tx_hash(const struct net_device *dev, const struct sk_buff *skb, -- unsigned int num_tx_queues) --{ -- u32 hash; -- u16 qoffset = 0; -- u16 qcount = num_tx_queues; -- -- if (skb_rx_queue_recorded(skb)) { -- hash = skb_get_rx_queue(skb); -- while (unlikely(hash >= num_tx_queues)) -- hash -= num_tx_queues; -- return hash; -- } -- -- if (dev->num_tc) { -- u8 tc = netdev_get_prio_tc_map(dev, skb->priority); -- qoffset = dev->tc_to_txq[tc].offset; -- qcount = dev->tc_to_txq[tc].count; -- } -- -- if (skb->sk && skb->sk->sk_hash) -- hash = skb->sk->sk_hash; -- else -- hash = (__force u16) skb->protocol; -- hash = __flow_hash_1word(hash); -- -- return (u16) (((u64) hash * qcount) >> 32) + qoffset; --} --EXPORT_SYMBOL(__skb_tx_hash); -- --/* __skb_get_poff() returns the offset to the payload as far as it could -- * be dissected. The main user is currently BPF, so that we can dynamically -- * truncate packets without needing to push actual payload to the user -- * space and can analyze headers only, instead. -- */ --u32 __skb_get_poff(const struct sk_buff *skb) --{ -- struct flow_keys keys; -- u32 poff = 0; -- -- if (!skb_flow_dissect(skb, &keys)) -- return 0; -- -- poff += keys.thoff; -- switch (keys.ip_proto) { -- case IPPROTO_TCP: { -- const struct tcphdr *tcph; -- struct tcphdr _tcph; -- -- tcph = skb_header_pointer(skb, poff, sizeof(_tcph), &_tcph); -- if (!tcph) -- return poff; -- -- poff += max_t(u32, sizeof(struct tcphdr), tcph->doff * 4); -- break; -- } -- case IPPROTO_UDP: -- case IPPROTO_UDPLITE: -- poff += sizeof(struct udphdr); -- break; -- /* For the rest, we do not really care about header -- * extensions at this point for now. -- */ -- case IPPROTO_ICMP: -- poff += sizeof(struct icmphdr); -- break; -- case IPPROTO_ICMPV6: -- poff += sizeof(struct icmp6hdr); -- break; -- case IPPROTO_IGMP: -- poff += sizeof(struct igmphdr); -- break; -- case IPPROTO_DCCP: -- poff += sizeof(struct dccp_hdr); -- break; -- case IPPROTO_SCTP: -- poff += sizeof(struct sctphdr); -- break; -- } -- -- return poff; --} -- --static inline int get_xps_queue(struct net_device *dev, struct sk_buff *skb) --{ --#ifdef CONFIG_XPS -- struct xps_dev_maps *dev_maps; -- struct xps_map *map; -- int queue_index = -1; -- -- rcu_read_lock(); -- dev_maps = rcu_dereference(dev->xps_maps); -- if (dev_maps) { -- map = rcu_dereference( -- dev_maps->cpu_map[raw_smp_processor_id()]); -- if (map) { -- if (map->len == 1) -- queue_index = map->queues[0]; -- else { -- u32 hash; -- if (skb->sk && skb->sk->sk_hash) -- hash = skb->sk->sk_hash; -- else -- hash = (__force u16) skb->protocol ^ -- skb->hash; -- hash = __flow_hash_1word(hash); -- queue_index = map->queues[ -- ((u64)hash * map->len) >> 32]; -- } -- if (unlikely(queue_index >= dev->real_num_tx_queues)) -- queue_index = -1; -- } -- } -- rcu_read_unlock(); -- -- return queue_index; --#else -- return -1; --#endif --} -- --static u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb) --{ -- struct sock *sk = skb->sk; -- int queue_index = sk_tx_queue_get(sk); -- -- if (queue_index < 0 || skb->ooo_okay || -- queue_index >= dev->real_num_tx_queues) { -- int new_index = get_xps_queue(dev, skb); -- if (new_index < 0) -- new_index = skb_tx_hash(dev, skb); -- -- if (queue_index != new_index && sk && -- rcu_access_pointer(sk->sk_dst_cache)) -- sk_tx_queue_set(sk, new_index); -- -- queue_index = new_index; -- } -- -- return queue_index; --} -- --struct netdev_queue *netdev_pick_tx(struct net_device *dev, -- struct sk_buff *skb, -- void *accel_priv) --{ -- int queue_index = 0; -- -- if (dev->real_num_tx_queues != 1) { -- const struct net_device_ops *ops = dev->netdev_ops; -- if (ops->ndo_select_queue) -- queue_index = ops->ndo_select_queue(dev, skb, accel_priv, -- __netdev_pick_tx); -- else -- queue_index = __netdev_pick_tx(dev, skb); -- -- if (!accel_priv) -- queue_index = netdev_cap_txqueue(dev, queue_index); -- } -- -- skb_set_queue_mapping(skb, queue_index); -- return netdev_get_tx_queue(dev, queue_index); --} From patchwork Mon Sep 17 21:31:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10603437 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D32013AD for ; Mon, 17 Sep 2018 21:31:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 666CA2A837 for ; Mon, 17 Sep 2018 21:31:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59A292A83A; Mon, 17 Sep 2018 21:31:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7868B2A837 for ; Mon, 17 Sep 2018 21:31:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728202AbeIRDA5 (ORCPT ); Mon, 17 Sep 2018 23:00:57 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:56114 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727329AbeIRDA5 (ORCPT ); Mon, 17 Sep 2018 23:00:57 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 5D954418B9; Mon, 17 Sep 2018 23:31:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id UwpGoUy1YFym; Mon, 17 Sep 2018 23:31:46 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, john@phrozen.org, Hauke Mehrtens Subject: [PATCH 2/7] header: Add kzalloc() Date: Mon, 17 Sep 2018 23:31:37 +0200 Message-Id: <20180917213142.7875-2-hauke@hauke-m.de> In-Reply-To: <20180917213142.7875-1-hauke@hauke-m.de> References: <20180917213142.7875-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds the kzalloc() function and allows it to remove the lib-rhashtable.patch patch. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/mm.h | 6 ++++++ patches/lib-rhashtable.patch | 18 ------------------ 2 files changed, 6 insertions(+), 18 deletions(-) delete mode 100644 patches/lib-rhashtable.patch diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h index 7e69b873..38c452e2 100644 --- a/backport/backport-include/linux/mm.h +++ b/backport/backport-include/linux/mm.h @@ -112,6 +112,12 @@ static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags) return kvmalloc(bytes, flags); } + +#define kvzalloc LINUX_BACKPORT(kvzalloc) +static inline void *kvzalloc(size_t size, gfp_t flags) +{ + return kvmalloc(size, flags | __GFP_ZERO); +} #endif #endif /* __BACKPORT_MM_H */ diff --git a/patches/lib-rhashtable.patch b/patches/lib-rhashtable.patch deleted file mode 100644 index 2e91f8d9..00000000 --- a/patches/lib-rhashtable.patch +++ /dev/null @@ -1,18 +0,0 @@ - ---- a/compat/lib-rhashtable.c -+++ b/compat/lib-rhashtable.c -@@ -175,10 +175,11 @@ static struct bucket_table *bucket_table - int i; - - size = sizeof(*tbl) + nbuckets * sizeof(tbl->buckets[0]); -- if (gfp != GFP_KERNEL) -+ if (size <= (PAGE_SIZE << PAGE_ALLOC_COSTLY_ORDER) || -+ gfp != GFP_KERNEL) - tbl = kzalloc(size, gfp | __GFP_NOWARN | __GFP_NORETRY); -- else -- tbl = kvzalloc(size, gfp); -+ if (tbl == NULL && gfp == GFP_KERNEL) -+ tbl = vzalloc(size); - - size = nbuckets; - From patchwork Mon Sep 17 21:31:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10603443 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4EF6F17E1 for ; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4366A2A83B for ; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 373492A838; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A76612A838 for ; Mon, 17 Sep 2018 21:31:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728009AbeIRDA7 (ORCPT ); Mon, 17 Sep 2018 23:00:59 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:60628 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727672AbeIRDA6 (ORCPT ); Mon, 17 Sep 2018 23:00:58 -0400 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 9C9E749928; Mon, 17 Sep 2018 23:31:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id kSh6i8kbA407; Mon, 17 Sep 2018 23:31:46 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, john@phrozen.org, Hauke Mehrtens Subject: [PATCH 3/7] patches: Adapt to new select queue API Date: Mon, 17 Sep 2018 23:31:38 +0200 Message-Id: <20180917213142.7875-3-hauke@hauke-m.de> In-Reply-To: <20180917213142.7875-1-hauke@hauke-m.de> References: <20180917213142.7875-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The select queue API was changed in upstream commit 4f49dec9075a ("net: allow ndo_select_queue to pass netdev"). This patch adds a new version of the API for kernel < 4.19 Signed-off-by: Hauke Mehrtens --- patches/0028-select_queue/mac80211.patch | 26 ++++++++++++++++++-------- patches/0028-select_queue/mwifiex.patch | 13 +++++++++---- patches/0028-select_queue/rtl8188eu.patch | 18 ++++++++++++++++++ patches/0028-select_queue/rtl8723bs.patch | 18 ++++++++++++++++++ 4 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 patches/0028-select_queue/rtl8188eu.patch create mode 100644 patches/0028-select_queue/rtl8723bs.patch diff --git a/patches/0028-select_queue/mac80211.patch b/patches/0028-select_queue/mac80211.patch index 2bfca8ee..82bf659f 100644 --- a/patches/0028-select_queue/mac80211.patch +++ b/patches/0028-select_queue/mac80211.patch @@ -1,15 +1,20 @@ --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -1126,10 +1126,20 @@ static void ieee80211_uninit(struct net_ +@@ -1128,10 +1128,25 @@ static void ieee80211_uninit(struct net_ ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev)); } -+#if LINUX_VERSION_IS_GEQ(3,14,0) || \ -+ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) ++#if LINUX_VERSION_IS_GEQ(4,19,0) static u16 ieee80211_netdev_select_queue(struct net_device *dev, struct sk_buff *skb, - void *accel_priv, + struct net_device *sb_dev, select_queue_fallback_t fallback) ++#elif LINUX_VERSION_IS_GEQ(3,14,0) || \ ++ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) ++static u16 ieee80211_netdev_select_queue(struct net_device *dev, ++ struct sk_buff *skb, ++ void *accel_priv, ++ select_queue_fallback_t fallback) +#elif LINUX_VERSION_IS_GEQ(3,13,0) +static u16 ieee80211_netdev_select_queue(struct net_device *dev, + struct sk_buff *skb, @@ -21,16 +26,21 @@ { return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb); } -@@ -1172,10 +1182,20 @@ static const struct net_device_ops ieee8 +@@ -1174,10 +1189,25 @@ static const struct net_device_ops ieee8 .ndo_get_stats64 = ieee80211_get_stats64, }; -+#if LINUX_VERSION_IS_GEQ(3,14,0) || \ -+ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) ++#if LINUX_VERSION_IS_GEQ(4,19,0) static u16 ieee80211_monitor_select_queue(struct net_device *dev, struct sk_buff *skb, - void *accel_priv, + struct net_device *sb_dev, select_queue_fallback_t fallback) ++#elif LINUX_VERSION_IS_GEQ(3,14,0) || \ ++ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) ++static u16 ieee80211_monitor_select_queue(struct net_device *dev, ++ struct sk_buff *skb, ++ void *accel_priv, ++ select_queue_fallback_t fallback) +#elif LINUX_VERSION_IS_GEQ(3,13,0) +static u16 ieee80211_monitor_select_queue(struct net_device *dev, + struct sk_buff *skb, diff --git a/patches/0028-select_queue/mwifiex.patch b/patches/0028-select_queue/mwifiex.patch index 5d2e257c..87159fa9 100644 --- a/patches/0028-select_queue/mwifiex.patch +++ b/patches/0028-select_queue/mwifiex.patch @@ -1,14 +1,19 @@ --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c -@@ -1261,9 +1261,19 @@ static struct net_device_stats *mwifiex_ +@@ -1280,10 +1280,24 @@ static struct net_device_stats *mwifiex_ return &priv->stats; } -+#if LINUX_VERSION_IS_GEQ(3,14,0) || \ -+ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) ++#if LINUX_VERSION_IS_GEQ(4,19,0) static u16 mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb, - void *accel_priv, select_queue_fallback_t fallback) + struct net_device *sb_dev, + select_queue_fallback_t fallback) ++#elif LINUX_VERSION_IS_GEQ(3,14,0) || \ ++ (LINUX_VERSION_CODE == KERNEL_VERSION(3,13,11) && UTS_UBUNTU_RELEASE_ABI > 30) ++static u16 ++mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb, ++ void *accel_priv, select_queue_fallback_t fallback) +#elif LINUX_VERSION_IS_GEQ(3,13,0) +static u16 +mwifiex_netdev_select_wmm_queue(struct net_device *dev, struct sk_buff *skb, diff --git a/patches/0028-select_queue/rtl8188eu.patch b/patches/0028-select_queue/rtl8188eu.patch new file mode 100644 index 00000000..00413804 --- /dev/null +++ b/patches/0028-select_queue/rtl8188eu.patch @@ -0,0 +1,18 @@ +--- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c ++++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c +@@ -244,9 +244,15 @@ static unsigned int rtw_classify8021d(st + return dscp >> 5; + } + ++#if LINUX_VERSION_IS_GEQ(4,19,0) + static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, + struct net_device *sb_dev, + select_queue_fallback_t fallback) ++#else ++static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, ++ void *accel_priv, ++ select_queue_fallback_t fallback) ++#endif + { + struct adapter *padapter = rtw_netdev_priv(dev); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; diff --git a/patches/0028-select_queue/rtl8723bs.patch b/patches/0028-select_queue/rtl8723bs.patch new file mode 100644 index 00000000..7dbf7f60 --- /dev/null +++ b/patches/0028-select_queue/rtl8723bs.patch @@ -0,0 +1,18 @@ +--- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c ++++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c +@@ -403,9 +403,15 @@ static unsigned int rtw_classify8021d(st + } + + ++#if LINUX_VERSION_IS_GEQ(4,19,0) + static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, + struct net_device *sb_dev, + select_queue_fallback_t fallback) ++#else ++static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb, ++ void *accel_priv, ++ select_queue_fallback_t fallback) ++#endif + { + struct adapter *padapter = rtw_netdev_priv(dev); + struct mlme_priv *pmlmepriv = &padapter->mlmepriv; From patchwork Mon Sep 17 21:31:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10603447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9424313AD for ; Mon, 17 Sep 2018 21:31:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 86EC929DA9 for ; Mon, 17 Sep 2018 21:31:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B2372A838; Mon, 17 Sep 2018 21:31:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4163A29DA9 for ; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728338AbeIRDA7 (ORCPT ); Mon, 17 Sep 2018 23:00:59 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:60638 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727698AbeIRDA7 (ORCPT ); Mon, 17 Sep 2018 23:00:59 -0400 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id BA72549540; Mon, 17 Sep 2018 23:31:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id Hjsix5IAxgny; Mon, 17 Sep 2018 23:31:47 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, john@phrozen.org, Hauke Mehrtens Subject: [PATCH 4/7] patches: make patches apply with kernel 4.19 Date: Mon, 17 Sep 2018 23:31:39 +0200 Message-Id: <20180917213142.7875-4-hauke@hauke-m.de> In-Reply-To: <20180917213142.7875-1-hauke@hauke-m.de> References: <20180917213142.7875-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Hauke Mehrtens --- patches/0002-disable-dump-adjust-on-old-kernels.patch | 4 ++-- .../0003-cfg80211-wext-padding/include_net_cfg80211.patch | 2 +- patches/0003-cfg80211-wext-padding/net_wireless_core.patch | 2 +- patches/0004-disable-wext-kconfig.patch | 2 +- .../0010-add-wext-handlers-to-netdev/net_wireless_core.patch | 4 ++-- patches/0013-fix-makefile-includes/ath10k.patch | 2 +- patches/0014-netlink_seq/net_wireless_nl80211.patch | 6 +++--- .../drivers_net_wireless_libertas_if_usb.patch | 4 ++-- patches/0021-umode_t-api-change/ath9k.patch | 2 +- patches/0024-led-blink-api/mac80211.patch | 2 +- patches/0025-usb-sg/usbnet.patch | 12 ++++++------ patches/0053-possible_net_t.patch | 2 +- patches/0055-name_assign_type/brcmfmac.patch | 2 +- patches/0069-iwlwifi-pd-string-fix.patch | 8 ++++---- patches/0070-mac80211-fils.patch | 4 ++-- patches/0071-skb-head_frag/wireless.patch | 2 +- patches/0075-ndo-stats-64/usbnet.patch | 2 +- patches/0077-genl-ro-after-init/hwsim.patch | 2 +- patches/0077-genl-ro-after-init/nl80211.patch | 4 ++-- patches/0079-netdev-destructor/brcmfmac.patch | 4 ++-- patches/0084-disbale-some-staging-dirs.patch | 10 ++++------ patches/0085-not-include-kmemleak.patch | 2 +- patches/0086-rtl8723bs-no-extern-inline.patch | 2 +- patches/lib-refcount.patch | 8 ++++---- 24 files changed, 46 insertions(+), 48 deletions(-) diff --git a/patches/0002-disable-dump-adjust-on-old-kernels.patch b/patches/0002-disable-dump-adjust-on-old-kernels.patch index 332a7b61..be1d9720 100644 --- a/patches/0002-disable-dump-adjust-on-old-kernels.patch +++ b/patches/0002-disable-dump-adjust-on-old-kernels.patch @@ -28,7 +28,7 @@ Date: Fri Mar 1 14:03:49 2013 +0100 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -2010,6 +2010,7 @@ static int nl80211_dump_wiphy(struct sk_ +@@ -2174,6 +2174,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 -@@ -2031,6 +2032,7 @@ static int nl80211_dump_wiphy(struct sk_ +@@ -2195,6 +2196,7 @@ static int nl80211_dump_wiphy(struct sk_ rtnl_unlock(); return 1; } diff --git a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch index 9727bb73..f8159596 100644 --- a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch +++ b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3723,6 +3723,9 @@ struct wiphy_iftype_ext_capab { +@@ -3971,6 +3971,9 @@ struct wiphy_iftype_ext_capab { struct wiphy { /* assign these fields before you register the wiphy */ diff --git a/patches/0003-cfg80211-wext-padding/net_wireless_core.patch b/patches/0003-cfg80211-wext-padding/net_wireless_core.patch index aabf7e43..011e3741 100644 --- a/patches/0003-cfg80211-wext-padding/net_wireless_core.patch +++ b/patches/0003-cfg80211-wext-padding/net_wireless_core.patch @@ -1,6 +1,6 @@ --- a/net/wireless/core.c +++ b/net/wireless/core.c -@@ -385,6 +385,17 @@ struct wiphy *wiphy_new_nm(const struct +@@ -388,6 +388,17 @@ struct wiphy *wiphy_new_nm(const struct struct cfg80211_registered_device *rdev; int alloc_size; diff --git a/patches/0004-disable-wext-kconfig.patch b/patches/0004-disable-wext-kconfig.patch index 1ed420ab..bcb60788 100644 --- a/patches/0004-disable-wext-kconfig.patch +++ b/patches/0004-disable-wext-kconfig.patch @@ -26,7 +26,7 @@ so remove the Kconfig options for them. tristate "cfg80211 - wireless configuration API" depends on RFKILL || !RFKILL @@ -187,7 +169,7 @@ config CFG80211_CRDA_SUPPORT - + config CFG80211_WEXT bool "cfg80211 wireless extensions compatibility" if !CFG80211_WEXT_EXPORT - select WEXT_CORE diff --git a/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch b/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch index 5a7364a1..e129648c 100644 --- a/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch +++ b/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch @@ -1,6 +1,6 @@ --- a/net/wireless/core.c +++ b/net/wireless/core.c -@@ -478,10 +478,6 @@ use_default_name: +@@ -481,10 +481,6 @@ use_default_name: INIT_WORK(&rdev->mlme_unreg_wk, cfg80211_mlme_unreg_wk); INIT_DELAYED_WORK(&rdev->dfs_update_channels_wk, cfg80211_dfs_channels_update_work); @@ -11,7 +11,7 @@ device_initialize(&rdev->wiphy.dev); rdev->wiphy.dev.class = &ieee80211_class; rdev->wiphy.dev.platform_data = rdev; -@@ -1188,6 +1184,15 @@ static int cfg80211_netdev_notifier_call +@@ -1215,6 +1211,15 @@ static int cfg80211_netdev_notifier_call } wdev->netdev = dev; #ifdef CONFIG_CFG80211_WEXT diff --git a/patches/0013-fix-makefile-includes/ath10k.patch b/patches/0013-fix-makefile-includes/ath10k.patch index 5bae024b..11eb4c54 100644 --- a/patches/0013-fix-makefile-includes/ath10k.patch +++ b/patches/0013-fix-makefile-includes/ath10k.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath10k/htt.h +++ b/drivers/net/wireless/ath/ath10k/htt.h -@@ -19,6 +19,7 @@ +@@ -20,6 +20,7 @@ #define _HTT_H_ #include diff --git a/patches/0014-netlink_seq/net_wireless_nl80211.patch b/patches/0014-netlink_seq/net_wireless_nl80211.patch index e56b92f1..3bbaf287 100644 --- a/patches/0014-netlink_seq/net_wireless_nl80211.patch +++ b/patches/0014-netlink_seq/net_wireless_nl80211.patch @@ -1,8 +1,8 @@ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -7916,7 +7916,9 @@ static int nl80211_dump_scan(struct sk_b - spin_lock_bh(&rdev->bss_lock); - cfg80211_bss_expire(rdev); +@@ -8206,7 +8206,9 @@ static int nl80211_dump_scan(struct sk_b + if (start == 0) + cfg80211_bss_expire(rdev); +#if LINUX_VERSION_IS_GEQ(3,1,0) cb->seq = rdev->bss_generation; diff --git a/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch b/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch index 22108262..6dace46d 100644 --- a/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch +++ b/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/marvell/libertas/if_usb.c +++ b/drivers/net/wireless/marvell/libertas/if_usb.c -@@ -939,6 +939,7 @@ static int if_usb_suspend(struct usb_int +@@ -938,6 +938,7 @@ static int if_usb_suspend(struct usb_int goto out; } @@ -8,7 +8,7 @@ #ifdef CONFIG_OLPC if (machine_is_olpc()) { if (priv->wol_criteria == EHS_REMOVE_WAKEUP) -@@ -947,6 +948,7 @@ static int if_usb_suspend(struct usb_int +@@ -946,6 +947,7 @@ static int if_usb_suspend(struct usb_int olpc_ec_wakeup_set(EC_SCI_SRC_WLAN); } #endif diff --git a/patches/0021-umode_t-api-change/ath9k.patch b/patches/0021-umode_t-api-change/ath9k.patch index d9fc169d..9707a5a8 100644 --- a/patches/0021-umode_t-api-change/ath9k.patch +++ b/patches/0021-umode_t-api-change/ath9k.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ath/ath9k/common-spectral.c +++ b/drivers/net/wireless/ath/ath9k/common-spectral.c -@@ -1048,7 +1048,11 @@ static const struct file_operations fops +@@ -1050,7 +1050,11 @@ static const struct file_operations fops static struct dentry *create_buf_file_handler(const char *filename, struct dentry *parent, diff --git a/patches/0024-led-blink-api/mac80211.patch b/patches/0024-led-blink-api/mac80211.patch index 61e0e893..42a02533 100644 --- a/patches/0024-led-blink-api/mac80211.patch +++ b/patches/0024-led-blink-api/mac80211.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1281,6 +1281,7 @@ struct ieee80211_local { +@@ -1285,6 +1285,7 @@ struct ieee80211_local { struct mutex chanctx_mtx; #ifdef CONFIG_MAC80211_LEDS diff --git a/patches/0025-usb-sg/usbnet.patch b/patches/0025-usb-sg/usbnet.patch index 0b715780..50c2d274 100644 --- a/patches/0025-usb-sg/usbnet.patch +++ b/patches/0025-usb-sg/usbnet.patch @@ -1,6 +1,6 @@ --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c -@@ -1311,6 +1311,7 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout); +@@ -1313,6 +1313,7 @@ EXPORT_SYMBOL_GPL(usbnet_tx_timeout); /*-------------------------------------------------------------------------*/ @@ -8,7 +8,7 @@ static int build_dma_sg(const struct sk_buff *skb, struct urb *urb) { unsigned num_sgs, total_len = 0; -@@ -1343,6 +1344,12 @@ static int build_dma_sg(const struct sk_ +@@ -1345,6 +1346,12 @@ static int build_dma_sg(const struct sk_ return 1; } @@ -21,7 +21,7 @@ netdev_tx_t usbnet_start_xmit (struct sk_buff *skb, struct net_device *net) -@@ -1399,12 +1406,19 @@ netdev_tx_t usbnet_start_xmit (struct sk +@@ -1401,12 +1408,19 @@ netdev_tx_t usbnet_start_xmit (struct sk if (!(info->flags & FLAG_SEND_ZLP)) { if (!(info->flags & FLAG_MULTI_PACKET)) { length++; @@ -41,7 +41,7 @@ } } else urb->transfer_flags |= URB_ZERO_PACKET; -@@ -1471,7 +1485,9 @@ not_drop: +@@ -1473,7 +1487,9 @@ not_drop: if (skb) dev_kfree_skb_any (skb); if (urb) { @@ -51,7 +51,7 @@ usb_free_urb(urb); } } else -@@ -1524,7 +1540,9 @@ static void usbnet_bh (struct timer_list +@@ -1526,7 +1542,9 @@ static void usbnet_bh (struct timer_list rx_process (dev, skb); continue; case tx_done: @@ -61,7 +61,7 @@ case rx_cleanup: usb_free_urb (entry->urb); dev_kfree_skb (skb); -@@ -1891,7 +1909,9 @@ int usbnet_resume (struct usb_interface +@@ -1893,7 +1911,9 @@ int usbnet_resume (struct usb_interface retval = usb_submit_urb(res, GFP_ATOMIC); if (retval < 0) { dev_kfree_skb_any(skb); diff --git a/patches/0053-possible_net_t.patch b/patches/0053-possible_net_t.patch index 3eb62bc0..e052a16a 100644 --- a/patches/0053-possible_net_t.patch +++ b/patches/0053-possible_net_t.patch @@ -2,7 +2,7 @@ diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 04e5785..a251da1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -3861,12 +3861,12 @@ struct wiphy { +@@ -4113,12 +4113,12 @@ struct wiphy { static inline struct net *wiphy_net(struct wiphy *wiphy) { diff --git a/patches/0055-name_assign_type/brcmfmac.patch b/patches/0055-name_assign_type/brcmfmac.patch index 6049dab9..b9c9b390 100644 --- a/patches/0055-name_assign_type/brcmfmac.patch +++ b/patches/0055-name_assign_type/brcmfmac.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c -@@ -2198,7 +2198,9 @@ struct wireless_dev *brcmf_p2p_add_vif(s +@@ -2203,7 +2203,9 @@ struct wireless_dev *brcmf_p2p_add_vif(s } strncpy(ifp->ndev->name, name, sizeof(ifp->ndev->name) - 1); diff --git a/patches/0069-iwlwifi-pd-string-fix.patch b/patches/0069-iwlwifi-pd-string-fix.patch index 272b8704..b2a6a512 100644 --- a/patches/0069-iwlwifi-pd-string-fix.patch +++ b/patches/0069-iwlwifi-pd-string-fix.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/dvm/debugfs.c -@@ -2421,12 +2421,23 @@ int iwl_dbgfs_register(struct iwl_priv * +@@ -2419,12 +2419,23 @@ int iwl_dbgfs_register(struct iwl_priv * */ if (priv->mac80211_registered) { char buf[100]; @@ -26,7 +26,7 @@ goto err; --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c -@@ -1498,8 +1498,13 @@ void iwl_mvm_vif_dbgfs_register(struct i +@@ -1497,8 +1497,13 @@ void iwl_mvm_vif_dbgfs_register(struct i mvmvif->dbgfs_dir = debugfs_create_dir("iwlmvm", dbgfs_dir); if (!mvmvif->dbgfs_dir) { @@ -40,7 +40,7 @@ return; } -@@ -1553,15 +1558,28 @@ void iwl_mvm_vif_dbgfs_register(struct i +@@ -1544,15 +1549,28 @@ void iwl_mvm_vif_dbgfs_register(struct i * find * netdev:wlan0 -> ../../../ieee80211/phy0/netdev:wlan0/iwlmvm/ */ @@ -71,7 +71,7 @@ IWL_ERR(mvm, "Can't create debugfs entity\n"); --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c -@@ -2032,7 +2032,13 @@ int iwl_mvm_dbgfs_register(struct iwl_mv +@@ -2056,7 +2056,13 @@ int iwl_mvm_dbgfs_register(struct iwl_mv * Create a symlink with mac80211. It will be removed when mac80211 * exists (before the opmode exists which removes the target.) */ diff --git a/patches/0070-mac80211-fils.patch b/patches/0070-mac80211-fils.patch index d7274e57..bdbc8a94 100644 --- a/patches/0070-mac80211-fils.patch +++ b/patches/0070-mac80211-fils.patch @@ -5,7 +5,7 @@ /* * FILS AEAD for (Re)Association Request/Response frames * Copyright 2016, Qualcomm Atheros, Inc. -@@ -332,3 +333,4 @@ int fils_decrypt_assoc_resp(struct ieee80211_sub_if_data *sdata, +@@ -332,3 +333,4 @@ int fils_decrypt_assoc_resp(struct ieee8 *frame_len -= AES_BLOCK_SIZE; return 0; } @@ -42,7 +42,7 @@ #endif /* FILS_AEAD_H */ --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -553,7 +553,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, +@@ -570,7 +570,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_ NL80211_FEATURE_MAC_ON_CREATE | NL80211_FEATURE_USERSPACE_MPM | NL80211_FEATURE_FULL_AP_CLIENT_STATE; diff --git a/patches/0071-skb-head_frag/wireless.patch b/patches/0071-skb-head_frag/wireless.patch index 91a345fd..d165630c 100644 --- a/patches/0071-skb-head_frag/wireless.patch +++ b/patches/0071-skb-head_frag/wireless.patch @@ -1,6 +1,6 @@ --- a/net/wireless/util.c +++ b/net/wireless/util.c -@@ -632,7 +632,11 @@ void ieee80211_amsdu_to_8023s(struct sk_ +@@ -634,7 +634,11 @@ void ieee80211_amsdu_to_8023s(struct sk_ u8 *payload; int offset = 0, remaining; struct ethhdr eth; diff --git a/patches/0075-ndo-stats-64/usbnet.patch b/patches/0075-ndo-stats-64/usbnet.patch index 8370b660..ac66d212 100644 --- a/patches/0075-ndo-stats-64/usbnet.patch +++ b/patches/0075-ndo-stats-64/usbnet.patch @@ -1,6 +1,6 @@ --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c -@@ -1015,6 +1015,9 @@ void usbnet_get_stats64(struct net_devic +@@ -1016,6 +1016,9 @@ void usbnet_get_stats64(struct net_devic } } EXPORT_SYMBOL_GPL(usbnet_get_stats64); diff --git a/patches/0077-genl-ro-after-init/hwsim.patch b/patches/0077-genl-ro-after-init/hwsim.patch index f7f607e9..986e2a04 100644 --- a/patches/0077-genl-ro-after-init/hwsim.patch +++ b/patches/0077-genl-ro-after-init/hwsim.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -3376,7 +3376,7 @@ static const struct genl_ops hwsim_ops[] +@@ -3553,7 +3553,7 @@ static const struct genl_ops hwsim_ops[] }, }; diff --git a/patches/0077-genl-ro-after-init/nl80211.patch b/patches/0077-genl-ro-after-init/nl80211.patch index fb04fd41..bb9f9013 100644 --- a/patches/0077-genl-ro-after-init/nl80211.patch +++ b/patches/0077-genl-ro-after-init/nl80211.patch @@ -1,7 +1,7 @@ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -13365,7 +13365,7 @@ static const struct genl_ops nl80211_ops - +@@ -13906,7 +13906,7 @@ static const struct genl_ops nl80211_ops + }, }; -static struct genl_family nl80211_fam __ro_after_init = { diff --git a/patches/0079-netdev-destructor/brcmfmac.patch b/patches/0079-netdev-destructor/brcmfmac.patch index 298c4417..4774b419 100644 --- a/patches/0079-netdev-destructor/brcmfmac.patch +++ b/patches/0079-netdev-destructor/brcmfmac.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c -@@ -500,6 +500,23 @@ static const struct net_device_ops brcmf +@@ -582,6 +582,23 @@ static const struct net_device_ops brcmf .ndo_set_rx_mode = brcmf_netdev_set_multicast_list }; @@ -24,7 +24,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked) { struct brcmf_pub *drvr = ifp->drvr; -@@ -672,7 +689,11 @@ struct brcmf_if *brcmf_add_if(struct brc +@@ -754,7 +771,11 @@ struct brcmf_if *brcmf_add_if(struct brc if (!ndev) return ERR_PTR(-ENOMEM); diff --git a/patches/0084-disbale-some-staging-dirs.patch b/patches/0084-disbale-some-staging-dirs.patch index 8947130d..1dd86ca7 100644 --- a/patches/0084-disbale-some-staging-dirs.patch +++ b/patches/0084-disbale-some-staging-dirs.patch @@ -1,13 +1,11 @@ --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile -@@ -1,8 +1,8 @@ +@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for staging directory -obj-y += media/ --obj-y += typec/ +#obj-y += media/ -+#obj-y += typec/ - obj-$(CONFIG_IPX) += ipx/ - obj-$(CONFIG_NCP_FS) += ncpfs/ - obj-$(CONFIG_IRDA) += irda/net/ + obj-$(CONFIG_PRISM2_USB) += wlan-ng/ + obj-$(CONFIG_COMEDI) += comedi/ + obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/ diff --git a/patches/0085-not-include-kmemleak.patch b/patches/0085-not-include-kmemleak.patch index def245d4..d9f051f3 100644 --- a/patches/0085-not-include-kmemleak.patch +++ b/patches/0085-not-include-kmemleak.patch @@ -1,6 +1,6 @@ --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c -@@ -13,7 +13,7 @@ +@@ -5,7 +5,7 @@ * ******************************************************************************/ #define _RTL8188EU_RECV_C_ diff --git a/patches/0086-rtl8723bs-no-extern-inline.patch b/patches/0086-rtl8723bs-no-extern-inline.patch index cc8bba0a..ca8321ec 100644 --- a/patches/0086-rtl8723bs-no-extern-inline.patch +++ b/patches/0086-rtl8723bs-no-extern-inline.patch @@ -2,7 +2,7 @@ diff --git a/drivers/staging/rtl8723bs/include/ieee80211.h b/drivers/staging/rtl index 73ce637..fa9c80f 100644 --- a/drivers/staging/rtl8723bs/include/ieee80211.h +++ b/drivers/staging/rtl8723bs/include/ieee80211.h -@@ -1008,18 +1008,18 @@ enum ieee80211_state { +@@ -850,18 +850,18 @@ enum ieee80211_state { #define IP_FMT "%pI4" #define IP_ARG(x) (x) diff --git a/patches/lib-refcount.patch b/patches/lib-refcount.patch index aa9ff468..28106342 100644 --- a/patches/lib-refcount.patch +++ b/patches/lib-refcount.patch @@ -2,11 +2,11 @@ diff --git a/compat/lib-refcount.c b/compat/lib-refcount.c index 5d0582a..8d108f9 100644 --- a/compat/lib-refcount.c +++ b/compat/lib-refcount.c -@@ -37,6 +37,7 @@ - +@@ -39,6 +39,7 @@ #include + #include #include +#include - #ifdef CONFIG_REFCOUNT_FULL - + /** + * refcount_add_not_zero_checked - add a value to a refcount unless it is 0 From patchwork Mon Sep 17 21:31:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10603445 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8985813AD for ; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EF4C2A837 for ; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 722082A83A; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 160612A837 for ; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727329AbeIRDA7 (ORCPT ); Mon, 17 Sep 2018 23:00:59 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:56186 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728338AbeIRDA7 (ORCPT ); Mon, 17 Sep 2018 23:00:59 -0400 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 05AC0416FC; Mon, 17 Sep 2018 23:31:50 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id 9PjM7m7xEesK; Mon, 17 Sep 2018 23:31:47 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, john@phrozen.org, Hauke Mehrtens Subject: [PATCH 5/7] header: Add NL_SET_BAD_ATTR Date: Mon, 17 Sep 2018 23:31:40 +0200 Message-Id: <20180917213142.7875-5-hauke@hauke-m.de> In-Reply-To: <20180917213142.7875-1-hauke@hauke-m.de> References: <20180917213142.7875-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is used by the mac80211_hwsim driver. The code was copied from the mainline kernel. This was introduced in mainline kernel commit c3ab2b4ec8f7 ("net: ipv4: Add extack messages for route add failures") Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/netlink.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h index 7da31aad..468a12d1 100644 --- a/backport/backport-include/linux/netlink.h +++ b/backport/backport-include/linux/netlink.h @@ -32,4 +32,11 @@ struct netlink_ext_ack { #define NETLINK_CB_PORTID(__skb) NETLINK_CB(__skb).portid #endif +#ifndef NL_SET_BAD_ATTR +#define NL_SET_BAD_ATTR(extack, attr) do { \ + if ((extack)) \ + (extack)->bad_attr = (attr); \ +} while (0) +#endif /* NL_SET_BAD_ATTR */ + #endif /* __BACKPORT_LINUX_NETLINK_H */ From patchwork Mon Sep 17 21:31:41 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10603441 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32D9B17D5 for ; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2667B2A83B for ; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1AF0E2A83E; Mon, 17 Sep 2018 21:31:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C80562A83A for ; Mon, 17 Sep 2018 21:31:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727672AbeIRDA7 (ORCPT ); Mon, 17 Sep 2018 23:00:59 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:56156 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727329AbeIRDA7 (ORCPT ); Mon, 17 Sep 2018 23:00:59 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 624D441238; Mon, 17 Sep 2018 23:31:49 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id sYB__rwx_4PS; Mon, 17 Sep 2018 23:31:48 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, john@phrozen.org, Hauke Mehrtens Subject: [PATCH 6/7] header: Add u64_stats_update_{begin,end}_irqsave() Date: Mon, 17 Sep 2018 23:31:41 +0200 Message-Id: <20180917213142.7875-6-hauke@hauke-m.de> In-Reply-To: <20180917213142.7875-1-hauke@hauke-m.de> References: <20180917213142.7875-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP These functions are currently used by the usbnet driver. These functions were introduced in upstream commit 2695578b896ae ("net: usbnet: fix potential deadlock on 32bit hosts") Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/u64_stats_sync.h | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/backport/backport-include/linux/u64_stats_sync.h b/backport/backport-include/linux/u64_stats_sync.h index 112a4094..0d221238 100644 --- a/backport/backport-include/linux/u64_stats_sync.h +++ b/backport/backport-include/linux/u64_stats_sync.h @@ -151,4 +151,29 @@ static inline bool u64_stats_fetch_retry_irq(const struct u64_stats_sync *syncp, #endif #endif /* LINUX_VERSION_IS_LESS(3,13,0) */ +#if LINUX_VERSION_IS_LESS(4,16,0) && \ + !LINUX_VERSION_IN_RANGE(4,14,44, 4,15,0) +static inline unsigned long +u64_stats_update_begin_irqsave(struct u64_stats_sync *syncp) +{ + unsigned long flags = 0; + +#if BITS_PER_LONG==32 && defined(CONFIG_SMP) + local_irq_save(flags); + write_seqcount_begin(&syncp->seq); +#endif + return flags; +} + +static inline void +u64_stats_update_end_irqrestore(struct u64_stats_sync *syncp, + unsigned long flags) +{ +#if BITS_PER_LONG==32 && defined(CONFIG_SMP) + write_seqcount_end(&syncp->seq); + local_irq_restore(flags); +#endif +} +#endif /* < 4.16 */ + #endif /* __BACKPORT_LINUX_U64_STATS_SYNC_H */ From patchwork Mon Sep 17 21:31:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10603439 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E106C6CB for ; Mon, 17 Sep 2018 21:31:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D75332A837 for ; Mon, 17 Sep 2018 21:31:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBCA22A83E; Mon, 17 Sep 2018 21:31:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 861FC2A837 for ; Mon, 17 Sep 2018 21:31:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728415AbeIRDA7 (ORCPT ); Mon, 17 Sep 2018 23:00:59 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:56160 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728009AbeIRDA6 (ORCPT ); Mon, 17 Sep 2018 23:00:58 -0400 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 6C6B141AD6; Mon, 17 Sep 2018 23:31:49 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id s1cxjYnB_XDg; Mon, 17 Sep 2018 23:31:48 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, john@phrozen.org, Hauke Mehrtens Subject: [PATCH 7/7] header: Add ktime_get_raw_ts64() Date: Mon, 17 Sep 2018 23:31:42 +0200 Message-Id: <20180917213142.7875-7-hauke@hauke-m.de> In-Reply-To: <20180917213142.7875-1-hauke@hauke-m.de> References: <20180917213142.7875-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ktime_get_raw_ts64() uses the old function which was renmaed. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/timekeeping.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backport/backport-include/linux/timekeeping.h b/backport/backport-include/linux/timekeeping.h index 56c3deec..73ce9f17 100644 --- a/backport/backport-include/linux/timekeeping.h +++ b/backport/backport-include/linux/timekeeping.h @@ -58,4 +58,12 @@ static inline void ktime_get_ts64(struct timespec64 *ts) } #endif +#if LINUX_VERSION_IS_LESS(4,18,0) +#define ktime_get_raw_ts64 LINUX_BACKPORT(ktime_get_raw_ts64) +static inline void ktime_get_raw_ts64(struct timespec64 *ts) +{ + return getrawmonotonic64(ts); +} +#endif + #endif /* __BACKPORT_TIMEKEEPING_H */