On Tue, 22 Jul 2003, David Brownell wrote:

> I'd put it the other way around, if I understand you correctly.
> 
> As in:  The UHCI code is so optimistic that it doesn't handle
> queue faults correctly, by stopping queue processing.
> 
> The USB spec requires that on certain faults the queue gets
> scrubbed.  It doesn't say what component does that.  It turned
> out to be rather messy to have each HCD do that ... but regardless
> of what component scrubs out queues after faults, if the queue
> is "live" and advancing, it can't be cleaned out correctly.  So
> the HCD clearly must stop the queue after faults.

That sounds like a worthwhile change.

> If the queue stops on all faults, and the HCD makes sure the
> device (interface) driver has a chance to clean things up
> before that queue is re-activated, there should be no problems.

How do you know when the driver has had a chance to clean up?  Assume that 
everything is okay once giveback_urb() returns?

Also, how come both usb_operations and hc_driver have an
endpoint_disable() entry point but not an endpoint_enable()?  It seems to
me that if the HCD is tracking the state of each endpoint that both
operations are needed.  Or do you simply intend endpoint_disable() to tell 
the HCD to stop tracking that particular endpoint and dequeue any pending 
URBs?

Oh yes, I was wondering about this last night:  How should an HC that has
died be handled?  Clearly all its URBs need to be returned with an error
code like -ESHUTDOWN.  But the UHCI driver's dequeueing code is
interrupt-driven, and those interrupts won't arrive if the HC is stopped.
Does the driver need additional code to handle this situation?  Bear in 
mind that even if the HC is merely suspended, unlinking URBs won't work.

Alan Stern




-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to