From: Dave Jiang <dave.jiang@intel.com>
To: Geoff Levand <geoff@infradead.org>, <ntb@lists.linux.dev>,
Jon Mason <jdmason@kudzu.us>, Allen Hubbe <allenbh@gmail.com>
Subject: Re: [PATCH v1 1/1] ntb_netdev: Fix module_init problem
Date: Fri, 30 Jun 2023 15:00:34 -0700 [thread overview]
Message-ID: <064504c8-12e6-00c2-eaee-06afda4fb5b3@intel.com> (raw)
In-Reply-To: <824a68d53214fa7a9e061176c05e9ce8ad5d850a.1688151221.git.geoff@infradead.org>
On 6/30/23 14:58, Geoff Levand wrote:
> With both the ntb_transport_init and the ntb_netdev_init_module routines in the
> module_init init group, the ntb_netdev_init_module routine can be called before
> the ntb_transport_init routine that it depends on is called. To assure the
> proper initialization order put ntb_netdev_init_module in the late_initcall
> group.
>
> Fixes runtime errors where the ntb_netdev_init_module call fails with ENODEV.
>
> Signed-off-by: Geoff Levand <geoff@infradead.org> for Sony Interactive Entertainment
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
> drivers/net/ntb_netdev.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c
> index 85dbe7f73e31..536bd6564f8b 100644
> --- a/drivers/net/ntb_netdev.c
> +++ b/drivers/net/ntb_netdev.c
> @@ -493,7 +493,7 @@ static int __init ntb_netdev_init_module(void)
>
> return 0;
> }
> -module_init(ntb_netdev_init_module);
> +late_initcall(ntb_netdev_init_module);
>
> static void __exit ntb_netdev_exit_module(void)
> {
prev parent reply other threads:[~2023-06-30 22:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-30 21:58 [PATCH v1 1/1] ntb_netdev: Fix module_init problem Geoff Levand
2023-06-30 22:00 ` Dave Jiang [this message]
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=064504c8-12e6-00c2-eaee-06afda4fb5b3@intel.com \
--to=dave.jiang@intel.com \
--cc=allenbh@gmail.com \
--cc=geoff@infradead.org \
--cc=jdmason@kudzu.us \
--cc=ntb@lists.linux.dev \
/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