The branch main has been updated by scottl:

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

commit bd9e461cf7f70f2a9b3bd566122bbf4e420d7e17
Author:     Scott Long <[email protected]>
AuthorDate: 2021-08-10 22:41:23 +0000
Commit:     Scott Long <[email protected]>
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
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to