[lkml]   [2004]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: PATCH: (as279) Don't delete interfaces until all are unbound
    On Thu, 13 May 2004, Duncan Sands wrote:

    > Hi Alan,
    > > + /* Now that the interfaces are unbound, nobody should
    > > + * try to access them.
    > > + */
    > how is usbfs going to claim interfaces after this?

    After this there _are_ no interfaces! They've all been destroyed by
    usb_disable_device(), called as part of usb_set_configuration() or
    usb_disconnect(). Of course, usb_set_configuration() will go ahead and
    create a new set of interfaces that usbfs can then bind.

    > > + * Don't call this function unless you are bound to one of the interfaces
    > > + * on this device or you own the dev->serialize semaphore!
    > Owning dev->serialize won't stop an Oops if the interfaces are all NULL...

    If you own dev->serialize then usb_disable_device() can't be running
    concurrently, since it requires its caller to own that semaphore (although
    that may not be stated explicitly). Hence either the interfaces won't be
    NULL or else dev->actconfig will be NULL, and in either case
    usb_ifnum_to_if() will work okay.

    Alan Stern

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:03    [W:0.021 / U:0.112 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site