On Wed, Jun 22, 2005 at 05:53:28PM +0200, Stelian Pop wrote:
> Le mercredi 22 juin 2005 ?? 11:41 -0400, Alan Stern a ??crit :
> 
> > This is a curious aspect of the driver model core.  Should failure of a 
> > driver to bind be considered serious enough to cause device_add to fail?
> > The current answer is Yes unless the driver's probe routine returns 
> > -ENODEV or -ENXIO, in which case the failure is not considered serious.
> 
> Indeed. I've also tracked my problem down to the hid core which returns
> -EIO when it fails to drive an unknown HID device, instead of a more
> logical -ENODEV (this is not a failure to init a known device, but
> rather the impossibility to init an unknown device).
> 
> The patch below solves the problem for me:

Damm, beat me by a few minutes :)

Yes, this is the proper fix for this.

But to answer Alan's main question, I think you are correct, we should
not fail device_add if binding a device fails.  I can see this causing a
lot of very difficult problems in the future (including the fact that
I've been hitting this bug with a new driver I'm writing and didn't even
realize it...)

So, I'll apply this one, and revert the main part of Hannes's patch too.

Thanks for tracking this down.

greg k-h


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to