Author: manu
Date: Tue Aug  4 20:04:00 2020
New Revision: 363862
URL: https://svnweb.freebsd.org/changeset/base/363862

Log:
  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

Modified:
  head/sys/cam/mmc/mmc_da.c

Modified: head/sys/cam/mmc/mmc_da.c
==============================================================================
--- head/sys/cam/mmc/mmc_da.c   Tue Aug  4 20:02:23 2020        (r363861)
+++ head/sys/cam/mmc/mmc_da.c   Tue Aug  4 20:04:00 2020        (r363862)
@@ -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);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to