mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Gan, Yi Fang" <yi.fang.gan@intel.com>
To: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Andrew Halaney" <ahalaney@redhat.com>,
	"Javier Martinez Canillas" <javierm@redhat.com>,
	"John Stultz" <jstultz@google.com>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	"Gan Yi Fang" <yi.fang.gan@intel.com>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Russell King" <linux@armlinux.org.uk>,
	"Andrew Lunn" <andrew@lunn.ch>,
	"Heiner Kallweit" <hkallweit1@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Marek Behún" <kabel@kernel.org>,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: Looi Hong Aun <hong.aun.looi@intel.com>,
	Voon Weifeng <weifeng.voon@intel.com>,
	Song Yoong Siang <yoong.siang.song@intel.com>,
	Lai Peter Jun Ann <peter.jun.ann.lai@intel.com>,
	Choong Yong Liang <yong.liang.choong@intel.com>
Subject: [PATCH net v2 2/2] net: phylink: Add module_exit_stub()
Date: Thu, 21 Dec 2023 16:51:09 +0800	[thread overview]
Message-ID: <20231221085109.2830794-3-yi.fang.gan@intel.com> (raw)
In-Reply-To: <20231221085109.2830794-1-yi.fang.gan@intel.com>

In delete_module(), if mod->init callback is defined but mod->exit
callback is not defined, it will assume the module cannot be removed
and return EBUSY. The module_exit() is missing from current phylink
module drive causing failure while unloading it.
Add module_exit_stub() in phylink for the module to be unloadable.

Fixes: eca68a3c7d05 ("net: phylink: pass supported host PHY interface modes to phylib for SFP's PHYs")
Cc: <stable@vger.kernel.org> # 6.1+
Signed-off-by: Gan, Yi Fang <yi.fang.gan@intel.com>
---
 drivers/net/phy/phylink.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 25c19496a336..823c9b43cd92 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -3725,6 +3725,7 @@ static int __init phylink_init(void)
 }
 
 module_init(phylink_init);
+module_exit_stub(phylink);
 
 MODULE_LICENSE("GPL v2");
 MODULE_DESCRIPTION("phylink models the MAC to optional PHY connection");
-- 
2.34.1


  parent reply	other threads:[~2023-12-21  8:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-21  8:51 [PATCH net v2 0/2] Fix phylink unloadable issue Gan, Yi Fang
2023-12-21  8:51 ` [PATCH net v2 1/2] driver.h: add helper macro for module_exit() boilerplate Gan, Yi Fang
2023-12-21  8:51 ` Gan, Yi Fang [this message]
2023-12-21  9:22   ` [PATCH net v2 2/2] net: phylink: Add module_exit_stub() Andrew Lunn
2024-01-04  9:45     ` Gan, Yi Fang
2024-01-04 13:00       ` Andrew Lunn
2023-12-21  9:11 ` [PATCH net v2 0/2] Fix phylink unloadable issue Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231221085109.2830794-3-yi.fang.gan@intel.com \
    --to=yi.fang.gan@intel.com \
    --cc=ahalaney@redhat.com \
    --cc=andrew@lunn.ch \
    --cc=axboe@kernel.dk \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hkallweit1@gmail.com \
    --cc=hong.aun.looi@intel.com \
    --cc=javierm@redhat.com \
    --cc=jstultz@google.com \
    --cc=kabel@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peter.jun.ann.lai@intel.com \
    --cc=rafael@kernel.org \
    --cc=weifeng.voon@intel.com \
    --cc=yong.liang.choong@intel.com \
    --cc=yoong.siang.song@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®