Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Nov 2019 19:54:15 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355015 - head/sys/cam/mmc
Message-ID:  <201911221954.xAMJsFIc003466@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911221954.xAMJsFIc003466>