From: Stefan Wahren <stefan.wahren@i2se.com>
To: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: John Youn <John.Youn@synopsys.com>,
Felipe Balbi <balbi@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc2: hcd: Fix host channel halt flow
Date: Thu, 7 Dec 2017 18:14:44 +0100 [thread overview]
Message-ID: <8e14e212-c995-de21-676e-b6f8bc1c613f@i2se.com> (raw)
In-Reply-To: <728f1476-6b48-f1f7-58ad-b3aaf091bd40@i2se.com>
Hi Minas,
Am 07.12.2017 um 18:08 schrieb Stefan Wahren:
> According databook in Buffer and External DMA mode
> non-split periodic channels can't be halted.
do you know of any consequences not having this patch applied?
>
> Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Please add a fixes tag.
Thanks
Stefan
> ---
> drivers/usb/dwc2/hcd.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index 614bb9603def..987122497408 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -985,6 +985,25 @@ void dwc2_hc_halt(struct dwc2_hsotg *hsotg, struct dwc2_host_chan *chan,
>
> if (dbg_hc(chan))
> dev_vdbg(hsotg->dev, "%s()\n", __func__);
> +
> + /*
> + * In buffer DMA or external DMA mode channel can't be halted
> + * for non-split periodic channels. At the end of the next
> + * uframe/frame (in the worst case), the core generates a channel
> + * halted and disables the channel automatically.
> + */
> + if ((hsotg->core_params->dma_enable > 0 &&
> + hsotg->core_params->dma_desc_enable <= 0) ||
> + hsotg->hw_params.arch == GHWCFG2_EXT_DMA_ARCH) {
> + if (!chan->do_split &&
> + (chan->ep_type == USB_ENDPOINT_XFER_ISOC ||
> + chan->ep_type == USB_ENDPOINT_XFER_INT)) {
> + dev_err(hsotg->dev, "%s() Channel can't be halted\n",
> + __func__);
> + return;
> + }
> + }
> +
> if (halt_status == DWC2_HC_XFER_NO_HALT_STATUS)
> dev_err(hsotg->dev, "!!! halt_status = %d !!!\n", halt_status);
>
next parent reply other threads:[~2017-12-07 17:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <728f1476-6b48-f1f7-58ad-b3aaf091bd40@i2se.com>
2017-12-07 17:14 ` Stefan Wahren [this message]
2017-12-06 14:58 Minas Harutyunyan
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=8e14e212-c995-de21-676e-b6f8bc1c613f@i2se.com \
--to=stefan.wahren@i2se.com \
--cc=John.Youn@synopsys.com \
--cc=Minas.Harutyunyan@synopsys.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®