multiple interface test case

Duncan Sands baldrick at free.fr
Wed Apr 13 06:13:22 EDT 2005


Hi Roman, in -mm things are completely different.  Here's what
happens: driver_detach correctly iterates over the devices.

First device (interface 0):
	device_release_driver calls usb_unbind_interface which calls
test_usb_disconnect.  This calls usb_driver_release_interface on each
interface:
	interface 0: instant exit at this line:
      	  if (!dev->driver || dev->driver != &driver->driver)
       	         return;

	interfaces 1 and 2: device_release_driver is NOT called, because
of this test:
    	    if (!klist_node_attached(&dev->knode_driver) && !klist_node_attached(&dev->knode_bus)) {
	however, usb_driver_release_interface then does this:
	        dev->driver = NULL;
	before exiting.

Second and third devices (interfaces 1 and 2):
	device_release_driver does an instant exit because of this test:
	         if (dev->driver) {

Summary: the fault seems to be in usb_driver_release_interface, which
shouldn't be setting dev->driver to NULL.

Ciao,

D.





More information about the Usbatm mailing list