USB ECHI hub dection

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

 



Hi, everyone

In kernel 2.6.26, when the root hub of ECHI is added to usb subsytem, which driver probe routine is called, generic_usb_driver or hub_driver?

I guess it is right for probe() of hub_driver to be called.
However, I see the device type of root hub is usb_device_type.
It is allocated by usb_alloc_dev().

struct usb_device *usb_alloc_dev(struct usb_device *parent, struct usb_bus *bus, unsigned port1)
{
	.......
	dev->dev.type = &usb_device_type;
	.......
}

The hub driver is registered by usb_register_driver(), so it is not for usb devices.

int usb_register_driver(struct usb_driver *new_driver, struct module *owner, const char *mod_name)
{
	.......

	new_driver->drvwrap.for_devices = 0;

        ........
}

It seems that the match routine of usb bus type(usb_device_match())
prevents the hub driver from being called for root hub of ehci because it is not usb devices.

static int usb_device_match(struct device *dev, struct device_driver *drv)
{
	/* devices and interfaces are handled separately */
	if (is_usb_device(dev)) {
		/* interface drivers never match devices */
		if (!is_usb_device_driver(drv))
			return 0;

	...................
}

When I run debian (kernel 2.6.18) in my PC, the probe routine of hub driver is called after the root hub of ehci is added to usb subsystem.

Is there differences in mechanism of probing the root HUB between kernel 2.6.26 and 2.6.18?

Please let me know what is the my misunderstaing of the kerenl 2.6.26.

Thanks in advance.


Regards,
J.H.Kim



--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux