Re: USBIP protocol

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alan Stern
Date: Wednesday, September 3, 2008 - 1:15 pm

On Wed, 3 Sep 2008, Matthew Wilcox wrote:


It's referred to as SetPortFeature(PORT_RESET) in section 11.24.2.13;  
the request is actually sent to the device's upstream hub.


In fact it's cleared by sending ClearFeature(ENDPOINT_HALT) to the 
appropriate endpoint.

Never mind the details; the important point is this: All these 
requests, in addition to sending data over the USB bus, have to modify 
the host's internal state.

	Set-Configuration updates the list of available interfaces
	and endpoints.

	Set-Interface updates the list of available endpoints.

	Reset-Device requires the host to verify that the device is
	still connected to the port and its descriptors haven't
	changed.  The host also has to restore the former configuration
	and altsettings.

	Clear-Halt requires the endpoint's data toggle value in the 
	host controller to be reset.

So it isn't good enough for the client simply to send a few packets; 
the server needs to know when these events happen.  In theory they can 
be detected by parsing packets as they are sent, but IMO it would be 
better for them to be higher-level calls.



How will this timeout be determined?


Should the server send a "submission accepted" message some time before
the first timeout occurs?  For long-running requests this would
eliminate a resend.


This requires the server to keep each completed reply for some time.  
When can this data be freed?



In brief, no.  The caller needs to know; retrying isn't always the 
appropriate response.



They do make sense at this level, just as they make sense in usbfs.
(However the point of USB_SHORT_NOT_OK would be lost; the semantics of 
that flag would need to be extended for it to be useful.)

Alan Stern

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
USBIP protocol, Matthew Wilcox, (Fri Aug 29, 7:02 am)
Re: USBIP protocol, Andi Kleen, (Fri Aug 29, 7:06 am)
Re: USBIP protocol, Greg KH, (Fri Aug 29, 7:30 am)
Re: USBIP protocol, Matthew Wilcox, (Fri Aug 29, 7:43 am)
Re: USBIP protocol, Greg KH, (Fri Aug 29, 7:54 am)
Re: USBIP protocol, Matthew Wilcox, (Fri Aug 29, 8:36 am)
RE: USBIP protocol, Dave Higton, (Fri Aug 29, 8:53 am)
Re: USBIP protocol, Matthew Wilcox, (Fri Aug 29, 1:46 pm)
Re: USBIP protocol, Willy Tarreau, (Fri Aug 29, 1:51 pm)
Re: USBIP protocol, Marcel Holtmann, (Fri Aug 29, 3:31 pm)
Re: USBIP protocol, Matthew Wilcox, (Tue Sep 2, 9:25 pm)
Re: USBIP protocol, Alan Stern, (Wed Sep 3, 8:40 am)
Re: USBIP protocol, Greg KH, (Wed Sep 3, 8:57 am)
Re: USBIP protocol, Matthew Wilcox, (Wed Sep 3, 12:10 pm)
Re: USBIP protocol, Matthew Wilcox, (Wed Sep 3, 12:43 pm)
Re: USBIP protocol, Alan Stern, (Wed Sep 3, 1:15 pm)
Re: USBIP protocol, Greg KH, (Wed Sep 3, 7:41 pm)
Re: USBIP protocol, Matthew Wilcox, (Thu Sep 4, 2:48 pm)
Re: USBIP protocol, Greg KH, (Thu Sep 4, 3:15 pm)
Re: USBIP protocol, Pete Zaitcev, (Thu Sep 4, 8:26 pm)
Re: USBIP protocol, Tilman Schmidt, (Fri Sep 5, 4:37 am)
Re: USBIP protocol, Alan Stern, (Fri Sep 5, 8:05 am)
Re: USBIP protocol, Matthew Wilcox, (Mon Sep 8, 5:53 pm)
Re: USBIP protocol, Steve Calfee, (Tue Sep 9, 12:12 am)
Re: USBIP protocol, Greg KH, (Tue Sep 9, 12:33 am)
Re: USBIP protocol, Greg KH, (Tue Sep 9, 1:04 am)
Re: USBIP protocol, Alan Stern, (Tue Sep 9, 8:21 am)