All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-usb\@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: John Youn <John.Youn@synopsys.com>
Subject: Re: [PATCH 2/6] usb: dwc3: gadget: Properly handle ClearFeature(halt)
Date: Mon, 16 Mar 2020 08:49:38 +0200	[thread overview]
Message-ID: <87h7yo23r1.fsf@kernel.org> (raw)
In-Reply-To: <2edccc70-5fab-4227-3d27-a06140523d62@synopsys.com>

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]


Hi,

Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:
> Felipe Balbi wrote:
>> Hi,
>>
>> Thinh Nguyen <Thinh.Nguyen@synopsys.com> 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().

Perhaps that should be fixed, then?

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2020-03-16  6:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-05 21:23 [PATCH 0/6] usb: dwc3: gadget: Misc transfer cancellation fixes Thinh Nguyen
2020-03-05 21:23 ` [PATCH 1/6] usb: dwc3: gadget: Don't clear flags before transfer ended Thinh Nguyen
2020-03-05 21:23 ` [PATCH 2/6] usb: dwc3: gadget: Properly handle ClearFeature(halt) Thinh Nguyen
2020-03-15  9:21   ` Felipe Balbi
2020-03-16  0:34     ` Thinh Nguyen
2020-03-16  6:49       ` Felipe Balbi [this message]
2020-03-16 19:07         ` Thinh Nguyen
2020-03-05 21:24 ` [PATCH 3/6] usb: dwc3: gadget: Wrap around when skip TRBs Thinh Nguyen
2020-03-05 21:24 ` [PATCH 4/6] usb: dwc3: gadget: Give back staled requests Thinh Nguyen
2020-03-15  9:23   ` Felipe Balbi
2020-03-16  0:54     ` Thinh Nguyen
2020-03-16  6:51       ` Felipe Balbi
2020-03-16 19:37         ` Thinh Nguyen
2020-03-05 21:24 ` [PATCH 5/6] usb: dwc3: gadget: Remove unnecessary checks Thinh Nguyen
2020-03-05 21:24 ` [PATCH 6/6] usb: dwc3: gadget: Refactor dwc3_gadget_ep_dequeue Thinh Nguyen
2020-03-15  9:26   ` Felipe Balbi
2020-03-16  0:42     ` Thinh Nguyen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h7yo23r1.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=John.Youn@synopsys.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.