Date: Fri, 31 Aug 2012 09:42:47 +0000 (UTC) From: Scott Long <scottl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239939 - head/sys/dev/amr Message-ID: <201208310942.q7V9glpp007014@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208310942.q7V9glpp007014>