Author: kevans
Date: Fri Nov 22 19:54:14 2019
New Revision: 355015
URL: https://svnweb.freebsd.org/changeset/base/355015

Log:
  MMCCAM: defer release of ccb until we're done with it
  
  If we've found a device, we attempt to call xpt_action() on a ccb that's
  already been released. Simply defer release until after we're done with it.
  
  Reviewed by:  imp, scottl
  MFC after:    1 week

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

Modified: head/sys/cam/mmc/mmc_xpt.c
==============================================================================
--- head/sys/cam/mmc/mmc_xpt.c  Fri Nov 22 19:30:31 2019        (r355014)
+++ head/sys/cam/mmc/mmc_xpt.c  Fri Nov 22 19:54:14 2019        (r355015)
@@ -1082,7 +1082,6 @@ mmcprobe_done(struct cam_periph *periph, union ccb *do
                 //xpt_async(AC_LOST_DEVICE, path, NULL);
         }
 
-       xpt_release_ccb(done_ccb);
         if (softc->action != PROBE_INVALID)
                 xpt_schedule(periph, priority);
        /* Drop freeze taken due to CAM_DEV_QFREEZE flag set. */
@@ -1099,6 +1098,7 @@ mmcprobe_done(struct cam_periph *periph, union ccb *do
                        xpt_async(AC_FOUND_DEVICE, path, done_ccb);
                }
        }
+       xpt_release_ccb(done_ccb);
         if (softc->action == PROBE_DONE || softc->action == PROBE_INVALID) {
                 cam_periph_invalidate(periph);
                 cam_periph_release_locked(periph);
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to