Address the reported mmc serialization issue.

Reset the mmc owner before calling the bridge release host callback.

Some people are hitting the "mmc: host bridge didn't serialize us." panic as
the bridge is released before the mmc owner is reset.

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

View File

@ -412,7 +412,6 @@ static int
mmc_release_bus(device_t busdev, device_t dev)
{
struct mmc_softc *sc;
int err;
sc = device_get_softc(busdev);
@ -421,14 +420,9 @@ mmc_release_bus(device_t busdev, device_t dev)
panic("mmc: releasing unowned bus.");
if (sc->owner != dev)
panic("mmc: you don't own the bus. game over.");
MMC_UNLOCK(sc);
err = MMCBR_RELEASE_HOST(device_get_parent(busdev), busdev);
if (err)
return (err);
MMC_LOCK(sc);
sc->owner = NULL;
MMC_UNLOCK(sc);
return (0);
return (MMCBR_RELEASE_HOST(device_get_parent(busdev), busdev));
}
static uint32_t