Call wakeup() with the lock held to avoid missed wakeup races.

Submitted by: luiz
Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
Scott Long 2021-08-10 22:36:38 +00:00
parent 5dedd2517d
commit 35547df5c7

View File

@ -2078,8 +2078,8 @@ sdhci_generic_release_host(device_t brdev __unused, device_t reqdev)
/* Deactivate led. */
WR1(slot, SDHCI_HOST_CONTROL, slot->hostctrl &= ~SDHCI_CTRL_LED);
slot->bus_busy--;
SDHCI_UNLOCK(slot);
wakeup(slot);
SDHCI_UNLOCK(slot);
return (0);
}