linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linux-usb@vger.kernel.org
Cc: balbi@kernel.org, Joel Stanley <joel@jms.id.au>,
	Alan Stern <stern@rowland.harvard.edu>
Subject: Re: [PATCH 02/10] usb: gadget: aspeed: Cleanup EP0 state on port reset
Date: Sat, 6 Jul 2019 11:11:04 +0300	[thread overview]
Message-ID: <6e554955-6a4f-06b1-82b3-982e5e299d19@cogentembedded.com> (raw)
In-Reply-To: <20190706005345.18131-3-benh@kernel.crashing.org>

Hello!

On 06.07.2019 3:53, Benjamin Herrenschmidt wrote:

> Otherwise, we can have a stale state after a disconnect and reconnect
> causing errors on the first SETUP packet to the device.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[...]
> diff --git a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
> index e2927fb083cf..5054c6343ead 100644
> --- a/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
> +++ b/drivers/usb/gadget/udc/aspeed-vhub/ep0.c
> @@ -459,6 +459,15 @@ static const struct usb_ep_ops ast_vhub_ep0_ops = {
>   	.free_request	= ast_vhub_free_request,
>   };
>   
> +void ast_vhub_reset_ep0(struct ast_vhub_dev *dev)
> +{
> +	struct ast_vhub_ep *ep = &dev->ep0;
> +
> +	ast_vhub_nuke(ep, -EIO);
> +        ep->ep0.state = ep0_state_token;

    This line is indented with spaces, previous with a tab.

> +}
> +
> +
>   void ast_vhub_init_ep0(struct ast_vhub *vhub, struct ast_vhub_ep *ep,
>   		       struct ast_vhub_dev *dev)
>   {
[...]

MBR, Sergei

  reply	other threads:[~2019-07-06  8:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-06  0:53 [PATCH 00/10] usb: gadget: aspeed: Bug fixes Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 01/10] usb: gadget: aspeed: Don't set port enable change bit on reset Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 02/10] usb: gadget: aspeed: Cleanup EP0 state on port reset Benjamin Herrenschmidt
2019-07-06  8:11   ` Sergei Shtylyov [this message]
2019-07-06 12:34     ` Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 03/10] usb: gadget: aspeed: Fix EP0 stall handling Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 04/10] usb: gadget: aspeed: Improve debugging when nuking Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 05/10] usb: gadget: aspeed: Don't reject requests on suspended devices Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 06/10] usb: gadget: aspeed: Check suspend/resume callback existence Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 07/10] usb: gadget: aspeed: Rework the reset logic Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 08/10] usb: gadget: aspeed: Remove unused "suspended" flag Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 09/10] usb: Add definitions for the USB2.0 hub TT requests Benjamin Herrenschmidt
2019-07-06  0:53 ` [PATCH 10/10] usb: gadget: aspeed: Implement dummy " Benjamin Herrenschmidt

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=6e554955-6a4f-06b1-82b3-982e5e299d19@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=balbi@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=joel@jms.id.au \
    --cc=linux-usb@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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;
as well as URLs for NNTP newsgroup(s).