From owner-dev-commits-src-main@freebsd.org Tue May 25 15:19:03 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 346CF64E87E; Tue, 25 May 2021 15:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FqHmR0nlxz3HgC; Tue, 25 May 2021 15:19:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id F3CDA1FAD1; Tue, 25 May 2021 15:19:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 14PFJ2f7000172; Tue, 25 May 2021 15:19:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 14PFJ2i4000171; Tue, 25 May 2021 15:19:02 GMT (envelope-from git) Date: Tue, 25 May 2021 15:19:02 GMT Message-Id: <202105251519.14PFJ2i4000171@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 28027f28e607 - main - cam: remove sim callout MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28027f28e607012b83ee9062eed3b8ed82e819c1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 May 2021 15:19:03 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=28027f28e607012b83ee9062eed3b8ed82e819c1 commit 28027f28e607012b83ee9062eed3b8ed82e819c1 Author: Warner Losh AuthorDate: 2021-05-25 15:14:32 +0000 Commit: Warner Losh 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.