drivers: usb_dc_mcux: processing endpoint callbacks in ISR context causes assertion #40638
Labels
area: Drivers
area: USB
Universal Serial Bus
bug
The issue is a bug, or the PR is fixing a bug
platform: NXP
NXP
priority: low
Low impact/importance bug
Describe the bug
When using USB networking, the driver accesses networking functions which lock mutexes from ISR context. This leads to failed assertion
mutexes cannot be used inside ISRs.
.ecm_status_cb
is registered as USB status callback here (apparently called via ISR)ecm_status_cb
callsecm_status_interface
hereecm_status_interface
callsnetusb_enable
herenetusb_enable
callsnet_if_up
herenet_if_up
locks mutex herenetusb_enable
callsnet_if_up
hereTo Reproduce
(Working on providing a minimal example...)
Expected behavior
Assertion should not fail, the interface should not be enabled from ISR context.
Impact
The network interface seems to work, but this makes it impossible to me to use
__ASSERT
, since the program can't run withCONFIG_ASSERT
enabled.Logs and console output
(WIP)
Environment (please complete the following information):
teensy41
The text was updated successfully, but these errors were encountered: