Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1500132
| From | Felipe Balbi <balbi@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq |
| Date | 2016-10-13 12:00 +0200 |
| Message-ID | <srKXT-1LD-5@gated-at.bofh.it> (permalink) |
| References | <srq37-3LI-5@gated-at.bofh.it> <srICJ-rU-13@gated-at.bofh.it> <srIMq-vI-13@gated-at.bofh.it> <srJ5L-CJ-11@gated-at.bofh.it> <srJfr-Vf-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi, Baolin Wang <baolin.wang@linaro.org> writes: >>>> I'm thinking this is a bug in configfs interface of Gadget API, not >>>> dwc3. The only reason for this to happen would be if we get to >>>> ->udc_stop() with endpoints still enabled. >>>> >>>> Can you check if that's the case? i.e. can you check if any endpoints >>>> are still enabled when we get here? >>> >>> No, it is not any endpoints are still enabled. Like I said in commit >>> message, we will start end transfer command when disable the endpoint, >>> if the end transfer command complete event comes after we have freed >>> the gadget irq, it will trigger the interrupt line all the time to >>> crash the system. >> >> I see what the problem is. Databook tells us we *must* set CMDIOC when >> issuing EndTransfer command and we should always wait for Command >> Complete IRQ. However, we took a shortcut and just delayed for 100us >> after issuing End Transfer. > > Yes, but 100us delay is not enough in some scenarios, like changing > function with configfs frequently, we will met problems. heh, 100us *is* enough. However we still get an IRQ because we requested for it. If you want to fix this, then you need to find a way to get rid of that 100us udelay() and add a proper wait_for_completion() to delay execution until command complete IRQ fires up. -- balbi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Baolin Wang <baolin.wang@linaro.org> - 2016-10-12 13:40 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Felipe Balbi <balbi@kernel.org> - 2016-10-13 09:30 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 09:40 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Felipe Balbi <balbi@kernel.org> - 2016-10-13 10:00 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 10:10 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Felipe Balbi <balbi@kernel.org> - 2016-10-13 12:00 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Felipe Balbi <balbi@kernel.org> - 2016-10-13 13:00 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 13:20 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Felipe Balbi <balbi@kernel.org> - 2016-10-13 13:30 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Baolin Wang <baolin.wang@linaro.org> - 2016-10-13 15:10 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Felipe Balbi <balbi@kernel.org> - 2016-10-13 15:40 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Baolin Wang <baolin.wang@linaro.org> - 2016-10-14 09:10 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Felipe Balbi <balbi@kernel.org> - 2016-10-14 09:50 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Baolin Wang <baolin.wang@linaro.org> - 2016-10-14 11:20 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Felipe Balbi <balbi@kernel.org> - 2016-10-14 12:00 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Alan Stern <stern@rowland.harvard.edu> - 2016-10-14 16:40 +0200
Re: [PATCH v2] usb: dwc3: gadget: Wait for end transfer complete before free irq Felipe Balbi <balbi@kernel.org> - 2016-10-17 10:20 +0200
csiph-web