svn commit: r248978 - projects/camlock/sys/cam

Alexander Motin mav at FreeBSD.org
Mon Apr 1 16:26:21 UTC 2013


Author: mav
Date: Mon Apr  1 16:26:20 2013
New Revision: 248978
URL: http://svnweb.freebsd.org/changeset/base/248978

Log:
  Remove cam_ccbq_frozen(), that is trivial after removing multilevel freeze
  at r248918.

Modified:
  projects/camlock/sys/cam/cam_queue.h
  projects/camlock/sys/cam/cam_xpt.c

Modified: projects/camlock/sys/cam/cam_queue.h
==============================================================================
--- projects/camlock/sys/cam/cam_queue.h	Mon Apr  1 16:23:34 2013	(r248977)
+++ projects/camlock/sys/cam/cam_queue.h	Mon Apr  1 16:26:20 2013	(r248978)
@@ -243,12 +243,5 @@ cam_ccbq_release_opening(struct cam_ccbq
 	ccbq->devq_openings++;
 }
 
-static __inline u_int32_t
-cam_ccbq_frozen(struct cam_ccbq *ccbq)
-{
-
-	return (ccbq->queue.qfrozen_cnt);
-}
-
 #endif /* _KERNEL */
 #endif  /* _CAM_CAM_QUEUE_H */

Modified: projects/camlock/sys/cam/cam_xpt.c
==============================================================================
--- projects/camlock/sys/cam/cam_xpt.c	Mon Apr  1 16:23:34 2013	(r248977)
+++ projects/camlock/sys/cam/cam_xpt.c	Mon Apr  1 16:26:20 2013	(r248978)
@@ -306,7 +306,7 @@ xpt_schedule_dev_sendq(struct cam_eb *bu
 
 	if ((dev->ccbq.queue.entries > 0) &&
 	    (dev->ccbq.dev_openings > 0) &&
-	    (cam_ccbq_frozen(&dev->ccbq) == 0)) {
+	    (dev->ccbq.queue.qfrozen_cnt == 0)) {
 		/*
 		 * The priority of a device waiting for controller
 		 * resources is that of the highest priority CCB
@@ -3156,7 +3156,7 @@ xpt_run_dev_allocq(struct cam_ed *device
 	while ((drvq->entries > 0) &&
 	    (device->ccbq.devq_openings > 0 ||
 	     CAMQ_GET_PRIO(drvq) <= CAM_PRIORITY_OOB) &&
-	    (cam_ccbq_frozen(&device->ccbq) == 0)) {
+	    (device->ccbq.queue.qfrozen_cnt == 0)) {
 		union	ccb *work_ccb;
 		struct	cam_periph *drv;
 
@@ -4156,9 +4156,7 @@ xpt_release_devq_device(struct cam_ed *d
 		count = dev->ccbq.queue.qfrozen_cnt;
 	}
 	dev->ccbq.queue.qfrozen_cnt -= count;
-	if (cam_ccbq_frozen(&dev->ccbq) == 0)
-		xpt_run_dev_allocq(dev);
-	if (cam_ccbq_frozen(&dev->ccbq) == 0) {
+	if (dev->ccbq.queue.qfrozen_cnt == 0) {
 		/*
 		 * No longer need to wait for a successful
 		 * command completion.
@@ -4172,6 +4170,7 @@ xpt_release_devq_device(struct cam_ed *d
 			callout_stop(&dev->callout);
 			dev->flags &= ~CAM_DEV_REL_TIMEOUT_PENDING;
 		}
+		xpt_run_dev_allocq(dev);
 		if (run_queue == 0)
 			return;
 		/*


More information about the svn-src-projects mailing list