Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1500098
| Path | csiph.com!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Baolin Wang <baolin.wang@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically |
| Date | Thu, 13 Oct 2016 10:50:01 +0200 |
| Message-ID | <srJS9-18s-9@gated-at.bofh.it> (permalink) |
| References | <sotAd-he-7@gated-at.bofh.it> <srIt4-oQ-1@gated-at.bofh.it> <srIW6-zk-7@gated-at.bofh.it> <srJp7-YE-1@gated-at.bofh.it> <srJyO-120-3@gated-at.bofh.it> <srJS9-18s-11@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=OTfuGHGtqRgDu4sdXcrjZBcgkG6Nbg38QM8W+wRdACI=; b=H8Xpmocki1wJClNOFtvLP2vS4l+aQ2KEA8kbmc99lIC1f1iwlIKv6unugZwbI/kJHG 2CpP5LxFt0XPiQNaTqCUviOcotV1a3HiQPCS3VfVrT3RqNcdhvlljgz5u28CReHYCllZ tAo5zrKRSWXkDFE5LxOiFwBhrpfOqKXxHRMZo= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=OTfuGHGtqRgDu4sdXcrjZBcgkG6Nbg38QM8W+wRdACI=; b=YL7WBYnZws3qqUnWIVvC5030yDrIe8MdXxSp4X9EIcVp9NIz1xFp032LzsQcovdIPR b5h+UF5In/VrLiRY5GEQamJw+MN0ysCOis86/dOpkgA+MXjpNVBk3sQ9QmT5asaOF6Z1 H2pdsXY8uxSn5X5vx2lWL4T4rkpRvI0OM41jU5/zqLy8crGk2RpBtP8pffnbm37p9yrs X0rUaC1W1HEsAYXHh3zmwPnjyhRu8R6d4hBNDb5RMp9XurwLuh9A3K/+HTAiQ4VqrMTP O4vXSuaosRLuAoAYFrH7KuIKoW915xWrMsZcD22r35nwX/zek87pb/K4bJDKWZbjajps IdaQ== |
| X-Gm-Message-State | AA6/9RmwIADp4aOYCJWaiL/SACsJhGCJKwgm/DgMG1rifVISSyFRhmzo/pnBO3+DRWdKzAmckZlFpylo/eB+O7HX |
| X-Received | by 10.13.231.199 with SMTP id q190mr4810239ywe.26.1476347998513; Thu, 13 Oct 2016 01:39:58 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 110 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Felipe Balbi <balbi@kernel.org>, Greg KH <gregkh@linuxfoundation.org>, Mark Brown <broonie@kernel.org>, USB <linux-usb@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org> |
| X-Original-Date | Thu, 13 Oct 2016 16:39:58 +0800 |
| X-Original-Message-ID | <CAMz4ku+5iN8YA978CA3Gvtb=m+Wb2HdWk04BJBmh6Nn-hTR8Bw@mail.gmail.com> |
| X-Original-References | <521625dd7f5e335e2a681ec65ebffc5832207e5f.1475570367.git.baolin.wang@linaro.org> <87oa2ovicc.fsf@linux.intel.com> <CAMz4kuLySR8ehbdYHUjXeWCdPY3bteYFt1gdFi_EQmxOi=-aEg@mail.gmail.com> <CALhHN=rauQyjDHXdih1BE6zC5qc6YthVbs9bHA3dSxjehEKEpg@mail.gmail.com> <CAMz4ku+_hG9wUmzHwCJLGr4GKegFqrJvUkK-ZrZ6yNHs9D0kqA@mail.gmail.com> <CALhHN=o=csw2tdGZqhmVUng98LfDFkwtbBnmY70EEUwBg6o4fA@mail.gmail.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1500098 |
Show key headers only | View raw
On 13 October 2016 at 16:28, Janusz Dziedzic <janusz.dziedzic@tieto.com> wrote: > On 13 October 2016 at 10:21, Baolin Wang <baolin.wang@linaro.org> wrote: >> Hi, >> >> On 13 October 2016 at 16:16, Janusz Dziedzic <janusz.dziedzic@tieto.com> wrote: >>> On 13 October 2016 at 09:37, Baolin Wang <baolin.wang@linaro.org> wrote: >>>> Hi, >>>> >>>> On 13 October 2016 at 15:06, Felipe Balbi <balbi@kernel.org> wrote: >>>>> >>>>> Hi, >>>>> >>>>> Baolin Wang <baolin.wang@linaro.org> writes: >>>>>> When system has stpped the gadget, we should avoid queuing any requests >>>>> >>>>> queueing is *not* a problem. Starting is. In fact, that's what your >>>>> patch is doing. >>>> >>>> OK. >>>> >>>>> >>>>>> which will cause tranfer failed. Thus adding some disconnect checking to >>>>> ^^^^^^^ >>>>> transfer >>>> >>>> Sorry for spelling mistake, will fix it. >>>> >>>>> >>>>>> avoid this situation. >>>>>> >>>>>> Signed-off-by: Baolin Wang <baolin.wang@linaro.org> >>>>>> --- >>>>>> Changes since v2: >>>>>> - Move disconnect checking into dwc3_send_gadget_ep_cmd(). >>>>>> - Rename completion name and issue complete() at one place. >>>>>> - Move completion initialization into dwc3_gadget_init(). >>>>>> >>>>>> Changes since v1: >>>>>> - Split into 2 separate ptaches. >>>>>> - Choose complete mechanism instead of polling. >>>>>> --- >>>>>> drivers/usb/dwc3/gadget.c | 3 +++ >>>>>> 1 file changed, 3 insertions(+) >>>>>> >>>>>> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c >>>>>> index 1783406..ca2ae5b 100644 >>>>>> --- a/drivers/usb/dwc3/gadget.c >>>>>> +++ b/drivers/usb/dwc3/gadget.c >>>>>> @@ -241,6 +241,9 @@ int dwc3_send_gadget_ep_cmd(struct dwc3_ep *dep, unsigned cmd, >>>>>> int susphy = false; >>>>>> int ret = -EINVAL; >>>>>> >>>>>> + if (!dwc->pullups_connected) >>>>>> + return -ESHUTDOWN; >>>>>> + >>> >>> you skip trace_dwc3_gadget_ep_cmd() >> >> Yes, we did not need trace here since we did not send out the command. >> > What in such case: enumeration will not work and this will be because > this ESHUTDOWN or wrong pullups_connected usage. Without a trace you > will not know where the problem is. > In my opinion this trace could be useful. We have returned the '-ESHUTDOWN' error number for user to know what happened. > > BR > Janusz > >>> >>> BR >>> Janusz >>> >>>>>> /* >>>>>> * Synopsys Databook 2.60a states, on section 6.3.2.5.[1-8], that if >>>>>> * we're issuing an endpoint command, we must check if >>>>>> -- >>>>>> 1.7.9.5 >>>>>> >>>>>> -- >>>>>> To unsubscribe from this list: send the line "unsubscribe linux-usb" in >>>>>> the body of a message to majordomo@vger.kernel.org >>>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html >>>>> >>>>> -- >>>>> balbi >>>> >>>> >>>> >>>> -- >>>> Baolin.wang >>>> Best Regards >>>> -- >>>> To unsubscribe from this list: send the line "unsubscribe linux-usb" in >>>> the body of a message to majordomo@vger.kernel.org >>>> More majordomo info at http://vger.kernel.org/majordomo-info.html >> >> >> >> -- >> Baolin.wang >> Best Regards -- Baolin.wang Best Regards
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Baolin Wang <baolin.wang@linaro.org> - 2016-10-04 10:50 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Felipe Balbi <balbi@kernel.org> - 2016-10-13 09:20 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 09:50 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Janusz Dziedzic <janusz.dziedzic@tieto.com> - 2016-10-13 10:20 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 10:30 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 10:50 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Felipe Balbi <balbi@kernel.org> - 2016-10-13 12:00 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 12:50 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Janusz Dziedzic <janusz.dziedzic@tieto.com> - 2016-10-13 13:20 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Felipe Balbi <balbi@kernel.org> - 2016-10-13 13:30 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 13:40 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 13:50 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Felipe Balbi <balbi@kernel.org> - 2016-10-13 14:20 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 14:30 +0200
Re: [RESEND PATCH v3 1/2] usb: dwc3: gadget: Add disconnect checking when changing function dynamically Janusz Dziedzic <janusz.dziedzic@tieto.com> - 2016-10-13 11:30 +0200
csiph-web