git: bd9e461cf7f7 - main - Address the reported mmc serialization issue.

Scott Long scottl at FreeBSD.org
Tue Aug 10 22:47:13 UTC 2021


The branch main has been updated by scottl:

URL: https://cgit.FreeBSD.org/src/commit/?id=bd9e461cf7f70f2a9b3bd566122bbf4e420d7e17

commit bd9e461cf7f70f2a9b3bd566122bbf4e420d7e17
Author:     Scott Long <scottl at FreeBSD.org>
AuthorDate: 2021-08-10 22:41:23 +0000
Commit:     Scott Long <scottl at FreeBSD.org>
CommitDate: 2021-08-10 22:41:23 +0000

    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")
---
 sys/dev/mmc/mmc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sys/dev/mmc/mmc.c b/sys/dev/mmc/mmc.c
index 29b3645beadd..74d0549ca491 100644
--- a/sys/dev/mmc/mmc.c
+++ b/sys/dev/mmc/mmc.c
@@ -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


More information about the dev-commits-src-all mailing list