[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190915.195049.1709278574899996404.davem@davemloft.net>
Date: Sun, 15 Sep 2019 19:50:49 +0100 (WEST)
From: David Miller <davem@...emloft.net>
To: andrew@...n.ch
Cc: f.fainelli@...il.com, vivien.didelot@...il.com,
netdev@...r.kernel.org
Subject: Re: [PATCH net] net: dsa: Fix load order between DSA drivers and
taggers
From: Andrew Lunn <andrew@...n.ch>
Date: Thu, 12 Sep 2019 15:16:45 +0200
> The DSA core, DSA taggers and DSA drivers all make use of
> module_init(). Hence they get initialised at device_initcall() time.
> The ordering is non-deterministic. It can be a DSA driver is bound to
> a device before the needed tag driver has been initialised, resulting
> in the message:
>
> No tagger for this switch
>
> Rather than have this be fatal, return -EPROBE_DEFER so that it is
> tried again later once all the needed drivers have been loaded.
>
> Fixes: d3b8c04988ca ("dsa: Add boilerplate helper to register DSA tag driver modules")
> Signed-off-by: Andrew Lunn <andrew@...n.ch>
> ---
>
> I did wonder if we should play with the core and tag drivers and make
> them use subsystem_initcall(), but EPROBE_DEFER seems to be the more
> preferred solution nowadays.
Yes that does indeed seem preferable these days and all of the init
types is usually quite fragile.
Applied and queued up for v5.2 -stable.
Thanks.
Powered by blists - more mailing lists