Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Add `dpti', which is an I2O vendor extension implementing th...
details: https://anonhg.NetBSD.org/src/rev/07ce13ef62b2
branches: trunk
changeset: 515302:07ce13ef62b2
user: ad <ad%NetBSD.org@localhost>
date: Fri Sep 21 23:44:19 2001 +0000
description:
Add `dpti', which is an I2O vendor extension implementing the DPT/Adaptec
control interface. This makes it possible to run the Linux versions of
dptmgr, raidutil, dptelog and other tools under NetBSD.
diffstat:
etc/etc.i386/MAKEDEV | 10 +-
share/man/man8/man8.i386/MAKEDEV.8 | 4 +-
sys/arch/i386/conf/GENERIC | 5 +-
sys/arch/i386/conf/INSTALL | 3 +-
sys/arch/i386/conf/INSTALL_SMALL | 3 +-
sys/arch/i386/conf/INSTALL_TINY | 3 +-
sys/arch/i386/i386/conf.c | 6 +-
sys/dev/DEVNAMES | 3 +-
sys/dev/i2o/dpti.c | 539 +++++++++++++++++++++++++++++++++++++
sys/dev/i2o/dptivar.h | 393 ++++++++++++++++++++++++++
sys/dev/i2o/files.i2o | 6 +-
sys/dev/i2o/i2o.h | 3 +-
sys/dev/i2o/i2odpt.h | 170 +++++++++++
sys/dev/i2o/iop.c | 28 +-
sys/dev/i2o/iopvar.h | 8 +-
15 files changed, 1155 insertions(+), 29 deletions(-)
diffs (truncated from 1461 to 300 lines):
diff -r b799e1db4972 -r 07ce13ef62b2 etc/etc.i386/MAKEDEV
--- a/etc/etc.i386/MAKEDEV Fri Sep 21 23:40:39 2001 +0000
+++ b/etc/etc.i386/MAKEDEV Fri Sep 21 23:44:19 2001 +0000
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $NetBSD: MAKEDEV,v 1.146 2001/09/16 08:19:06 veego Exp $
+# $NetBSD: MAKEDEV,v 1.147 2001/09/21 23:44:22 ad Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
# All rights reserved.
@@ -130,6 +130,7 @@
# wsmux* wscons event multiplexor
# agp* AGP GART devices
# pci* PCI bus access devices
+# dpti* DPT/Adaptec RAID management interface
#
dialin=0
@@ -830,6 +831,13 @@
chmod 644 pci$unit
;;
+dpti*)
+ unit=${i#dpti};
+ rm -f dpti$unit
+ mknod dpti$unit c 84 $unit
+ chmod 600 dpti$unit
+ ;;
+
altq)
mkdir -p altq
chmod 755 altq
diff -r b799e1db4972 -r 07ce13ef62b2 share/man/man8/man8.i386/MAKEDEV.8
--- a/share/man/man8/man8.i386/MAKEDEV.8 Fri Sep 21 23:40:39 2001 +0000
+++ b/share/man/man8/man8.i386/MAKEDEV.8 Fri Sep 21 23:44:19 2001 +0000
@@ -6,7 +6,7 @@
.\" *** DO NOT EDIT - any changes will be lost!!!
.\" *** ------------------------------------------------------------------
.\"
-.\" $NetBSD: MAKEDEV.8,v 1.29 2001/09/15 10:53:17 wiz Exp $
+.\" $NetBSD: MAKEDEV.8,v 1.30 2001/09/21 23:44:20 ad Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -316,6 +316,8 @@
. It Ar pci#
PCI bus access devices, see
.Xr \&pci 4
+. It Ar dpti#
+DPT/Adaptec RAID management interface
. El
.El
.Sh FILES
diff -r b799e1db4972 -r 07ce13ef62b2 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC Fri Sep 21 23:40:39 2001 +0000
+++ b/sys/arch/i386/conf/GENERIC Fri Sep 21 23:44:19 2001 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: GENERIC,v 1.426 2001/09/14 21:44:21 nathanw Exp $
+# $NetBSD: GENERIC,v 1.427 2001/09/21 23:44:21 ad Exp $
#
# GENERIC -- everything that's currently supported
#
include "arch/i386/conf/std.i386"
-#ident "GENERIC-$Revision: 1.426 $"
+#ident "GENERIC-$Revision: 1.427 $"
maxusers 32 # estimated number of users
@@ -403,6 +403,7 @@
iop* at pci? dev ? function ? # I/O processor
iopsp* at iop? tid ? # SCSI/FC-AL ports
ld* at iop? tid ? # block devices
+dpti* at iop? tid 0 # DPT/Adaptec control interface
# SCSI Controllers and Devices
diff -r b799e1db4972 -r 07ce13ef62b2 sys/arch/i386/conf/INSTALL
--- a/sys/arch/i386/conf/INSTALL Fri Sep 21 23:40:39 2001 +0000
+++ b/sys/arch/i386/conf/INSTALL Fri Sep 21 23:44:19 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.172 2001/09/14 21:44:21 nathanw Exp $
+# $NetBSD: INSTALL,v 1.173 2001/09/21 23:44:22 ad Exp $
#
# INSTALL - Installation kernel.
#
@@ -288,6 +288,7 @@
iop* at pci? dev ? function ? # I/O processor
iopsp* at iop? tid ? # SCSI/FC-AL ports
ld* at iop? tid ? # Block devices
+#dpti* at iop? tid 0 # DPT/Adaptec control interface
# SCSI Controllers and Devices
diff -r b799e1db4972 -r 07ce13ef62b2 sys/arch/i386/conf/INSTALL_SMALL
--- a/sys/arch/i386/conf/INSTALL_SMALL Fri Sep 21 23:40:39 2001 +0000
+++ b/sys/arch/i386/conf/INSTALL_SMALL Fri Sep 21 23:44:19 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL_SMALL,v 1.70 2001/09/14 21:44:22 nathanw Exp $
+# $NetBSD: INSTALL_SMALL,v 1.71 2001/09/21 23:44:22 ad Exp $
#
# INSTALL_SMALL - Small Installation kernel.
#
@@ -255,6 +255,7 @@
#iop* at pci? dev ? function ? # I/O processor
#iopsp* at iop? tid ? # SCSI/FC-AL ports
#ld* at iop? tid ? # block devices
+#dpti* at iop? tid 0 # DPT/Adaptec control interface
# SCSI Controllers and Devices
diff -r b799e1db4972 -r 07ce13ef62b2 sys/arch/i386/conf/INSTALL_TINY
--- a/sys/arch/i386/conf/INSTALL_TINY Fri Sep 21 23:40:39 2001 +0000
+++ b/sys/arch/i386/conf/INSTALL_TINY Fri Sep 21 23:44:19 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL_TINY,v 1.39 2001/09/14 21:44:22 nathanw Exp $
+# $NetBSD: INSTALL_TINY,v 1.40 2001/09/21 23:44:22 ad Exp $
#
# INSTALL_TINY - Tiny Installation kernel, suitable for 4M machines.
#
@@ -255,6 +255,7 @@
#iop* at pci? dev ? function ? # I/O processor
#iopsp* at iop? tid ? # SCSI/FC-AL ports
#ld* at iop? tid ? # block devices
+#dpti* at iop? tid 0 # DPT/Adaptec control interface
# SCSI Controllers and Devices
diff -r b799e1db4972 -r 07ce13ef62b2 sys/arch/i386/i386/conf.c
--- a/sys/arch/i386/i386/conf.c Fri Sep 21 23:40:39 2001 +0000
+++ b/sys/arch/i386/i386/conf.c Fri Sep 21 23:44:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: conf.c,v 1.146 2001/09/13 22:08:44 thorpej Exp $ */
+/* $NetBSD: conf.c,v 1.147 2001/09/21 23:44:21 ad Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -233,6 +233,8 @@
cdev_decl(mlx);
#include "mly.h"
cdev_decl(mly);
+#include "dpti.h"
+cdev_decl(dpti);
cdev_decl(edmca);
#include "agp.h"
cdev_decl(agp);
@@ -338,6 +340,7 @@
cdev__oci_init(NWSFONT,wsfont), /* 81: wsfont pseudo-device */
cdev__ocim_init(NAGP,agp), /* 82: AGP graphics aperture device */
cdev_pci_init(NPCI,pci), /* 83: PCI bus access device */
+ cdev__oci_init(NDPTI,dpti), /* 84: DPT/Adaptec RAID management */
};
int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
@@ -463,6 +466,7 @@
/* 81 */ NODEV,
/* 82 */ NODEV,
/* 83 */ NODEV,
+ /* 84 */ NODEV,
};
/*
diff -r b799e1db4972 -r 07ce13ef62b2 sys/dev/DEVNAMES
--- a/sys/dev/DEVNAMES Fri Sep 21 23:40:39 2001 +0000
+++ b/sys/dev/DEVNAMES Fri Sep 21 23:44:19 2001 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: DEVNAMES,v 1.75 2001/09/20 22:17:25 ad Exp $
+# $NetBSD: DEVNAMES,v 1.76 2001/09/21 23:44:19 ad Exp $
#
# This file contains all used device names and defined attributes in
# alphabetical order. New devices added to the system somewhere should first
@@ -239,6 +239,7 @@
dn vax
dp8390nic MI Attribute
dpt MI
+dpti MI
drbbc amiga
drbbc amigappc
drsc amiga
diff -r b799e1db4972 -r 07ce13ef62b2 sys/dev/i2o/dpti.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/i2o/dpti.c Fri Sep 21 23:44:19 2001 +0000
@@ -0,0 +1,539 @@
+/* $NetBSD: dpti.c,v 1.1 2001/09/21 23:44:20 ad Exp $ */
+
+/*-
+ * Copyright (c) 2001 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Andrew Doran.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
+ * Copyright (c) 2000 Adaptec Corporation
+ * All rights reserved.
+ *
+ * TERMS AND CONDITIONS OF USE
+ *
+ * Redistribution and use in source form, with or without modification, are
+ * permitted provided that redistributions of source code must retain the
+ * above copyright notice, this list of conditions and the following disclaimer.
+ *
+ * This software is provided `as is' by Adaptec and any express or implied
+ * warranties, including, but not limited to, the implied warranties of
+ * merchantability and fitness for a particular purpose, are disclaimed. In no
+ * event shall Adaptec be liable for any direct, indirect, incidental, special,
+ * exemplary or consequential damages (including, but not limited to,
+ * procurement of substitute goods or services; loss of use, data, or profits;
+ * or business interruptions) however caused and on any theory of liability,
+ * whether in contract, strict liability, or tort (including negligence or
+ * otherwise) arising in any way out of the use of this driver software, even
+ * if advised of the possibility of such damage.
+ */
+
+/*
+ * Adaptec/DPT I2O control interface.
+ */
+
+#include "opt_i2o.h"
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/kernel.h>
+#include <sys/device.h>
+#include <sys/queue.h>
+#include <sys/proc.h>
+#include <sys/endian.h>
+#include <sys/malloc.h>
+#include <sys/conf.h>
+#include <sys/ioctl.h>
+
+#include <machine/bus.h>
+
+#include <dev/i2o/i2o.h>
+#include <dev/i2o/i2odpt.h>
+#include <dev/i2o/iopio.h>
+#include <dev/i2o/iopvar.h>
+#include <dev/i2o/dptivar.h>
+
+#include <compat/linux/common/linux_types.h>
+#include <compat/linux/common/linux_ioctl.h>
+
+#ifdef I2ODEBUG
+#define DPRINTF(x) printf x
+#else
+#define DPRINTF(x)
+#endif
+
+static struct dpt_sig dpti_sig = {
+ { 'd', 'P', 't', 'S', 'i', 'G'}, SIG_VERSION, PROC_INTEL,
+ PROC_386 | PROC_486 | PROC_PENTIUM | PROC_SEXIUM, FT_HBADRVR, 0,
+ OEM_DPT, OS_FREE_BSD, CAP_ABOVE16MB, DEV_ALL,
+ ADF_ALL_SC5,
+ 0, 0, DPTI_VERSION, DPTI_REVISION, DPTI_SUBREVISION,
+ DPTI_MONTH, DPTI_DAY, DPTI_YEAR,
+ ""
+};
+
+void dpti_attach(struct device *, struct device *, void *);
+int dpti_blinkled(struct dpti_softc *);
+int dpti_ctlrinfo(struct dpti_softc *, u_long, caddr_t);
+int dpti_match(struct device *, struct cfdata *, void *);
+int dpti_passthrough(struct dpti_softc *, caddr_t, struct proc *);
+int dpti_sysinfo(struct dpti_softc *, u_long, caddr_t);
+
+cdev_decl(dpti);
+
+extern struct cfdriver dpti_cd;
Home |
Main Index |
Thread Index |
Old Index