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
--