aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2021-05-25 15:14:32 +0000
committerWarner Losh <imp@FreeBSD.org>2021-05-25 15:18:08 +0000
commit28027f28e607012b83ee9062eed3b8ed82e819c1 (patch)
treeb694546c3a37c327413d7d7a6a6f130a0ff0e630
parent27f09959d5f507465cc7f202c1b34987f0cdee55 (diff)
downloadsrc-28027f28e607012b83ee9062eed3b8ed82e819c1.tar.gz
src-28027f28e607012b83ee9062eed3b8ed82e819c1.zip
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
-rw-r--r--sys/cam/cam_sim.c1
-rw-r--r--sys/cam/cam_sim.h2
-rw-r--r--sys/cam/cam_xpt.c9
3 files changed, 0 insertions, 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.