summaryrefslogtreecommitdiff
path: root/drivers/staging/dwc2/hcd_intr.c
AgeCommit message (Collapse)Author
2013-07-23staging: dwc2: reduce noisy debug messagesPaul Zimmerman
Change the non-aligned buffer debug messages to dev_vdbg(). Also remove some duplicated debug output when the driver is loaded. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: dwc2: optimize dwc2_hc_handle_tt_clear() a bitPaul Zimmerman
Make dwc2_hc_handle_tt_clear() return early if the device is hi-speed. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: dwc2: refactor dwc2_host_complete()Paul Zimmerman
The parameters to dwc2_host_complete() didn't make much sense. The 'context' parameter always came from the ->priv member of the 'dwc2_urb' parameter, and both of those always came from a struct dwc2_qtd. So just pass in the struct dwc2_qtd instead. This also allows us to null out the dwc2_qtd->urb member after it is freed, which the calling code forgot to do in several places, causing random driver crashes from dereferencing the freed pointer. This also requires the calls to dwc2_hc_handle_tt_clear() to be moved before the calls to dwc2_host_complete(), otherwise that routine would do nothing because dwc2_qtd->urb has already been freed. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-27Merge 3.10-rc3 into staging-nextGreg Kroah-Hartman
We want the changes here, and we resolve the merge conflict that was happening in the nvec_kbd.c file. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-22staging: dwc2: remove compile warning for USB_DWC2_TRACK_MISSED_SOFSPaul Zimmerman
Remove the compile-time warning for this config option, and instead warn that it is experimental in the Kconfig text Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: dwc2: add helper variable to simplify codeMatthijs Kooijman
Now a register is masked only in once place, instead of twice. This makes the two uses of this value shorter so they no longer need to be linewrapped. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: dwc2: use dwc2_hcd_get_frame_number where possibleMatthijs Kooijman
Before, there were two places that manually read the FRNUM registers, while there is a function to do this. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: dwc2: remove dummy interrupt handlingMatthijs Kooijman
The handling for the IC2INT and RESTOREDONE interrupts just cleared the interrupt flag, but did not do anything else. Since these interrupts are not enabled anywhere, they should never trigger and there should never be a need to clear their flags, so we can safely remove this code. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: dwc2: rename dwc2_hcd_intr() to dwc2_handle_hcd_intr()Matthijs Kooijman
This makes the function name more clear and consistent with dwc2_handle_common_intr(). Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging: dwc2: use irq_return_t for interrupt handlersMatthijs Kooijman
The top-level hcd interrupt handlers already used irq_return_t, but the functions to which it delegates the actual work and the common irq handler returned plain ints. In addition, they used the IRQ_RETVAL in the wrong way (but because of the values of the various constants, this didn't result in wrong behaviour). Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> [matthijs@stdin.nl: Split patch from bigger patch and added commit message] Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Acked-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-23staging: dwc2: check for null pointer before dereferencing itPaul Zimmerman
We were testing qtd->urb pointer for null after we had already dereferenced it Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-23staging: dwc2: add missing newlines to debug messagesPaul Zimmerman
A few debug messages were missing newlines, add them Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-04-11staging: dwc2: toggle periodic debugging output separatelyMatthijs Kooijman
This adds a config option USB_DWC2_DEBUG_PERIODIC that allows debugging output be suppressed for periodic transfers. This helps when debugging non-periodic transfers while there are also periodic transfers going on (both to make the debug output less polluted and to prevent all CPU time going to debug messages). In addition, a debug message from dwc2_hcd_is_status_changed is removed entirely, since it often floods the log regardless of periodic transfers. Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl> Cc: Paul Zimmerman <Paul.Zimmerman@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25staging: dwc2: always release host channel after dequeueingMatthijs Kooijman
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>
2013-03-14staging: dwc2: fix compiler warningsPaul Zimmerman
Fix some compiler warnings when building for i386 arch. Reported by Fengguang's build-bot. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-12staging: HCD files for the DWC2 driverPaul Zimmerman
These files contain the HCD code, and implement the Linux hc_driver API. Support for both slave mode and buffer DMA mode of the controller is included. Signed-off-by: Paul Zimmerman <paulz@synopsys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>