question about USB interface probe order and synchronization

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

 



Hi, 
I am attempting to debug a problem where the hwa_hc module occasionally 
fails to start correctly when an HWA device is plugged in.  An HWA device 
consists of two USB interfaces each with its own driver: the radio control 
interface (hwa_rc.ko), and the host controller interface (hwa_hc.ko).  
Both of these modules depend on a common subcomponent (uwb.ko) but they do 
not depend directly on each other as far as depmod is concerned.

When the device is plugged in, hwa_rc receives a probe event.  It then 
does a device_add after setting the class to "uwb_rc" to add itself to the 
system.  When the hwa_hc probe event happens for the host controller 
interface, it attempts to find a handle to the RC object using 
class_find_device to find a "uwb_rc" class device with a common parent 
device ptr.

Usually, the radio controller interface is able to register itself before 
the host controller interface looks for it, but occasionally the order is 
reversed and the lookup fails causing the host controller probe to fail.

So, my question is.  Is there a better way for one interface driver to get 
a handle to the device object of another interface on the same USB device 
at probe time?

Thanks,
Tom Pugliese
--
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