sdhci: do the wait for interrupts the straightforward way again

In a previous commit I flipped this around because the command interrupt
doesn't always trigger on Ricoh controllers. However, this leads to
command execution continuing before the interrupt actually triggers on
some other controllers.

Might solve #17031 but it could also break things on other hardware.

Change-Id: I96cba90358f0b04ef1ac319aead898c0f4155114
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4985
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Fredrik Holmqvist <[email protected]>
This commit is contained in:
Adrien Destugues
2022-04-23 14:31:03 +00:00
committed by Fredrik Holmqvist
parent 745a40d78a
commit 8b858379e2
+2 -2
View File
@@ -259,13 +259,13 @@ SdhciBus::ExecuteCommand(uint8_t command, uint32_t argument, uint32_t* response)
// Wait for command response to be available ("command complete" interrupt)
TRACE("Wait for command complete...");
while (fCommandResult == 0) {
do {
acquire_sem(fSemaphore);
TRACE("command complete sem acquired, status: %x\n", fCommandResult);
TRACE("real status = %x command line busy: %d\n",
fRegisters->interrupt_status,
fRegisters->present_state.CommandInhibit());
}
} while (fCommandResult == 0);
TRACE("Command response available\n");