From owner-svn-src-all@FreeBSD.ORG Fri Aug 31 09:42:47 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 982511065673; Fri, 31 Aug 2012 09:42:47 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 832238FC18; Fri, 31 Aug 2012 09:42:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q7V9glkv007018; Fri, 31 Aug 2012 09:42:47 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q7V9glpp007014; Fri, 31 Aug 2012 09:42:47 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <201208310942.q7V9glpp007014@svn.freebsd.org> From: Scott Long Date: Fri, 31 Aug 2012 09:42:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r239939 - head/sys/dev/amr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Aug 2012 09:42:47 -0000 Author: scottl Date: Fri Aug 31 09:42:46 2012 New Revision: 239939 URL: http://svn.freebsd.org/changeset/base/239939 Log: Essentially revert r239912. The amr_periodic function hadn't been armed in over 10 years and was dead code; the previous revision exposed it as such to CLANG. The solution is to cull the whole thing. Modified: head/sys/dev/amr/amr.c head/sys/dev/amr/amr_pci.c head/sys/dev/amr/amrvar.h Modified: head/sys/dev/amr/amr.c ============================================================================== --- head/sys/dev/amr/amr.c Fri Aug 31 08:48:53 2012 (r239938) +++ head/sys/dev/amr/amr.c Fri Aug 31 09:42:46 2012 (r239939) @@ -139,11 +139,6 @@ static void amr_setup_ccb(void *arg, bus static void amr_abort_load(struct amr_command *ac); /* - * Status monitoring - */ -static void amr_periodic(void *data); - -/* * Interface-specific shims */ static int amr_quartz_submit_command(struct amr_command *ac); @@ -348,11 +343,6 @@ amr_startup(void *arg) /* interrupts will be enabled before we do anything more */ sc->amr_state |= AMR_STATE_INTEN; - /* - * Start the timeout routine. - */ -/* callout_reset(&sc->amr_timeout, hz, amr_periodic, sc);*/ - return; } @@ -391,9 +381,6 @@ amr_free(struct amr_softc *sc) if (sc->amr_pass != NULL) device_delete_child(sc->amr_dev, sc->amr_pass); - /* cancel status timeout */ - callout_drain(&sc->amr_timeout); - /* throw away any command buffers */ while ((acc = TAILQ_FIRST(&sc->amr_cmd_clusters)) != NULL) { TAILQ_REMOVE(&sc->amr_cmd_clusters, acc, acc_link); @@ -959,31 +946,6 @@ out: /******************************************************************************** ******************************************************************************** - Status Monitoring - ******************************************************************************** - ********************************************************************************/ - -/******************************************************************************** - * Perform a periodic check of the controller status - */ -static void -amr_periodic(void *data) -{ - struct amr_softc *sc = (struct amr_softc *)data; - - debug_called(2); - - /* XXX perform periodic status checks here */ - - /* compensate for missed interrupts */ - amr_done(sc); - - /* reschedule */ - callout_reset(&sc->amr_timeout, hz, amr_periodic, sc); -} - -/******************************************************************************** - ******************************************************************************** Command Wrappers ******************************************************************************** ********************************************************************************/ Modified: head/sys/dev/amr/amr_pci.c ============================================================================== --- head/sys/dev/amr/amr_pci.c Fri Aug 31 08:48:53 2012 (r239938) +++ head/sys/dev/amr/amr_pci.c Fri Aug 31 09:42:46 2012 (r239939) @@ -331,7 +331,6 @@ amr_pci_attach(device_t dev) */ mtx_init(&sc->amr_list_lock, "AMR List Lock", NULL, MTX_DEF); mtx_init(&sc->amr_hw_lock, "AMR HW Lock", NULL, MTX_DEF); - callout_init(&sc->amr_timeout, CALLOUT_MPSAFE); if ((error = amr_setup_mbox(sc)) != 0) goto out; Modified: head/sys/dev/amr/amrvar.h ============================================================================== --- head/sys/dev/amr/amrvar.h Fri Aug 31 08:48:53 2012 (r239938) +++ head/sys/dev/amr/amrvar.h Fri Aug 31 09:42:46 2012 (r239939) @@ -256,7 +256,6 @@ struct amr_softc device_t amr_pass; int (*amr_cam_command)(struct amr_softc *sc, struct amr_command **acp); struct intr_config_hook amr_ich; /* wait-for-interrupts probe hook */ - struct callout amr_timeout; /* periodic status check */ int amr_allow_vol_config; int amr_linux_no_adapters; int amr_ld_del_supported;