Skip to content

Commit

Permalink
USB: dwc2: hande irq on dead controller correctly
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
oneukum authored and gregkh committed Aug 22, 2023
1 parent 09867af commit 2ccbe85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/dwc2/hcd_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2ccbe85

Please sign in to comment.