git: 28027f28e607 - main - cam: remove sim callout

Warner Losh imp at FreeBSD.org
Tue May 25 15:19:03 UTC 2021


The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=28027f28e607012b83ee9062eed3b8ed82e819c1

commit 28027f28e607012b83ee9062eed3b8ed82e819c1
Author:     Warner Losh <imp at FreeBSD.org>
AuthorDate: 2021-05-25 15:14:32 +0000
Commit:     Warner Losh <imp at FreeBSD.org>
CommitDate: 2021-05-25 15:18:08 +0000

    cam: remove sim callout
    
    Nothing is using the sim callout to unfreeze the queue. Remove it to
    simplify the SIM. This was introduced in the original CAM commit in 1998
    but setting the CAM_SIM_REL_TIMEOUT_PENDING flag was removed in 1999 in
    commit 87cfaf0e1fbd which reworked how bus reset worked. That work was
    merged just after 3.2R was released. Remove the unused residuals.
    
    Sponsored by:           Netflix
    Reviewed by:            scottl@, mav@
    Differential Revision:  https://reviews.freebsd.org/D30383
---
 sys/cam/cam_sim.c | 1 -
 sys/cam/cam_sim.h | 2 --
 sys/cam/cam_xpt.c | 9 ---------
 3 files changed, 12 deletions(-)

diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c
index 64427795426e..42fe14b5e991 100644
--- a/sys/cam/cam_sim.c
+++ b/sys/cam/cam_sim.c
@@ -126,7 +126,6 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll,
 	sim->refcount = 1;
 	sim->devq = queue;
 	sim->mtx = mtx;
-	callout_init(&sim->callout, 1);
 	return (sim);
 }
 
diff --git a/sys/cam/cam_sim.h b/sys/cam/cam_sim.h
index a1595a51fadb..956084c41da5 100644
--- a/sys/cam/cam_sim.h
+++ b/sys/cam/cam_sim.h
@@ -102,8 +102,6 @@ struct cam_sim {
 	int			max_tagged_dev_openings;
 	int			max_dev_openings;
 	u_int32_t		flags;
-#define	CAM_SIM_REL_TIMEOUT_PENDING	0x01
-	struct callout		callout;
 	struct cam_devq 	*devq;	/* Device Queue to use for this SIM */
 	int			refcount; /* References to the SIM. */
 	device_t		sim_dev; /* For attached peripherals. */
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index 91bac149c061..4bd71f1cd93b 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -4607,15 +4607,6 @@ xpt_release_simq(struct cam_sim *sim, int run_queue)
 	} else
 		devq->send_queue.qfrozen_cnt--;
 	if (devq->send_queue.qfrozen_cnt == 0) {
-		/*
-		 * If there is a timeout scheduled to release this
-		 * sim queue, remove it.  The queue frozen count is
-		 * already at 0.
-		 */
-		if ((sim->flags & CAM_SIM_REL_TIMEOUT_PENDING) != 0){
-			callout_stop(&sim->callout);
-			sim->flags &= ~CAM_SIM_REL_TIMEOUT_PENDING;
-		}
 		if (run_queue) {
 			/*
 			 * Now that we are unfrozen run the send queue.


More information about the dev-commits-src-main mailing list