Netdev List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: andrew@lunn.ch
Cc: f.fainelli@gmail.com, vivien.didelot@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net] net: dsa: Fix load order between DSA drivers and taggers
Date: Sun, 15 Sep 2019 19:50:49 +0100 (WEST)	[thread overview]
Message-ID: <20190915.195049.1709278574899996404.davem@davemloft.net> (raw)
In-Reply-To: <20190912131645.24782-1-andrew@lunn.ch>

From: Andrew Lunn <andrew@lunn.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@lunn.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.

      reply	other threads:[~2019-09-15 18:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-12 13:16 [PATCH net] net: dsa: Fix load order between DSA drivers and taggers Andrew Lunn
2019-09-15 18:50 ` David Miller [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=20190915.195049.1709278574899996404.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.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