On the RK3588 eMMC controller it appears that after a failed command a
authorpatrick <patrick@openbsd.org>
Tue, 6 Aug 2024 15:03:36 +0000 (15:03 +0000)
committerpatrick <patrick@openbsd.org>
Tue, 6 Aug 2024 15:03:36 +0000 (15:03 +0000)
commitd80c3592c5656cea49cba26741ebd70a75f84e4d
tree8a5045668e07b9d5a5fdcf696835b4ef98f510cf
parentd8f81b403fbc1cd712dbc3c425faff51e55e86b9
On the RK3588 eMMC controller it appears that after a failed command a
completion signal shows up some time after the error signal.  This can
lead to the case that when the next command is being executed, the old
completion signal is still recorded and the driver may think the command
already executed.  Resetting the status before executing a new command
makes sense, albeit it's technically still possible that the controller
issues another completion signal.  It shouldn't happen because a reset
was issued and we're also waiting for the command and data inhibit bits
to be cleared, but who knows.  This makes the eMMC come up reliably.

ok kettenis@
sys/dev/sdmmc/sdhc.c