Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/hp300 Switch hp300 to MI SCSI with MI mb89352 SPC S...



details:   https://anonhg.NetBSD.org/src/rev/ed4a83656b85
branches:  trunk
changeset: 550182:ed4a83656b85
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Fri Aug 01 01:18:39 2003 +0000

description:
Switch hp300 to MI SCSI with MI mb89352 SPC SCSI driver (at last),
and remove old hp300 MD oscsi support derived from 4.4BSD-Lite2.

diffstat:

 sys/arch/hp300/conf/GENERIC     |    16 +-
 sys/arch/hp300/conf/INSTALL     |    14 +-
 sys/arch/hp300/conf/files.hp300 |    25 +-
 sys/arch/hp300/dev/ac.c         |   550 -------------
 sys/arch/hp300/dev/acioctl.h    |    88 --
 sys/arch/hp300/dev/acvar.h      |    99 --
 sys/arch/hp300/dev/hp98265reg.h |    70 +
 sys/arch/hp300/dev/scsi.c       |  1584 ---------------------------------------
 sys/arch/hp300/dev/scsivar.h    |   129 ---
 sys/arch/hp300/dev/sd.c         |  1320 --------------------------------
 sys/arch/hp300/dev/sd_compat.c  |   131 ---
 sys/arch/hp300/dev/sdvar.h      |   101 --
 sys/arch/hp300/dev/spc.c        |   303 +++++++
 sys/arch/hp300/dev/st.c         |  1448 -----------------------------------
 sys/arch/hp300/dev/stvar.h      |   225 -----
 sys/arch/hp300/hp300/autoconf.c |    61 +-
 16 files changed, 417 insertions(+), 5747 deletions(-)

diffs (truncated from 6338 to 300 lines):

diff -r 90fccde95a4e -r ed4a83656b85 sys/arch/hp300/conf/GENERIC
--- a/sys/arch/hp300/conf/GENERIC       Fri Aug 01 01:01:37 2003 +0000
+++ b/sys/arch/hp300/conf/GENERIC       Fri Aug 01 01:18:39 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.93 2003/05/24 06:21:21 gmcgarry Exp $
+# $NetBSD: GENERIC,v 1.94 2003/08/01 01:18:47 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.93 $"
+#ident                 "GENERIC-$Revision: 1.94 $"
 
 maxusers       32              # estimated number of users
 
@@ -218,11 +218,15 @@
 mt*            at hpibbus? slave ? punit ?     # HP-IB 9-track tape
 ppi0           at hpibbus0 slave 5 punit 0     # HP-IB plotter
 
-oscsi*         at dio? scode ?         # Old HP SCSI
+spc*           at dio? scode ?                 # HP 98265A SCSI
+scsibus*       at spc?
 
-sd*            at oscsi? target ? lun ?        # SCSI disks
-st*            at oscsi? target ? lun ?        # SCSI tapes
-ac*            at oscsi? target ? lun ?        # SCSI changers
+sd*            at scsibus? target ? lun ?      # SCSI disks
+st*            at scsibus? target ? lun ?      # SCSI tapes
+cd*            at scsibus? target ? lun ?      # SCSI CD-ROMs
+ch*            at scsibus? target ? lun ?      # SCSI changer devices
+ss*            at scsibus? target ? lun ?      # SCSI scanners
+uk*            at scsibus? target ? lun ?      # unknown SCSI devices
 
 #
 # Pseudo-devices
diff -r 90fccde95a4e -r ed4a83656b85 sys/arch/hp300/conf/INSTALL
--- a/sys/arch/hp300/conf/INSTALL       Fri Aug 01 01:01:37 2003 +0000
+++ b/sys/arch/hp300/conf/INSTALL       Fri Aug 01 01:18:39 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.9 2002/12/22 00:17:14 gmcgarry Exp $
+# $NetBSD: INSTALL,v 1.10 2003/08/01 01:18:47 tsutsui Exp $
 #
 # INSTALL machine description file
 #
@@ -186,11 +186,15 @@
 mt*            at hpibbus? slave ? punit ?     # HP-IB 9-track tape
 #ppi0          at hpibbus0 slave 5 punit 0     # HP-IB plotter
 
-oscsi*         at dio? scode ?         # Old HP SCSI
+spc*           at dio? scode ?                 # HP 98265A SCSI
+scsibus*       at spc?
 
-sd*            at oscsi? target ? lun ?        # SCSI disks
-st*            at oscsi? target ? lun ?        # SCSI tapes
-ac*            at oscsi? target ? lun ?        # SCSI changers
+sd*            at scsibus? target ? lun ?      # SCSI disks
+st*            at scsibus? target ? lun ?      # SCSI tapes
+cd*            at scsibus? target ? lun ?      # SCSI CD-ROMs
+#ch*           at scsibus? target ? lun ?      # SCSI changer devices
+#ss*           at scsibus? target ? lun ?      # SCSI scanners
+#uk*           at scsibus? target ? lun ?      # unknown SCSI devices
 
 pseudo-device  pty                     # pseudo-terminals
 #pseudo-device sl              4       # SLIP network interfaces
diff -r 90fccde95a4e -r ed4a83656b85 sys/arch/hp300/conf/files.hp300
--- a/sys/arch/hp300/conf/files.hp300   Fri Aug 01 01:01:37 2003 +0000
+++ b/sys/arch/hp300/conf/files.hp300   Fri Aug 01 01:18:39 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.hp300,v 1.67 2003/07/27 01:19:25 thorpej Exp $
+#      $NetBSD: files.hp300,v 1.68 2003/08/01 01:18:47 tsutsui Exp $
 #
 # hp300-specific configuration info
 
@@ -169,24 +169,13 @@
 attach ppi at hpibbus
 file   arch/hp300/dev/ppi.c            ppi needs-flag
 
-# Old HP SCSI layer
-device oscsi { target = -1, lun = -1 }
-attach oscsi at dio
-file   arch/hp300/dev/scsi.c           oscsi
+# MI SCSI
+include "dev/scsipi/files.scsipi"
 
-# Old HP SCSI devices
-device sd: disk
-attach sd at oscsi
-file   arch/hp300/dev/sd.c             sd needs-flag
-file   arch/hp300/dev/sd_compat.c      sd              # XXX
-
-device st: tape
-attach st at oscsi
-file   arch/hp300/dev/st.c             st needs-flag
-
-device ac
-attach ac at oscsi
-file   arch/hp300/dev/ac.c             ac needs-flag
+device spc: scsi
+attach spc at dio
+file   arch/hp300/dev/spc.c            spc needs-flag
+file   dev/ic/mb89352.c                spc
 
 # Memory Disk for ramdisk
 file   dev/md_root.c                   memory_disk_hooks
diff -r 90fccde95a4e -r ed4a83656b85 sys/arch/hp300/dev/ac.c
--- a/sys/arch/hp300/dev/ac.c   Fri Aug 01 01:01:37 2003 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,550 +0,0 @@
-/*     $NetBSD: ac.c,v 1.20 2003/06/29 22:28:15 fvdl Exp $     */
-
-/*-
- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
- * All rights reserved.
- *
- * This code is derived from software contributed to The NetBSD Foundation
- * by Jason R. Thorpe.
- *
- * 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) 1991 University of Utah.
- * Copyright (c) 1990, 1993
- *     The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * 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 University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University 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 REGENTS 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 REGENTS 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.
- *
- * from: Utah $Hdr: ac.c 1.5 92/01/21$
- *
- *     @(#)ac.c        8.2 (Berkeley) 1/12/94
- */
-
-/*
- * SCSI driver for MO autochanger.
- *
- * Very crude.  Because of the lack of connect/disconnect support in the
- * scsi driver, this driver can tie up the SCSI bus for a long time.  It
- * also grabs a DMA channel and holds it for the duration even though it
- * never uses it.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ac.c,v 1.20 2003/06/29 22:28:15 fvdl Exp $");
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/buf.h>
-#include <sys/device.h>
-#include <sys/errno.h>
-#include <sys/ioctl.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/conf.h>
-#include <sys/event.h>
-
-#include <hp300/dev/scsireg.h>
-#include <hp300/dev/scsivar.h>
-#include <hp300/dev/acioctl.h>
-#include <hp300/dev/acvar.h>
-
-static int     acmatch __P((struct device *, struct cfdata *, void *));
-static void    acattach __P((struct device *, struct device *, void *));
-
-CFATTACH_DECL(ac, sizeof(struct ac_softc),
-    acmatch, acattach, NULL, NULL);
-
-extern struct cfdriver ac_cd;
-
-dev_type_open(acopen);
-dev_type_close(acclose);
-dev_type_ioctl(acioctl);
-
-const struct cdevsw ac_cdevsw = {
-       acopen, acclose, noread, nowrite, acioctl,
-       nostop, notty, nopoll, nommap, nokqfilter,
-};
-
-void   acstart __P((void *));
-void   acgo __P((void *));
-void   acintr __P((void *, int));
-
-#ifdef DEBUG
-int ac_debug = 0x0000;
-#define ACD_FOLLOW     0x0001
-#define ACD_OPEN       0x0002
-#endif
-
-static int
-acmatch(parent, match, aux)
-       struct device *parent;
-       struct cfdata *match;
-       void *aux;
-{
-       struct oscsi_attach_args *osa = aux;
-
-       if (osa->osa_inqbuf->type != 8 || osa->osa_inqbuf->qual != 0x80 ||
-           osa->osa_inqbuf->version != 2)
-               return (0);
-
-       return (1);
-}
-
-static void
-acattach(parent, self, aux)
-       struct device *parent, *self;
-       void *aux;
-{
-       struct ac_softc *sc = (struct ac_softc *)self;
-       struct oscsi_attach_args *osa = aux;
-
-       printf("\n");
-
-       sc->sc_target = osa->osa_target;
-       sc->sc_lun = osa->osa_lun;
-
-       /* Initialize SCSI queue entry. */
-       sc->sc_sq.sq_softc = sc;
-       sc->sc_sq.sq_target = sc->sc_target;
-       sc->sc_sq.sq_lun = sc->sc_lun;
-       sc->sc_sq.sq_start = acstart;
-       sc->sc_sq.sq_go = acgo;
-       sc->sc_sq.sq_intr = acintr;
-
-       MALLOC(sc->sc_bp, struct buf *, sizeof(struct buf), M_DEVBUF, M_NOWAIT);
-       if (sc->sc_bp == NULL) {
-               printf("%s: memory allocation failed\n", sc->sc_dev.dv_xname);
-               return;
-       }
-       MALLOC(sc->sc_cmd, struct scsi_fmt_cdb *, sizeof(struct scsi_fmt_cdb),
-           M_DEVBUF, M_NOWAIT);
-       if (sc->sc_cmd == NULL) {
-               printf("%s: memory allocation failed\n", sc->sc_dev.dv_xname);
-               return;
-       }
-
-       sc->sc_flags = ACF_ALIVE;
-}
-
-/*ARGSUSED*/
-int
-acopen(dev, flag, mode, p)



Home | Main Index | Thread Index | Old Index