multiple interface test case

Duncan Sands baldrick at
Wed Apr 13 08:05:32 EDT 2005

Hi Roman,

> > > 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_
> device_release_driver().

well I agree that it is unclear exactly at which point the change is
made that causes the test in usb_driver_release_interface to fire.
However one thing is clear: it has happened before the first call to
your test module's disconnect, since every call to
usb_driver_release_interface skips the call to device_release_driver.
And I know perfectly well that device_release_driver has not been
called for each interface yet, because I print debugging info for
every call to it.

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

If you stick some printk's in device_release_driver and
usb_driver_release_interface then you will see it yourself.  I'm still
trying to understand exactly what's going on.



More information about the Usbatm mailing list