Skip to content

Commit 2ccbe85

Browse files
oneukumgregkh
authored andcommitted
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>
1 parent 09867af commit 2ccbe85

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

drivers/usb/dwc2/hcd_intr.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2203,11 +2203,13 @@ static void dwc2_hc_intr(struct dwc2_hsotg *hsotg)
22032203
irqreturn_t dwc2_handle_hcd_intr(struct dwc2_hsotg *hsotg)
22042204
{
22052205
u32 gintsts, dbg_gintsts;
2206-
irqreturn_t retval = IRQ_NONE;
2206+
irqreturn_t retval = IRQ_HANDLED;
22072207

22082208
if (!dwc2_is_controller_alive(hsotg)) {
22092209
dev_warn(hsotg->dev, "Controller is dead\n");
22102210
return retval;
2211+
} else {
2212+
retval = IRQ_NONE;
22112213
}
22122214

22132215
spin_lock(&hsotg->lock);

0 commit comments

Comments
 (0)