svn commit: r239912 - head/sys/dev/amr
John Baldwin
jhb at FreeBSD.org
Thu Aug 30 17:37:02 UTC 2012
Author: jhb
Date: Thu Aug 30 17:37:01 2012
New Revision: 239912
URL: http://svn.freebsd.org/changeset/base/239912
Log:
Use callout(9) rather than timeout(9). Note that the periodic timer in
amr(4) is never started, so this should be even more of a NOP than
normal.
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 Thu Aug 30 17:35:12 2012 (r239911)
+++ head/sys/dev/amr/amr.c Thu Aug 30 17:37:01 2012 (r239912)
@@ -351,7 +351,7 @@ amr_startup(void *arg)
/*
* Start the timeout routine.
*/
-/* sc->amr_timeout = timeout(amr_periodic, sc, hz);*/
+/* callout_reset(&sc->amr_timeout, hz, amr_periodic, sc);*/
return;
}
@@ -392,7 +392,7 @@ amr_free(struct amr_softc *sc)
device_delete_child(sc->amr_dev, sc->amr_pass);
/* cancel status timeout */
- untimeout(amr_periodic, sc, sc->amr_timeout);
+ callout_drain(&sc->amr_timeout);
/* throw away any command buffers */
while ((acc = TAILQ_FIRST(&sc->amr_cmd_clusters)) != NULL) {
@@ -979,7 +979,7 @@ amr_periodic(void *data)
amr_done(sc);
/* reschedule */
- sc->amr_timeout = timeout(amr_periodic, sc, hz);
+ callout_reset(&sc->amr_timeout, hz, amr_periodic, sc);
}
/********************************************************************************
Modified: head/sys/dev/amr/amr_pci.c
==============================================================================
--- head/sys/dev/amr/amr_pci.c Thu Aug 30 17:35:12 2012 (r239911)
+++ head/sys/dev/amr/amr_pci.c Thu Aug 30 17:37:01 2012 (r239912)
@@ -331,6 +331,7 @@ 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 Thu Aug 30 17:35:12 2012 (r239911)
+++ head/sys/dev/amr/amrvar.h Thu Aug 30 17:37:01 2012 (r239912)
@@ -256,7 +256,7 @@ 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_handle amr_timeout; /* periodic status check */
+ struct callout amr_timeout; /* periodic status check */
int amr_allow_vol_config;
int amr_linux_no_adapters;
int amr_ld_del_supported;
More information about the svn-src-head
mailing list