Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1274203
| From | Felipe Balbi <balbi@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 2/2] usb: dwc2: host: Clear interrupts before handling them |
| Date | 2015-11-20 16:50 +0100 |
| Message-ID | <qwW6L-Fa-35@gated-at.bofh.it> (permalink) |
| References | <qwEWe-6pz-17@gated-at.bofh.it> <qwEWf-6pz-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
Hi, Douglas Anderson <dianders@chromium.org> writes: > In general it is wise to clear interrupts before processing them. If > you don't do that, you can get: > 1. Interrupt happens > 2. You look at system state and process interrupt > 3. A new interrupt happens > 4. You clear interrupt without processing it. > > This patch was actually a first attempt to fix missing device insertions > as described in (usb: dwc2: host: Fix missing device insertions) and it > did solve some of the signal bouncing problems but not all of > them (which is why I submitted the other patch). Specifically, this > patch itself would sometimes change: > 1. hardware sees connect > 2. hardware sees disconnect > 3. hardware sees connect > 4. dwc2_port_intr() - clears connect interrupt > 5. dwc2_handle_common_intr() - calls dwc2_hcd_disconnect() > > ...to: > 1. hardware sees connect > 2. hardware sees disconnect > 3. dwc2_port_intr() - clears connect interrupt > 4. hardware sees connect > 5. dwc2_handle_common_intr() - calls dwc2_hcd_disconnect() > > ...but with different timing then sometimes we'd still miss cable > insertions. > > In any case, though this patch doesn't fix any (known) problems, it > still seems wise as a general policy to clear interrupt before handling > them. > > Note that for dwc2_handle_usb_port_intr(), instead of moving the clear > of PRTINT to the beginning of the function we remove it completely. The > only way to clear PRTINT is to clear the sources that set it in the > first place. > > Signed-off-by: Douglas Anderson <dianders@chromium.org> > Acked-by: John Youn <johnyoun@synopsys.com> > Tested-by: John Youn <johnyoun@synopsys.com> $ patch -p1 --dry-run < patch.diff checking file drivers/usb/dwc2/core_intr.c checking file drivers/usb/dwc2/hcd_intr.c Hunk #4 FAILED at 365. Hunk #5 succeeded at 388 (offset 11 lines). 1 out of 5 hunks FAILED Care to rebase on top of my testing/next ? -- balbi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 1/2] usb: dwc2: host: Fix missing device insertions Douglas Anderson <dianders@chromium.org> - 2015-11-19 22:30 +0100
[PATCH v4 2/2] usb: dwc2: host: Clear interrupts before handling them Douglas Anderson <dianders@chromium.org> - 2015-11-19 22:30 +0100
Re: [PATCH v4 2/2] usb: dwc2: host: Clear interrupts before handling them Felipe Balbi <balbi@ti.com> - 2015-11-20 16:50 +0100
Re: [PATCH v4 2/2] usb: dwc2: host: Clear interrupts before handling them Doug Anderson <dianders@chromium.org> - 2015-11-20 17:50 +0100
Re: [PATCH v4 2/2] usb: dwc2: host: Clear interrupts before handling them Doug Anderson <dianders@chromium.org> - 2015-11-20 18:10 +0100
csiph-web