From bd6fac7bb3f28e49754bcc5c39542eea2e697256 Mon Sep 17 00:00:00 2001 From: Michael Knudsen Date: Wed, 30 Jun 2010 19:06:17 +0000 Subject: Use SLIST instead of TAILQ for the ccb free list. ok krw --- sys/dev/ic/uha.c | 12 ++++++------ sys/dev/ic/uhareg.h | 4 ++-- sys/dev/ic/uhavar.h | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'sys/dev/ic') diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c index c5acaa50b57..0db1a6efae3 100644 --- a/sys/dev/ic/uha.c +++ b/sys/dev/ic/uha.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uha.c,v 1.19 2010/06/28 18:31:02 krw Exp $ */ +/* $OpenBSD: uha.c,v 1.20 2010/06/30 19:06:16 mk Exp $ */ /* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */ #undef UHADEBUG @@ -127,7 +127,7 @@ uha_attach(sc) struct scsibus_attach_args saa; (sc->init)(sc); - TAILQ_INIT(&sc->sc_free_mscp); + SLIST_INIT(&sc->sc_free_mscp); /* * fill in the prototype scsi_link. @@ -168,13 +168,13 @@ uha_free_mscp(sc, mscp) s = splbio(); uha_reset_mscp(sc, mscp); - TAILQ_INSERT_HEAD(&sc->sc_free_mscp, mscp, chain); + SLIST_INSERT_HEAD(&sc->sc_free_mscp, mscp, chain); /* * If there were none, wake anybody waiting for one to come free, * starting with queued entries. */ - if (TAILQ_NEXT(mscp, chain) == NULL) + if (SLIST_NEXT(mscp, chain) == NULL) wakeup(&sc->sc_free_mscp); splx(s); @@ -220,9 +220,9 @@ uha_get_mscp(sc, flags) * but only if we can't allocate a new one */ for (;;) { - mscp = TAILQ_FIRST(&sc->sc_free_mscp); + mscp = SLIST_FIRST(&sc->sc_free_mscp); if (mscp) { - TAILQ_REMOVE(&sc->sc_free_mscp, mscp, chain); + SLIST_REMOVE_HEAD(&sc->sc_free_mscp, chain); break; } if (sc->sc_nummscps < UHA_MSCP_MAX) { diff --git a/sys/dev/ic/uhareg.h b/sys/dev/ic/uhareg.h index 00d45a2e778..49254f1a008 100644 --- a/sys/dev/ic/uhareg.h +++ b/sys/dev/ic/uhareg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uhareg.h,v 1.4 2003/11/16 20:30:06 avsm Exp $ */ +/* $OpenBSD: uhareg.h,v 1.5 2010/06/30 19:06:16 mk Exp $ */ /* $NetBSD: uhareg.h,v 1.2 1996/09/01 00:54:41 mycroft Exp $ */ /* @@ -218,7 +218,7 @@ struct uha_mscp { struct uha_dma_seg uha_dma[UHA_NSEG]; struct scsi_sense_data mscp_sense; /*-----------------end of hardware supported fields----------------*/ - TAILQ_ENTRY(uha_mscp) chain; + SLIST_ENTRY(uha_mscp) chain; struct uha_mscp *nexthash; long hashkey; struct scsi_xfer *xs; /* the scsi_xfer for this cmd */ diff --git a/sys/dev/ic/uhavar.h b/sys/dev/ic/uhavar.h index 52dedb68443..64308b6b42e 100644 --- a/sys/dev/ic/uhavar.h +++ b/sys/dev/ic/uhavar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: uhavar.h,v 1.2 2002/03/14 01:26:55 millert Exp $ */ +/* $OpenBSD: uhavar.h,v 1.3 2010/06/30 19:06:16 mk Exp $ */ /* $NetBSD: uhavar.h,v 1.3 1996/10/21 22:34:43 thorpej Exp $ */ /* @@ -49,7 +49,7 @@ struct uha_softc { void (*init)(struct uha_softc *); struct uha_mscp *sc_mscphash[MSCP_HASH_SIZE]; - TAILQ_HEAD(, uha_mscp) sc_free_mscp; + SLIST_HEAD(, uha_mscp) sc_free_mscp; int sc_nummscps; int sc_scsi_dev; /* our scsi id */ struct scsi_link sc_link; -- cgit v1.2.3