On Tue, Apr 11, 2000, Georg Acher <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 11, 2000 at 11:28:03PM +0000, Johan Verrept wrote:
> <...> 
> > ok. thanks for the answer, it's bulk btw.
> > Another question related to this, when i unplug my device, what happens
> > to the queued urb's ?
> 
> They are killed, for usb-uhci it's uhci_free_dev which calls this.
> uhci_free_dev itself is called from the hub thread.

Just to clarify this. A call is made to the drivers disconnect()
function first.

Nice drivers will call usb_unlink_urb here for all of the URB's it
knows about (like interrupt, etc).

Then, if there are any URB's left, the HCD's deallocate() function will
forcefully unlink any remaining URB's.

> > is the completion handler called ?
> 
> No, except the urb->transfer_flags have USB_ASYNC_UNLINK set.

Is this the desired behaviour in the deallocate() call? My driver does
call the callback.

This seems to be useful for when usb_control_msg is being used to make
sure it properly gets notified that a disconnect has happened.

> > ...and one more ;-)
> > 
> > i presume the following allows me to queue mulitple urbs for quick data
> > transport ?
> > 
> > urb->transfer_flags |= USB_QUEUE_BULK;
> 
> Yes, it's experimental in usb-uhci and uhci. So it may work, but may also
> cause unexpected behavior. In both cases, please inform us...

I've gotten a report that the support in my driver does not work
correctly. It doesn't seem to crash the system, just do some odd things.

This is not surprisingly given I didn't have any devices or drivers to
test it on. I do have a device (and hopefully driver) on the way to fix
the bugs.

> > does it have any effect on the unlinking stuff ?
> 
> usb-uhci: Not for the completion stuff, but it may disturb the data toggle
> ordering if you kill an URB in between. 
> So please unlink all URBs that are on the way. 

This is interesting point. I don't track the data toggle for packets
which have been sent on a forceful unlink.

Does usb-uhci do that?

JE


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to