aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorGravatar Oliver Neukum <oneukum@suse.com> 2023-08-22 13:24:55 +0200
committerGravatar Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2023-08-22 14:46:30 +0200
commit2ccbe85456b367d24d53f6ff9f5b2cafd0b54877 (patch)
treed25d70f867c4d71f543a559d0a8c4a9dbe1a3b4f /drivers/usb
parentUSB: cdc-acm: support flushing write buffers (TCOFLUSH) (diff)
downloadlinux-2ccbe85456b367d24d53f6ff9f5b2cafd0b54877.tar.gz
linux-2ccbe85456b367d24d53f6ff9f5b2cafd0b54877.tar.bz2
linux-2ccbe85456b367d24d53f6ff9f5b2cafd0b54877.zip
USB: dwc2: hande irq on dead controller correctly
If the controller is dead, the honest answer to the question whether it has caused an irq is: unknown As the purpose of the irq return is to trigger switching off an IRQ, the correct response if you cannot determine if your device has caused the interrupt is IRQ_HANDLED Signed-off-by: Oliver Neukum <oneukum@suse.com> Link: https://lore.kernel.org/r/20230822112455.18957-1-oneukum@suse.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/dwc2/hcd_intr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/hcd_intr.c b/drivers/usb/dwc2/hcd_intr.c
index c9740caa5974..0144ca8350c3 100644
--- a/drivers/usb/dwc2/hcd_intr.c
+++ b/drivers/usb/dwc2/hcd_intr.c
@@ -2203,11 +2203,13 @@ static void dwc2_hc_intr(struct dwc2_hsotg *hsotg)
irqreturn_t dwc2_handle_hcd_intr(struct dwc2_hsotg *hsotg)
{
u32 gintsts, dbg_gintsts;
- irqreturn_t retval = IRQ_NONE;
+ irqreturn_t retval = IRQ_HANDLED;
if (!dwc2_is_controller_alive(hsotg)) {
dev_warn(hsotg->dev, "Controller is dead\n");
return retval;
+ } else {
+ retval = IRQ_NONE;
}
spin_lock(&hsotg->lock);