usb driver - order of calling module init / probe

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

 



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. 
This seems strange to me, as I expected that the init function would be called 
first when inserting the kernel module and only afterwards the driver is 
allowed to probe for an connected device. The device itself is connected all 
the time to the Linux system.

I now solved the problem by changing the Cypress FW to allways disconnect after 
FW download, even if the VID/PID does not change. This causes the drivers probe 
function to be called after init and the order of the initialisation is correct 
again.

Nevertheless: Is this order of calling probe before init correct?

Greetings,

Martin

--
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