From f2df51ecc5b116791967a368d13f59c5c8a9284b Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Tue, 4 Aug 2020 20:04:00 +0000 Subject: [PATCH] mmccam: Hold the periph during init We need to sleep during this routine so acquire the cam hold too. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D25946 --- sys/cam/mmc/mmc_da.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c index 6c00283eb2d..b09c2938769 100644 --- a/sys/cam/mmc/mmc_da.c +++ b/sys/cam/mmc/mmc_da.c @@ -1109,7 +1109,9 @@ sdda_start_init_task(void *context, int pending) { CAM_PRIORITY_NONE); cam_periph_lock(periph); + cam_periph_hold(periph, PRIBIO|PCATCH); sdda_start_init(context, new_ccb); + cam_periph_unhold(periph); cam_periph_unlock(periph); xpt_free_ccb(new_ccb); }