From fd958fd3dc98447a7b243a4eaf0190304f53bf61 Mon Sep 17 00:00:00 2001 From: Michael Knudsen Date: Wed, 30 Jun 2010 19:10:06 +0000 Subject: Use SLIST for the ccb free list. ok krw, discontent grunts from marco. --- sys/dev/ic/mfi.c | 10 +++++----- sys/dev/ic/mfivar.h | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sys') 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 * @@ -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 * @@ -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, -- cgit v1.2.3