Re: [PATCH] usb: gadget: m66592-udc: Ignore feature requests for EP0

Alan Stern
2025-06-29T13:33:36Z

On Sat, Jun 28, 2025 at 10:59:53PM -0400, Seungjin Bae wrote:
> The `set_feature() and clear_feature() functions handle requests to set or clear the ENDPOINT_HALT feature.
> Currently, these requests are processed for any endpoint, including the control endpoint (EP0).
>
> The ENDPOINT_HALT feature is not defined for control endpoints according to the USB specification 9.4.5.

Actually that's not correct. What the spec says is:

It is neither required nor recommended that the Halt feature be
implemented for the Default Control Pipe. However, devices may
set the Halt feature of the Default Control Pipe in order to
reflect a functional error condition. If the feature is set to
one, the device will return STALL in the Data and Status stages
of each standard request to the pipe except GetStatus(),
SetFeature(), and ClearFeature() requests. The device need not
return STALL for class-specific and vendor-specific requests.

Thus, it is valid for devices to support the ENDPOINT_HALT feature for
control endpoints.

Alan Stern