Re: usb driver - order of calling module init / probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 25, 2009 at 06:30:00AM +0000, Martin Willms wrote:
> 
> Hello,
> 
> I just saw something "unexpected" using our USB driver for our ADU-07 
> measurement systems. We use a measurement hardware with Cypress EZ USB 
> controller connected to an CPU board running an Linux system. As the EZ USB is 
> soft booted, it is probed as Cypress device after power on. After software 
> beeing downloaded to it it renumerates and probes as ADU-07.
> 
> So far so good. Now I had problems, if doing a warm start of the Linux system, 
> not switching power off of the Cypress controller. In this case the Cypress 
> controller would not renumerate as it does not change its VID/PID. As a result 
> my USB driver did not work properly anymore.
> 
> After investigating this issue I found out, that the Linux kernel calls the 
> probe function for the device before calling the init function of the module. 

That's impossible, how would the kernel know to call the probe function
if it's not even registered yet?

Now the probe function can be called before the init function returns,
right after usb_register_driver() is called, which is probably what
happened here, right?  That's expected for devices that are already
plugged in, and your driver should be able to handle it.

Do you have a pointer to your driver somewhere so that we can look at it
to see if there are any other problems?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux