ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: ksummit <ksummit-discuss@lists.linuxfoundation.org>,
	ksummit@lists.linux.dev, Shuah Khan <skhan@linuxfoundation.org>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [TECH TOPIC] Driver probe fails and register succeeds
Date: Fri, 24 Jun 2022 09:55:52 -0600	[thread overview]
Message-ID: <7e4ca4bb-fb34-7886-927c-c13f7da44b80@linuxfoundation.org> (raw)
In-Reply-To: <YrVaPvqE+lB42OPD@kroah.com>

On 6/24/22 12:31 AM, Greg KH wrote:
> On Thu, Jun 23, 2022 at 05:05:30PM -0600, Shuah Khan wrote:
>> I have been debugging a driver probe failure and noticed that driver gets
>> registered even when driver probe fails. This is not a new behavior. The
>> code in question is the same since 2005.
> 
> As others have pointed out, this is "by design".  Probe is independent
> of a driver registering in the kernel (i.e. module_init()) and should
> never determine if a module is to not be loaded or not.
> 
> That was part of the explicit design of the driver model we did back in
> the 2.5 kernel days.  We don't want to go back to the old style of "if a
> module can not find a device to control, fail to load" model, it does
> not work well for a variety of reasons.
> 

Thank you - this is helpful.

> So it sounds like the driver is working properly for this portion of it,
> we can discuss the specifics of it on the subsystem-specific mailing
> list to find out of anything else is currently wrong with it, but I
> don't think this needs to be a tech topic from what I can tell.
> 

Thank you. Makes sense. This driver probe failure is a bug that needs to
be fixed. I have a few fixes to send.

thanks,
-- Shuah


      reply	other threads:[~2022-06-24 15:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-23 23:05 [TECH TOPIC] Driver probe fails and register succeeds Shuah Khan
2022-06-23 23:13 ` Laurent Pinchart
2022-06-23 23:28   ` Shuah Khan
2022-06-23 23:30     ` Laurent Pinchart
2022-06-23 23:38       ` Shuah Khan
2022-06-23 23:57         ` Dan Williams
2022-06-24  1:00           ` Dmitry Torokhov
2022-06-24  6:33             ` Greg KH
2022-06-23 23:24 ` Guenter Roeck
2022-06-24  6:31 ` Greg KH
2022-06-24 15:55   ` Shuah Khan [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=7e4ca4bb-fb34-7886-927c-c13f7da44b80@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=ksummit@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;
as well as URLs for NNTP newsgroup(s).