From patchwork Sun Apr 19 17:10:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11497699 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52A3913B2 for ; Sun, 19 Apr 2020 17:11:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 44505206E9 for ; Sun, 19 Apr 2020 17:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726507AbgDSRLA (ORCPT ); Sun, 19 Apr 2020 13:11:00 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:15366 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726396AbgDSRK7 (ORCPT ); Sun, 19 Apr 2020 13:10:59 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 494xDf4zxWzQlGN; Sun, 19 Apr 2020 19:10:58 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id B7-8_biE_pZB; Sun, 19 Apr 2020 19:10:55 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Johannes Berg Subject: [PATCH 1/8] backports: add linux/units.h Date: Sun, 19 Apr 2020 19:10:32 +0200 Message-Id: <20200419171039.17268-2-hauke@hauke-m.de> In-Reply-To: <20200419171039.17268-1-hauke@hauke-m.de> References: <20200419171039.17268-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: B80581769 X-Rspamd-Score: 0.31 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg We can just copy this. Signed-off-by: Johannes Berg --- copy-list | 1 + 1 file changed, 1 insertion(+) diff --git a/copy-list b/copy-list index 328e92d0..ba10a0bf 100644 --- a/copy-list +++ b/copy-list @@ -23,6 +23,7 @@ include/linux/crc32poly.h include/linux/bitfield.h include/linux/average.h include/linux/overflow.h +include/linux/units.h # crypto_memneq crypto/memneq.c -> compat/memneq.c From patchwork Sun Apr 19 17:10:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11497701 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D384F6CA for ; Sun, 19 Apr 2020 17:11:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BA8C1206E9 for ; Sun, 19 Apr 2020 17:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726396AbgDSRLA (ORCPT ); Sun, 19 Apr 2020 13:11:00 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:15376 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbgDSRLA (ORCPT ); Sun, 19 Apr 2020 13:11:00 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 494xDg12YtzQlGQ; Sun, 19 Apr 2020 19:10:59 +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 dewRMuWY_fF4; Sun, 19 Apr 2020 19:10:56 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Johannes Berg , Hauke Mehrtens Subject: [PATCH 2/8] backports: skbuff: add skb_list_walk_safe() and skb_mark_not_on_list() Date: Sun, 19 Apr 2020 19:10:33 +0200 Message-Id: <20200419171039.17268-3-hauke@hauke-m.de> In-Reply-To: <20200419171039.17268-1-hauke@hauke-m.de> References: <20200419171039.17268-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 3318C168A X-Rspamd-Score: -6.64 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg Signed-off-by: Johannes Berg [Do not add skb_mark_not_on_list() on kernel > 4.19.10] Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/skbuff.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h index 42b048ad..3ed990d0 100644 --- a/backport/backport-include/linux/skbuff.h +++ b/backport/backport-include/linux/skbuff.h @@ -378,6 +378,13 @@ static inline struct sk_buff *__skb_peek(const struct sk_buff_head *list_) { return list_->next; } + +#if !LINUX_VERSION_IN_RANGE(4,19,10, 4,20,0) +static inline void skb_mark_not_on_list(struct sk_buff *skb) +{ + skb->next = NULL; +} +#endif /* 4.19.10 <= x < 4.20 */ #endif #if LINUX_VERSION_IS_LESS(4,11,0) @@ -406,4 +413,10 @@ static inline void nf_reset_ct(struct sk_buff *skb) } #endif +#ifndef skb_list_walk_safe +#define skb_list_walk_safe(first, skb, next_skb) \ + for ((skb) = (first), (next_skb) = (skb) ? (skb)->next : NULL; (skb); \ + (skb) = (next_skb), (next_skb) = (skb) ? (skb)->next : NULL) +#endif + #endif /* __BACKPORT_SKBUFF_H */ From patchwork Sun Apr 19 17:10:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11497705 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84EF46CA for ; Sun, 19 Apr 2020 17:11:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6DE4521473 for ; Sun, 19 Apr 2020 17:11:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726512AbgDSRLE (ORCPT ); Sun, 19 Apr 2020 13:11:04 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:37016 "EHLO mout-p-103.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbgDSRLD (ORCPT ); Sun, 19 Apr 2020 13:11:03 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 494xDg6Vt9zKmL5; Sun, 19 Apr 2020 19:10:59 +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 wnQZTFSQX8pj; Sun, 19 Apr 2020 19:10:56 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Johannes Berg Subject: [PATCH 3/8] backports: netlink: fix nla_validate_nested() Date: Sun, 19 Apr 2020 19:10:34 +0200 Message-Id: <20200419171039.17268-4-hauke@hauke-m.de> In-Reply-To: <20200419171039.17268-1-hauke@hauke-m.de> References: <20200419171039.17268-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: D77D11761 X-Rspamd-Score: 0.31 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg I had accidentally named this nl80211_validate_nested(), and it got renamed in 5.6. Signed-off-by: Johannes Berg --- backport/backport-include/net/netlink.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h index b2045e44..082ac4d0 100644 --- a/backport/backport-include/net/netlink.h +++ b/backport/backport-include/net/netlink.h @@ -266,17 +266,17 @@ nla_validate_nested_deprecated(const struct nlattr *start, int maxtype, } #endif /* < 5.2 */ -#if LINUX_VERSION_IS_LESS(5,3,0) -#define nl80211_validate_nested LINUX_BACKPORT(nl80211_validate_nested) +#if LINUX_VERSION_IS_LESS(5,6,0) +#define nla_validate_nested LINUX_BACKPORT(nla_validate_nested) static inline int -nl80211_validate_nested(const struct nlattr *start, int maxtype, - const struct nla_policy *policy, - struct netlink_ext_ack *extack) +nla_validate_nested(const struct nlattr *start, int maxtype, + const struct nla_policy *policy, + struct netlink_ext_ack *extack) { return __nla_validate_nested(start, maxtype, policy, NL_VALIDATE_STRICT, extack); } -#endif /* < 5.3 */ +#endif /* < 5.6 */ #if LINUX_VERSION_IS_LESS(5,1,0) #undef NLA_POLICY_NESTED From patchwork Sun Apr 19 17:10:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11497707 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A38E56CA for ; Sun, 19 Apr 2020 17:11:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 961CF21473 for ; Sun, 19 Apr 2020 17:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726373AbgDSRLF (ORCPT ); Sun, 19 Apr 2020 13:11:05 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:15400 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbgDSRLE (ORCPT ); Sun, 19 Apr 2020 13:11:04 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 494xDj0x6XzQlFh; Sun, 19 Apr 2020 19:11:01 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id pwNo0T7h9J3r; Sun, 19 Apr 2020 19:10:57 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 4/8] backports: patches: Refresh on kernel 5.6.5 Date: Sun, 19 Apr 2020 19:10:35 +0200 Message-Id: <20200419171039.17268-5-hauke@hauke-m.de> In-Reply-To: <20200419171039.17268-1-hauke@hauke-m.de> References: <20200419171039.17268-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 50B60168A X-Rspamd-Score: -5.67 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org The patch patches/0093-nl80211-vlan.patch was applied upstream. Signed-off-by: Hauke Mehrtens --- .../0002-disable-dump-adjust-on-old-kernels.patch | 4 ++-- patches/0014-netlink_seq/net_wireless_nl80211.patch | 2 +- patches/0079-netdev-destructor/brcmfmac.patch | 2 +- patches/0090-remove-GRO_CONSUMED.patch | 2 +- patches/0092-listified-rx/iwlwifi.patch | 2 +- patches/0093-nl80211-vlan.patch | 12 ------------ 6 files changed, 6 insertions(+), 18 deletions(-) delete mode 100644 patches/0093-nl80211-vlan.patch diff --git a/patches/0002-disable-dump-adjust-on-old-kernels.patch b/patches/0002-disable-dump-adjust-on-old-kernels.patch index 3d752359..5a41edfb 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 -@@ -2549,6 +2549,7 @@ static int nl80211_dump_wiphy(struct sk_ +@@ -2550,6 +2550,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 -@@ -2570,6 +2571,7 @@ static int nl80211_dump_wiphy(struct sk_ +@@ -2571,6 +2572,7 @@ static int nl80211_dump_wiphy(struct sk_ rtnl_unlock(); return 1; } diff --git a/patches/0014-netlink_seq/net_wireless_nl80211.patch b/patches/0014-netlink_seq/net_wireless_nl80211.patch index 28416330..c9442de4 100644 --- a/patches/0014-netlink_seq/net_wireless_nl80211.patch +++ b/patches/0014-netlink_seq/net_wireless_nl80211.patch @@ -1,6 +1,6 @@ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -8780,7 +8780,9 @@ static int nl80211_dump_scan(struct sk_b +@@ -8781,7 +8781,9 @@ static int nl80211_dump_scan(struct sk_b if (start == 0) cfg80211_bss_expire(rdev); diff --git a/patches/0079-netdev-destructor/brcmfmac.patch b/patches/0079-netdev-destructor/brcmfmac.patch index 3ee6da62..6dc59043 100644 --- a/patches/0079-netdev-destructor/brcmfmac.patch +++ b/patches/0079-netdev-destructor/brcmfmac.patch @@ -24,7 +24,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked) { struct brcmf_pub *drvr = ifp->drvr; -@@ -802,7 +819,11 @@ struct brcmf_if *brcmf_add_if(struct brc +@@ -870,7 +887,11 @@ struct brcmf_if *brcmf_add_if(struct brc if (!ndev) return ERR_PTR(-ENOMEM); diff --git a/patches/0090-remove-GRO_CONSUMED.patch b/patches/0090-remove-GRO_CONSUMED.patch index ea0e1ea7..5ba92ae6 100644 --- a/patches/0090-remove-GRO_CONSUMED.patch +++ b/patches/0090-remove-GRO_CONSUMED.patch @@ -4,7 +4,7 @@ older kernel versions. --- a/drivers/net/wireless/ath/wil6210/txrx.c +++ b/drivers/net/wireless/ath/wil6210/txrx.c -@@ -913,7 +913,9 @@ void wil_netif_rx(struct sk_buff *skb, s +@@ -914,7 +914,9 @@ void wil_netif_rx(struct sk_buff *skb, s [GRO_HELD] = "GRO_HELD", [GRO_NORMAL] = "GRO_NORMAL", [GRO_DROP] = "GRO_DROP", diff --git a/patches/0092-listified-rx/iwlwifi.patch b/patches/0092-listified-rx/iwlwifi.patch index 925010fd..4d3e25cc 100644 --- a/patches/0092-listified-rx/iwlwifi.patch +++ b/patches/0092-listified-rx/iwlwifi.patch @@ -3,7 +3,7 @@ commit 323ebb61e32b ("net: use listified RX for handling GRO_NORMAL skbs") --- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c -@@ -1531,11 +1531,13 @@ out: +@@ -1581,11 +1581,13 @@ out: if (napi->poll) { napi_gro_flush(napi, false); diff --git a/patches/0093-nl80211-vlan.patch b/patches/0093-nl80211-vlan.patch deleted file mode 100644 index c1f8dac1..00000000 --- a/patches/0093-nl80211-vlan.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c -index ae8e3d9575d3..15c0e3c5c979 100644 ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - #include - #include - #include From patchwork Sun Apr 19 17:10:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11497703 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 419526CA for ; Sun, 19 Apr 2020 17:11:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3572421D79 for ; Sun, 19 Apr 2020 17:11:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726509AbgDSRLD (ORCPT ); Sun, 19 Apr 2020 13:11:03 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:13454 "EHLO mout-p-102.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726083AbgDSRLC (ORCPT ); Sun, 19 Apr 2020 13:11:02 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 494xDh59KYzKmTq; Sun, 19 Apr 2020 19:11:00 +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 9im-G0QSj3Dd; Sun, 19 Apr 2020 19:10:57 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 5/8] backports: patches: handle txqueue parameter in ndo_tx_timeout Date: Sun, 19 Apr 2020 19:10:36 +0200 Message-Id: <20200419171039.17268-6-hauke@hauke-m.de> In-Reply-To: <20200419171039.17268-1-hauke@hauke-m.de> References: <20200419171039.17268-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: F33C81769 X-Rspamd-Score: -5.67 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org In upstream commit 0290bd291cc0 ("netdev: pass the stuck queue to the timeout handler") the ndo_tx_timeout callback in the net_device_ops structure got a new parameter txqueue. This patch changes the code to also work with the older interface where no txqueue was provided. The functions are sometimes used by other modules so add an EXPORT_SYMBOL_GPL to the spatch. Signed-off-by: Hauke Mehrtens --- patches/0094-ndo-tx-timeout.cocci | 28 +++++++++++++++++++++++ patches/0094-ndo-tx-timeout/orinoco.patch | 10 ++++++++ patches/0094-ndo-tx-timeout/prism54.patch | 23 +++++++++++++++++++ patches/0094-ndo-tx-timeout/usbnet.patch | 10 ++++++++ 4 files changed, 71 insertions(+) create mode 100644 patches/0094-ndo-tx-timeout.cocci create mode 100644 patches/0094-ndo-tx-timeout/orinoco.patch create mode 100644 patches/0094-ndo-tx-timeout/prism54.patch create mode 100644 patches/0094-ndo-tx-timeout/usbnet.patch diff --git a/patches/0094-ndo-tx-timeout.cocci b/patches/0094-ndo-tx-timeout.cocci new file mode 100644 index 00000000..34904994 --- /dev/null +++ b/patches/0094-ndo-tx-timeout.cocci @@ -0,0 +1,28 @@ +@r@ +identifier OPS; +identifier tx_timeout_fn; +fresh identifier tx_timeout_fn_wrap = "bp_" ## tx_timeout_fn; +position p; +@@ +struct net_device_ops OPS@p = { ++#if LINUX_VERSION_IS_GEQ(5,6,0) + .ndo_tx_timeout = tx_timeout_fn, ++#else ++ .ndo_tx_timeout = tx_timeout_fn_wrap, ++#endif +}; + +@@ +identifier r.tx_timeout_fn_wrap; +identifier r.tx_timeout_fn; +@@ +void tx_timeout_fn(...) {...} ++#if LINUX_VERSION_IS_LESS(5,6,0) ++/* Just declare it here to keep sparse happy */ ++void tx_timeout_fn_wrap(struct net_device *dev); ++void tx_timeout_fn_wrap(struct net_device *dev) ++{ ++ tx_timeout_fn(dev, 0); ++} ++EXPORT_SYMBOL_GPL(tx_timeout_fn_wrap); ++#endif diff --git a/patches/0094-ndo-tx-timeout/orinoco.patch b/patches/0094-ndo-tx-timeout/orinoco.patch new file mode 100644 index 00000000..bda0a6da --- /dev/null +++ b/patches/0094-ndo-tx-timeout/orinoco.patch @@ -0,0 +1,10 @@ +--- a/drivers/net/wireless/intersil/orinoco/orinoco.h ++++ b/drivers/net/wireless/intersil/orinoco/orinoco.h +@@ -208,6 +208,7 @@ int orinoco_stop(struct net_device *dev) + void orinoco_set_multicast_list(struct net_device *dev); + int orinoco_change_mtu(struct net_device *dev, int new_mtu); + void orinoco_tx_timeout(struct net_device *dev, unsigned int txqueue); ++void bp_orinoco_tx_timeout(struct net_device *dev); + + /********************************************************************/ + /* Locking and synchronization functions */ diff --git a/patches/0094-ndo-tx-timeout/prism54.patch b/patches/0094-ndo-tx-timeout/prism54.patch new file mode 100644 index 00000000..d61d3402 --- /dev/null +++ b/patches/0094-ndo-tx-timeout/prism54.patch @@ -0,0 +1,23 @@ +--- a/drivers/net/wireless/intersil/prism54/islpci_eth.h ++++ b/drivers/net/wireless/intersil/prism54/islpci_eth.h +@@ -54,6 +54,7 @@ void islpci_eth_cleanup_transmit(islpci_ + netdev_tx_t islpci_eth_transmit(struct sk_buff *, struct net_device *); + int islpci_eth_receive(islpci_private *); + void islpci_eth_tx_timeout(struct net_device *, unsigned int txqueue); ++void bp_islpci_eth_tx_timeout(struct net_device *); + void islpci_do_reset_and_wake(struct work_struct *); + + #endif /* _ISL_GEN_H */ +--- a/drivers/net/wireless/intersil/prism54/islpci_eth.c ++++ b/drivers/net/wireless/intersil/prism54/islpci_eth.c +@@ -491,3 +491,10 @@ islpci_eth_tx_timeout(struct net_device + "%s: tx_timeout, waiting for reset", ndev->name); + } + } ++ ++#if LINUX_VERSION_IS_LESS(5,6,0) ++void bp_islpci_eth_tx_timeout(struct net_device *dev) { ++ islpci_eth_tx_timeout(dev, 0); ++} ++EXPORT_SYMBOL_GPL(bp_islpci_eth_tx_timeout); ++#endif diff --git a/patches/0094-ndo-tx-timeout/usbnet.patch b/patches/0094-ndo-tx-timeout/usbnet.patch new file mode 100644 index 00000000..3bd1facd --- /dev/null +++ b/patches/0094-ndo-tx-timeout/usbnet.patch @@ -0,0 +1,10 @@ +--- a/include/linux/usb/usbnet.h ++++ b/include/linux/usb/usbnet.h +@@ -254,6 +254,7 @@ extern int usbnet_stop(struct net_device + extern netdev_tx_t usbnet_start_xmit(struct sk_buff *skb, + struct net_device *net); + extern void usbnet_tx_timeout(struct net_device *net, unsigned int txqueue); ++extern void bp_usbnet_tx_timeout(struct net_device *net); + extern int usbnet_change_mtu(struct net_device *net, int new_mtu); + + extern int usbnet_get_endpoints(struct usbnet *, struct usb_interface *); From patchwork Sun Apr 19 17:10:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11497715 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 732C5112C for ; Sun, 19 Apr 2020 17:11:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5BD5821473 for ; Sun, 19 Apr 2020 17:11:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726597AbgDSRLH (ORCPT ); Sun, 19 Apr 2020 13:11:07 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:15408 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbgDSRLG (ORCPT ); Sun, 19 Apr 2020 13:11:06 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 494xDn67n2zQlFh; Sun, 19 Apr 2020 19:11:05 +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 rRiqKnmPV220; Sun, 19 Apr 2020 19:10:58 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 6/8] backports: rcupdate: Add rcu_replace_pointer Date: Sun, 19 Apr 2020 19:10:37 +0200 Message-Id: <20200419171039.17268-7-hauke@hauke-m.de> In-Reply-To: <20200419171039.17268-1-hauke@hauke-m.de> References: <20200419171039.17268-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 1904D1762 X-Rspamd-Score: -5.43 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org rcu_replace_pointer() was added in upstream commit a63fc6b75cca ("rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()") and is now used by the mt76 driver. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/rcupdate.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/backport/backport-include/linux/rcupdate.h b/backport/backport-include/linux/rcupdate.h index db501007..0bbfd615 100644 --- a/backport/backport-include/linux/rcupdate.h +++ b/backport/backport-include/linux/rcupdate.h @@ -77,4 +77,24 @@ rcu_head_after_call_rcu(struct rcu_head *rhp, rcu_callback_t f) } while (0) #endif +#ifndef rcu_replace_pointer +/** + * rcu_replace_pointer() - replace an RCU pointer, returning its old value + * @rcu_ptr: RCU pointer, whose old value is returned + * @ptr: regular pointer + * @c: the lockdep conditions under which the dereference will take place + * + * Perform a replacement, where @rcu_ptr is an RCU-annotated + * pointer and @c is the lockdep argument that is passed to the + * rcu_dereference_protected() call used to read that pointer. The old + * value of @rcu_ptr is returned, and @rcu_ptr is set to @ptr. + */ +#define rcu_replace_pointer(rcu_ptr, ptr, c) \ +({ \ + typeof(ptr) __tmp = rcu_dereference_protected((rcu_ptr), (c)); \ + rcu_assign_pointer((rcu_ptr), (ptr)); \ + __tmp; \ +}) +#endif + #endif /* __BACKPORT_LINUX_RCUPDATE_H */ From patchwork Sun Apr 19 17:10:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11497713 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 122E9112C for ; Sun, 19 Apr 2020 17:11:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ED06D21927 for ; Sun, 19 Apr 2020 17:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726343AbgDSRLF (ORCPT ); Sun, 19 Apr 2020 13:11:05 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:54938 "EHLO mout-p-201.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726513AbgDSRLF (ORCPT ); Sun, 19 Apr 2020 13:11:05 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 494xDj3q45zQlF1; Sun, 19 Apr 2020 19:11:01 +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 Uw9ZmtGv4lWh; Sun, 19 Apr 2020 19:10:58 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 7/8] backports: fs: Adapt struct proc_ops Date: Sun, 19 Apr 2020 19:10:38 +0200 Message-Id: <20200419171039.17268-8-hauke@hauke-m.de> In-Reply-To: <20200419171039.17268-1-hauke@hauke-m.de> References: <20200419171039.17268-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: B693C176F X-Rspamd-Score: -5.43 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org Since upstream commit 97a32539b956 ("proc: convert everything to "struct proc_ops"") the drivers ate not using struct file_operations for proc files any more, but the new struct proc_ops. This replaces the new names with the old ones to make the driver still work on older kernel versions. The kernel commit also removed the .owner attribute which is not added by this change again. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/fs.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/backport/backport-include/linux/fs.h b/backport/backport-include/linux/fs.h index 9854290a..4e03adf6 100644 --- a/backport/backport-include/linux/fs.h +++ b/backport/backport-include/linux/fs.h @@ -59,4 +59,13 @@ extern long compat_ptr_ioctl(struct file *file, unsigned int cmd, #endif #endif /* < 5.5 */ +#if LINUX_VERSION_IS_LESS(5,6,0) +#define proc_ops file_operations +#define proc_open open +#define proc_read read +#define proc_lseek llseek +#define proc_release release +#define proc_write write +#endif /* < 5.6 */ + #endif /* _COMPAT_LINUX_FS_H */ From patchwork Sun Apr 19 17:10:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11497709 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D6C8013B2 for ; Sun, 19 Apr 2020 17:11:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BEF6421473 for ; Sun, 19 Apr 2020 17:11:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726083AbgDSRLF (ORCPT ); Sun, 19 Apr 2020 13:11:05 -0400 Received: from mout-p-202.mailbox.org ([80.241.56.172]:15402 "EHLO mout-p-202.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbgDSRLF (ORCPT ); Sun, 19 Apr 2020 13:11:05 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 494xDk25yVzQlGt; Sun, 19 Apr 2020 19:11:02 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id jgMEkX5Q9Va2; Sun, 19 Apr 2020 19:10:59 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 8/8] patches: patches: Restrict MTU changes to struct net_device Date: Sun, 19 Apr 2020 19:10:39 +0200 Message-Id: <20200419171039.17268-9-hauke@hauke-m.de> In-Reply-To: <20200419171039.17268-1-hauke@hauke-m.de> References: <20200419171039.17268-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 5EC5E175E X-Rspamd-Score: -5.43 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org The struct ieee80211_hw got a max_mtu element, but no min_mtu element. This spatch was also applied to this structure accidentally. This adds the type to make sure this spatch is only applied to mtu_min and mtu_max attributes on the net_device structure. Signed-off-by: Hauke Mehrtens --- patches/0073-netdevice-mtu-range.cocci | 6 +++--- patches/0074-netdevice-mtu-range-ifdefs.cocci | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/patches/0073-netdevice-mtu-range.cocci b/patches/0073-netdevice-mtu-range.cocci index 7a4b6532..7afe900e 100644 --- a/patches/0073-netdevice-mtu-range.cocci +++ b/patches/0073-netdevice-mtu-range.cocci @@ -4,7 +4,7 @@ first_ops = 0 @both@ -expression ndevexp; +struct net_device *ndevexp; constant e1, e2; identifier func; position p; @@ -17,7 +17,7 @@ func(...) { } @@ -expression ndevexp; +struct net_device *ndevexp; constant MAX; identifier func; position p != both.p; @@ -58,7 +58,7 @@ if not(first_ops == ln): cocci.include_match(False) @r1 exists@ -expression ndevexp; +struct net_device *ndevexp; constant e1, e2; identifier func; @@ diff --git a/patches/0074-netdevice-mtu-range-ifdefs.cocci b/patches/0074-netdevice-mtu-range-ifdefs.cocci index 5689f438..bb1ca95c 100644 --- a/patches/0074-netdevice-mtu-range-ifdefs.cocci +++ b/patches/0074-netdevice-mtu-range-ifdefs.cocci @@ -1,5 +1,5 @@ @@ -expression ndevexp; +struct net_device *ndevexp; expression E; identifier func; @@ @@ -12,7 +12,7 @@ func(...) { } @@ -expression ndevexp; +struct net_device *ndevexp; expression E; identifier func; @@