From 84754cd048244fd28f63067bf2c09a79ce6688aa Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Fri, 13 Feb 2004 01:04:15 +0000 Subject: [PATCH] Add __DragonFly__ --- sys/dev/disk/aic7xxx/aic79xx.c | 10 +++++----- sys/dev/disk/aic7xxx/aic79xx_osm.h | 8 ++++---- sys/dev/disk/aic7xxx/aic7xxx.c | 10 +++++----- sys/dev/disk/aic7xxx/aic7xxx_osm.h | 10 +++++----- sys/dev/disk/ct/bshw_machdep.c | 6 +++--- sys/dev/disk/ct/ct.c | 4 ++-- sys/dev/disk/ct/ct_isa.c | 4 ++-- sys/dev/disk/ct/ctvar.h | 4 ++-- sys/dev/disk/i386/bs/bs.c | 4 ++-- sys/dev/disk/i386/bs/bsfunc.c | 4 ++-- sys/dev/disk/i386/bs/bsfunc.h | 6 +++--- sys/dev/disk/i386/bs/bshw.c | 8 ++++---- sys/dev/disk/i386/bs/bshw_dma.c | 6 +++--- sys/dev/disk/i386/bs/bshw_pdma.c | 8 ++++---- sys/dev/disk/i386/bs/bsif.c | 16 ++++++++-------- sys/dev/disk/i386/bs/bsif.h | 18 +++++++++--------- sys/dev/disk/i386/bs/bsvar.h | 4 ++-- sys/dev/disk/isp/isp.c | 4 ++-- sys/dev/disk/isp/isp_target.c | 4 ++-- sys/dev/disk/isp/ispvar.h | 4 ++-- sys/dev/disk/ncr/ncr.c | 4 ++-- sys/dev/disk/sym/sym_hipd.c | 8 ++++---- sys/dev/disk/trm/trm.c | 4 ++-- 23 files changed, 79 insertions(+), 79 deletions(-) diff --git a/sys/dev/disk/aic7xxx/aic79xx.c b/sys/dev/disk/aic7xxx/aic79xx.c index c219d382e3..e2414b8ec4 100644 --- a/sys/dev/disk/aic7xxx/aic79xx.c +++ b/sys/dev/disk/aic7xxx/aic79xx.c @@ -40,7 +40,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#198 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic79xx.c,v 1.3.2.5 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.c,v 1.3 2003/08/07 21:16:51 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx.c,v 1.4 2004/02/13 01:04:14 joerg Exp $ */ #include "aic79xx_osm.h" @@ -1837,7 +1837,7 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd) printerror = 0; } else if (ahd_sent_msg(ahd, AHDMSG_1B, MSG_BUS_DEV_RESET, TRUE)) { -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) /* * Don't mark the user's request for this BDR * as completing with CAM_BDR_SENT. CAM3 @@ -4779,7 +4779,7 @@ ahd_alloc(void *platform_arg, char *name) { struct ahd_softc *ahd; -#ifndef __FreeBSD__ +#if !defined(__DragonFly__) && !defined(__FreeBSD__) ahd = malloc(sizeof(*ahd), M_DEVBUF, M_NOWAIT); if (!ahd) { printf("aic7xxx: cannot malloc softc!\n"); @@ -4793,7 +4793,7 @@ ahd_alloc(void *platform_arg, char *name) ahd->seep_config = malloc(sizeof(*ahd->seep_config), M_DEVBUF, M_NOWAIT); if (ahd->seep_config == NULL) { -#ifndef __FreeBSD__ +#if !defined(__DragonFly__) && !defined(__FreeBSD__) free(ahd, M_DEVBUF); #endif free(name, M_DEVBUF); @@ -4995,7 +4995,7 @@ ahd_free(struct ahd_softc *ahd) free(ahd->seep_config, M_DEVBUF); if (ahd->saved_stack != NULL) free(ahd->saved_stack, M_DEVBUF); -#ifndef __FreeBSD__ +#if !defined(__DragonFly__) && !defined(__FreeBSD__) free(ahd, M_DEVBUF); #endif return; diff --git a/sys/dev/disk/aic7xxx/aic79xx_osm.h b/sys/dev/disk/aic7xxx/aic79xx_osm.h index da140e229e..00f257536c 100644 --- a/sys/dev/disk/aic7xxx/aic79xx_osm.h +++ b/sys/dev/disk/aic7xxx/aic79xx_osm.h @@ -33,7 +33,7 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic79xx_osm.h#20 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic79xx_osm.h,v 1.4.2.3 2003/06/10 03:26:07 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_osm.h,v 1.3 2003/08/07 21:16:51 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic79xx_osm.h,v 1.4 2004/02/13 01:04:14 joerg Exp $ */ #ifndef _AIC79XX_FREEBSD_H_ @@ -44,7 +44,7 @@ #include #include #include /* For device_t */ -#if __FreeBSD_version >= 500000 +#if defined(__FreeBSD__) && __FreeBSD_version >= 500000 #include #endif #include @@ -181,7 +181,7 @@ struct scb_platform_data { }; /********************************* Byte Order *********************************/ -#if __FreeBSD_version >= 500000 +#if defined(__FreeBSD___) && __FreeBSD_version >= 500000 #define ahd_htobe16(x) htobe16(x) #define ahd_htobe32(x) htobe32(x) #define ahd_htobe64(x) htobe64(x) @@ -224,7 +224,7 @@ typedef struct callout ahd_timer_t; /***************************** Timer Facilities *******************************/ timeout_t ahd_timeout; -#if __FreeBSD_version >= 500000 +#if defined(__FreeBSD__) && __FreeBSD_version >= 500000 #define ahd_timer_init(timer) callout_init(timer, /*mpsafe*/0) #else #define ahd_timer_init callout_init diff --git a/sys/dev/disk/aic7xxx/aic7xxx.c b/sys/dev/disk/aic7xxx/aic7xxx.c index 849204e630..4128593753 100644 --- a/sys/dev/disk/aic7xxx/aic7xxx.c +++ b/sys/dev/disk/aic7xxx/aic7xxx.c @@ -40,7 +40,7 @@ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#134 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx.c,v 1.41.2.27 2003/06/10 03:26:08 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx.c,v 1.3 2003/08/07 21:16:51 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx.c,v 1.4 2004/02/13 01:04:14 joerg Exp $ */ #include "aic7xxx_osm.h" @@ -1253,7 +1253,7 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat) printerror = 0; } else if (ahc_sent_msg(ahc, AHCMSG_1B, MSG_BUS_DEV_RESET, TRUE)) { -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) /* * Don't mark the user's request for this BDR * as completing with CAM_BDR_SENT. CAM3 @@ -3804,7 +3804,7 @@ ahc_alloc(void *platform_arg, char *name) struct ahc_softc *ahc; int i; -#ifndef __FreeBSD__ +#if !defined(__DragonFly__) && !defined(__FreeBSD__) ahc = malloc(sizeof(*ahc), M_DEVBUF, M_NOWAIT); if (!ahc) { printf("aic7xxx: cannot malloc softc!\n"); @@ -3818,7 +3818,7 @@ ahc_alloc(void *platform_arg, char *name) ahc->seep_config = malloc(sizeof(*ahc->seep_config), M_DEVBUF, M_NOWAIT); if (ahc->seep_config == NULL) { -#ifndef __FreeBSD__ +#if !defined(__DragonFly__) && !defined(__FreeBSD__) free(ahc, M_DEVBUF); #endif free(name, M_DEVBUF); @@ -4027,7 +4027,7 @@ ahc_free(struct ahc_softc *ahc) free(ahc->name, M_DEVBUF); if (ahc->seep_config != NULL) free(ahc->seep_config, M_DEVBUF); -#ifndef __FreeBSD__ +#if !defined(__DragonFly__) && !defined(__FreeBSD__) free(ahc, M_DEVBUF); #endif return; diff --git a/sys/dev/disk/aic7xxx/aic7xxx_osm.h b/sys/dev/disk/aic7xxx/aic7xxx_osm.h index 3784132288..e3d2e2bd0a 100644 --- a/sys/dev/disk/aic7xxx/aic7xxx_osm.h +++ b/sys/dev/disk/aic7xxx/aic7xxx_osm.h @@ -32,7 +32,7 @@ * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/aic7xxx_osm.h#15 $ * * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_osm.h,v 1.14.2.6 2003/06/10 03:26:09 gibbs Exp $ - * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_osm.h,v 1.3 2003/08/07 21:16:51 dillon Exp $ + * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_osm.h,v 1.4 2004/02/13 01:04:14 joerg Exp $ */ #ifndef _AIC7XXX_FREEBSD_H_ @@ -43,7 +43,7 @@ #include #include #include /* For device_t */ -#if __FreeBSD_version >= 500000 +#if defined(__FreeBSD__) && __FreeBSD_version >= 500000 #include #endif #include @@ -51,7 +51,7 @@ #include #include -#if __FreeBSD_version < 500000 +#if defined(__DragonFly__) || __FreeBSD_version < 500000 #include #else #define NPCI 1 @@ -192,7 +192,7 @@ struct scb_platform_data { }; /********************************* Byte Order *********************************/ -#if __FreeBSD_version >= 500000 +#if defined(__FreeBSD__) && __FreeBSD_version >= 500000 #define ahc_htobe16(x) htobe16(x) #define ahc_htobe32(x) htobe32(x) #define ahc_htobe64(x) htobe64(x) @@ -236,7 +236,7 @@ typedef struct callout ahc_timer_t; /***************************** Timer Facilities *******************************/ timeout_t ahc_timeout; -#if __FreeBSD_version >= 500000 +#if defined(__FreeBSD__) && __FreeBSD_version >= 500000 #define ahc_timer_init(timer) callout_init(timer, /*mpsafe*/0) #else #define ahc_timer_init callout_init diff --git a/sys/dev/disk/ct/bshw_machdep.c b/sys/dev/disk/ct/bshw_machdep.c index f65ab93442..61b20d23b8 100644 --- a/sys/dev/disk/ct/bshw_machdep.c +++ b/sys/dev/disk/ct/bshw_machdep.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/ct/bshw_machdep.c,v 1.3.2.1 2001/07/26 02:32:18 nyan Exp $ */ -/* $DragonFly: src/sys/dev/disk/ct/Attic/bshw_machdep.c,v 1.4 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/ct/Attic/bshw_machdep.c,v 1.5 2004/02/13 01:04:14 joerg Exp $ */ /* $NecBSD: bshw_machdep.c,v 1.8.12.6 2001/06/29 06:28:05 honda Exp $ */ /* $NetBSD$ */ @@ -72,7 +72,7 @@ #include #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include #include #include @@ -103,7 +103,7 @@ int bshw_data_write_bytes = 4096; #define BSHW_PAGE_SIZE NBPG #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #define BSHW_PAGE_SIZE PAGE_SIZE typedef unsigned long vaddr_t; #endif /* __FreeBSD__ */ diff --git a/sys/dev/disk/ct/ct.c b/sys/dev/disk/ct/ct.c index 5be11848ff..f38306ae96 100644 --- a/sys/dev/disk/ct/ct.c +++ b/sys/dev/disk/ct/ct.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/ct/ct.c,v 1.4.2.1 2001/07/26 02:32:18 nyan Exp $ */ -/* $DragonFly: src/sys/dev/disk/ct/Attic/ct.c,v 1.5 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/ct/Attic/ct.c,v 1.6 2004/02/13 01:04:14 joerg Exp $ */ /* $NecBSD: ct.c,v 1.13.12.5 2001/06/26 07:31:53 honda Exp $ */ /* $NetBSD$ */ @@ -72,7 +72,7 @@ #include #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include #include #include diff --git a/sys/dev/disk/ct/ct_isa.c b/sys/dev/disk/ct/ct_isa.c index 004921b52b..e6c525d8e8 100644 --- a/sys/dev/disk/ct/ct_isa.c +++ b/sys/dev/disk/ct/ct_isa.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/ct/ct_isa.c,v 1.3.2.3 2003/06/01 04:26:44 nyan Exp $ */ -/* $DragonFly: src/sys/dev/disk/ct/Attic/ct_isa.c,v 1.4 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/ct/Attic/ct_isa.c,v 1.5 2004/02/13 01:04:14 joerg Exp $ */ /* $NecBSD: ct_isa.c,v 1.6 1999/07/26 06:32:01 honda Exp $ */ /* $NetBSD$ */ @@ -73,7 +73,7 @@ #include #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include #include #include diff --git a/sys/dev/disk/ct/ctvar.h b/sys/dev/disk/ct/ctvar.h index d71c9b7f6c..3cd6cda5a3 100644 --- a/sys/dev/disk/ct/ctvar.h +++ b/sys/dev/disk/ct/ctvar.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/ct/ctvar.h,v 1.2.2.1 2001/07/26 02:32:18 nyan Exp $ */ -/* $DragonFly: src/sys/dev/disk/ct/Attic/ctvar.h,v 1.3 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/ct/Attic/ctvar.h,v 1.4 2004/02/13 01:04:14 joerg Exp $ */ /* $NecBSD: ctvar.h,v 1.4.14.3 2001/06/20 06:13:34 honda Exp $ */ /* $NetBSD$ */ @@ -73,7 +73,7 @@ struct ct_softc { void *sc_ih; #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) struct resource *port_res; struct resource *mem_res; struct resource *irq_res; diff --git a/sys/dev/disk/i386/bs/bs.c b/sys/dev/disk/i386/bs/bs.c index 83eeec321e..ec0e2a01ab 100644 --- a/sys/dev/disk/i386/bs/bs.c +++ b/sys/dev/disk/i386/bs/bs.c @@ -1,7 +1,7 @@ /* $NecBSD: bs.c,v 1.1 1997/07/18 09:18:59 kmatsuda Exp $ */ /* $NetBSD$ */ /* $FreeBSD: src/sys/i386/isa/bs/bs.c,v 1.8 1999/12/03 11:58:11 nyan Exp $ */ -/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bs.c,v 1.5 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bs.c,v 1.6 2004/02/13 01:04:14 joerg Exp $ */ /* * [NetBSD for NEC PC98 series] * Copyright (c) 1994, 1995, 1996 NetBSD/pc98 porting staff. @@ -37,7 +37,7 @@ #ifdef __NetBSD__ #include #endif -#ifdef __FreeBSD__ +#if defined(__DragonFly__)|| defined(__FreeBSD__) #include "bsif.h" #endif diff --git a/sys/dev/disk/i386/bs/bsfunc.c b/sys/dev/disk/i386/bs/bsfunc.c index 3527ac4a0f..8385959a41 100644 --- a/sys/dev/disk/i386/bs/bsfunc.c +++ b/sys/dev/disk/i386/bs/bsfunc.c @@ -1,7 +1,7 @@ /* $NecBSD: bsfunc.c,v 1.2 1997/10/31 17:43:37 honda Exp $ */ /* $NetBSD$ */ /* $FreeBSD: src/sys/i386/isa/bs/bsfunc.c,v 1.7.2.2 2001/07/26 02:32:18 nyan Exp $ */ -/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsfunc.c,v 1.4 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsfunc.c,v 1.5 2004/02/13 01:04:14 joerg Exp $ */ /* * [NetBSD for NEC PC98 series] * Copyright (c) 1994, 1995, 1996 NetBSD/pc98 porting staff. @@ -37,7 +37,7 @@ #ifdef __NetBSD__ #include #endif -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include "bsif.h" #endif diff --git a/sys/dev/disk/i386/bs/bsfunc.h b/sys/dev/disk/i386/bs/bsfunc.h index ece6c2cdab..7123e3904b 100644 --- a/sys/dev/disk/i386/bs/bsfunc.h +++ b/sys/dev/disk/i386/bs/bsfunc.h @@ -1,6 +1,6 @@ /* $NecBSD: bsfunc.h,v 1.1 1997/07/18 09:19:03 kmatsuda Exp $ */ /* $NetBSD$ */ -/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsfunc.h,v 1.2 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsfunc.h,v 1.3 2004/02/13 01:04:14 joerg Exp $ */ /* * [NetBSD for NEC PC98 series] * Copyright (c) 1994, 1995, 1996 NetBSD/pc98 porting staff. @@ -214,7 +214,7 @@ bs_start_timeout(bsc) if ((bsc->sc_flags & BSSTARTTIMEOUT) == 0) { bsc->sc_flags |= BSSTARTTIMEOUT; -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) bsc->timeout_ch = #endif timeout(bstimeout, bsc, BS_TIMEOUT_INTERVAL); @@ -228,7 +228,7 @@ bs_terminate_timeout(bsc) if (bsc->sc_flags & BSSTARTTIMEOUT) { -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) untimeout(bstimeout, bsc, bsc->timeout_ch); #else diff --git a/sys/dev/disk/i386/bs/bshw.c b/sys/dev/disk/i386/bs/bshw.c index ea1c923274..5de4792e75 100644 --- a/sys/dev/disk/i386/bs/bshw.c +++ b/sys/dev/disk/i386/bs/bshw.c @@ -1,6 +1,6 @@ /* $NecBSD: bshw.c,v 1.1 1997/07/18 09:19:03 kmatsuda Exp $ */ /* $NetBSD$ */ -/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bshw.c,v 1.4 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bshw.c,v 1.5 2004/02/13 01:04:14 joerg Exp $ */ /* * [NetBSD for NEC PC98 series] * Copyright (c) 1994, 1995, 1996 NetBSD/pc98 porting staff. @@ -33,7 +33,7 @@ * Copyright (c) 1994, 1995, 1996 Naofumi HONDA. All rights reserved. * * $FreeBSD: src/sys/i386/isa/bs/bshw.c,v 1.7.2.1 2001/07/26 02:32:18 nyan Exp $ - * $DragonFly: src/sys/dev/disk/i386/bs/Attic/bshw.c,v 1.4 2003/08/27 10:35:16 rob Exp $ + * $DragonFly: src/sys/dev/disk/i386/bs/Attic/bshw.c,v 1.5 2004/02/13 01:04:14 joerg Exp $ */ #ifdef __NetBSD__ @@ -41,7 +41,7 @@ #include #include #endif -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include "opt_pc98.h" #include #include "bsif.h" @@ -426,7 +426,7 @@ bshw_unlock(bsc) #include #include #endif -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include "bshw_dma.c" #include "bshw_pdma.c" #endif diff --git a/sys/dev/disk/i386/bs/bshw_dma.c b/sys/dev/disk/i386/bs/bshw_dma.c index 3f05129868..9198a57ae7 100644 --- a/sys/dev/disk/i386/bs/bshw_dma.c +++ b/sys/dev/disk/i386/bs/bshw_dma.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/i386/isa/bs/bshw_dma.c,v 1.6.6.1 2000/10/21 07:44:26 nyan Exp $ */ -/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bshw_dma.c,v 1.3 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bshw_dma.c,v 1.4 2004/02/13 01:04:14 joerg Exp $ */ /* $NecBSD: bshw_dma.c,v 1.3 1997/07/26 06:03:16 honda Exp $ */ /* $NetBSD$ */ /* @@ -202,7 +202,7 @@ bshw_dmastart(bsc) * byte mode channels. */ /* set dma channel mode, and reset address ff */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) if (need_pre_dma_flush) wbinvd(); #else /* NetBSD/pc98 */ @@ -250,7 +250,7 @@ bshw_dmadone(bsc) if (bsc->sc_hw->dma_stop) (*bsc->sc_hw->dma_stop)(bsc); -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) if (need_post_dma_flush) invd(); #else diff --git a/sys/dev/disk/i386/bs/bshw_pdma.c b/sys/dev/disk/i386/bs/bshw_pdma.c index a32c07cd95..8cf6c584b3 100644 --- a/sys/dev/disk/i386/bs/bshw_pdma.c +++ b/sys/dev/disk/i386/bs/bshw_pdma.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/i386/isa/bs/bshw_pdma.c,v 1.6.6.1 2000/10/21 07:44:26 nyan Exp $ */ -/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bshw_pdma.c,v 1.3 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bshw_pdma.c,v 1.4 2004/02/13 01:04:14 joerg Exp $ */ /* $NecBSD: bshw_pdma.c,v 1.4 1997/10/31 17:43:39 honda Exp $ */ /* $NetBSD$ */ /* @@ -212,7 +212,7 @@ bs_lc_smit_xfer(ti, direction) break; count = (datalen > LC_FSZ ? LC_FSZ : datalen); -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) memcopy((u_int8_t *)ti->sm_offset, data, count); #else /* NetBSD */ bus_space_read_region_4(bsc->sc_memt, bsc->sc_memh, @@ -233,7 +233,7 @@ bs_lc_smit_xfer(ti, direction) break; count = (datalen > LC_SFSZ ? LC_SFSZ : datalen); -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) memcopy(data, (u_int8_t *)ti->sm_offset, count); #else /* NetBSD */ bus_space_write_region_4(bsc->sc_memt, bsc->sc_memh, @@ -246,7 +246,7 @@ bs_lc_smit_xfer(ti, direction) break; count = (datalen > LC_REST ? LC_REST : datalen); -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) memcopy(data, (u_int8_t *)(ti->sm_offset + LC_SFSZ), count); #else /* NetBSD */ bus_space_write_region_4(bsc->sc_memt, bsc->sc_memh, diff --git a/sys/dev/disk/i386/bs/bsif.c b/sys/dev/disk/i386/bs/bsif.c index bc33efa65f..2e53555d12 100644 --- a/sys/dev/disk/i386/bs/bsif.c +++ b/sys/dev/disk/i386/bs/bsif.c @@ -27,7 +27,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/bs/bsif.c,v 1.10.2.1 2000/08/24 08:06:08 kato Exp $ - * $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsif.c,v 1.4 2003/08/27 10:35:16 rob Exp $ + * $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsif.c,v 1.5 2004/02/13 01:04:14 joerg Exp $ */ #if 0 @@ -38,7 +38,7 @@ #ifdef __NetBSD__ #include #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include "opt_bs.h" #include "opt_pc98.h" #include "bs.h" @@ -79,7 +79,7 @@ struct scsi_adapter pc98texa55bs = { }; #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) static int bsprobe (struct isa_device *); static void bs_poll(struct cam_sim *sim); static int bsattach(struct isa_device *); @@ -128,7 +128,7 @@ static struct bs_softc *bscdata[NBS]; /***************************************************************** * OS <=> BS INTERFACE *****************************************************************/ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) static int bsprobe(dev) struct isa_device *dev; @@ -221,7 +221,7 @@ bsprint(aux, name) } #endif -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) static void bs_poll(struct cam_sim *sim) { @@ -280,7 +280,7 @@ bsintr(arg) } #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) static void bsintr(unit) int unit; @@ -292,7 +292,7 @@ bsintr(unit) /***************************************************************** * JULIAN SCSI <=> BS INTERFACE *****************************************************************/ -#ifndef __FreeBSD__ +#if !defined(__DragonFly__) && !defined(__FreeBSD__) static void bs_scsi_minphys(bp) struct buf *bp; @@ -381,7 +381,7 @@ bad: } #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) static int bs_dmarangecheck(caddr_t va, unsigned length) { vm_offset_t phys, priorpage = 0, endva; diff --git a/sys/dev/disk/i386/bs/bsif.h b/sys/dev/disk/i386/bs/bsif.h index cd2c2f972d..1a087b96cd 100644 --- a/sys/dev/disk/i386/bs/bsif.h +++ b/sys/dev/disk/i386/bs/bsif.h @@ -1,6 +1,6 @@ /* $NecBSD: bsif.h,v 1.5 1997/10/23 20:52:34 honda Exp $ */ /* $FreeBSD: src/sys/i386/isa/bs/bsif.h,v 1.12.2.2 2001/07/26 02:32:18 nyan Exp $ */ -/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsif.h,v 1.5 2003/08/27 10:35:16 rob Exp $ */ +/* $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsif.h,v 1.6 2004/02/13 01:04:14 joerg Exp $ */ /* * Copyright (c) HONDA Naofumi, KATO Takenori, 1996. All rights reserved. * @@ -50,7 +50,7 @@ bus_dma_tag_t sc_dmat; #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #define OS_DEPEND_DEVICE_HEADER \ int unit; @@ -64,7 +64,7 @@ #if defined(__NetBSD__) #define BSHW_NBPG NBPG #endif -#if defined(__FreeBSD__) +#if defined(__DragonFly__) || defined(__FreeBSD__) #define BSHW_NBPG PAGE_SIZE #endif @@ -105,7 +105,7 @@ #include #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include #include #include @@ -147,7 +147,7 @@ #include #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #define BUS_IO_DELAY ((void) inb(0x5f)) #define BUS_IO_WEIGHT (outb(0x5f, 0)) #define BUS_IOR(offs) (BUS_IO_DELAY, inb(bsc->sc_iobase + (offs))) @@ -168,7 +168,7 @@ #ifdef __NetBSD__ #define XSBS_INT32T int #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #define XSBS_INT32T int32_t #endif /* __FreeBSD__ */ @@ -180,7 +180,7 @@ #define XSBS_SCSI_NOSLEEP SCSI_NOSLEEP #define XSBS_SCSI_POLL SCSI_POLL #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #define XSBS_SCSI_POLL SCSI_NOMASK #endif /* __FreeBSD__ */ @@ -193,7 +193,7 @@ void bs_alloc_buf (struct targ_info *); XSBS_INT32T bs_target_open (struct scsi_link *, struct cfdata *); XSBS_INT32T bs_scsi_cmd (struct scsi_xfer *); #endif -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) void bs_scsi_cmd(struct cam_sim *sim, union ccb *ccb); #endif extern int delaycount; @@ -204,7 +204,7 @@ int bsintr (void *); int bsprint (void *, const char *); #endif /* __NetBSD__ */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) static BS_INLINE void memcopy (void *from, void *to, register size_t len); u_int32_t bs_adapter_info (int); #define delay(y) DELAY(y) diff --git a/sys/dev/disk/i386/bs/bsvar.h b/sys/dev/disk/i386/bs/bsvar.h index f1ab673a8a..378c70bf75 100644 --- a/sys/dev/disk/i386/bs/bsvar.h +++ b/sys/dev/disk/i386/bs/bsvar.h @@ -29,13 +29,13 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/bs/bsvar.h,v 1.6.6.1 2000/03/22 03:36:45 nyan Exp $ - * $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsvar.h,v 1.3 2003/08/27 10:35:16 rob Exp $ + * $DragonFly: src/sys/dev/disk/i386/bs/Attic/bsvar.h,v 1.4 2004/02/13 01:04:14 joerg Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Naofumi HONDA. All rights reserved. */ -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #define BS_INLINE __inline #else #define BS_INLINE inline diff --git a/sys/dev/disk/isp/isp.c b/sys/dev/disk/isp/isp.c index 40dc95d08b..d62a950aa5 100644 --- a/sys/dev/disk/isp/isp.c +++ b/sys/dev/disk/isp/isp.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/isp/isp.c,v 1.41.2.23 2002/10/11 17:34:28 mjacob Exp $ */ -/* $DragonFly: src/sys/dev/disk/isp/isp.c,v 1.3 2003/08/07 21:16:52 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/isp/isp.c,v 1.4 2004/02/13 01:04:15 joerg Exp $ */ /* * Machine and OS Independent (well, as best as possible) * code for the Qlogic ISP SCSI adapters. @@ -43,7 +43,7 @@ #ifdef __NetBSD__ #include #endif -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include "isp_freebsd.h" #endif #ifdef __OpenBSD__ diff --git a/sys/dev/disk/isp/isp_target.c b/sys/dev/disk/isp/isp_target.c index a7f77a75a0..50e6a4507c 100644 --- a/sys/dev/disk/isp/isp_target.c +++ b/sys/dev/disk/isp/isp_target.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/isp/isp_target.c,v 1.5.4.10 2002/07/29 04:25:59 mjacob Exp $ */ -/* $DragonFly: src/sys/dev/disk/isp/isp_target.c,v 1.3 2003/08/07 21:16:53 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/isp/isp_target.c,v 1.4 2004/02/13 01:04:15 joerg Exp $ */ /* * Machine and OS Independent Target Mode Code for the Qlogic SCSI/FC adapters. * @@ -40,7 +40,7 @@ #ifdef __NetBSD__ #include #endif -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include "isp_freebsd.h" #endif #ifdef __OpenBSD__ diff --git a/sys/dev/disk/isp/ispvar.h b/sys/dev/disk/isp/ispvar.h index 0a0d23c5c2..eaabb4436d 100644 --- a/sys/dev/disk/isp/ispvar.h +++ b/sys/dev/disk/isp/ispvar.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/isp/ispvar.h,v 1.25.2.17 2002/10/11 18:51:49 mjacob Exp $ */ -/* $DragonFly: src/sys/dev/disk/isp/ispvar.h,v 1.3 2003/08/07 21:16:53 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/isp/ispvar.h,v 1.4 2004/02/13 01:04:15 joerg Exp $ */ /* * Soft Definitions for for Qlogic ISP SCSI adapters. * @@ -39,7 +39,7 @@ #include #endif #endif -#ifdef __FreeBSD__ +#if defined(__DragonFly__) || defined(__FreeBSD__) #include "ispmbox.h" #ifdef ISP_TARGET_MODE #include "isp_target.h" diff --git a/sys/dev/disk/ncr/ncr.c b/sys/dev/disk/ncr/ncr.c index 31052ca5a0..a8261d6d3e 100644 --- a/sys/dev/disk/ncr/ncr.c +++ b/sys/dev/disk/ncr/ncr.c @@ -1,7 +1,7 @@ /************************************************************************** ** ** $FreeBSD: src/sys/pci/ncr.c,v 1.155.2.3 2001/03/05 13:09:10 obrien Exp $ -** $DragonFly: src/sys/dev/disk/ncr/ncr.c,v 1.5 2003/11/15 21:05:41 dillon Exp $ +** $DragonFly: src/sys/dev/disk/ncr/ncr.c,v 1.6 2004/02/13 01:04:15 joerg Exp $ ** ** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family. ** @@ -47,7 +47,7 @@ #define NCR_GETCC_WITHMSG -#if defined (__FreeBSD__) && defined(_KERNEL) +#if (defined(__DragonFly__) || defined (__FreeBSD__)) && defined(_KERNEL) #include "opt_ncr.h" #endif diff --git a/sys/dev/disk/sym/sym_hipd.c b/sys/dev/disk/sym/sym_hipd.c index 90523fba31..9411aff2ae 100644 --- a/sys/dev/disk/sym/sym_hipd.c +++ b/sys/dev/disk/sym/sym_hipd.c @@ -56,7 +56,7 @@ */ /* $FreeBSD: src/sys/dev/sym/sym_hipd.c,v 1.6.2.12 2001/12/02 19:01:10 groudier Exp $ */ -/* $DragonFly: src/sys/dev/disk/sym/sym_hipd.c,v 1.4 2003/08/07 21:16:54 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/sym/sym_hipd.c,v 1.5 2004/02/13 01:04:15 joerg Exp $ */ #define SYM_DRIVER_NAME "sym-1.6.5-20000902" @@ -71,7 +71,7 @@ * Note that the old BUS stuff also works for FreeBSD 4 and spares * about 1 KB for the driver object file. */ -#if __FreeBSD_version >= 400000 +#if defined(__DragonFly__) || __FreeBSD_version >= 400000 #define FreeBSD_Bus_Dma_Abstraction #define FreeBSD_Bus_Io_Abstraction #define FreeBSD_Bus_Space_Abstraction @@ -8868,7 +8868,7 @@ static struct pci_device sym_pci_driver = { NULL }; -#if __FreeBSD_version >= 400000 +#if defined(__DragonFly__) || __FreeBSD_version >= 400000 COMPAT_PCI_DRIVER (sym, sym_pci_driver); #else DATA_SET (pcidevice_set, sym_pci_driver); @@ -9676,7 +9676,7 @@ int sym_cam_attach(hcb_p np) * Hmmm... This should be useful, but I donnot want to * know about. */ -#if __FreeBSD_version < 400000 +#if defined(__FreeBSD__) && __FreeBSD_version < 400000 #ifdef __alpha__ #ifdef FreeBSD_Bus_Io_Abstraction alpha_register_pci_scsi(pci_get_bus(np->device), diff --git a/sys/dev/disk/trm/trm.c b/sys/dev/disk/trm/trm.c index 8c0d8f9f9c..befc66373f 100644 --- a/sys/dev/disk/trm/trm.c +++ b/sys/dev/disk/trm/trm.c @@ -45,7 +45,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/trm/trm.c,v 1.2.2.2 2002/12/19 20:34:45 cognet Exp $ - * $DragonFly: src/sys/dev/disk/trm/trm.c,v 1.3 2003/08/07 21:16:54 dillon Exp $ + * $DragonFly: src/sys/dev/disk/trm/trm.c,v 1.4 2004/02/13 01:04:15 joerg Exp $ */ /* @@ -63,7 +63,7 @@ #include #include #include -#if __FreeBSD_version >= 500000 +#if defined(__FreeBSD__) && __FreeBSD_version >= 500000 #include #endif #include -- 2.41.0