Subject: Re: [PATCH] net: dev: Add API to check net_dev readiness

From: Andrew Lunn <[email-masked]>
Date: Sun, 26 Jul 2020 21:45:28 +0200

On Sun, Jul 26, 2020 at 10:37:54PM +0300, Ilia Lin wrote:
> From: Ilia Lin <[email-masked]>
> 
> Add an API that returns true, if the net_dev_init was already called,
> and the driver was initialized.
> 
> Some early drivers, that are initialized during the subsys_initcall
> may try accessing the net_dev or NAPI APIs before the net_dev_init,
> and will encounter a kernel bug. This API provides a way to handle
> this and manage by deferring or by other way.

Hi Ilia

You need to include a user of this new API.

I also have to wonder why a network device driver is being probed the
subsys_initcall.

    Andrew