From patchwork Fri Jan 28 08:52:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 12728137 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D075C4332F for ; Fri, 28 Jan 2022 08:52:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347385AbiA1Iwr (ORCPT ); Fri, 28 Jan 2022 03:52:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347377AbiA1Iwk (ORCPT ); Fri, 28 Jan 2022 03:52:40 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 728FBC061714 for ; Fri, 28 Jan 2022 00:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=QB6upebxx8V7RU5BEFu6hU8k40dNmvJS3KS7Pdpivg8=; t=1643359959; x=1644569559; b=XodM0zqvarjoAuNJ3B7lm9hjT38uLgZNxeQXGdTuRzH8RwNApXgOrNDtJ5N3U8Jh+dTcP75e6Kb l3xVuj7px0SoEotCm+k2AnqCj0NYYqliGtnnveX76/AU/7LH42vujrIDzcYoRq1yq61g3VBisAXi/ gzk759GNeD6PjlODyxKFFsuKYv64D0CH5A8twBt+Mg6ZlD8PwazdHIMxyY8ZsSO3six7UB+X/FFnW Ud0wYe389puPRRqHNWk3Teoh82TfYJSFdjRdfZMsNtaZfCNI6IIeZqL6Vx3/o6lBaqDQVi+3bfO05 BPNZqmkYmXU74jLEw9twy9l6Q9iI3HnUO/gQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nDMzj-00BMr8-4F; Fri, 28 Jan 2022 09:52:35 +0100 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 1/3] patches: add spatch to adjust to changed ethtool ringparam API Date: Fri, 28 Jan 2022 09:52:28 +0100 Message-Id: <20220128095230.da47bbe7d248.I29005f305b7808de21837d75e992b07444b4eaaa@changeid> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg This changed in 5.17-rc1, so add the necessary ifdefs via a new spatch. ticket=none Signed-off-by: Johannes Berg --- patches/0106-ethtool-ringparam.cocci | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 patches/0106-ethtool-ringparam.cocci diff --git a/patches/0106-ethtool-ringparam.cocci b/patches/0106-ethtool-ringparam.cocci new file mode 100644 index 000000000000..6f78668e37b6 --- /dev/null +++ b/patches/0106-ethtool-ringparam.cocci @@ -0,0 +1,45 @@ +@set@ +identifier ops, fn; +@@ +const struct ethtool_ops ops = { + .set_ringparam = fn, + ... +}; + +@@ +identifier set.fn; +identifier dev, rp; +@@ +int fn(struct net_device *dev, + struct ethtool_ringparam *rp ++#if LINUX_VERSION_IS_GEQ(5,17,0) ++ , struct kernel_ethtool_ringparam *krp, ++ struct netlink_ext_ack *extack ++#endif + ) +{ +... +} + +@get@ +identifier ops, fn; +@@ +const struct ethtool_ops ops = { + .get_ringparam = fn, + ... +}; + +@@ +identifier get.fn; +identifier dev, rp; +@@ +void fn(struct net_device *dev, + struct ethtool_ringparam *rp ++#if LINUX_VERSION_IS_GEQ(5,17,0) ++ , struct kernel_ethtool_ringparam *krp, ++ struct netlink_ext_ack *extack ++#endif + ) +{ +... +} From patchwork Fri Jan 28 08:52:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 12728139 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF6C6C43219 for ; Fri, 28 Jan 2022 08:52:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347398AbiA1Iws (ORCPT ); Fri, 28 Jan 2022 03:52:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347361AbiA1Iwk (ORCPT ); Fri, 28 Jan 2022 03:52:40 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72CA8C06173B for ; Fri, 28 Jan 2022 00:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=PWQXg1VQ3lI1x8rz1aZXiFqFEPlis4loDnpfeefp9w4=; t=1643359959; x=1644569559; b=qVVylLIuXJN428VcKVsJkcPwuIQ2KLYBWrLshbE2lAGi7/Y pNG5Y1GiOp8gzS2uDmpjHAZBP+JKOX3Eq4K3PMbDOqT9bjg3+RKKKX8E+hjYqYYKsc59tDp85Hgs3 g7ouUdax9jurXj9fPOw7murjsqfs93EeNQsMIeZYTMDGTIVwJrgOohYH6nh+/A98zNqJqLXqfzeKR gZIgSbGn2kkJS3QwNc26Cna/ftwz6+/BMACsU/8/cdpuPW+mSqzNtou5RkgXSKU12X8Qh7SIAOOjj 3khtKt0qoZ5Y6svazIKj3CWf9bHOBSOz6tFGRJIbXwZYblnPXtB/gFhWnTFYeGDg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nDMzj-00BMr8-Do; Fri, 28 Jan 2022 09:52:35 +0100 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 2/3] main: add module_exit() Date: Fri, 28 Jan 2022 09:52:29 +0100 Message-Id: <20220128095230.0a57cdbba670.I1ef27160b229985f1bf154a8cc3d6f6b08328895@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220128095230.da47bbe7d248.I29005f305b7808de21837d75e992b07444b4eaaa@changeid> References: <20220128095230.da47bbe7d248.I29005f305b7808de21837d75e992b07444b4eaaa@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg This is needed since we have module_init() and otherwise the kernel cannot unload the module again. Signed-off-by: Johannes Berg --- backport/compat/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backport/compat/main.c b/backport/compat/main.c index 2540e7573674..d4f3340dba48 100644 --- a/backport/compat/main.c +++ b/backport/compat/main.c @@ -72,3 +72,8 @@ static int __init backport_init(void) return 0; } subsys_initcall(backport_init); + +static void __exit backport_exit(void) +{ +} +module_exit(backport_exit); From patchwork Fri Jan 28 08:52:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 12728138 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B4BDC433EF for ; Fri, 28 Jan 2022 08:52:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347414AbiA1Iwr (ORCPT ); Fri, 28 Jan 2022 03:52:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347385AbiA1Iwk (ORCPT ); Fri, 28 Jan 2022 03:52:40 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 770D1C061747 for ; Fri, 28 Jan 2022 00:52:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=U+5JvG8I7u02yMiA/HPT/x9S1+Fo8GzerjLG7LFlU5A=; t=1643359959; x=1644569559; b=Hs1rOsYNdLEktjnn6wlo8xgYPBk6+iKq0COXKsPnET4nKCB JEzrhKwSCOy3vcrqaksZ15G8Dc3ioBZ/j/TWS2D8RkS1E4ELEFIzUy6dZ3cRLYgiB11Li3lmA4xw7 /S3RFtjt6tejRxqNsIkuqKCANjxsBuuu0dy5NsvraUepyyGEyplRpez/bPdD4IuAHlame9yPEd7gI XQve9m2BnaKAgm1tWCpWuGFwV0vuYYM2RPuoHPFzNotbucT1F4Yhe2VrUTU1roEX1tVGJgxOiDet+ e8KkbJRl9qEHROV2ZiQr9qbj1f095qW1Rbk/Bhm8rm6IUsZ+lqR4CN1nkdYezMyw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.95) (envelope-from ) id 1nDMzj-00BMr8-MC; Fri, 28 Jan 2022 09:52:35 +0100 From: Johannes Berg To: backports@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 3/3] backports: add kthread.h Date: Fri, 28 Jan 2022 09:52:30 +0100 Message-Id: <20220128095230.0d32af21ba08.I0c3c1ed3d75dcd800d0a4ef41943a4db10ea5df4@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220128095230.da47bbe7d248.I29005f305b7808de21837d75e992b07444b4eaaa@changeid> References: <20220128095230.da47bbe7d248.I29005f305b7808de21837d75e992b07444b4eaaa@changeid> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org From: Johannes Berg In 5.17, complete_and_exit() gets replaced by kthread_complete_and_exit(), so support that API. Signed-off-by: Johannes Berg --- backport/backport-include/linux/kthread.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 backport/backport-include/linux/kthread.h diff --git a/backport/backport-include/linux/kthread.h b/backport/backport-include/linux/kthread.h new file mode 100644 index 000000000000..0b36bdcc2d2a --- /dev/null +++ b/backport/backport-include/linux/kthread.h @@ -0,0 +1,12 @@ +#ifndef __BACKPORT_LINUX_KTHREAD_H +#define __BACKPORT_LINUX_KTHREAD_H +#include_next + +#if LINUX_VERSION_IS_LESS(5,17,0) +static inline void kthread_complete_and_exit(struct completion *c, long ret) +{ + complete_and_exit(c, ret); +} +#endif /* < 5.17 */ + +#endif /* __BACKPORT_LINUX_KTHREAD_H */