Re: [PATCH 2/6] usb: dwc3: gadget: Properly handle ClearFeature(halt)

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

 



Hi,

Felipe Balbi wrote:
> Hi,
>
> Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx> writes:
>> @@ -1627,13 +1633,37 @@ int __dwc3_gadget_ep_set_halt(struct dwc3_ep *dep, int value, int protocol)
>>   		else
>>   			dep->flags |= DWC3_EP_STALL;
>>   	} else {
>> +		/*
>> +		 * Don't issue CLEAR_STALL command to control endpoints. The
>> +		 * controller automatically clears the STALL when it receives
>> +		 * the SETUP token.
>> +		 */
> we have a separate dwc3_gadget_ep0_set_halt() to handle that. How was
> this triggered?
>

I think it's a bit confusing here that the dwc3_gadget_ep0_set_halt() 
has the similar name as __dwc3_gadget_ep_set_halt(). However, that 
function only calls dwc3_ep0_stall_and_restart() and not handled through 
SET/CLEAR_FEATURE(halt) request.

If host issues SET_FEATURE(halt) or CLEAR_FEATURE(halt) to control 
endpoints, it still goes through __dwc3_gadget_ep_set_halt().

BR,
Thinh




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

  Powered by Linux