Re: [RFC 4/4] USB: Support for USB 3.0 streams.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch, 19. August 2009 20:33:38 schrieb Sarah Sharp:
> > > +int usb_free_streams(struct usb_driver *driver,
> >
> > What is a driver supposed to do if this returns an error? This will
> > have to be used in disconnect(), which cannot fail.
>
> I see.  I can make sure there will be a spot on the command ring for the
> command to remove the stream rings.  Unfortunately, the host controller
> can fail that command if it runs out of bandwidth or resources.
> Deallocating streams shouldn't change the bandwidth allocation (unless
> the host controller is broken), but I can't prevent the host controller
> from running out of internal resources.
>
> What should the xHCI driver do in that case?  Wait a while and re-submit
> the command?  I'm not sure if it's wise to tie up a disconnect()
> function with command resubmissions, so perhaps usb_free_streams()
> should only guarantee that the streams will be freed sometime in the
> future?

The problem arises if you have a soft disconnect, for example through
sysfs or a failing reset.
In this case the next call to probe() will expect that no streams are
allocated for its interface's endpoints. That expectation has to be met.
It is not enough to guarantee that the streams will be freed at an
unspecified time in the future. I think this needs a hook in usbcore.

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux