Skip to content

Commit a5a78ee

Browse files
mjchen0fabiobaltieri
authored andcommitted
drivers: usb_dc_mcux: disable irq in detach
Otherwise the next attach could have the ISR invoked before init has completely initialized all the required data structures to handle the ISR properly. Signed-off-by: Mike J. Chen <mjchen@google.com>
1 parent 4a9412b commit a5a78ee

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/usb/device/usb_dc_mcux.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ int usb_dc_detach(void)
226226
return -EIO;
227227
}
228228

229+
irq_disable(DT_INST_IRQN(0));
229230
status = dev_state.dev_struct.controllerInterface->deviceDeinit(
230231
dev_state.dev_struct.controllerHandle);
231232
if (kStatus_USB_Success != status) {

0 commit comments

Comments
 (0)