Linux USB
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Dan Scally <dan.scally@ideasonboard.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: Explicit status phase for DWC3
Date: Thu, 26 Jan 2023 00:20:22 +0000	[thread overview]
Message-ID: <20230126002017.tbxc3j6xdgplncfs@synopsys.com> (raw)
In-Reply-To: <9ce226b4-90c6-94c4-a5ad-bd623409bc51@ideasonboard.com>

On Tue, Jan 24, 2023, Dan Scally wrote:
> Hi Thinh
> 
> 
> I'm trying to update the DWC3 driver to allow the status phase of a
> transaction to be explicit; meaning the gadget driver has the choice to
> either Ack or Stall _after_ the data phase so that the contents of the data
> phase can be validated. I thought that I should be able to achieve this by
> preventing dwc3_ep0_xfernotready() from calling dwc3_ep0_do_control_status()
> (relying on an "explicit_status" flag added to the usb_request to decide
> whether or not to do so) and then calling it manually later once the data
> phase was validated by the gadget driver (or indeed userspace). A very
> barebones version of my attempt to do that looks like this:
> 

We shouldn't do this. At the protocol level, there must be better ways
to do handshake than relying on protocol STALL _after_ the data stage.
Note that not all controllers support this.

Thanks,
Thinh

  reply	other threads:[~2023-01-26  0:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 14:27 Explicit status phase for DWC3 Dan Scally
2023-01-26  0:20 ` Thinh Nguyen [this message]
2023-01-26 10:30   ` Dan Scally
2023-01-26 19:31     ` Thinh Nguyen
2023-01-26 20:31       ` Alan Stern
2023-01-26 23:57         ` Thinh Nguyen
2023-02-02 10:12           ` Dan Scally
2023-02-02 14:51             ` Roger Quadros
2023-02-02 14:52             ` Alan Stern
2023-02-02 15:45               ` Dan Scally
2023-02-02 16:37                 ` Alan Stern
2023-02-02 19:48                   ` Thinh Nguyen
2023-02-02 20:15                     ` Alan Stern
2023-04-05 19:35                       ` Hans Petter Selasky
2023-02-02 20:01             ` 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=20230126002017.tbxc3j6xdgplncfs@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=dan.scally@ideasonboard.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox