staging: dwc2: always release host channel after dequeueing
authorMatthijs Kooijman <matthijs@stdin.nl>
Mon, 25 Mar 2013 19:00:25 +0000 (12:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Mar 2013 23:32:46 +0000 (16:32 -0700)
commit8509f2f43a2b245ade076d1568daa2cf15446732
treedd9c82aaaf62afb143758b7eb2c6dbc8b70bffbd
parent257f65801520a5c888930d410f781d408a405990
staging: dwc2: always release host channel after dequeueing

Previously, when an active urb was dequeued, its host channel would
not always be released. There is some special handling for this in
dwc2_hc_chhltd_intr_dma, but when it was the last urb/qtd in its qh, a
safeguard in dwc2_hc_n_intr would short-circuit and prevent the regular
interrupt handlers from running, without releasing the channel.

This is easily triggered when using a 3G modem using the option driver.
Opening and closing any ttyUSBx device will eat up a host channel that
is forever unusable from that point on.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
[paulz@synopsys.com: fixed comment style and added a couple of NULL checks]
Signed-off-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dwc2/hcd_intr.c