public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adam Baker <linux@baker-net.org.uk>
To: rt2400-devel@lists.sourceforge.net
Cc: Roland Dreier <rdreier@cisco.com>,
	Ivo van Doorn <ivdoorn@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-stuff@comcast.net
Subject: Re: [Rt2400-devel] [PATCH] rt2500usb - Don't claim 050d:705{0/a}
Date: Fri, 26 Oct 2007 20:58:56 +0100	[thread overview]
Message-ID: <200710262058.56188.linux@baker-net.org.uk> (raw)
In-Reply-To: <adamyu5zo88.fsf@cisco.com>

On Friday 26 October 2007 20:10, Roland Dreier wrote:
>  > Well it could be something quite simple, in the module loader it is
> looping > through all modules to look for a device with the correct USB/PCI
> ID. > Currently, after the first occurence it loads the module and doesn't
> continue, > it should perhaps be relatively easy that it checks if the
> driver returned -ENODEV > and continues looping to search for another
> driver.
>
> But a driver (especially a driver for something as hot-pluggable as a
> USB device) shouldn't return -ENODEV just because no devices are
> present at the moment.  It should just load successfully and wait for
> a device to appear.

The function that is returning ENODEV is the driver probe function. According 
to Documentation/DocBook/writing_usb_driver/ch03.html when that function is 
called 

"The driver now needs to verify that this device is actually one that it can 
accept. If so, it returns 0. If not, or if any error occurs during 
initialization, an errorcode (such as -ENOMEM or -ENODEV) is returned from 
the probe function."

It isn't a device the driver can accept so it returns -ENODEV

Adam

  reply	other threads:[~2007-10-26 19:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 23:22 [PATCH] rt2500usb - Don't claim 050d:705{0/a} Parag Warudkar
2007-10-25 19:35 ` [Rt2400-devel] " Adam Baker
2007-10-25 22:33   ` Parag Warudkar
2007-10-25 21:15 ` Ivo van Doorn
2007-10-25 22:41   ` Parag Warudkar
2007-10-26 18:39     ` Ivo van Doorn
2007-10-26 19:10       ` Roland Dreier
2007-10-26 19:58         ` Adam Baker [this message]
2007-10-26 20:05           ` Roland Dreier
2007-10-26 21:34             ` Ivo van Doorn

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=200710262058.56188.linux@baker-net.org.uk \
    --to=linux@baker-net.org.uk \
    --cc=ivdoorn@gmail.com \
    --cc=kernel-stuff@comcast.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdreier@cisco.com \
    --cc=rt2400-devel@lists.sourceforge.net \
    /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