multiple interface test case

Roman Kagan rkagan at
Wed Apr 13 07:33:58 EDT 2005

On Wed, Apr 13, 2005 at 01:17:37PM +0200, Duncan Sands wrote:
> > > release_interfaces: interface 0
> > > usb_driver_release_interface: skipping <= somehow I failed to see this!
> > > release_interfaces: interface 1
> > > usb_driver_release_interface: skipping
> > > release_interfaces: interface 2
> > > usb_driver_release_interface: skipping
> > 
> > That is weird then: who has removed _all_ interfaces from the driver's
> > list?  On the first disconnect(), the other two interfaces must still
> > remain on the list.  Otherwise what does driver_detach() iterate over?
> I think it's this one, in device_release_driver:
>                 klist_del(&dev->knode_driver);
> it's called just before doing the disconnect call
>                 if (drv->remove)
>                         drv->remove(dev);

Exactly, that's what I meant, but that means that device_release_driver
has already been called for all three interfaces, but we were talking
about the _first_ disconnect() which is called from the _first_

> I suppose klist_del removes the driver from the list of drivers,
> which means that this test in usb_driver_release_interface fires:
> 	klist_node_attached(&dev->knode_driver)
> driver_detach iterates over devices, but this is a test on the
> driver.

klist_del() does both (similar to list_del_init()): it removes the node
from the list, and removes the reference to the list from the node.  So
there's nothing new in -mm compared to vanilla -rc2 (BTW I've fetched
-mm3, there are no relevant changes wrt -mm2).

Frankly, I can't explain the messages above...  Can you please
double-check it?

Thanks and cheers,

More information about the Usbatm mailing list