Wed Mar 18 10:41:46 2009 UTC ()
buildfix: undo previous


(cegger)
diff -r1.116 -r1.117 src/sys/dev/ieee1394/fwohci.c

cvs diff -r1.116 -r1.117 src/sys/dev/ieee1394/fwohci.c (expand / switch to unified diff)

--- src/sys/dev/ieee1394/fwohci.c 2009/03/18 10:22:40 1.116
+++ src/sys/dev/ieee1394/fwohci.c 2009/03/18 10:41:46 1.117
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: fwohci.c,v 1.116 2009/03/18 10:22:40 cegger Exp $ */ 1/* $NetBSD: fwohci.c,v 1.117 2009/03/18 10:41:46 cegger Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2003 Hidetoshi Shimokawa 4 * Copyright (c) 2003 Hidetoshi Shimokawa
5 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa 5 * Copyright (c) 1998-2002 Katsushi Kobayashi and Hidetoshi Shimokawa
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -27,27 +27,27 @@ @@ -27,27 +27,27 @@
27 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, 27 * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
28 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 32 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
33 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE. 34 * POSSIBILITY OF SUCH DAMAGE.
35 * 35 *
36 * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.93 2007/06/08 09:04:30 simokawa Exp $ 36 * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.93 2007/06/08 09:04:30 simokawa Exp $
37 * 37 *
38 */ 38 */
39#include <sys/cdefs.h> 39#include <sys/cdefs.h>
40__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.116 2009/03/18 10:22:40 cegger Exp $"); 40__KERNEL_RCSID(0, "$NetBSD: fwohci.c,v 1.117 2009/03/18 10:41:46 cegger Exp $");
41 41
42#define ATRQ_CH 0 42#define ATRQ_CH 0
43#define ATRS_CH 1 43#define ATRS_CH 1
44#define ARRQ_CH 2 44#define ARRQ_CH 2
45#define ARRS_CH 3 45#define ARRS_CH 3
46#define ITX_CH 4 46#define ITX_CH 4
47#define IRX_CH 0x24 47#define IRX_CH 0x24
48 48
49#if defined(__FreeBSD__) 49#if defined(__FreeBSD__)
50#include <sys/param.h> 50#include <sys/param.h>
51#include <sys/systm.h> 51#include <sys/systm.h>
52#include <sys/mbuf.h> 52#include <sys/mbuf.h>
53#include <sys/malloc.h> 53#include <sys/malloc.h>
@@ -870,27 +870,27 @@ fwohci_timeout(void *arg) @@ -870,27 +870,27 @@ fwohci_timeout(void *arg)
870{ 870{
871 struct fwohci_softc *sc; 871 struct fwohci_softc *sc;
872 872
873 sc = (struct fwohci_softc *)arg; 873 sc = (struct fwohci_softc *)arg;
874} 874}
875 875
876uint32_t 876uint32_t
877fwohci_cyctimer(struct firewire_comm *fc) 877fwohci_cyctimer(struct firewire_comm *fc)
878{ 878{
879 struct fwohci_softc *sc = (struct fwohci_softc *)fc; 879 struct fwohci_softc *sc = (struct fwohci_softc *)fc;
880 return(OREAD(sc, OHCI_CYCLETIMER)); 880 return(OREAD(sc, OHCI_CYCLETIMER));
881} 881}
882 882
883FWOHCI_DETACH(void) 883FWOHCI_DETACH()
884{ 884{
885 int i; 885 int i;
886 886
887 FWOHCI_DETACH_START; 887 FWOHCI_DETACH_START;
888 if (sc->sid_buf != NULL) 888 if (sc->sid_buf != NULL)
889 fwdma_free(&sc->fc, &sc->sid_dma); 889 fwdma_free(&sc->fc, &sc->sid_dma);
890 if (sc->fc.config_rom != NULL) 890 if (sc->fc.config_rom != NULL)
891 fwdma_free(&sc->fc, &sc->crom_dma); 891 fwdma_free(&sc->fc, &sc->crom_dma);
892 892
893 fwohci_db_free(&sc->arrq); 893 fwohci_db_free(&sc->arrq);
894 fwohci_db_free(&sc->arrs); 894 fwohci_db_free(&sc->arrs);
895 895
896 fwohci_db_free(&sc->atrq); 896 fwohci_db_free(&sc->atrq);