summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Knudsen <mk@cvs.openbsd.org>2010-06-30 19:10:06 +0000
committerMichael Knudsen <mk@cvs.openbsd.org>2010-06-30 19:10:06 +0000
commitfd958fd3dc98447a7b243a4eaf0190304f53bf61 (patch)
treef25f6cd12ded6ff5a37d0b91e9f38c4781563e4f /sys
parente8ea1c2f0d10ecba1caf3e09529e316458eaf798 (diff)
Use SLIST for the ccb free list.
ok krw, discontent grunts from marco.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/mfi.c10
-rw-r--r--sys/dev/ic/mfivar.h6
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index d710ba652d6..6c5453e7a63 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.107 2010/06/28 18:31:02 krw Exp $ */
+/* $OpenBSD: mfi.c,v 1.108 2010/06/30 19:10:05 mk Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -152,9 +152,9 @@ mfi_get_ccb(struct mfi_softc *sc)
struct mfi_ccb *ccb;
mtx_enter(&sc->sc_ccb_mtx);
- ccb = TAILQ_FIRST(&sc->sc_ccb_freeq);
+ ccb = SLIST_FIRST(&sc->sc_ccb_freeq);
if (ccb != NULL) {
- TAILQ_REMOVE(&sc->sc_ccb_freeq, ccb, ccb_link);
+ SLIST_REMOVE_HEAD(&sc->sc_ccb_freeq, ccb_link);
ccb->ccb_state = MFI_CCB_READY;
}
mtx_leave(&sc->sc_ccb_mtx);
@@ -186,7 +186,7 @@ mfi_put_ccb(struct mfi_ccb *ccb)
ccb->ccb_len = 0;
mtx_enter(&sc->sc_ccb_mtx);
- TAILQ_INSERT_TAIL(&sc->sc_ccb_freeq, ccb, ccb_link);
+ SLIST_INSERT_HEAD(&sc->sc_ccb_freeq, ccb, ccb_link);
mtx_leave(&sc->sc_ccb_mtx);
}
@@ -636,7 +636,7 @@ mfi_attach(struct mfi_softc *sc, enum mfi_iop iop)
if (mfi_transition_firmware(sc))
return (1);
- TAILQ_INIT(&sc->sc_ccb_freeq);
+ SLIST_INIT(&sc->sc_ccb_freeq);
mtx_init(&sc->sc_ccb_mtx, IPL_BIO);
rw_init(&sc->sc_lock, "mfi_lock");
diff --git a/sys/dev/ic/mfivar.h b/sys/dev/ic/mfivar.h
index bcb56306354..6540b77db89 100644
--- a/sys/dev/ic/mfivar.h
+++ b/sys/dev/ic/mfivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfivar.h,v 1.38 2010/04/10 17:26:10 marco Exp $ */
+/* $OpenBSD: mfivar.h,v 1.39 2010/06/30 19:10:05 mk Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -87,10 +87,10 @@ struct mfi_ccb {
} ccb_state;
uint32_t ccb_flags;
#define MFI_CCB_F_ERR (1<<0)
- TAILQ_ENTRY(mfi_ccb) ccb_link;
+ SLIST_ENTRY(mfi_ccb) ccb_link;
};
-TAILQ_HEAD(mfi_ccb_list, mfi_ccb);
+SLIST_HEAD(mfi_ccb_list, mfi_ccb);
enum mfi_iop {
MFI_IOP_XSCALE,