Date: Tue, 10 Aug 2021 22:47:13 GMT From: Scott Long <scottl@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: bd9e461cf7f7 - main - Address the reported mmc serialization issue. Message-ID: <202108102247.17AMlDd5027031@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=bd9e461cf7f70f2a9b3bd566122bbf4e420d7e17 commit bd9e461cf7f70f2a9b3bd566122bbf4e420d7e17 Author: Scott Long <scottl@FreeBSD.org> AuthorDate: 2021-08-10 22:41:23 +0000 Commit: Scott Long <scottl@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202108102247.17AMlDd5027031>