speedtch testatm.c,1.4,1.5
Roman Kagan
rkagan at mail.ru
Fri Apr 8 08:06:12 EDT 2005
On Fri, Apr 08, 2005 at 01:42:17PM +0200, Duncan Sands wrote:
> > BTW do we really need to manually release interfaces we've claimed?
> > Won't they get disconnect()-ed by the usb core?
>
> Yes, because there's also "logical disconnect", in which just one
> interface can get disconnected (you can play with this easily
> enough using usbfs; maybe you can also do it by writing to a sysfs
> file but I don't remember). In order to keep things simple I would
> like to unbind from all interfaces.
Then it looks like you need to usb_set_intfdata(intf, NULL) _before_
releasing that intf, to avoid repeating the same thing in its
disconnect(). Anyway recursing into the disconnect for the same
interface still sounds like a bad thing, and IMHO should be avoided by
not releasing it its own disconnect(). Or was I wrong im my analysis?
Roman.
More information about the Usbatm
mailing list