Commit 832e10a
committed
mimxrt/sdcard: Fix deadlock in sdcard_power_off when no card present.
The sdcard_power_off function was unconditionally sending GO_IDLE_STATE
command even when the card was never successfully initialized or not
present. This caused a deadlock in USDHC_WaitCommandDone which has an
infinite loop waiting for command completion.
The fix checks card->state->initialized before attempting to send the
command, preventing communication with non-existent hardware.
Signed-off-by: Andrew Leech <[email protected]>1 parent 2762fe6 commit 832e10a
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
989 | | - | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
990 | 994 | | |
991 | 995 | | |
992 | 996 | | |
| |||
0 commit comments