kernel: Remove support for the EISA bus and EISA/VLB devices.
authorSascha Wildner <saw@online.de>
Tue, 28 Dec 2010 17:42:20 +0000 (18:42 +0100)
committerSascha Wildner <saw@online.de>
Tue, 28 Dec 2010 17:43:03 +0000 (18:43 +0100)
Discussed-with-and-approved-by: dillon, aggelos, and others.
56 files changed:
Makefile_upgrade.inc
etc/devd.conf
share/man/man4/Makefile
share/man/man4/adv.4
share/man/man4/aha.4
share/man/man4/ahb.4 [deleted file]
share/man/man4/ahc.4
share/man/man4/bt.4
share/man/man4/dpt.4
share/man/man4/isa.4
share/man/man4/man4.i386/aic.4
share/man/man4/man4.i386/ep.4
share/man/man4/man4.i386/lnc.4
share/man/man4/mlx.4
share/man/man4/scsi.4
sys/bus/eisa/eisaconf.c [deleted file]
sys/bus/eisa/eisaconf.h [deleted file]
sys/conf/files
sys/config/GENERIC
sys/config/GENERIC_SMP
sys/config/LINT
sys/config/SOEKRIS
sys/config/X86_64_GENERIC
sys/config/X86_64_GENERIC_SMP
sys/dev/disk/advansys/adv_eisa.c [deleted file]
sys/dev/disk/advansys/advansys.c
sys/dev/disk/ahb/ahb.c [deleted file]
sys/dev/disk/ahb/ahbreg.h [deleted file]
sys/dev/disk/aic7xxx/ahc/Makefile
sys/dev/disk/aic7xxx/ahc/ahc_eisa/Makefile [deleted file]
sys/dev/disk/aic7xxx/ahc/ahc_isa/Makefile [deleted file]
sys/dev/disk/aic7xxx/ahc_eisa.c [deleted file]
sys/dev/disk/aic7xxx/ahc_isa.c [deleted file]
sys/dev/disk/aic7xxx/aic7770.c [deleted file]
sys/dev/disk/aic7xxx/aic7xxx.c
sys/dev/disk/aic7xxx/aic7xxx.h
sys/dev/disk/aic7xxx/aic7xxx_osm.c
sys/dev/disk/aic7xxx/aic7xxx_osm.h
sys/dev/disk/buslogic/bt.c
sys/dev/disk/buslogic/bt_eisa.c [deleted file]
sys/dev/disk/buslogic/bt_isa.c
sys/dev/disk/buslogic/btreg.h
sys/dev/netif/ep/if_ep_eisa.c [deleted file]
sys/dev/netif/vx/Makefile
sys/dev/netif/vx/if_vx_eisa.c [deleted file]
sys/dev/raid/dpt/dpt_eisa.c [deleted file]
sys/dev/raid/dpt/dpt_scsi.c
sys/dev/raid/ida/ida.c
sys/dev/raid/ida/ida_eisa.c [deleted file]
sys/dev/serial/si/si_eisa.c [deleted file]
sys/dev/serial/stli/istallion.c
sys/platform/pc32/conf/files
sys/platform/pc32/conf/options
sys/platform/pc32/i386/userconfig.c
usr.sbin/stallion/bootcode/stl.4
usr.sbin/stallion/stlstty/stlstty.8

index b3014b5..9281e8d 100644 (file)
@@ -1546,6 +1546,10 @@ TO_REMOVE+=/usr/include/sys/hotplug.h
 TO_REMOVE+=/usr/share/man/cat4/hotplug.4.gz
 TO_REMOVE+=/usr/share/man/man4/hotplug.4.gz
 TO_REMOVE+=/usr/include/sys/dm.h
+TO_REMOVE+=/usr/share/man/cat4/ahb.4.gz
+TO_REMOVE+=/usr/share/man/man4/ahb.4.gz
+TO_REMOVE+=/boot/kernel/ahc_eisa.ko
+TO_REMOVE+=/boot/kernel/ahc_isa.ko
 
 # XXX Remove when adjusted to the new 802.11 framework
 TO_REMOVE+=/boot/modules/if_acx.ko
index adbcfc7..f8b5464 100644 (file)
@@ -1,5 +1,4 @@
 # $FreeBSD: src/etc/devd.conf,v 1.42 2008/06/27 12:04:36 rpaulo Exp $
-# $DragonFly: src/etc/devd.conf,v 1.1 2008/10/03 00:26:20 hasso Exp $
 #
 # Refer to devd.conf(5) and devd(8) man pages for the details on how to
 # run and configure devd.
@@ -19,7 +18,7 @@ options {
        # Setup some shorthand for regex that we use later in the file.
        #XXX Yes, these are gross -- imp
        set scsi-controller-regex
-               "(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\
+               "(aac|adv|adw|aha|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|\
                esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)\
                [0-9]+";
 };
index d002fdf..0ad20e4 100644 (file)
@@ -19,7 +19,6 @@ MAN=  aac.4 \
        age.4 \
        agp.4 \
        aha.4 \
-       ahb.4 \
        ahc.4 \
        ahci.4 \
        ahd.4 \
index b1485d9..915f70f 100644 (file)
@@ -22,7 +22,6 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man4/adv.4,v 1.7.4.6 2001/10/01 13:07:22 dd Exp $
-.\" $DragonFly: src/share/man/man4/adv.4,v 1.4 2008/05/02 02:05:05 swildner Exp $
 .\"
 .Dd February 13, 2000
 .Dt ADV 4
@@ -148,7 +147,6 @@ resource allocation among devices.
 .Sh SEE ALSO
 .Xr adw 4 ,
 .Xr aha 4 ,
-.Xr ahb 4 ,
 .Xr ahc 4 ,
 .Xr cd 4 ,
 .Xr da 4 ,
index fd9f825..e5df7d9 100644 (file)
@@ -25,7 +25,6 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man4/aha.4,v 1.11.4.6 2001/10/01 13:07:22 dd Exp $
-.\" $DragonFly: src/share/man/man4/aha.4,v 1.2 2003/06/17 04:36:58 dillon Exp $
 .\"
 .Dd October 15, 1998
 .Dt AHA 4
@@ -42,11 +41,7 @@ This driver provides access to the
 bus connected to an Adaptec 154xA, 154xB, 154xC, 154xCF, or 154xCP
 host adapter.  Host adapters supporting a 154X compatible interface,
 such as some Tekram controllers and the Adaptec 174x in 154x
-emulation mode can, also be attached with this driver.  For optimum
-performance, Adaptec 174x controllers should be configured in
-enhanced mode and attached via the
-.Xr ahb 4
-driver.
+emulation mode can also be attached with this driver.
 .Pp
 One kernel config entry for every card to be attached by the system is
 required.  Specific values for the port address, irq, and drq may be
@@ -57,7 +52,6 @@ locations and attaches to the first unattached card it finds.  The possible
 port addresses for this card are 0x330, 0x334, 0x230, 0x234, 0x130, and
 0x134.
 .Sh SEE ALSO
-.Xr ahb 4 ,
 .Xr ahc 4 ,
 .Xr cd 4 ,
 .Xr da 4 ,
diff --git a/share/man/man4/ahb.4 b/share/man/man4/ahb.4
deleted file mode 100644 (file)
index 019ee68..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-.\"
-.\" Copyright (c) 1994 Wilko Bulte
-.\" All rights reserved.
-.\"
-.\" 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. The name of the author may not be used to endorse or promote products
-.\"    derived from this software without specific prior written permission
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
-.\"
-.\" $FreeBSD: src/share/man/man4/ahb.4,v 1.13.4.5 2001/10/01 13:07:22 dd Exp $
-.\" $DragonFly: src/share/man/man4/ahb.4,v 1.2 2003/06/17 04:36:58 dillon Exp $
-.\"
-.Dd October 15, 1998
-.Dt AHB 4
-.Os
-.Sh NAME
-.Nm ahb
-.Nd Adaptec EISA SCSI host adapter driver
-.Sh SYNOPSIS
-.Cd device ahb
-.Cd device scbus0 at ahb0
-.Sh DESCRIPTION
-This driver provides access to the
-.Tn SCSI
-bus connected to an Adaptec
-174x hostadapter in
-.Dq Em enhanced
-mode.
-Tagged queueing and synchronous SCSI transfers are supported.
-.Sh CAVEATS
-The Adaptec 174X is very sensitive to SCSI bus termination and cable
-length.  It may also have difficulties operating with some modern devices
-that, due to their speed, expose timing problems in the controller.  There
-are no known mechanisms for working around device incompatibilities of
-this nature.
-.Sh SEE ALSO
-.Xr aha 4 ,
-.Xr ahc 4 ,
-.Xr cd 4 ,
-.Xr da 4 ,
-.Xr sa 4 ,
-.Xr scsi 4
-.Sh AUTHORS
-The
-.Nm
-driver was written by
-.An Justin T. Gibbs .
index 7ac0908..be9372f 100644 (file)
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man4/ahc.4,v 1.38.2.1 2006/06/05 19:30:28 brueffer Exp $
-.\" $DragonFly: src/share/man/man4/ahc.4,v 1.7 2008/05/02 02:05:05 swildner Exp $
 .\"
 .Dd September 26, 2007
 .Dt AHC 4
 .Os
 .Sh NAME
 .Nm ahc
-.Nd Adaptec VL/EISA/PCI SCSI host adapter driver
+.Nd Adaptec PCI SCSI host adapter driver
 .Sh SYNOPSIS
 To compile this driver into the kernel,
 place the following lines in your
@@ -40,11 +39,6 @@ kernel configuration file:
 .Bd -ragged -offset indent
 .Cd "device scbus"
 .Cd "device ahc"
-.Pp
-For one or more VL/EISA cards:
-.Cd "device eisa"
-.Pp
-For one or more PCI cards:
 .Cd "device pci"
 .Pp
 To allow PCI adapters to use memory mapped I/O if enabled:
@@ -64,8 +58,6 @@ module at boot time, place the following lines in
 .Xr loader.conf 5 :
 .Bd -literal -offset indent
 ahc_load="YES"
-ahc_eisa_load="YES"
-ahc_isa_load="YES"
 ahc_pci_load="YES"
 .Ed
 .Sh DESCRIPTION
@@ -132,46 +124,20 @@ A value of 0x8a enables it for units 1, 3, and 7.
 .Pp
 Per target configuration performed in the
 .Tn SCSI-Select
-menu, accessible at boot
-in
-.No non- Ns Tn EISA
-models,
-or through an
-.Tn EISA
-configuration utility for
-.Tn EISA
-models,
-is honored by this driver.
+menu, accessible at boot, is honored by this driver.
 This includes synchronous/asynchronous transfers,
 maximum synchronous negotiation rate,
 wide transfers,
-disconnection,
-the host adapter's SCSI ID,
-and,
-in the case of
-.Tn EISA
-Twin Channel controllers,
-the primary channel selection.
+disconnection
+and the host adapter's SCSI ID.
 For systems that store non-volatile settings in a system specific manner
 rather than a serial eeprom directly connected to the aic7xxx controller,
 the
 .Tn BIOS
 must be enabled for the driver to access this information.
-This restriction applies to all
-.Tn EISA
-and many motherboard configurations.
+This restriction applies to many motherboard configurations.
 .Pp
-Note that I/O addresses are determined automatically by the probe routines,
-but care should be taken when using a 284x
-.Pq Tn VESA No local bus controller
-in an
-.Tn EISA
-system.
-The jumpers setting the I/O area for the 284x should match the
-.Tn EISA
-slot into which the card is inserted to prevent conflicts with other
-.Tn EISA
-cards.
+Note that I/O addresses are determined automatically by the probe routines.
 .Pp
 Performance and feature sets vary throughout the aic7xxx product line.
 The following table provides a comparison of the different chips supported
@@ -182,9 +148,8 @@ Note that wide and twin channel features, although always supported
 by a particular chip, may be disabled in a particular motherboard or card
 design.
 .Bd -ragged -compact
-.Bl -column "aic7770 " "MIPS " "EISA/VL " "MaxSync " "MaxWidth " "SCBs " "1 2 3 4 5 6 7 8 "
+.Bl -column "aic7850 " "MIPS " "PCI/32 " "MaxSync " "MaxWidth " "SCBs " "1 2 3 4 5 6 7 8 "
 .It Em Chip Ta Em MIPS Ta Em Bus Ta Em MaxSync Ta Em MaxWidth Ta Em SCBs Ta Em Features
-.It aic7770 Ta 10 Ta EISA/VL Ta 10MHz Ta 16Bit Ta 4 Ta 1
 .It aic7850 Ta 10 Ta PCI/32 Ta 10MHz Ta 8Bit Ta 3
 .It aic7860 Ta 10 Ta PCI/32 Ta 20MHz Ta 8Bit Ta 3
 .It aic7870 Ta 10 Ta PCI/32 Ta 10MHz Ta 16Bit Ta 16
@@ -437,7 +402,6 @@ more SCB space available, the less host bus traffic consumed saving
 and restoring SCB data.
 .Sh SEE ALSO
 .Xr aha 4 ,
-.Xr ahb 4 ,
 .Xr cd 4 ,
 .Xr da 4 ,
 .Xr sa 4 ,
index 357850d..417996b 100644 (file)
@@ -25,7 +25,6 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man4/bt.4,v 1.10.4.6 2001/10/01 13:07:23 dd Exp $
-.\" $DragonFly: src/share/man/man4/bt.4,v 1.5 2008/05/02 02:05:05 swildner Exp $
 .\"
 .Dd October 16, 1998
 .Dt BT 4
@@ -56,10 +55,6 @@ MultiMaster "C" Series Host Adapters:
 BT-946C   PCI     100     Fast SCSI-2
 BT-956C   PCI     100     Wide Fast SCSI-2
 BT-956CD  PCI     100     Wide Differential Fast SCSI-2
-BT-445C   VLB     100     Fast SCSI-2
-BT-747C   EISA    100     Fast SCSI-2
-BT-757C   EISA    100     Wide Fast SCSI-2
-BT-757CD  EISA    100     Wide Differential Fast SCSI-2
 BT-545C   ISA      50     Fast SCSI-2
 BT-540CF  ISA      50     Fast SCSI-2
 .El
@@ -67,21 +62,14 @@ BT-540CF  ISA      50     Fast SCSI-2
 MultiMaster "S" Series Host Adapters:
 .Pp
 .Em "Adapter   Bus   Commands  Description"
-BT-445S   VLB      30     Fast SCSI-2
-BT-747S   EISA     30     Fast SCSI-2
-BT-747D   EISA     30     Differential Fast SCSI-2
-BT-757S   EISA     30     Wide Fast SCSI-2
-BT-757D   EISA     30     Wide Differential Fast SCSI-2
 BT-545S   ISA      30     Fast SCSI-2
 BT-542D   ISA      30     Differential Fast SCSI-2
-BT-742A   EISA     30     SCSI-2 (742A revision H)
 BT-542B   ISA      30     SCSI-2 (542B revision H)
 .El
 .Bl -column "BT-956CD " "ISA " "Commands " Description
 MultiMaster "A" Series Host Adapters:
 .Pp
 .Em "Adapter   Bus   Commands  Description"
-BT-742A   EISA     30     SCSI-2 (742A revisions A - G)
 BT-542B   ISA      30     SCSI-2 (542B revisions A - G)
 .El
 .Ed
@@ -105,10 +93,8 @@ Core Driver Implementation
 MultiMaster Register Set and Core Driver Data Structures
 .It Pa /sys/dev/disk/buslogic/bt_pci.c
 PCI Bus Driver Attachment
-.It Pa /sys/dev/disk/buslogic/bt_eisa.c
-EISA Bus Driver Attachment
 .It Pa /sys/dev/disk/buslogic/bt_isa.c
-ISA/VL Bus Driver Attachment
+ISA Bus Driver Attachment
 .El
 .Sh SEE ALSO
 .Xr cd 4 ,
index bc443f9..2ec8d13 100644 (file)
@@ -22,7 +22,6 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man4/dpt.4,v 1.5.4.8 2002/01/12 04:08:50 bmah Exp $
-.\" $DragonFly: src/share/man/man4/dpt.4,v 1.5 2006/05/26 19:39:39 swildner Exp $
 .\"
 .Dd May 11, 2006
 .Dt DPT 4
 .Nm dpt
 .Nd DPT RAID Controller SCSI driver
 .Sh SYNOPSIS
-For one or more EISA Controllers
-.Cd "device eisa"
-.Cd "device dpt"
-.Pp
-For one or more PCI Controllers
 .Cd "device pci"
 .Cd "device dpt"
 .Sh DESCRIPTION
@@ -51,8 +45,6 @@ Core Driver Implementation
 Register Set and Core Driver Data Structures
 .It Pa /sys/dev/raid/dpt/dpt_pci.c
 PCI Bus Driver Attachment
-.It Pa /sys/dev/raid/dpt/dpt_eisa.c
-EISA Bus Driver Attachment
 .El
 .Sh SEE ALSO
 .Xr cd 4 ,
index ba9f4ee..f19d262 100644 (file)
@@ -64,8 +64,6 @@ Advansys SCSI host adapter driver
 Adaptec SCSI host adapter driver
 .It Xr aic 4
 Adaptec AIC-6260 and AIC-6360 SCSI driver
-.\".It Xr ahc 4
-.\"EISA/VL only?
 .It Xr bt 4
 Buslogic/Mylex MultiMaster SCSI host adapter driver
 .It Xr stg 4
index 9e37099..39d5cbc 100644 (file)
@@ -22,7 +22,6 @@
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man4/man4.i386/aic.4,v 1.6.2.3 2001/07/21 09:16:51 schweikh Exp $
-.\" $DragonFly: src/share/man/man4/man4.i386/aic.4,v 1.3 2008/01/05 22:44:08 pavalos Exp $
 .\"
 .Dd November 8, 2003
 .Dt AIC 4 i386
@@ -66,7 +65,6 @@ NEC PC-9801-100 (PC98)
 .El
 .Sh SEE ALSO
 .Xr aha 4 ,
-.Xr ahb 4 ,
 .Xr ahc 4 ,
 .Xr cd 4 ,
 .Xr ch 4 ,
index 2f3de11..f8229df 100644 (file)
@@ -41,7 +41,7 @@
 .Sh DESCRIPTION
 The
 .Nm
-device driver supports the 3c509 (ISA), 3c529 (MCA), 3c579 (EISA),
+device driver supports the 3c509 (ISA), 3c529 (MCA),
 and various PCMCIA cards including the 3c589.
 Various models of these cards come with a different assortment of
 connectors:
@@ -79,14 +79,6 @@ To find the card on the ISA bus, the kernel performs a complex
 scan operation at IO address 0x110.
 Beware!
 Avoid placing other cards at that address!
-.Pp
-Furthermore,
-the 3c509 should only
-be configured in EISA mode
-when installed in a computer that has actual EISA slots
-(and an EISA-aware BIOS).
-The normal driver auto-detection support
-is sufficient for non-EISA systems.
 .Sh DIAGNOSTICS
 .Bl -diag
 .It ep0: reset (status: %x)
index e841602..c041e0f 100644 (file)
@@ -99,17 +99,6 @@ CRC function.
 .\" .It
 .\" .Tn Digital DEPCA
 .\" .El
-.\" .Ss EISA
-.\" The
-.\" .Tn EISA
-.\" bus Ethernet cards supported by the
-.\" .Nm
-.\" driver are:
-.\" .Pp
-.\" .Bl -bullet -compact
-.\" .It
-.\" .Tn DEC DE422
-.\" .El
 .\" .Ss MCA
 .\" The
 .\" .Tn MCA
index 3f7d7cc..aafd34e 100644 (file)
@@ -225,7 +225,5 @@ and
 .An Michael Smith
 .Aq msmith@FreeBSD.org .
 .Sh BUGS
-The driver does not yet support EISA adapters.
-.Pp
 The driver does not yet support the version 6.x firmware as found in the
 AcceleRAID 352 and eXtremeRAID 2000 and 3000 products.
index 29aaeb2..f3539ce 100644 (file)
@@ -24,7 +24,6 @@
 .\" SUCH DAMAGE.
 .\"
 .\" $FreeBSD: src/share/man/man4/scsi.4,v 1.18.2.7 2001/08/17 13:08:39 ru Exp $
-.\" $DragonFly: src/share/man/man4/scsi.4,v 1.5 2008/02/10 00:01:01 pavalos Exp $
 .Dd October 15, 1998
 .Dt SCSI 4
 .Os
@@ -260,7 +259,6 @@ utility.  See
 for details.
 .Sh SEE ALSO
 .Xr aha 4 ,
-.Xr ahb 4 ,
 .Xr ahc 4 ,
 .Xr bt 4 ,
 .Xr cd 4 ,
diff --git a/sys/bus/eisa/eisaconf.c b/sys/bus/eisa/eisaconf.c
deleted file mode 100644 (file)
index a75336c..0000000
+++ /dev/null
@@ -1,606 +0,0 @@
-/*
- * EISA bus probe and attach routines 
- *
- * Copyright (c) 1995, 1996 Justin T. Gibbs.
- * All rights reserved.
- * 
- * 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 immediately at the beginning of the file, without modification,
- *    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. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/sys/dev/eisa/eisaconf.c,v 1.55 2000/01/14 07:13:57 peter Exp $
- * $DragonFly: src/sys/bus/eisa/eisaconf.c,v 1.11 2006/12/22 23:12:16 swildner Exp $
- */
-
-#include "opt_eisa.h"
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/queue.h>
-#include <sys/malloc.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-
-#include <machine/limits.h>
-#include <sys/rman.h>
-
-#include "eisaconf.h"
-
-typedef struct resvaddr {
-        u_long addr;                           /* start address */
-        u_long size;                           /* size of reserved area */
-       int     flags;
-       struct resource *res;                   /* resource manager handle */
-       LIST_ENTRY(resvaddr) links;             /* List links */
-} resvaddr_t;
-
-LIST_HEAD(resvlist, resvaddr);
-
-struct irq_node {
-       int     irq_no;
-       int     irq_trigger;
-       void    *idesc;
-       TAILQ_ENTRY(irq_node) links;
-};
-
-TAILQ_HEAD(irqlist, irq_node);
-
-struct eisa_ioconf {
-       int             slot;
-       struct resvlist ioaddrs;        /* list of reserved I/O ranges */
-       struct resvlist maddrs;         /* list of reserved memory ranges */
-       struct irqlist  irqs;           /* list of reserved irqs */
-};
-
-/* To be replaced by the "super device" generic device structure... */
-struct eisa_device {
-       eisa_id_t               id;
-       struct eisa_ioconf      ioconf;
-};
-
-
-/* Global variable, so UserConfig can change it. */
-#define MAX_COL                79
-#ifndef EISA_SLOTS
-#define EISA_SLOTS 10   /* PCI clashes with higher ones.. fix later */
-#endif
-int num_eisa_slots = EISA_SLOTS;
-
-static devclass_t eisa_devclass;
-
-static void eisa_reg_print(device_t, char *, char *, int *);
-static struct irq_node * eisa_find_irq(struct eisa_device *e_dev, int rid);
-static struct resvaddr * eisa_find_maddr(struct eisa_device *e_dev, int rid);
-static struct resvaddr * eisa_find_ioaddr(struct eisa_device *e_dev, int rid);
-
-static int
-mainboard_probe(device_t dev)
-{
-       char *idstring;
-       eisa_id_t id = eisa_get_id(dev);
-
-       if (eisa_get_slot(dev) != 0)
-               return (ENXIO);
-
-       idstring = kmalloc(8 + sizeof(" (System Board)") + 1,
-                           M_DEVBUF, M_INTWAIT);
-       ksprintf(idstring, "%c%c%c%03x%01x (System Board)",
-                EISA_MFCTR_CHAR0(id),
-                EISA_MFCTR_CHAR1(id),
-                EISA_MFCTR_CHAR2(id),
-                EISA_PRODUCT_ID(id),
-                EISA_REVISION_ID(id));
-       device_set_desc(dev, idstring);
-
-       return (0);
-}
-
-static int
-mainboard_attach(device_t dev)
-{
-       return (0);
-}
-
-static device_method_t mainboard_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         mainboard_probe),
-       DEVMETHOD(device_attach,        mainboard_attach),
-
-       { 0, 0 }
-};
-
-static driver_t mainboard_driver = {
-       "mainboard",
-       mainboard_methods,
-       1,
-};
-
-static devclass_t mainboard_devclass;
-
-DRIVER_MODULE(mainboard, eisa, mainboard_driver, mainboard_devclass, 0, 0);
-               
-/*
-** probe for EISA devices
-*/
-static int
-eisa_probe(device_t dev)
-{
-       int i,slot;
-       struct eisa_device *e_dev;
-       device_t child;
-       int eisaBase = 0xc80;
-       eisa_id_t eisa_id;
-       int devices_found = 0;
-
-       device_set_desc(dev, "EISA bus");
-
-       for (slot = 0; slot < num_eisa_slots; eisaBase+=0x1000, slot++) {
-               int id_size = sizeof(eisa_id);
-               eisa_id = 0;
-               for( i = 0; i < id_size; i++ ) {
-                       outb(eisaBase,0x80 + i); /*Some cards require priming*/
-                       eisa_id |= inb(eisaBase+i) << ((id_size-i-1)*CHAR_BIT);
-               }
-               if (eisa_id & 0x80000000) {
-                       if (slot == 0)
-                               break;
-                       continue;  /* no EISA card in slot */
-               }
-
-               devices_found++;
-
-               /* Prepare an eisa_device_node for this slot */
-               e_dev = kmalloc(sizeof(*e_dev), M_DEVBUF, M_INTWAIT | M_ZERO);
-
-               e_dev->id = eisa_id;
-               e_dev->ioconf.slot = slot; 
-
-               /* Initialize our lists of reserved addresses */
-               LIST_INIT(&(e_dev->ioconf.ioaddrs));
-               LIST_INIT(&(e_dev->ioconf.maddrs));
-               TAILQ_INIT(&(e_dev->ioconf.irqs));
-
-               child = device_add_child(dev, NULL, -1);
-               device_set_ivars(child, e_dev);
-       }
-
-       /*
-        * EISA busses themselves are not easily detectable, the easiest way
-        * to tell if there is an eisa bus is if we found something - there
-        * should be a motherboard "card" there somewhere.
-        */
-       return devices_found ? 0 : ENXIO;
-}
-
-static void
-eisa_probe_nomatch(device_t dev, device_t child)
-{
-       u_int32_t       eisa_id = eisa_get_id(child);
-       u_int8_t        slot = eisa_get_slot(child);
-
-       device_printf(dev, "unknown card %c%c%c%03x%01x (0x%08x) at slot %d\n",
-               EISA_MFCTR_CHAR0(eisa_id),
-               EISA_MFCTR_CHAR1(eisa_id),
-               EISA_MFCTR_CHAR2(eisa_id),
-               EISA_PRODUCT_ID(eisa_id),
-               EISA_REVISION_ID(eisa_id),
-               eisa_id,
-               slot);
-
-       return;
-}
-
-static void
-eisa_reg_print(device_t dev, char *string, char *separator, int *column)
-{
-       int length = strlen(string);
-
-       length += (separator ? 2 : 1);
-
-       if (((*column) + length) >= MAX_COL) {
-               kprintf("\n");
-               (*column) = 0;
-       } else if ((*column) != 0) {
-               if (separator) {
-                       kprintf("%c", *separator);
-                       (*column)++;
-               }
-               kprintf(" ");
-               (*column)++;
-       }
-
-       if ((*column) == 0) {
-               (*column) += device_printf(dev, "%s", string);
-       } else {
-               (*column) += kprintf("%s", string);
-       }
-
-       return;
-}
-
-static int
-eisa_print_child(device_t dev, device_t child)
-{
-       char                    buf[81];
-       struct eisa_device *    e_dev = device_get_ivars(child);
-       int                     rid;
-       struct irq_node *       irq;
-       struct resvaddr *       resv;
-       char                    separator = ',';
-       int                     column = 0;
-       int                     retval = 0;
-
-       if (device_get_desc(child)) {
-               ksnprintf(buf, sizeof(buf), "<%s>", device_get_desc(child));
-               eisa_reg_print(child, buf, NULL, &column);
-       }
-
-       rid = 0;
-       while ((resv = eisa_find_ioaddr(e_dev, rid++))) {
-               if ((resv->size == 1) ||
-                   (resv->flags & RESVADDR_BITMASK)) {
-                       ksnprintf(buf, sizeof(buf), "%s%lx",
-                               ((rid == 1) ? "at 0x" : "0x"),
-                               resv->addr);
-               } else {
-                       ksnprintf(buf, sizeof(buf), "%s%lx-0x%lx",
-                               ((rid == 1) ? "at 0x" : "0x"),
-                               resv->addr,
-                               (resv->addr + (resv->size - 1)));
-               }
-               eisa_reg_print(child, buf, 
-                       ((rid == 2) ? &separator : NULL), &column);
-       }
-
-       rid = 0;
-       while ((resv = eisa_find_maddr(e_dev, rid++))) {
-               if ((resv->size == 1) ||
-                   (resv->flags & RESVADDR_BITMASK)) {
-                       ksnprintf(buf, sizeof(buf), "%s%lx",
-                               ((rid == 1) ? "at 0x" : "0x"),
-                               resv->addr);
-               } else {
-                       ksnprintf(buf, sizeof(buf), "%s%lx-0x%lx",
-                               ((rid == 1) ? "at 0x" : "0x"),
-                               resv->addr,
-                               (resv->addr + (resv->size - 1)));
-               }
-               eisa_reg_print(child, buf, 
-                       ((rid == 2) ? &separator : NULL), &column);
-       }
-
-       rid = 0;
-       while ((irq = eisa_find_irq(e_dev, rid++)) != NULL) {
-               ksnprintf(buf, sizeof(buf), "irq %d (%s)", irq->irq_no,
-                        (irq->irq_trigger ? "level" : "edge"));
-               eisa_reg_print(child, buf, 
-                       ((rid == 1) ? &separator : NULL), &column);
-       }
-
-       ksnprintf(buf, sizeof(buf), "on %s slot %d\n",
-               device_get_nameunit(dev), eisa_get_slot(child));
-       eisa_reg_print(child, buf, NULL, &column);
-
-       return (retval);
-}
-
-static struct irq_node *
-eisa_find_irq(struct eisa_device *e_dev, int rid)
-{
-       int i;
-       struct irq_node *irq;
-
-       for (i = 0, irq = TAILQ_FIRST(&e_dev->ioconf.irqs);
-            i < rid && irq;
-            i++, irq = TAILQ_NEXT(irq, links))
-               ;
-       
-       if (irq)
-               return (irq);
-       else
-               return (NULL);
-}
-
-static struct resvaddr *
-eisa_find_maddr(struct eisa_device *e_dev, int rid)
-{
-       int i;
-       struct resvaddr *resv;
-
-       for (i = 0, resv = LIST_FIRST(&e_dev->ioconf.maddrs);
-            i < rid && resv;
-            i++, resv = LIST_NEXT(resv, links))
-               ;
-
-       return resv;
-}
-
-static struct resvaddr *
-eisa_find_ioaddr(struct eisa_device *e_dev, int rid)
-{
-       int i;
-       struct resvaddr *resv;
-
-       for (i = 0, resv = LIST_FIRST(&e_dev->ioconf.ioaddrs);
-            i < rid && resv;
-            i++, resv = LIST_NEXT(resv, links))
-               ;
-
-       return resv;
-}
-
-static int
-eisa_read_ivar(device_t dev, device_t child, int which, u_long *result)
-{
-       struct eisa_device *e_dev = device_get_ivars(child);
-       struct irq_node *irq;
-
-       switch (which) {
-       case EISA_IVAR_SLOT:
-               *result = e_dev->ioconf.slot;
-               break;
-               
-       case EISA_IVAR_ID:
-               *result = e_dev->id;
-               break;
-
-       case EISA_IVAR_IRQ:
-               /* XXX only first irq */
-               if ((irq = eisa_find_irq(e_dev, 0)) != NULL) {
-                       *result = irq->irq_no;
-               } else {
-                       *result = -1;
-               }
-               break;
-
-       default:
-               return (ENOENT);
-       }
-
-       return (0);
-}
-
-static int
-eisa_write_ivar(device_t dev, device_t child, int which, uintptr_t value)
-{
-       return (EINVAL);
-}
-
-static struct resource *
-eisa_alloc_resource(device_t dev, device_t child, int type, int *rid,
-                   u_long start, u_long end, u_long count, u_int flags)
-{
-       int isdefault;
-       struct eisa_device *e_dev = device_get_ivars(child);
-       struct resource *rv, **rvp = 0;
-
-       isdefault = (device_get_parent(child) == dev
-                    && start == 0UL && end == ~0UL && count == 1);
-
-       switch (type) {
-       case SYS_RES_IRQ:
-               if (isdefault) {
-                       struct irq_node * irq = eisa_find_irq(e_dev, *rid);
-                       if (irq == NULL)
-                               return 0;
-                       start = end = irq->irq_no;
-                       count = 1;
-                       if (irq->irq_trigger == EISA_TRIGGER_LEVEL) {
-                               flags |= RF_SHAREABLE;
-                       } else {
-                               flags &= ~RF_SHAREABLE;
-                       }
-               }
-               break;
-
-       case SYS_RES_MEMORY:
-               if (isdefault) {
-                       struct resvaddr *resv;
-
-                       resv = eisa_find_maddr(e_dev, *rid);
-                       if (!resv)
-                               return 0;
-
-                       start = resv->addr;
-                       end = resv->addr + (resv->size - 1);
-                       count = resv->size;
-                       rvp = &resv->res;
-               }
-               break;
-
-       case SYS_RES_IOPORT:
-               if (isdefault) {
-                       struct resvaddr *resv;
-
-                       resv = eisa_find_ioaddr(e_dev, *rid);
-                       if (!resv)
-                               return 0;
-
-                       start = resv->addr;
-                       end = resv->addr + (resv->size - 1);
-                       count = resv->size;
-                       rvp = &resv->res;
-               }
-               break;
-
-       default:
-               return 0;
-       }
-
-       rv = BUS_ALLOC_RESOURCE(device_get_parent(dev), child,
-                                type, rid, start, end, count, flags);
-       if (rvp)
-               *rvp = rv;
-
-       return rv;
-}
-
-static int
-eisa_release_resource(device_t dev, device_t child, int type, int rid,
-                     struct resource *r)
-{
-       int rv;
-       struct eisa_device *e_dev = device_get_ivars(child);
-       struct resvaddr *resv = 0;
-
-       switch (type) {
-       case SYS_RES_IRQ:
-               if (eisa_find_irq(e_dev, rid) == NULL)
-                       return EINVAL;
-               break;
-
-       case SYS_RES_MEMORY:
-               if (device_get_parent(child) == dev)
-                       resv = eisa_find_maddr(e_dev, rid);
-               break;
-
-
-       case SYS_RES_IOPORT:
-               if (device_get_parent(child) == dev)
-                       resv = eisa_find_ioaddr(e_dev, rid);
-               break;
-
-       default:
-               return (ENOENT);
-       }
-
-       rv = BUS_RELEASE_RESOURCE(device_get_parent(dev), child, type, rid, r);
-
-       if (rv == 0) {
-               if (resv)
-                       resv->res = 0;
-       }
-
-       return rv;
-}
-
-int
-eisa_add_intr(device_t dev, int irq, int trigger)
-{
-       struct eisa_device *e_dev = device_get_ivars(dev);
-       struct irq_node *irq_info;
-       irq_info = kmalloc(sizeof(*irq_info), M_DEVBUF, M_INTWAIT);
-       irq_info->irq_no = irq;
-       irq_info->irq_trigger = trigger;
-       irq_info->idesc = NULL;
-       TAILQ_INSERT_TAIL(&e_dev->ioconf.irqs, irq_info, links);
-       return 0;
-}
-
-static int
-eisa_add_resvaddr(struct eisa_device *e_dev, struct resvlist *head, u_long base,
-                 u_long size, int flags)
-{
-       resvaddr_t *reservation;
-
-       reservation = kmalloc(sizeof(resvaddr_t), M_DEVBUF, M_INTWAIT);
-       reservation->addr = base;
-       reservation->size = size;
-       reservation->flags = flags;
-
-       if (!head->lh_first) {
-               LIST_INSERT_HEAD(head, reservation, links);
-       }
-       else {
-               resvaddr_t *node;
-               for(node = head->lh_first; node; node = node->links.le_next) {
-                       if (node->addr > reservation->addr) {
-                               /*
-                                * List is sorted in increasing
-                                * address order.
-                                */
-                               LIST_INSERT_BEFORE(node, reservation, links);
-                               break;
-                       }
-
-                       if (node->addr == reservation->addr) {
-                               /*
-                                * If the entry we want to add
-                                * matches any already in here,
-                                * fail.
-                                */
-                               kfree(reservation, M_DEVBUF);
-                               return (EEXIST);
-                       }
-
-                       if (!node->links.le_next) {
-                               LIST_INSERT_AFTER(node, reservation, links);
-                               break;
-                       }
-               }
-       }
-       return (0);
-}
-
-int
-eisa_add_mspace(device_t dev, u_long mbase, u_long msize, int flags)
-{
-       struct eisa_device *e_dev = device_get_ivars(dev);
-
-       return  eisa_add_resvaddr(e_dev, &(e_dev->ioconf.maddrs), mbase, msize,
-                                 flags);
-}
-
-int
-eisa_add_iospace(device_t dev, u_long iobase, u_long iosize, int flags)
-{
-       struct eisa_device *e_dev = device_get_ivars(dev);
-
-       return  eisa_add_resvaddr(e_dev, &(e_dev->ioconf.ioaddrs), iobase,
-                                 iosize, flags);
-}
-
-static device_method_t eisa_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         eisa_probe),
-       DEVMETHOD(device_attach,        bus_generic_attach),
-       DEVMETHOD(device_shutdown,      bus_generic_shutdown),
-       DEVMETHOD(device_suspend,       bus_generic_suspend),
-       DEVMETHOD(device_resume,        bus_generic_resume),
-
-       /* Bus interface */
-       DEVMETHOD(bus_print_child,      eisa_print_child),
-       DEVMETHOD(bus_probe_nomatch,    eisa_probe_nomatch),
-       DEVMETHOD(bus_read_ivar,        eisa_read_ivar),
-       DEVMETHOD(bus_write_ivar,       eisa_write_ivar),
-       DEVMETHOD(bus_driver_added,     bus_generic_driver_added),
-       DEVMETHOD(bus_alloc_resource,   eisa_alloc_resource),
-       DEVMETHOD(bus_release_resource, eisa_release_resource),
-       DEVMETHOD(bus_activate_resource, bus_generic_activate_resource),
-       DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource),
-       DEVMETHOD(bus_setup_intr,       bus_generic_setup_intr),
-       DEVMETHOD(bus_teardown_intr,    bus_generic_teardown_intr),
-
-       { 0, 0 }
-};
-
-static driver_t eisa_driver = {
-       "eisa",
-       eisa_methods,
-       1,                      /* no softc */
-};
-
-DRIVER_MODULE(eisa, isab, eisa_driver, eisa_devclass, 0, 0);
-DRIVER_MODULE(eisa, nexus, eisa_driver, eisa_devclass, 0, 0);
diff --git a/sys/bus/eisa/eisaconf.h b/sys/bus/eisa/eisaconf.h
deleted file mode 100644 (file)
index 6f58197..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * EISA bus device definitions
- *
- * Copyright (c) 1995, 1996 Justin T. Gibbs.
- * All rights reserved.
- * 
- * 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 immediately at the beginning of the file, without modification,
- *    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. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/sys/dev/eisa/eisaconf.h,v 1.20 1999/08/28 00:43:39 peter Exp $
- * $DragonFly: src/sys/bus/eisa/eisaconf.h,v 1.4 2006/10/23 21:50:31 dillon Exp $
- */
-
-#ifndef _BUS_EISA_EISACONF_H_
-#define _BUS_EISA_EISACONF_H_
-
-#define EISA_SLOT_SIZE 0x1000
-
-#define EISA_MFCTR_CHAR0(ID) (char)(((ID>>26) & 0x1F) | '@')  /* Bits 26-30 */
-#define EISA_MFCTR_CHAR1(ID) (char)(((ID>>21) & 0x1F) | '@')  /* Bits 21-25 */
-#define EISA_MFCTR_CHAR2(ID) (char)(((ID>>16) & 0x1F) | '@')  /* Bits 16-20 */
-#define EISA_MFCTR_ID(ID)    (short)((ID>>16) & 0xFF)        /* Bits 16-31 */
-#define EISA_PRODUCT_ID(ID)  (short)((ID>>4)  & 0xFFF)        /* Bits  4-15 */
-#define EISA_REVISION_ID(ID) (u_char)(ID & 0x0F)              /* Bits  0-3  */
-
-extern int num_eisa_slots;
-
-typedef u_int32_t eisa_id_t;
-
-enum eisa_device_ivars {
-    EISA_IVAR_SLOT,
-    EISA_IVAR_ID,
-    EISA_IVAR_IRQ
-};
-
-#define EISA_TRIGGER_EDGE       0x0
-#define EISA_TRIGGER_LEVEL      0x1
-
-/*
- * Simplified accessors for isa devices
- */
-#define EISA_ACCESSOR(A, B, T)                                          \
-                                                                        \
-static __inline T eisa_get_ ## A(device_t dev)                          \
-{                                                                       \
-       uintptr_t v;                                                     \
-       BUS_READ_IVAR(device_get_parent(dev), dev, EISA_IVAR_ ## B, &v); \
-       return (T) v;                                                    \
-}                                                                       \
-                                                                        \
-static __inline void eisa_set_ ## A(device_t dev, T t)                  \
-{                                                                       \
-       u_long v = (u_long) t;                                           \
-       BUS_WRITE_IVAR(device_get_parent(dev), dev, EISA_IVAR_ ## B, v); \
-}
-
-EISA_ACCESSOR(slot, SLOT, int)
-EISA_ACCESSOR(id, ID, eisa_id_t)
-EISA_ACCESSOR(irq, IRQ, eisa_id_t)
-
-int eisa_add_intr (device_t, int, int);
-
-#define                RESVADDR_NONE           0x00
-#define                RESVADDR_BITMASK        0x01    /* size is a mask of reserved 
-                                                * bits at addr
-                                                */
-#define                RESVADDR_RELOCATABLE    0x02
-int eisa_add_iospace (device_t, u_long, u_long, int);
-int eisa_add_mspace (device_t, u_long, u_long, int);
-
-#endif /* _BUS_EISA_EISACONF_H_ */
index 8a38751..00dd9b7 100644 (file)
@@ -134,7 +134,6 @@ dev/pccard/cardbus/cardbus.c                optional cardbus
 dev/pccard/cardbus/cardbus_cis.c       optional cardbus
 dev/pccard/exca/exca.c                 optional cbb
 
-dev/disk/advansys/adv_eisa.c           optional adv eisa
 dev/disk/advansys/adv_pci.c            optional adv pci
 dev/disk/advansys/advansys.c           optional adv
 dev/disk/advansys/advlib.c             optional adv
@@ -200,12 +199,8 @@ dev/raid/amr/amr_disk.c                    optional amr
 dev/raid/amr/amr_pci.c                 optional amr pci
 dev/disk/aha/aha.c                     optional aha
 dev/disk/aha/aha_isa.c                 optional aha isa
-dev/disk/ahb/ahb.c                     optional ahb eisa
 dev/disk/aic/aic.c                     optional aic
 dev/disk/aic/aic_pccard.c              optional aic pccard
-dev/disk/aic7xxx/aic7770.c             optional ahc
-dev/disk/aic7xxx/ahc_eisa.c            optional ahc eisa
-dev/disk/aic7xxx/ahc_isa.c             optional ahc isa
 dev/disk/aic7xxx/ahc_pci.c             optional ahc pci
 dev/disk/aic7xxx/aic7xxx.c             optional ahc
 dev/disk/aic7xxx/aic7xxx_93cx6.c       optional ahc
@@ -312,7 +307,6 @@ dev/netif/bfe/if_bfe.c                      optional bfe
 dev/netif/bge/if_bge.c                 optional bge
 dev/disk/buslogic/bt.c                 optional bt
 dev/disk/buslogic/bt_isa.c             optional bt isa
-dev/disk/buslogic/bt_eisa.c            optional bt eisa
 dev/disk/buslogic/bt_pci.c             optional bt pci
 dev/disk/ccd/ccd.c                     optional ccd
 dev/raid/ciss/ciss.c                   optional ciss
@@ -324,14 +318,12 @@ dev/misc/dcons/dcons_crom.c       optional dcons_crom
 dev/misc/dcons/dcons_os.c      optional dcons
 #dev/raid/dpt/dpt_control.c    optional dpt
 dev/raid/dpt/dpt_scsi.c        optional dpt
-dev/raid/dpt/dpt_eisa.c        optional dpt eisa
 dev/raid/dpt/dpt_pci.c optional dpt pci
 dev/netif/ed/if_ed.c           optional nowerror ed
 dev/netif/ed/if_ed_pccard.c    optional ed pccard
 dev/netif/ed/if_ed_pci.c       optional ed pci
 dev/netif/ep/if_ep.c           optional ep
 dev/netif/ep/if_ep_isa.c       optional ep isa
-dev/netif/ep/if_ep_eisa.c      optional ep eisa
 dev/netif/ep/if_ep_pccard.c    optional ep pccard
 dev/netif/em/if_em.c           optional em
 dev/netif/emx/if_emx.c         optional emx
@@ -399,7 +391,6 @@ dev/powermng/kate/kate.c    optional kate pci
 dev/powermng/km/km.c           optional km pci
 dev/raid/ida/ida.c             optional ida
 dev/raid/ida/ida_disk.c        optional ida
-dev/raid/ida/ida_eisa.c        optional ida eisa
 dev/raid/ida/ida_pci.c optional ida pci
 dev/disk/isp/isp_freebsd.c     optional isp
 dev/disk/isp/isp.c             optional isp
@@ -707,7 +698,6 @@ bus/smbus/smb.c                     optional smb
 dev/serial/si/si.c             optional si
 dev/serial/si/si2_z280.c       optional si
 dev/serial/si/si3_t225.c       optional si
-dev/serial/si/si_eisa.c        optional si eisa
 dev/serial/si/si_isa.c         optional si isa
 dev/serial/si/si_pci.c         optional si pci
 dev/netif/sln/if_sln.c         optional sln pci
@@ -760,7 +750,6 @@ dev/raid/ips/ips_ioctl.c            optional ips
 dev/raid/ips/ips_pci.c                 optional ips
 dev/disk/vn/vn.c                       optional vn
 dev/netif/vx/if_vx.c                   optional vx
-dev/netif/vx/if_vx_eisa.c              optional vx eisa
 dev/netif/vx/if_vx_pci.c               optional vx pci
 dev/netif/wi/if_wi.c                   optional wi
 dev/netif/wi/if_wi_pccard.c            optional wi pccard
@@ -1649,7 +1638,6 @@ dev/video/meteor/meteor.c optional meteor pci
 dev/disk/ncr/ncr.c             optional ncr
 dev/disk/sym/sym_hipd.c                optional sym                            \
        dependency      "$S/dev/disk/sym/sym_{conf,defs}.h"
-bus/pci/eisa_pci.c             optional pci eisa
 bus/pci/fixup_pci.c            optional pci
 bus/pci/hostb_pci.c            optional pci
 bus/pci/ignore_pci.c           optional pci
index 9282b99..dc73e58 100644 (file)
@@ -78,7 +78,6 @@ options       DDB_TRACE
 options        INVARIANTS
 
 device         isa
-device         eisa
 device         pci
 
 # Floppy drives
@@ -124,7 +123,6 @@ options     ATA_STATIC_ID           # Static device numbering
 #options       ATA_STATIC_ID           #Static device numbering
 
 # SCSI Controllers
-device         ahb             # EISA AHA1742 family
 device         ahc             # AHA2940 and onboard AIC7xxx devices
 device         ahd             # AHA39320/29320 and onboard AIC79xx devices
 device         amd             # AMD 53C974 (Tekram DC-390(T))
index 323a971..57ba282 100644 (file)
@@ -79,7 +79,6 @@ options       DDB_TRACE
 options        INVARIANTS
 
 device         isa
-device         eisa
 device         pci
 
 # Floppy drives
@@ -125,7 +124,6 @@ options     ATA_STATIC_ID           # Static device numbering
 #options       ATA_STATIC_ID           #Static device numbering
 
 # SCSI Controllers
-device         ahb             # EISA AHA1742 family
 device         ahc             # AHA2940 and onboard AIC7xxx devices
 device         ahd             # AHA39320/29320 and onboard AIC79xx devices
 device         amd             # AMD 53C974 (Tekram DC-390(T))
index f845bbd..aa240a0 100644 (file)
@@ -1052,8 +1052,7 @@ options   MSGBUF_SIZE=40960
 #####################################################################
 # HARDWARE DEVICE CONFIGURATION
 
-# ISA and EISA devices:
-# EISA support is available for some device, so they can be auto-probed.
+# ISA devices:
 
 #
 # Mandatory ISA devices: isa, npx
@@ -1220,7 +1219,7 @@ device            npx0    at nexus? port IO_NPX flags 0x0 irq 13
 #
 
 #
-# Optional ISA and EISA devices:
+# Optional ISA devices:
 #
 
 #
@@ -1596,7 +1595,7 @@ device            "snd_uaudio"
 # si: Specialix SI/XIO 4-32 port terminal multiplexor
 # spic: Sony Programmable I/O controller (VAIO notebooks)
 # stl: Stallion EasyIO and EasyConnection 8/32 (ISA and PCI), EasyConnection 8/64 PCI
-# stli: Stallion EasyConnection 8/64 ISA/EISA, ONboard, Brumby (intelligent)
+# stli: Stallion EasyConnection 8/64 ISA, ONboard, Brumby (intelligent)
 # nmdm: nullmodem terminal driver (see nmdm(4))
 
 # Notes on APM
@@ -1662,9 +1661,7 @@ device            "snd_uaudio"
 #     to change src/sys/dev/serial/stl/stallion.c if you reconfigure this on the boards.
 #  The "flags" and "iosiz" settings on the stli driver depend on the board:
 #      EasyConnection 8/64 ISA:     flags 23         iosiz 0x1000
-#      EasyConnection 8/64 EISA:    flags 24         iosiz 0x10000
 #      ONboard ISA:                 flags 4          iosiz 0x10000
-#      ONboard EISA:                flags 7          iosiz 0x10000
 #      Brumby:                      flags 2          iosiz 0x4000
 #      Stallion:                    flags 1          iosiz 0x10000
 #  For the PCI cards, "device stl" will suffice.
@@ -1695,18 +1692,8 @@ device           stli0   at isa? port 0x2a0 iomem 0xcc000 flags 23 iosiz 0x1000
 # nullmodem terminal driver
 device         nmdm
 
-#
-# EISA devices:
-#
-# The EISA bus device is `eisa'.  It provides auto-detection and
-# configuration support for all devices on the EISA bus.
-#
-# The `ahb' device provides support for the Adaptec 174X adapter.
-#
 # The `ahc' device provides support for the Adaptec 274X and 284X
-# adapters.  The 284X, although a VLB card, responds to EISA probes.
-device         eisa
-device         ahb
+# adapters.
 device         ahc
 
 # The aic7xxx driver will attempt to use memory mapped I/O for all PCI
@@ -1719,14 +1706,6 @@ options  AHC_ALLOW_MEMIO
 # controllers that have it configured only if this option is set.
 options        ADW_ALLOW_MEMIO
 
-# By default, only 10 EISA slots are probed, since the slot numbers
-# above clash with the configuration address space of the PCI subsystem,
-# and the EISA probe is not very smart about this.  This is sufficient
-# for most machines, but in particular the HP NetServer LC series comes
-# with an onboard AIC7770 dual-channel SCSI controller on EISA slot #11,
-# thus you need to bump this figure to 12 for them.
-options        EISA_SLOTS=12
-
 #
 # PCI devices & PCI options:
 #
index 0f07d2b..ad849cb 100644 (file)
@@ -64,7 +64,6 @@ options       DDB_TRACE
 options        INVARIANTS
 
 device         isa
-device         eisa
 device         pci
 
 # NEW-ATA (NATA) and ATAPI devices
index b33cc4c..9c42e01 100644 (file)
@@ -110,7 +110,6 @@ options     ATA_STATIC_ID           # Static device numbering
 #options       ATA_STATIC_ID           #Static device numbering
 
 # SCSI Controllers
-device         ahb             # EISA AHA1742 family
 device         ahc             # AHA2940 and onboard AIC7xxx devices
 device         ahd             # AHA39320/29320 and onboard AIC79xx devices
 device         amd             # AMD 53C974 (Tekram DC-390(T))
index 1d23a3a..04adf51 100644 (file)
@@ -110,7 +110,6 @@ options     ATA_STATIC_ID           # Static device numbering
 #options       ATA_STATIC_ID           #Static device numbering
 
 # SCSI Controllers
-device         ahb             # EISA AHA1742 family
 device         ahc             # AHA2940 and onboard AIC7xxx devices
 device         ahd             # AHA39320/29320 and onboard AIC79xx devices
 device         amd             # AMD 53C974 (Tekram DC-390(T))
diff --git a/sys/dev/disk/advansys/adv_eisa.c b/sys/dev/disk/advansys/adv_eisa.c
deleted file mode 100644 (file)
index 62d834c..0000000
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * Device probe and attach routines for the following
- * Advanced Systems Inc. SCSI controllers:
- *
- *   Single Channel Products:
- *     ABP742 - Bus-Master EISA (240 CDB)
- *
- *   Dual Channel Products:  
- *     ABP752 - Dual Channel Bus-Master EISA (240 CDB Per Channel)
- *
- * Copyright (c) 1997 Justin Gibbs.
- * All rights reserved.
- *
- * 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,
- *    without modification, immediately at the beginning of the file.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/sys/dev/advansys/adv_eisa.c,v 1.9.2.1 2000/04/14 13:32:44 nyan Exp $
- * $DragonFly: src/sys/dev/disk/advansys/adv_eisa.c,v 1.7 2006/12/22 23:26:15 swildner Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#include <bus/eisa/eisaconf.h>
-
-#include "advansys.h"
-
-#define EISA_DEVICE_ID_ADVANSYS_740    0x04507400
-#define EISA_DEVICE_ID_ADVANSYS_750    0x04507500
-
-#define ADV_EISA_SLOT_OFFSET           0xc00
-#define ADV_EISA_OFFSET_CHAN1          0x30
-#define ADV_EISA_OFFSET_CHAN2          0x50
-#define ADV_EISA_IOSIZE                        0x100
-
-#define ADV_EISA_ROM_BIOS_ADDR_REG     0x86
-#define ADV_EISA_IRQ_BURST_LEN_REG     0x87
-#define        ADV_EISA_IRQ_MASK       0x07
-#define        ADV_EISA_IRQ_10         0x00
-#define        ADV_EISA_IRQ_11         0x01
-#define        ADV_EISA_IRQ_12         0x02
-#define        ADV_EISA_IRQ_14         0x04
-#define        ADV_EISA_IRQ_15         0x05
-
-#define        ADV_EISA_MAX_DMA_ADDR   (0x07FFFFFFL)
-#define        ADV_EISA_MAX_DMA_COUNT  (0x07FFFFFFL)
-
-/* 
- * The overrun buffer shared amongst all EISA adapters.
- */
-static u_int8_t*       overrun_buf;
-static bus_dma_tag_t   overrun_dmat;
-static bus_dmamap_t    overrun_dmamap;
-static bus_addr_t      overrun_physbase;
-
-static const char*
-adv_eisa_match(eisa_id_t type)
-{
-       switch (type & ~0xF) {
-       case EISA_DEVICE_ID_ADVANSYS_740:
-               return ("AdvanSys ABP-740/742 SCSI adapter");
-               break;
-       case EISA_DEVICE_ID_ADVANSYS_750:
-               return ("AdvanSys ABP-750/752 SCSI adapter");
-               break;
-       default:
-               break;
-       }
-       return (NULL);
-}
-
-static int
-adv_eisa_probe(device_t dev)
-{
-       const char *desc;
-       u_int32_t iobase;
-       u_int8_t irq;
-
-       desc = adv_eisa_match(eisa_get_id(dev));
-       if (!desc)
-               return (ENXIO);
-       device_set_desc(dev, desc);
-
-       iobase = (eisa_get_slot(dev) * EISA_SLOT_SIZE) + ADV_EISA_SLOT_OFFSET;
-
-       eisa_add_iospace(dev, iobase, ADV_EISA_IOSIZE, RESVADDR_NONE);
-       irq = inb(iobase + ADV_EISA_IRQ_BURST_LEN_REG);
-       irq &= ADV_EISA_IRQ_MASK;
-       switch (irq) {
-       case 0:
-       case 1:
-       case 2:
-       case 4:
-       case 5:
-           break;
-       default:
-           kprintf("adv at slot %d: illegal "
-                  "irq setting %d\n", eisa_get_slot(dev),
-                  irq);
-           return ENXIO;
-       }
-       eisa_add_intr(dev, irq + 10, EISA_TRIGGER_LEVEL);
-
-       return 0;
-}
-
-static int
-adv_eisa_attach(device_t dev)
-{
-       struct adv_softc *adv;
-       struct adv_softc *adv_b;
-       struct resource *io;
-       struct resource *irq;
-       int rid, error;
-       void *ih;
-
-       adv_b = NULL;
-
-       rid = 0;
-       io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
-                               0, ~0, 1, RF_ACTIVE);
-       if (!io) {
-               device_printf(dev, "No I/O space?!\n");
-               return ENOMEM;
-       }
-
-       rid = 0;
-       irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid,
-                                0, ~0, 1, RF_SHAREABLE | RF_ACTIVE);
-       if (!irq) {
-               device_printf(dev, "No irq?!\n");
-               bus_release_resource(dev, SYS_RES_IOPORT, 0, io);
-               return ENOMEM;
-
-       }
-
-       switch (eisa_get_id(dev) & ~0xF) {
-       case EISA_DEVICE_ID_ADVANSYS_750:
-               adv_b = adv_alloc(dev, rman_get_bustag(io),
-                                 rman_get_bushandle(io) + ADV_EISA_OFFSET_CHAN2);
-               if (adv_b == NULL)
-                       goto bad;
-               
-               /*
-                * Allocate a parent dmatag for all tags created
-                * by the MI portions of the advansys driver
-                */
-               /* XXX Should be a child of the PCI bus dma tag */
-               error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1,
-                                          /*boundary*/0,
-                                          /*lowaddr*/ADV_EISA_MAX_DMA_ADDR,
-                                          /*highaddr*/BUS_SPACE_MAXADDR,
-                                          /*filter*/NULL, /*filterarg*/NULL,
-                                          /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
-                                          /*nsegments*/BUS_SPACE_UNRESTRICTED,
-                                          /*maxsegsz*/ADV_EISA_MAX_DMA_COUNT,
-                                          /*flags*/0,
-                                          &adv_b->parent_dmat);
-               if (error != 0) {
-                       kprintf("%s: Could not allocate DMA tag - error %d\n",
-                              adv_name(adv_b), error);
-                       adv_free(adv_b);
-                       goto bad;
-               }
-
-               adv_b->init_level++;
-
-               /* FALLTHROUGH */
-       case EISA_DEVICE_ID_ADVANSYS_740:
-               adv = adv_alloc(dev, rman_get_bustag(io),
-                               rman_get_bushandle(io) + ADV_EISA_OFFSET_CHAN1);
-               if (adv == NULL) {
-                       if (adv_b != NULL)
-                               adv_free(adv_b);
-                       goto bad;
-               }
-
-               /*
-                * Allocate a parent dmatag for all tags created
-                * by the MI portions of the advansys driver
-                */
-               /* XXX Should be a child of the PCI bus dma tag */
-               error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1,
-                                          /*boundary*/0,
-                                          /*lowaddr*/ADV_EISA_MAX_DMA_ADDR,
-                                          /*highaddr*/BUS_SPACE_MAXADDR,
-                                          /*filter*/NULL, /*filterarg*/NULL,
-                                          /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
-                                          /*nsegments*/BUS_SPACE_UNRESTRICTED,
-                                          /*maxsegsz*/ADV_EISA_MAX_DMA_COUNT,
-                                          /*flags*/0,
-                                          &adv->parent_dmat);
-               if (error != 0) {
-                       kprintf("%s: Could not allocate DMA tag - error %d\n",
-                              adv_name(adv), error);
-                       adv_free(adv);
-                       goto bad;
-               }
-
-               adv->init_level++;
-               break;
-       default: 
-               kprintf("adveisaattach: Unknown device type!\n");
-               goto bad;
-               break;
-       }
-
-       if (overrun_buf == NULL) {
-               /* Need to allocate our overrun buffer */
-               if (bus_dma_tag_create(adv->parent_dmat,
-                                      /*alignment*/8,
-                                      /*boundary*/0,
-                                      ADV_EISA_MAX_DMA_ADDR,
-                                      BUS_SPACE_MAXADDR,
-                                      /*filter*/NULL,
-                                      /*filterarg*/NULL,
-                                      ADV_OVERRUN_BSIZE,
-                                      /*nsegments*/1,
-                                      BUS_SPACE_MAXSIZE_32BIT,
-                                      /*flags*/0,
-                                      &overrun_dmat) != 0) {
-                       adv_free(adv);
-                       goto bad;
-                       }
-               if (bus_dmamem_alloc(overrun_dmat,
-                                    (void *)&overrun_buf,
-                                    BUS_DMA_NOWAIT,
-                                    &overrun_dmamap) != 0) {
-                       bus_dma_tag_destroy(overrun_dmat);
-                       adv_free(adv);
-                       goto bad;
-               }
-               /* And permanently map it in */  
-               bus_dmamap_load(overrun_dmat, overrun_dmamap,
-                               overrun_buf, ADV_OVERRUN_BSIZE,
-                               adv_map, &overrun_physbase,
-                               /*flags*/0);
-       }
-       
-       /*
-        * Now that we know we own the resources we need, do the 
-        * card initialization.
-        */
-
-       /*
-        * Stop the chip.
-        */
-       ADV_OUTB(adv, ADV_CHIP_CTRL, ADV_CC_HALT);
-       ADV_OUTW(adv, ADV_CHIP_STATUS, 0);
-
-       adv->chip_version = EISA_REVISION_ID(eisa_get_id(dev))
-                         + ADV_CHIP_MIN_VER_EISA - 1;
-
-       if (adv_init(adv) != 0) {
-               adv_free(adv);
-               if (adv_b != NULL)
-                       adv_free(adv_b);
-               return(-1);
-       }
-
-       adv->max_dma_count = ADV_EISA_MAX_DMA_COUNT;
-       adv->max_dma_addr = ADV_EISA_MAX_DMA_ADDR;
-
-       if (adv_b != NULL) {
-               /*
-                * Stop the chip.
-                */
-               ADV_OUTB(adv_b, ADV_CHIP_CTRL, ADV_CC_HALT);
-               ADV_OUTW(adv_b, ADV_CHIP_STATUS, 0);
-
-               adv_b->chip_version = EISA_REVISION_ID(eisa_get_id(dev))
-                                   + ADV_CHIP_MIN_VER_EISA - 1;
-
-               if (adv_init(adv_b) != 0) {
-                       adv_free(adv_b);
-               } else {
-                       adv_b->max_dma_count = ADV_EISA_MAX_DMA_COUNT;
-                       adv_b->max_dma_addr = ADV_EISA_MAX_DMA_ADDR;
-               }
-       }
-
-       /*
-        * Enable our interrupt handler.
-        */
-       bus_setup_intr(dev, irq, 0, adv_intr, adv, &ih, NULL);
-
-       /* Attach sub-devices - always succeeds */
-       adv_attach(adv);
-       if (adv_b != NULL)
-               adv_attach(adv_b);
-
-       return 0;
-
- bad:
-       bus_release_resource(dev, SYS_RES_IOPORT, 0, io);
-       bus_release_resource(dev, SYS_RES_IRQ, 0, irq);
-       return -1;
-}
-
-static device_method_t adv_eisa_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         adv_eisa_probe),
-       DEVMETHOD(device_attach,        adv_eisa_attach),
-       { 0, 0 }
-};
-
-static driver_t adv_eisa_driver = {
-       "adv", adv_eisa_methods, sizeof(struct adv_softc)
-};
-
-static devclass_t adv_eisa_devclass;
-DRIVER_MODULE(adv, eisa, adv_eisa_driver, adv_eisa_devclass, 0, 0);
index 9bf86f5..2a2af51 100644 (file)
@@ -3,7 +3,6 @@
  * Product specific probe and attach routines can be found in:
  * 
  * i386/isa/adv_isa.c  ABP5140, ABP542, ABP5150, ABP842, ABP852
- * i386/eisa/adv_eisa.c        ABP742, ABP752
  * pci/adv_pci.c       ABP920, ABP930, ABP930U, ABP930UA, ABP940, ABP940U,
  *                     ABP940UA, ABP950, ABP960, ABP960U, ABP960UA,
  *                     ABP970, ABP970U
@@ -33,7 +32,6 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/advansys/advansys.c,v 1.14.2.4 2002/01/06 21:21:42 dwmalone Exp $
- * $DragonFly: src/sys/dev/disk/advansys/advansys.c,v 1.15 2008/05/18 20:30:20 pavalos Exp $
  */
 /*
  * Ported from:
diff --git a/sys/dev/disk/ahb/ahb.c b/sys/dev/disk/ahb/ahb.c
deleted file mode 100644 (file)
index 24a41eb..0000000
+++ /dev/null
@@ -1,1352 +0,0 @@
-/*
- * CAM SCSI device driver for the Adaptec 174X SCSI Host adapter
- *
- * Copyright (c) 1998 Justin T. Gibbs
- * All rights reserved.
- *
- * 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 immediately at the beginning of the file, without modification,
- *    this list of conditions, and the following disclaimer.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/sys/dev/ahb/ahb.c,v 1.18.2.3 2001/03/05 13:08:55 obrien Exp $
- * $DragonFly: src/sys/dev/disk/ahb/ahb.c,v 1.19 2008/05/18 20:30:21 pavalos Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-#include <sys/thread2.h>
-
-#include <machine/clock.h>
-
-#include <bus/cam/cam.h>
-#include <bus/cam/cam_ccb.h>
-#include <bus/cam/cam_sim.h>
-#include <bus/cam/cam_xpt_sim.h>
-#include <bus/cam/cam_debug.h>
-
-#include <bus/cam/scsi/scsi_message.h>
-
-#include <bus/eisa/eisaconf.h>
-
-#include "ahbreg.h"
-
-#define ccb_ecb_ptr spriv_ptr0
-#define ccb_ahb_ptr spriv_ptr1
-
-#define ahb_inb(ahb, port)                             \
-       bus_space_read_1((ahb)->tag, (ahb)->bsh, port)
-
-#define ahb_inl(ahb, port)                             \
-       bus_space_read_4((ahb)->tag, (ahb)->bsh, port)
-
-#define ahb_outb(ahb, port, value)                     \
-       bus_space_write_1((ahb)->tag, (ahb)->bsh, port, value)
-
-#define ahb_outl(ahb, port, value)                     \
-       bus_space_write_4((ahb)->tag, (ahb)->bsh, port, value)
-
-static const char              *ahbmatch(eisa_id_t type);
-static struct ahb_softc                *ahballoc(u_long unit, struct resource *res);
-static void                     ahbfree(struct ahb_softc *ahb);
-static int                      ahbreset(struct ahb_softc *ahb);
-static void                     ahbmapecbs(void *arg, bus_dma_segment_t *segs,
-                                           int nseg, int error);
-static int                      ahbxptattach(struct ahb_softc *ahb);
-static void                     ahbhandleimmed(struct ahb_softc *ahb,
-                                               u_int32_t mbox, u_int intstat);
-static void                     ahbcalcresid(struct ahb_softc *ahb,
-                                             struct ecb *ecb, union ccb *ccb);
-static __inline void            ahbdone(struct ahb_softc *ahb, u_int32_t mbox,
-                                        u_int intstat);
-static void                     ahbintr(void *arg);
-static bus_dmamap_callback_t    ahbexecuteecb;
-static void                     ahbaction(struct cam_sim *sim, union ccb *ccb);
-static void                     ahbpoll(struct cam_sim *sim);
-
-/* Our timeout handler */
-static timeout_t ahbtimeout;
-
-static __inline struct ecb*    ahbecbget(struct ahb_softc *ahb);
-static __inline void           ahbecbfree(struct ahb_softc* ahb,
-                                          struct ecb* ecb);
-static __inline u_int32_t      ahbecbvtop(struct ahb_softc *ahb,
-                                          struct ecb *ecb);
-static __inline struct ecb*    ahbecbptov(struct ahb_softc *ahb,
-                                          u_int32_t ecb_addr);
-static __inline u_int32_t      ahbstatuspaddr(u_int32_t ecb_paddr);
-static __inline u_int32_t      ahbsensepaddr(u_int32_t ecb_paddr);
-static __inline u_int32_t      ahbsgpaddr(u_int32_t ecb_paddr);
-static __inline void           ahbqueuembox(struct ahb_softc *ahb,
-                                            u_int32_t mboxval,
-                                            u_int attn_code);
-
-static __inline struct ecb*
-ahbecbget(struct ahb_softc *ahb)
-{
-       struct  ecb* ecb;
-
-       crit_enter();
-       if ((ecb = SLIST_FIRST(&ahb->free_ecbs)) != NULL)
-               SLIST_REMOVE_HEAD(&ahb->free_ecbs, links);
-       crit_exit();
-
-       return (ecb);
-}
-
-static __inline void
-ahbecbfree(struct ahb_softc* ahb, struct ecb* ecb)
-{
-       crit_enter();
-       ecb->state = ECB_FREE;
-       SLIST_INSERT_HEAD(&ahb->free_ecbs, ecb, links);
-       crit_exit();
-}
-
-static __inline u_int32_t
-ahbecbvtop(struct ahb_softc *ahb, struct ecb *ecb)
-{
-       return (ahb->ecb_physbase
-             + (u_int32_t)((caddr_t)ecb - (caddr_t)ahb->ecb_array));
-}
-
-static __inline struct ecb*
-ahbecbptov(struct ahb_softc *ahb, u_int32_t ecb_addr)
-{
-       return (ahb->ecb_array
-             + ((struct ecb*)ecb_addr - (struct ecb*)ahb->ecb_physbase));
-}
-
-static __inline u_int32_t
-ahbstatuspaddr(u_int32_t ecb_paddr)
-{
-       return (ecb_paddr + offsetof(struct ecb, status));
-}
-
-static __inline u_int32_t
-ahbsensepaddr(u_int32_t ecb_paddr)
-{
-       return (ecb_paddr + offsetof(struct ecb, sense));
-}
-
-static __inline u_int32_t
-ahbsgpaddr(u_int32_t ecb_paddr)
-{
-       return (ecb_paddr + offsetof(struct ecb, sg_list));
-}
-
-static __inline void
-ahbqueuembox(struct ahb_softc *ahb, u_int32_t mboxval, u_int attn_code)
-{
-       u_int loopmax = 300;
-       while (--loopmax) {
-               u_int status;
-
-               status = ahb_inb(ahb, HOSTSTAT);
-               if ((status & (HOSTSTAT_MBOX_EMPTY|HOSTSTAT_BUSY))
-                  == HOSTSTAT_MBOX_EMPTY)
-                       break;
-               DELAY(20);
-       }
-       if (loopmax == 0)
-               panic("ahb%ld: adapter not taking commands\n", ahb->unit);
-
-       ahb_outl(ahb, MBOXOUT0, mboxval);
-       ahb_outb(ahb, ATTN, attn_code);
-}
-
-static const char *
-ahbmatch(eisa_id_t type)
-{                         
-       switch(type & 0xfffffe00) {
-               case EISA_DEVICE_ID_ADAPTEC_1740:
-                       return ("Adaptec 174x SCSI host adapter");
-                       break;
-               default:
-                       break;
-       }
-       return (NULL);
-} 
-
-static int
-ahbprobe(device_t dev)      
-{       
-       const char *desc;
-       u_int32_t iobase;
-       u_int32_t irq;
-       u_int8_t  intdef;      
-       int shared;
-                
-       desc = ahbmatch(eisa_get_id(dev));
-       if (!desc)
-           return (ENXIO);
-       device_set_desc(dev, desc);
-
-       iobase = (eisa_get_slot(dev) * EISA_SLOT_SIZE) +
-           AHB_EISA_SLOT_OFFSET;
-                        
-       eisa_add_iospace(dev, iobase, AHB_EISA_IOSIZE, RESVADDR_NONE);
-               
-       intdef = inb(INTDEF + iobase);
-       switch (intdef & 0x7) {
-       case INT9:  
-           irq = 9;
-           break;
-       case INT10: 
-           irq = 10;
-           break;
-       case INT11:
-           irq = 11;
-           break;
-       case INT12:
-           irq = 12; 
-           break;
-       case INT14:
-           irq = 14;
-           break;
-       case INT15:
-           irq = 15;
-           break;
-       default:
-           kprintf("Adaptec 174X at slot %d: illegal "
-                  "irq setting %d\n", eisa_get_slot(dev),
-                  (intdef & 0x7));
-           irq = 0;
-           break;
-       }               
-       if (irq == 0)
-           return ENXIO;
-
-       shared = (inb(INTDEF + iobase) & INTLEVEL) ?
-                EISA_TRIGGER_LEVEL : EISA_TRIGGER_EDGE;
-
-       eisa_add_intr(dev, irq, shared);
-
-       return 0;   
-}
-
-static int
-ahbattach(device_t dev)
-{
-       /*
-        * find unit and check we have that many defined
-        */
-       struct      ahb_softc *ahb;
-       struct      ecb* next_ecb;
-       struct      resource *io = 0;
-       struct      resource *irq = 0;
-       int         rid;
-       void        *ih;
-
-       rid = 0;
-       io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
-                               0, ~0, 1, RF_ACTIVE);
-       if (!io) {
-               device_printf(dev, "No I/O space?!\n");
-               return ENOMEM;
-       }
-
-       if ((ahb = ahballoc(device_get_unit(dev), io)) == NULL) {
-               goto error_exit2;
-       }
-
-       if (ahbreset(ahb) != 0)
-               goto error_exit;
-
-       rid = 0;
-       irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid,
-                                0, ~0, 1, RF_ACTIVE);
-       if (!irq) {
-               device_printf(dev, "Can't allocate interrupt\n");
-               goto error_exit;
-       }
-
-       /*
-        * Create our DMA tags.  These tags define the kinds of device
-        * accessible memory allocations and memory mappings we will 
-        * need to perform during normal operation.
-        */
-       /* DMA tag for mapping buffers into device visible space. */
-       /* XXX Should be a child of the EISA bus dma tag */
-       if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, /*boundary*/0,
-                              /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
-                              /*highaddr*/BUS_SPACE_MAXADDR,
-                              /*filter*/NULL, /*filterarg*/NULL,
-                              /*maxsize*/MAXBSIZE, /*nsegments*/AHB_NSEG,
-                              /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT,
-                              /*flags*/BUS_DMA_ALLOCNOW,
-                              &ahb->buffer_dmat) != 0)
-               goto error_exit;
-
-       ahb->init_level++;
-
-       /* DMA tag for our ccb structures and ha inquiry data */
-       if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, /*boundary*/0,
-                              /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
-                              /*highaddr*/BUS_SPACE_MAXADDR,
-                              /*filter*/NULL, /*filterarg*/NULL,
-                              (AHB_NECB * sizeof(struct ecb))
-                              + sizeof(*ahb->ha_inq_data),
-                              /*nsegments*/1,
-                              /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT,
-                              /*flags*/0, &ahb->ecb_dmat) != 0)
-               goto error_exit;
-
-       ahb->init_level++;
-
-       /* Allocation for our ccbs */
-       if (bus_dmamem_alloc(ahb->ecb_dmat, (void *)&ahb->ecb_array,
-                            BUS_DMA_NOWAIT, &ahb->ecb_dmamap) != 0)
-               goto error_exit;
-
-       ahb->ha_inq_data = (struct ha_inquiry_data *)&ahb->ecb_array[AHB_NECB];
-
-       ahb->init_level++;
-
-       /* And permanently map them */
-       bus_dmamap_load(ahb->ecb_dmat, ahb->ecb_dmamap,
-                       ahb->ecb_array, AHB_NSEG * sizeof(struct ecb),
-                       ahbmapecbs, ahb, /*flags*/0);
-
-       ahb->init_level++;
-
-       /* Allocate the buffer dmamaps for each of our ECBs */
-       bzero(ahb->ecb_array, (AHB_NECB * sizeof(struct ecb))
-             + sizeof(*ahb->ha_inq_data));
-       next_ecb = ahb->ecb_array;
-       while (ahb->num_ecbs < AHB_NECB) {
-               u_int32_t ecb_paddr;
-
-               if (bus_dmamap_create(ahb->buffer_dmat, /*flags*/0,
-                                     &next_ecb->dmamap))
-                       break;
-               ecb_paddr = ahbecbvtop(ahb, next_ecb);
-               next_ecb->hecb.status_ptr = ahbstatuspaddr(ecb_paddr);
-               next_ecb->hecb.sense_ptr = ahbsensepaddr(ecb_paddr);
-               ahb->num_ecbs++;
-               ahbecbfree(ahb, next_ecb);
-               next_ecb++;
-       }
-
-       if (ahb->num_ecbs == 0)
-               goto error_exit;
-
-       ahb->init_level++;
-
-       /*
-        * Now that we know we own the resources we need, register
-        * our bus with the XPT.
-        */
-       if (ahbxptattach(ahb))
-               goto error_exit;
-
-       /* Enable our interrupt */
-       bus_setup_intr(dev, irq, 0, ahbintr, ahb, &ih, NULL);
-       return (0);
-
-error_exit:
-       /*
-        * The board's IRQ line will not be left enabled
-        * if we can't intialize correctly, so its safe
-        * to release the irq.
-        */
-       ahbfree(ahb);
-error_exit2:
-       if (io)
-               bus_release_resource(dev, SYS_RES_IOPORT, 0, io);
-       if (irq)
-               bus_release_resource(dev, SYS_RES_IRQ, 0, irq);
-       return (-1);
-}
-
-static struct ahb_softc *
-ahballoc(u_long unit, struct resource *res)
-{
-       struct  ahb_softc *ahb;
-
-       /*
-        * Allocate a storage area for us
-        */
-       ahb = kmalloc(sizeof(struct ahb_softc), M_DEVBUF, M_INTWAIT | M_ZERO);
-       SLIST_INIT(&ahb->free_ecbs);
-       LIST_INIT(&ahb->pending_ccbs);
-       ahb->unit = unit;
-       ahb->tag = rman_get_bustag(res);
-       ahb->bsh = rman_get_bushandle(res);
-       ahb->disc_permitted = ~0;
-       ahb->tags_permitted = ~0;
-
-       return (ahb);
-}
-
-static void    
-ahbfree(struct ahb_softc *ahb)
-{
-       switch (ahb->init_level) {
-       default:
-       case 4:
-               bus_dmamap_unload(ahb->ecb_dmat, ahb->ecb_dmamap);
-               /* fall through */
-       case 3:
-               bus_dmamem_free(ahb->ecb_dmat, ahb->ecb_array,
-                               ahb->ecb_dmamap);
-               bus_dmamap_destroy(ahb->ecb_dmat, ahb->ecb_dmamap);
-               /* fall through */
-       case 2:
-               bus_dma_tag_destroy(ahb->ecb_dmat);
-               /* fall through */
-       case 1:
-               bus_dma_tag_destroy(ahb->buffer_dmat);
-               /* fall through */
-       case 0:
-               break;
-       }
-       kfree(ahb, M_DEVBUF);
-}
-
-/*
- * reset board, If it doesn't respond, return failure
- */
-static int
-ahbreset(struct ahb_softc *ahb)
-{
-       int     wait = 1000;    /* 1 sec enough? */
-       int     test;
-
-       if ((ahb_inb(ahb, PORTADDR) & PORTADDR_ENHANCED) == 0) {
-               kprintf("ahb_reset: Controller not in enhanced mode\n");
-               return (-1);
-       }
-
-       ahb_outb(ahb, CONTROL, CNTRL_HARD_RST);
-       DELAY(1000);
-       ahb_outb(ahb, CONTROL, 0);
-       while (--wait) {
-               DELAY(1000);
-               if ((ahb_inb(ahb, HOSTSTAT) & HOSTSTAT_BUSY) == 0)
-                       break;
-       }
-
-       if (wait == 0) {
-               kprintf("ahbreset: No answer from aha1742 board\n");
-               return (-1);
-       }
-       if ((test = ahb_inb(ahb, MBOXIN0)) != 0) {
-               kprintf("ahb_reset: self test failed, val = 0x%x\n", test);
-               return (-1);
-       }
-       while (ahb_inb(ahb, HOSTSTAT) & HOSTSTAT_INTPEND) {
-               ahb_outb(ahb, CONTROL, CNTRL_CLRINT);
-               DELAY(10000);
-       }
-       return (0);
-}
-
-static void
-ahbmapecbs(void *arg, bus_dma_segment_t *segs, int nseg, int error)
-{
-       struct ahb_softc* ahb;
-
-       ahb = (struct ahb_softc*)arg;
-       ahb->ecb_physbase = segs->ds_addr;
-       /*
-        * Space for adapter inquiry information is on the
-        * tail of the ecb array.
-        */
-       ahb->ha_inq_physbase = ahbecbvtop(ahb, &ahb->ecb_array[AHB_NECB]);
-}
-
-static int
-ahbxptattach(struct ahb_softc *ahb)
-{
-       struct ecb *ecb;
-       u_int  i;
-
-       /* Remeber who are we on the scsi bus */
-       ahb->scsi_id = ahb_inb(ahb, SCSIDEF) & HSCSIID;
-
-       /* Use extended translation?? */
-       ahb->extended_trans = ahb_inb(ahb, RESV1) & EXTENDED_TRANS;
-
-       /* Fetch adapter inquiry data */
-       ecb = ahbecbget(ahb);   /* Always succeeds - no outstanding commands */
-       ecb->hecb.opcode = ECBOP_READ_HA_INQDATA;
-       ecb->hecb.flag_word1 = FW1_SUPPRESS_URUN_ERR|FW1_ERR_STATUS_BLK_ONLY;
-       ecb->hecb.data_ptr = ahb->ha_inq_physbase;
-       ecb->hecb.data_len = sizeof(struct ha_inquiry_data);
-       ecb->hecb.sense_ptr = 0;
-       ecb->state = ECB_ACTIVE;
-       
-       /* Tell the adapter about this command */
-       ahbqueuembox(ahb, ahbecbvtop(ahb, ecb),
-                    ATTN_STARTECB|ahb->scsi_id);
-
-       /* Poll for interrupt completion */
-       for (i = 1000; ecb->state != ECB_FREE && i != 0; i--) {
-               ahbintr(ahb);
-               DELAY(1000);
-       }
-
-       ahb->num_ecbs = MIN(ahb->num_ecbs,
-                           ahb->ha_inq_data->scsi_data.spc2_flags);
-       kprintf("ahb%ld: %.8s %s SCSI Adapter, FW Rev. %.4s, ID=%d, %d ECBs\n",
-              ahb->unit, ahb->ha_inq_data->scsi_data.product,
-              (ahb->ha_inq_data->scsi_data.flags & 0x4) ? "Differential"
-                                                        : "Single Ended",
-              ahb->ha_inq_data->scsi_data.revision,
-              ahb->scsi_id, ahb->num_ecbs);
-
-       /* Restore sense paddr for future CCB clients */
-       ecb->hecb.sense_ptr = ahbsensepaddr(ahbecbvtop(ahb, ecb));
-
-       ahbecbfree(ahb, ecb);
-
-       /*
-        * Construct our SIM entry
-        */
-       ahb->sim = cam_sim_alloc(ahbaction, ahbpoll, "ahb", ahb, ahb->unit,
-                                &sim_mplock, 2, ahb->num_ecbs, NULL);
-       if (ahb->sim == NULL)
-               return (ENOMEM);
-
-       if (xpt_bus_register(ahb->sim, 0) != CAM_SUCCESS) {
-               cam_sim_free(ahb->sim);
-               return (ENXIO);
-       }
-       
-       if (xpt_create_path(&ahb->path, /*periph*/NULL,
-                           cam_sim_path(ahb->sim), CAM_TARGET_WILDCARD,
-                           CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
-               xpt_bus_deregister(cam_sim_path(ahb->sim));
-               cam_sim_free(ahb->sim);
-               return (ENXIO);
-       }
-               
-       /*
-        * Allow the board to generate interrupts.
-        */
-       ahb_outb(ahb, INTDEF, ahb_inb(ahb, INTDEF) | INTEN);
-
-       return (0);
-}
-
-static void
-ahbhandleimmed(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
-{
-       struct ccb_hdr *ccb_h;
-       u_int target_id;
-
-       if (ahb->immed_cmd == 0) {
-               kprintf("ahb%ld: Immediate Command complete with no "
-                      " pending command\n", ahb->unit);
-               return;
-       }
-
-       target_id = intstat & INTSTAT_TARGET_MASK;
-
-       ccb_h = LIST_FIRST(&ahb->pending_ccbs);
-       while (ccb_h != NULL) {
-               struct ecb *pending_ecb;
-               union ccb *ccb;
-
-               pending_ecb = (struct ecb *)ccb_h->ccb_ecb_ptr;
-               ccb = pending_ecb->ccb;
-               ccb_h = LIST_NEXT(ccb_h, sim_links.le);
-               if (ccb->ccb_h.target_id == target_id
-                || target_id == ahb->scsi_id) {
-                       callout_stop(&ccb->ccb_h.timeout_ch);
-                       LIST_REMOVE(&ccb->ccb_h, sim_links.le);
-                       if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE)
-                               bus_dmamap_unload(ahb->buffer_dmat,
-                                                 pending_ecb->dmamap);
-                       if (pending_ecb == ahb->immed_ecb)
-                               ccb->ccb_h.status =
-                                   CAM_CMD_TIMEOUT|CAM_RELEASE_SIMQ;
-                       else if (target_id == ahb->scsi_id)
-                               ccb->ccb_h.status = CAM_SCSI_BUS_RESET;
-                       else
-                               ccb->ccb_h.status = CAM_BDR_SENT;
-                       ahbecbfree(ahb, pending_ecb);
-                       xpt_done(ccb);
-               } else if (ahb->immed_ecb != NULL) {
-                       /* Re-instate timeout */
-                       callout_reset(&ccb->ccb_h.timeout_ch,
-                           (ccb->ccb_h.timeout * hz) / 1000,
-                           ahbtimeout, pending_ecb);
-               }
-       }
-
-       if (ahb->immed_ecb != NULL) {
-               ahb->immed_ecb = NULL;
-               kprintf("ahb%ld: No longer in timeout\n", ahb->unit);
-       } else if (target_id == ahb->scsi_id)
-               kprintf("ahb%ld: SCSI Bus Reset Delivered\n", ahb->unit);
-       else
-               kprintf("ahb%ld:  Bus Device Reset Delivered to target %d\n",
-                      ahb->unit, target_id);
-
-       ahb->immed_cmd = 0;
-}
-
-static void
-ahbcalcresid(struct ahb_softc *ahb, struct ecb *ecb, union ccb *ccb)
-{
-       if (ecb->status.data_overrun != 0) {
-               /*
-                * Overrun Condition.  The hardware doesn't
-                * provide a meaningful byte count in this case
-                * (the residual is always 0).  Tell the XPT
-                * layer about the error.
-                */
-               ccb->ccb_h.status = CAM_DATA_RUN_ERR;
-       } else {
-               ccb->csio.resid = ecb->status.resid_count;
-
-               if ((ecb->hecb.flag_word1 & FW1_SG_ECB) != 0) {
-                       /*
-                        * For S/G transfers, the adapter provides a pointer
-                        * to the address in the last S/G element used and a
-                        * residual for that element.  So, we need to sum up
-                        * the elements that follow it in order to get a real
-                        * residual number.  If we have an overrun, the residual
-                        * reported will be 0 and we already know that all S/G
-                        * segments have been exhausted, so we can skip this
-                        * step.
-                        */
-                       ahb_sg_t *sg;
-                       int       num_sg;
-
-                       num_sg = ecb->hecb.data_len / sizeof(ahb_sg_t);
-
-                       /* Find the S/G the adapter was working on */
-                       for (sg = ecb->sg_list;
-                            num_sg != 0 && sg->addr != ecb->status.resid_addr;
-                            num_sg--, sg++)
-                               ;
-
-                       /* Skip it */
-                       num_sg--;
-                       sg++;
-
-                       /* Sum the rest */
-                       for (; num_sg != 0; num_sg--, sg++)
-                               ccb->csio.resid += sg->len;
-               }
-               /* Underruns are not errors */
-               ccb->ccb_h.status = CAM_REQ_CMP;
-       }
-}
-
-static void
-ahbprocesserror(struct ahb_softc *ahb, struct ecb *ecb, union ccb *ccb)
-{
-       struct hardware_ecb *hecb;
-       struct ecb_status *status;
-
-       hecb = &ecb->hecb;
-       status = &ecb->status;
-       switch (status->ha_status) {
-       case HS_OK:
-               ccb->csio.scsi_status = status->scsi_status;
-               if (status->scsi_status != 0) {
-                       ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;
-                       if (status->sense_stored) {
-                               ccb->ccb_h.status |= CAM_AUTOSNS_VALID;
-                               ccb->csio.sense_resid =
-                                   ccb->csio.sense_len - status->sense_len;
-                               bcopy(&ecb->sense, &ccb->csio.sense_data,
-                                     status->sense_len);
-                       }
-               }
-               break;
-       case HS_TARGET_NOT_ASSIGNED:
-               ccb->ccb_h.status = CAM_PATH_INVALID;
-               break;
-       case HS_SEL_TIMEOUT:
-               ccb->ccb_h.status = CAM_SEL_TIMEOUT;
-               break;
-       case HS_DATA_RUN_ERR:
-               ahbcalcresid(ahb, ecb, ccb);
-               break;
-       case HS_UNEXPECTED_BUSFREE:
-               ccb->ccb_h.status = CAM_UNEXP_BUSFREE;
-               break;
-       case HS_INVALID_PHASE:
-               ccb->ccb_h.status = CAM_SEQUENCE_FAIL;
-               break;
-       case HS_REQUEST_SENSE_FAILED:
-               ccb->ccb_h.status = CAM_AUTOSENSE_FAIL;
-               break;
-       case HS_TAG_MSG_REJECTED:
-       {
-               struct ccb_trans_settings neg; 
-               struct ccb_trans_settings_scsi *scsi = &neg.proto_specific.scsi;
-
-               xpt_print_path(ccb->ccb_h.path);
-               kprintf("refuses tagged commands.  Performing "
-                      "non-tagged I/O\n");
-               memset(&neg, 0, sizeof (neg));
-               neg.protocol = PROTO_SCSI;
-               neg.protocol_version = SCSI_REV_2;
-               neg.transport = XPORT_SPI;
-               neg.transport_version = 2;
-               scsi->flags = CTS_SCSI_VALID_TQ;
-               xpt_setup_ccb(&neg.ccb_h, ccb->ccb_h.path, /*priority*/1); 
-               xpt_async(AC_TRANSFER_NEG, ccb->ccb_h.path, &neg);
-               ahb->tags_permitted &= ~(0x01 << ccb->ccb_h.target_id);
-               ccb->ccb_h.status = CAM_MSG_REJECT_REC;
-               break;
-       }
-       case HS_FIRMWARE_LOAD_REQ:
-       case HS_HARDWARE_ERR:
-               /*
-                * Tell the system that the Adapter
-                * is no longer functional.
-                */
-               ccb->ccb_h.status = CAM_NO_HBA;
-               break;
-       case HS_CMD_ABORTED_HOST:
-       case HS_CMD_ABORTED_ADAPTER:
-       case HS_ATN_TARGET_FAILED:
-       case HS_SCSI_RESET_ADAPTER:
-       case HS_SCSI_RESET_INCOMING:
-               ccb->ccb_h.status = CAM_SCSI_BUS_RESET;
-               break;
-       case HS_INVALID_ECB_PARAM:
-               kprintf("ahb%ld: opcode 0x%02x, flag_word1 0x%02x, flag_word2 0x%02x\n",
-                       ahb->unit, hecb->opcode, hecb->flag_word1, hecb->flag_word2);   
-               ccb->ccb_h.status = CAM_SCSI_BUS_RESET;
-               break;
-       case HS_DUP_TCB_RECEIVED:
-       case HS_INVALID_OPCODE:
-       case HS_INVALID_CMD_LINK:
-       case HS_PROGRAM_CKSUM_ERROR:
-               panic("ahb%ld: Can't happen host status %x occurred",
-                     ahb->unit, status->ha_status);
-               break;
-       }
-       if (ccb->ccb_h.status != CAM_REQ_CMP) {
-               xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
-               ccb->ccb_h.status |= CAM_DEV_QFRZN;
-       }
-}
-
-static void
-ahbdone(struct ahb_softc *ahb, u_int32_t mbox, u_int intstat)
-{
-       struct ecb *ecb;
-       union ccb *ccb;
-
-       ecb = ahbecbptov(ahb, mbox);
-
-       if ((ecb->state & ECB_ACTIVE) == 0)
-               panic("ecb not active");
-
-       ccb = ecb->ccb;
-
-       if (ccb != NULL) {
-               callout_stop(&ccb->ccb_h.timeout_ch);
-               LIST_REMOVE(&ccb->ccb_h, sim_links.le);
-
-               if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
-                       bus_dmasync_op_t op;
-
-                       if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN)
-                               op = BUS_DMASYNC_POSTREAD;
-                       else
-                               op = BUS_DMASYNC_POSTWRITE;
-                       bus_dmamap_sync(ahb->buffer_dmat, ecb->dmamap, op);
-                       bus_dmamap_unload(ahb->buffer_dmat, ecb->dmamap);
-               }
-
-               if ((intstat & INTSTAT_MASK) == INTSTAT_ECB_OK) {
-                       ccb->ccb_h.status = CAM_REQ_CMP;
-                       ccb->csio.resid = 0;
-               } else {
-                       ahbprocesserror(ahb, ecb, ccb);
-               }
-               ahbecbfree(ahb, ecb);
-               xpt_done(ccb);
-       } else {
-               /* Non CCB Command */
-               if ((intstat & INTSTAT_MASK) != INTSTAT_ECB_OK) {
-                       kprintf("ahb%ld: Command 0%x Failed %x:%x:%x\n",
-                              ahb->unit, ecb->hecb.opcode,
-                              *((u_int16_t*)&ecb->status),
-                              ecb->status.ha_status, ecb->status.resid_count);
-               }
-               /* Client owns this ECB and will release it. */
-       }
-}
-
-/*
- * Catch an interrupt from the adaptor
- */
-static void
-ahbintr(void *arg)
-{
-       struct    ahb_softc *ahb;
-       u_int     intstat;
-       u_int32_t mbox;
-
-       ahb = (struct ahb_softc *)arg;
-
-       while (ahb_inb(ahb, HOSTSTAT) & HOSTSTAT_INTPEND) {
-               /*
-                * Fetch information about this interrupt.
-                */
-               intstat = ahb_inb(ahb, INTSTAT);
-               mbox = ahb_inl(ahb, MBOXIN0);
-
-               /*
-                * Reset interrupt latch.
-                */
-               ahb_outb(ahb, CONTROL, CNTRL_CLRINT);
-
-               /*
-                * Process the completed operation
-                */
-               switch (intstat & INTSTAT_MASK) {
-               case INTSTAT_ECB_OK:
-               case INTSTAT_ECB_CMPWRETRY:
-               case INTSTAT_ECB_CMPWERR:
-                       ahbdone(ahb, mbox, intstat);
-                       break;
-               case INTSTAT_AEN_OCCURED:
-                       if ((intstat & INTSTAT_TARGET_MASK) == ahb->scsi_id) {
-                               /* Bus Reset */
-                               xpt_print_path(ahb->path);
-                               switch (mbox) {
-                               case HS_SCSI_RESET_ADAPTER:
-                                       kprintf("Host Adapter Initiated "
-                                              "Bus Reset occurred\n");
-                                       break;
-                               case HS_SCSI_RESET_INCOMING:
-                                       kprintf("Bus Reset Initiated "
-                                              "by another device occurred\n");
-                                       break;
-                               }
-                               /* Notify the XPT */
-                               xpt_async(AC_BUS_RESET, ahb->path, NULL);
-                               break;
-                       }
-                       kprintf("Unsupported initiator selection AEN occurred\n");
-                       break;
-               case INTSTAT_IMMED_OK:
-               case INTSTAT_IMMED_ERR:
-                       ahbhandleimmed(ahb, mbox, intstat);
-                       break;
-               case INTSTAT_HW_ERR:
-                       panic("Unrecoverable hardware Error Occurred\n");
-               }
-       }
-}
-
-static void
-ahbexecuteecb(void *arg, bus_dma_segment_t *dm_segs, int nseg, int error)
-{
-       struct    ecb *ecb;
-       union     ccb *ccb;
-       struct    ahb_softc *ahb;
-       u_int32_t ecb_paddr;
-
-       ecb = (struct ecb *)arg;
-       ccb = ecb->ccb;
-       ahb = (struct ahb_softc *)ccb->ccb_h.ccb_ahb_ptr;
-
-       if (error != 0) {
-               if (error != EFBIG)
-                       kprintf("ahb%ld: Unexpected error 0x%x returned from "
-                              "bus_dmamap_load\n", ahb->unit, error);
-               if (ccb->ccb_h.status == CAM_REQ_INPROG) {
-                       xpt_freeze_devq(ccb->ccb_h.path, /*count*/1);
-                       ccb->ccb_h.status = CAM_REQ_TOO_BIG|CAM_DEV_QFRZN;
-               }
-               ahbecbfree(ahb, ecb);
-               xpt_done(ccb);
-               return;
-       }
-               
-       ecb_paddr = ahbecbvtop(ahb, ecb);
-
-       if (nseg != 0) {
-               ahb_sg_t *sg;
-               bus_dma_segment_t *end_seg;
-               bus_dmasync_op_t op;
-
-               end_seg = dm_segs + nseg;
-
-               /* Copy the segments into our SG list */
-               sg = ecb->sg_list;
-               while (dm_segs < end_seg) {
-                       sg->addr = dm_segs->ds_addr;
-                       sg->len = dm_segs->ds_len;
-                       sg++;
-                       dm_segs++;
-               }
-
-               if (nseg > 1) {
-                       ecb->hecb.flag_word1 |= FW1_SG_ECB;
-                       ecb->hecb.data_ptr = ahbsgpaddr(ecb_paddr);
-                       ecb->hecb.data_len = sizeof(ahb_sg_t) * nseg;
-               } else {
-                       ecb->hecb.data_ptr = ecb->sg_list->addr;
-                       ecb->hecb.data_len = ecb->sg_list->len;
-               }
-
-               if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_IN) {
-/*                     ecb->hecb.flag_word2 |= FW2_DATA_DIR_IN; */
-                       op = BUS_DMASYNC_PREREAD;
-               } else {
-                       op = BUS_DMASYNC_PREWRITE;
-               }
-               /* ecb->hecb.flag_word2 |= FW2_CHECK_DATA_DIR; */
-
-               bus_dmamap_sync(ahb->buffer_dmat, ecb->dmamap, op);
-
-       } else {
-               ecb->hecb.data_ptr = 0;
-               ecb->hecb.data_len = 0;
-       }
-
-       crit_enter();
-
-       /*
-        * Last time we need to check if this CCB needs to
-        * be aborted.
-        */
-       if (ccb->ccb_h.status != CAM_REQ_INPROG) {
-               if (nseg != 0)
-                       bus_dmamap_unload(ahb->buffer_dmat, ecb->dmamap);
-               ahbecbfree(ahb, ecb);
-               xpt_done(ccb);
-               crit_exit();
-               return;
-       }
-               
-       ecb->state = ECB_ACTIVE;
-       ccb->ccb_h.status |= CAM_SIM_QUEUED;
-       LIST_INSERT_HEAD(&ahb->pending_ccbs, &ccb->ccb_h, sim_links.le);
-
-       /* Tell the adapter about this command */
-       ahbqueuembox(ahb, ecb_paddr, ATTN_STARTECB|ccb->ccb_h.target_id);
-
-       callout_reset(&ccb->ccb_h.timeout_ch, (ccb->ccb_h.timeout * hz) / 1000,
-                     ahbtimeout, ecb);
-       crit_exit();
-}
-
-static void
-ahbaction(struct cam_sim *sim, union ccb *ccb)
-{
-       struct  ahb_softc *ahb;
-
-       CAM_DEBUG(ccb->ccb_h.path, CAM_DEBUG_TRACE, ("ahbaction\n"));
-       
-       ahb = (struct ahb_softc *)cam_sim_softc(sim);
-       
-       switch (ccb->ccb_h.func_code) {
-       /* Common cases first */
-       case XPT_SCSI_IO:       /* Execute the requested I/O operation */
-       {
-               struct ecb *ecb;
-               struct hardware_ecb *hecb;
-
-               /*
-                * get an ecb to use.
-                */
-               if ((ecb = ahbecbget(ahb)) == NULL) {
-                       /* Should never occur */
-                       panic("Failed to get an ecb");
-               }
-
-               /*
-                * So we can find the ECB when an abort is requested
-                */
-               ecb->ccb = ccb;
-               ccb->ccb_h.ccb_ecb_ptr = ecb;
-               ccb->ccb_h.ccb_ahb_ptr = ahb;
-
-               /*
-                * Put all the arguments for the xfer in the ecb
-                */
-               hecb = &ecb->hecb;
-               hecb->opcode = ECBOP_INITIATOR_SCSI_CMD;
-               hecb->flag_word1 = FW1_AUTO_REQUEST_SENSE
-                                | FW1_ERR_STATUS_BLK_ONLY;
-               hecb->flag_word2 = ccb->ccb_h.target_lun
-                                | FW2_NO_RETRY_ON_BUSY;
-               if ((ccb->ccb_h.flags & CAM_TAG_ACTION_VALID) != 0) {
-                       hecb->flag_word2 |= FW2_TAG_ENB
-                                        | ((ccb->csio.tag_action & 0x3)
-                                           << FW2_TAG_TYPE_SHIFT);
-               }
-               if ((ccb->ccb_h.flags & CAM_DIS_DISCONNECT) != 0)
-                       hecb->flag_word2 |= FW2_DISABLE_DISC;
-               hecb->sense_len = ccb->csio.sense_len;
-               hecb->cdb_len = ccb->csio.cdb_len;
-               if ((ccb->ccb_h.flags & CAM_CDB_POINTER) != 0) {
-                       if ((ccb->ccb_h.flags & CAM_CDB_PHYS) == 0) {
-                               bcopy(ccb->csio.cdb_io.cdb_ptr,
-                                     hecb->cdb, hecb->cdb_len);
-                       } else {
-                               /* I guess I could map it in... */
-                               ccb->ccb_h.status = CAM_REQ_INVALID;
-                               ahbecbfree(ahb, ecb);
-                               xpt_done(ccb);
-                               return;
-                       }
-               } else {
-                       bcopy(ccb->csio.cdb_io.cdb_bytes,
-                             hecb->cdb, hecb->cdb_len);
-               }
-
-               /*
-                * If we have any data to send with this command,
-                * map it into bus space.
-                */
-               if ((ccb->ccb_h.flags & CAM_DIR_MASK) != CAM_DIR_NONE) {
-                       if ((ccb->ccb_h.flags & CAM_SCATTER_VALID) == 0) {
-                               /*
-                                * We've been given a pointer
-                                * to a single buffer.
-                                */
-                               if ((ccb->ccb_h.flags & CAM_DATA_PHYS)==0) {
-                                       int error;
-
-                                       crit_enter();
-                                       error = bus_dmamap_load(
-                                           ahb->buffer_dmat,
-                                           ecb->dmamap,
-                                           ccb->csio.data_ptr,
-                                           ccb->csio.dxfer_len,
-                                           ahbexecuteecb,
-                                           ecb, /*flags*/0);
-                                       if (error == EINPROGRESS) {
-                                               /*
-                                                * So as to maintain ordering,
-                                                * freeze the controller queue
-                                                * until our mapping is
-                                                * returned.
-                                                */
-                                               xpt_freeze_simq(ahb->sim, 1);
-                                               ccb->ccb_h.status |=
-                                                   CAM_RELEASE_SIMQ;
-                                       }
-                                       crit_exit();
-                               } else {
-                                       struct bus_dma_segment seg; 
-
-                                       /* Pointer to physical buffer */
-                                       seg.ds_addr =
-                                           (bus_addr_t)ccb->csio.data_ptr;
-                                       seg.ds_len = ccb->csio.dxfer_len;
-                                       ahbexecuteecb(ecb, &seg, 1, 0);
-                               }
-                       } else {
-                               struct bus_dma_segment *segs;
-
-                               if ((ccb->ccb_h.flags & CAM_DATA_PHYS) != 0)
-                                       panic("ahbaction - Physical segment "
-                                             "pointers unsupported");
-
-                               if ((ccb->ccb_h.flags & CAM_SG_LIST_PHYS) == 0)
-                                       panic("btaction - Virtual segment "
-                                             "addresses unsupported");
-
-                               /* Just use the segments provided */
-                               segs = (struct bus_dma_segment *)
-                                   ccb->csio.data_ptr;
-                               ahbexecuteecb(ecb, segs, ccb->csio.sglist_cnt,
-                                            0);
-                       }
-               } else {
-                       ahbexecuteecb(ecb, NULL, 0, 0);
-               }
-               break;
-       }
-       case XPT_EN_LUN:                /* Enable LUN as a target */
-       case XPT_TARGET_IO:             /* Execute target I/O request */
-       case XPT_ACCEPT_TARGET_IO:      /* Accept Host Target Mode CDB */
-       case XPT_CONT_TARGET_IO:        /* Continue Host Target I/O Connection*/
-       case XPT_ABORT:                 /* Abort the specified CCB */
-               /* XXX Implement */
-               ccb->ccb_h.status = CAM_REQ_INVALID;
-               xpt_done(ccb);
-               break;
-       case XPT_SET_TRAN_SETTINGS:
-       {
-               ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-               xpt_done(ccb);
-               break;
-       }
-       case XPT_GET_TRAN_SETTINGS:
-       /* Get default/user set transfer settings for the target */
-       {
-               struct  ccb_trans_settings *cts = &ccb->cts;
-               u_int   target_mask = 0x01 << ccb->ccb_h.target_id;
-               struct ccb_trans_settings_scsi *scsi =
-                   &cts->proto_specific.scsi;
-               struct ccb_trans_settings_spi *spi =
-                   &cts->xport_specific.spi;
-
-               if (cts->type == CTS_TYPE_USER_SETTINGS) {
-                       cts->protocol = PROTO_SCSI;
-                       cts->protocol_version = SCSI_REV_2;
-                       cts->transport = XPORT_SPI;
-                       cts->transport_version = 2;
-
-                       scsi->flags &= ~CTS_SCSI_FLAGS_TAG_ENB;
-                       spi->flags &= ~CTS_SPI_FLAGS_DISC_ENB;
-                       if ((ahb->disc_permitted & target_mask) != 0)
-                               spi->flags |= CTS_SPI_FLAGS_DISC_ENB;
-                       if ((ahb->tags_permitted & target_mask) != 0)
-                               scsi->flags |= CTS_SCSI_FLAGS_TAG_ENB;
-                       spi->bus_width = MSG_EXT_WDTR_BUS_8_BIT;
-                       spi->sync_period = 25; /* 10MHz */
-
-                       if (spi->sync_period != 0)
-                               spi->sync_offset = 15;
-
-                       spi->valid = CTS_SPI_VALID_SYNC_RATE
-                                  | CTS_SPI_VALID_SYNC_OFFSET
-                                  | CTS_SPI_VALID_BUS_WIDTH
-                                  | CTS_SPI_VALID_DISC;
-                       scsi->valid = CTS_SCSI_VALID_TQ;
-                       ccb->ccb_h.status = CAM_REQ_CMP;
-               } else {
-                       ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
-               }
-               xpt_done(ccb);
-               break;
-       }
-       case XPT_RESET_DEV:     /* Bus Device Reset the specified SCSI device */
-       {
-               int i;
-
-               crit_enter();
-               ahb->immed_cmd = IMMED_RESET;
-               ahbqueuembox(ahb, IMMED_RESET, ATTN_IMMED|ccb->ccb_h.target_id);
-               /* Poll for interrupt completion */
-               for (i = 1000; ahb->immed_cmd != 0 && i != 0; i--) {
-                       DELAY(1000);
-                       ahbintr(cam_sim_softc(sim));
-               }
-               crit_exit();
-               break;
-       }
-       case XPT_CALC_GEOMETRY:
-       {
-               struct    ccb_calc_geometry *ccg;
-               u_int32_t size_mb;
-               u_int32_t secs_per_cylinder;
-
-               ccg = &ccb->ccg;
-               size_mb = ccg->volume_size
-                       / ((1024L * 1024L) / ccg->block_size);
-               
-               if (size_mb > 1024 && (ahb->extended_trans != 0)) {
-                       ccg->heads = 255;
-                       ccg->secs_per_track = 63;
-               } else {
-                       ccg->heads = 64;
-                       ccg->secs_per_track = 32;
-               }
-               secs_per_cylinder = ccg->heads * ccg->secs_per_track;
-               ccg->cylinders = ccg->volume_size / secs_per_cylinder;
-               ccb->ccb_h.status = CAM_REQ_CMP;
-               xpt_done(ccb);
-               break;
-       }
-       case XPT_RESET_BUS:             /* Reset the specified SCSI bus */
-       {
-               int i;
-
-               ahb->immed_cmd = IMMED_RESET;
-               ahbqueuembox(ahb, IMMED_RESET, ATTN_IMMED|ahb->scsi_id);
-               /* Poll for interrupt completion */
-               for (i = 1000; ahb->immed_cmd != 0 && i != 0; i--)
-                       DELAY(1000);
-               ccb->ccb_h.status = CAM_REQ_CMP;
-               xpt_done(ccb);
-               break;
-       }
-       case XPT_TERM_IO:               /* Terminate the I/O process */
-               /* XXX Implement */
-               ccb->ccb_h.status = CAM_REQ_INVALID;
-               xpt_done(ccb);
-               break;
-       case XPT_PATH_INQ:              /* Path routing inquiry */
-       {
-               struct ccb_pathinq *cpi = &ccb->cpi;
-               
-               cpi->version_num = 1; /* XXX??? */
-               cpi->hba_inquiry = PI_SDTR_ABLE|PI_TAG_ABLE;
-               cpi->target_sprt = 0;
-               cpi->hba_misc = 0;
-               cpi->hba_eng_cnt = 0;
-               cpi->max_target = 7;
-               cpi->max_lun = 7;
-               cpi->initiator_id = ahb->scsi_id;
-               cpi->bus_id = cam_sim_bus(sim);
-               cpi->base_transfer_speed = 3300;
-               strncpy(cpi->sim_vid, "FreeBSD", SIM_IDLEN);
-               strncpy(cpi->hba_vid, "Adaptec", HBA_IDLEN);
-               strncpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN);
-               cpi->unit_number = cam_sim_unit(sim);
-                cpi->transport = XPORT_SPI;
-                cpi->transport_version = 2;
-                cpi->protocol = PROTO_SCSI;
-                cpi->protocol_version = SCSI_REV_2;
-               cpi->ccb_h.status = CAM_REQ_CMP;
-               xpt_done(ccb);
-               break;
-       }
-#if 0
-       /* Need these??? */
-        case XPT_IMMED_NOTIFY:         /* Notify Host Target driver of event */
-        case XPT_NOTIFY_ACK:           /* Acknowledgement of event */
-#endif
-       default:
-               ccb->ccb_h.status = CAM_REQ_INVALID;
-               xpt_done(ccb);
-               break;
-       }
-}
-
-static void
-ahbpoll(struct cam_sim *sim)
-{
-       ahbintr(cam_sim_softc(sim));
-}
-
-static void
-ahbtimeout(void *arg)
-{
-       struct ecb       *ecb;
-       union  ccb       *ccb;
-       struct ahb_softc *ahb;
-
-       ecb = (struct ecb *)arg;
-       ccb = ecb->ccb;
-       ahb = (struct ahb_softc *)ccb->ccb_h.ccb_ahb_ptr;
-       xpt_print_path(ccb->ccb_h.path);
-       kprintf("ECB %p - timed out\n", (void *)ecb);
-
-       crit_enter();
-
-       if ((ecb->state & ECB_ACTIVE) == 0) {
-               xpt_print_path(ccb->ccb_h.path);
-               kprintf("ECB %p - timed out ECB already completed\n",
-                      (void *)ecb);
-               crit_exit();
-               return;
-       }
-       /*
-        * In order to simplify the recovery process, we ask the XPT
-        * layer to halt the queue of new transactions and we traverse
-        * the list of pending CCBs and remove their timeouts. This
-        * means that the driver attempts to clear only one error
-        * condition at a time.  In general, timeouts that occur
-        * close together are related anyway, so there is no benefit
-        * in attempting to handle errors in parrallel.  Timeouts will
-        * be reinstated when the recovery process ends.
-        */
-       if ((ecb->state & ECB_DEVICE_RESET) == 0) {
-               struct ccb_hdr *ccb_h;
-
-               if ((ecb->state & ECB_RELEASE_SIMQ) == 0) {
-                       xpt_freeze_simq(ahb->sim, /*count*/1);
-                       ecb->state |= ECB_RELEASE_SIMQ;
-               }
-
-               ccb_h = LIST_FIRST(&ahb->pending_ccbs);
-               while (ccb_h != NULL) {
-                       struct ecb *pending_ecb;
-
-                       pending_ecb = (struct ecb *)ccb_h->ccb_ecb_ptr;
-                       callout_stop(&ccb_h->timeout_ch);
-                       ccb_h = LIST_NEXT(ccb_h, sim_links.le);
-               }
-
-               /* Store for our interrupt handler */
-               ahb->immed_ecb = ecb;
-
-               /*    
-                * Send a Bus Device Reset message:
-                * The target that is holding up the bus may not
-                * be the same as the one that triggered this timeout
-                * (different commands have different timeout lengths),
-                * but we have no way of determining this from our
-                * timeout handler.  Our strategy here is to queue a
-                * BDR message to the target of the timed out command.
-                * If this fails, we'll get another timeout 2 seconds
-                * later which will attempt a bus reset.
-                */
-               xpt_print_path(ccb->ccb_h.path);
-               kprintf("Queuing BDR\n");
-               ecb->state |= ECB_DEVICE_RESET;
-               callout_reset(&ccb->ccb_h.timeout_ch, 2 * hz, ahbtimeout, ecb);
-
-               ahb->immed_cmd = IMMED_RESET;
-               ahbqueuembox(ahb, IMMED_RESET, ATTN_IMMED|ccb->ccb_h.target_id);
-       } else if ((ecb->state & ECB_SCSIBUS_RESET) != 0) {
-               /*
-                * Try a SCSI bus reset.  We do this only if we
-                * have already attempted to clear the condition with a BDR.
-                */
-               xpt_print_path(ccb->ccb_h.path);
-               kprintf("Attempting SCSI Bus reset\n");
-               ecb->state |= ECB_SCSIBUS_RESET;
-               callout_reset(&ccb->ccb_h.timeout_ch, 2 * hz, ahbtimeout, ecb);
-               ahb->immed_cmd = IMMED_RESET;
-               ahbqueuembox(ahb, IMMED_RESET, ATTN_IMMED|ahb->scsi_id);
-       } else {
-               /* Bring out the hammer... */
-               ahbreset(ahb);
-
-               /* Simulate the reset complete interrupt */
-               ahbhandleimmed(ahb, 0, ahb->scsi_id|INTSTAT_IMMED_OK);
-       }
-
-       crit_exit();
-}
-
-static device_method_t ahb_eisa_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         ahbprobe),
-       DEVMETHOD(device_attach,        ahbattach),
-
-       { 0, 0 }
-};
-
-static driver_t ahb_eisa_driver = {
-       "ahb",
-       ahb_eisa_methods,
-       1,                      /* unused */
-};
-
-static devclass_t ahb_devclass;
-
-DRIVER_MODULE(ahb, eisa, ahb_eisa_driver, ahb_devclass, 0, 0);
diff --git a/sys/dev/disk/ahb/ahbreg.h b/sys/dev/disk/ahb/ahbreg.h
deleted file mode 100644 (file)
index 1f91832..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Hardware structure definitions for the Adaptec 174X CAM SCSI device driver.
- *
- * Copyright (c) 1998 Justin T. Gibbs
- * All rights reserved.
- *
- * 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 immediately at the beginning of the file, without modification,
- *    this list of conditions, and the following disclaimer.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/sys/dev/ahb/ahbreg.h,v 1.2 1999/08/28 00:43:37 peter Exp $
- * $DragonFly: src/sys/dev/disk/ahb/ahbreg.h,v 1.2 2003/06/17 04:28:21 dillon Exp $
- */
-
-/* Resource Constatns */
-#define        AHB_NECB        64
-#define AHB_NSEG       32
-
-/* AHA1740 EISA ID, IO port range size, and offset from slot base */
-#define EISA_DEVICE_ID_ADAPTEC_1740  0x04900000
-#define        AHB_EISA_IOSIZE 0x100
-#define        AHB_EISA_SLOT_OFFSET 0xc00
-
-/* AHA1740 EISA board control registers (Offset from slot base) */
-#define        EBCTRL                          0x084
-#define                CDEN                    0x01
-
-/*
- * AHA1740 EISA board mode registers (Offset from slot base)
- */
-#define PORTADDR                       0x0C0
-#define                PORTADDR_ENHANCED       0x80
-
-#define BIOSADDR                       0x0C1
-
-#define        INTDEF                          0x0C2
-#define                INT9                    0x00
-#define                INT10                   0x01
-#define                INT11                   0x02
-#define                INT12                   0x03
-#define                INT14                   0x05
-#define                INT15                   0x06
-#define                INTLEVEL                0x08
-#define                INTEN                   0x10
-
-#define        SCSIDEF                         0x0C3
-#define                HSCSIID                 0x0F    /* our SCSI ID */
-#define                RSTBUS                  0x10
-
-#define        BUSDEF                          0x0C4
-#define                B0uS                    0x00    /* give up bus immediatly */
-#define                B4uS                    0x01    /* delay 4uSec. */
-#define                B8uS                    0x02    /* delay 8uSec. */
-
-#define        RESV0                           0x0C5
-
-#define        RESV1                           0x0C6
-#define                EXTENDED_TRANS          0x01
-
-#define        RESV2                           0x0C7
-
-/*
- * AHA1740 ENHANCED mode mailbox control regs (Offset from slot base)
- */
-#define MBOXOUT0                       0x0D0
-#define MBOXOUT1                       0x0D1
-#define MBOXOUT2                       0x0D2
-#define MBOXOUT3                       0x0D3
-
-#define        ATTN                            0x0D4
-#define                ATTN_TARGMASK           0x0F
-#define                ATTN_IMMED              0x10
-#define                ATTN_STARTECB           0x40
-#define                ATTN_ABORTECB           0x50
-#define                ATTN_TARG_RESET         0x80
-
-#define        CONTROL                         0x0D5
-#define                CNTRL_SET_HRDY          0x20
-#define                CNTRL_CLRINT            0x40
-#define                CNTRL_HARD_RST          0x80
-
-#define        INTSTAT                         0x0D6
-#define                INTSTAT_TARGET_MASK     0x0F
-#define                INTSTAT_MASK            0xF0
-#define                INTSTAT_ECB_OK          0x10    /* ECB Completed w/out error */
-#define                INTSTAT_ECB_CMPWRETRY   0x50    /* ECB Completed w/retries */
-#define                INTSTAT_HW_ERR          0x70    /* Adapter Hardware Failure */
-#define                INTSTAT_IMMED_OK        0xA0    /* Immediate command complete */
-#define                INTSTAT_ECB_CMPWERR     0xC0    /* ECB Completed w/error */
-#define                INTSTAT_AEN_OCCURED     0xD0    /* Async Event Notification */
-#define                INTSTAT_IMMED_ERR       0xE0    /* Immediate command failed */
-
-#define HOSTSTAT                       0x0D7
-#define                HOSTSTAT_MBOX_EMPTY     0x04
-#define                HOSTSTAT_INTPEND        0x02
-#define                HOSTSTAT_BUSY           0x01
-
-
-#define        MBOXIN0                         0x0D8
-#define        MBOXIN1                         0x0D9
-#define        MBOXIN2                         0x0DA
-#define        MBOXIN3                         0x0DB
-
-#define STATUS2                                0x0DC
-#define        STATUS2_HOST_READY              0x01
-
-typedef enum {
-       IMMED_RESET               = 0x000080,
-       IMMED_DEVICE_CLEAR_QUEUE  = 0x000480,
-       IMMED_ADAPTER_CLEAR_QUEUE = 0x000880,
-       IMMED_RESUME              = 0x200090
-} immed_cmd;
-
-struct ecb_status {
-       /* Status Flags */
-       u_int16_t       no_error      :1, /* Completed with no error */
-                       data_underrun :1,
-                                     :1,
-                       ha_queue_full :1,
-                       spec_check    :1,
-                       data_overrun  :1,
-                       chain_halted  :1,
-                       intr_issued   :1,
-                       status_avail  :1, /* status bytes 14-31 are valid */
-                       sense_stored  :1,
-                                     :1,
-                       init_requied  :1,
-                       major_error   :1,
-                                     :1,
-                       extended_ca   :1,
-                                     :1;
-       /* Host Status */
-       u_int8_t        ha_status;
-       u_int8_t        scsi_status;
-       int32_t         resid_count;
-       u_int32_t       resid_addr;
-       u_int16_t       addit_status;
-       u_int8_t        sense_len;
-       u_int8_t        unused[9];
-       u_int8_t        cdb[6];
-};
-
-typedef enum {
-       HS_OK                   = 0x00,
-       HS_CMD_ABORTED_HOST     = 0x04,
-       HS_CMD_ABORTED_ADAPTER  = 0x05,
-       HS_FIRMWARE_LOAD_REQ    = 0x08,
-       HS_TARGET_NOT_ASSIGNED  = 0x0A,
-       HS_SEL_TIMEOUT          = 0x11,
-       HS_DATA_RUN_ERR         = 0x12,
-       HS_UNEXPECTED_BUSFREE   = 0x13,
-       HS_INVALID_PHASE        = 0x14,
-       HS_INVALID_OPCODE       = 0x16,
-       HS_INVALID_CMD_LINK     = 0x17,
-       HS_INVALID_ECB_PARAM    = 0x18,
-       HS_DUP_TCB_RECEIVED     = 0x19,
-       HS_REQUEST_SENSE_FAILED = 0x1A,
-       HS_TAG_MSG_REJECTED     = 0x1C,
-       HS_HARDWARE_ERR         = 0x20,
-       HS_ATN_TARGET_FAILED    = 0x21,
-       HS_SCSI_RESET_ADAPTER   = 0x22,
-       HS_SCSI_RESET_INCOMING  = 0x23,
-       HS_PROGRAM_CKSUM_ERROR  = 0x80
-} host_status;
-
-typedef enum {
-       ECBOP_NOP                = 0x00,
-       ECBOP_INITIATOR_SCSI_CMD = 0x01,
-       ECBOP_RUN_DIAGNOSTICS    = 0x05,
-       ECBOP_INITIALIZE_SCSI    = 0x06, /* Set syncrate/disc/parity */
-       ECBOP_READ_SENSE         = 0x08,
-       ECBOP_DOWNLOAD_FIRMWARE  = 0x09,
-       ECBOP_READ_HA_INQDATA    = 0x0a,
-       ECBOP_TARGET_SCSI_CMD    = 0x10
-} ecb_op;
-
-struct ha_inquiry_data {
-       struct    scsi_inquiry_data scsi_data;
-       u_int8_t  release_date[8];
-       u_int8_t  release_time[8];
-       u_int16_t firmware_cksum;
-       u_int16_t reserved;
-       u_int16_t target_data[16];
-};
-
-struct hardware_ecb {
-       u_int16_t       opcode;
-       u_int16_t       flag_word1;
-#define        FW1_LINKED_CMD          0x0001
-#define FW1_DISABLE_INTR       0x0080
-#define FW1_SUPPRESS_URUN_ERR  0x0400
-#define        FW1_SG_ECB              0x1000
-#define FW1_ERR_STATUS_BLK_ONLY        0x4000
-#define FW1_AUTO_REQUEST_SENSE 0x8000
-       u_int16_t       flag_word2;
-#define FW2_LUN_MASK           0x0007
-#define FW2_TAG_ENB            0x0008
-#define FW2_TAG_TYPE           0x0030
-#define FW2_TAG_TYPE_SHIFT     4
-#define FW2_DISABLE_DISC       0x0040
-#define FW2_CHECK_DATA_DIR     0x0100
-#define FW2_DATA_DIR_IN                0x0200
-#define FW2_SUPRESS_TRANSFER   0x0400
-#define FW2_CALC_CKSUM         0x0800
-#define FW2_RECOVERY_ECB       0x4000
-#define FW2_NO_RETRY_ON_BUSY   0x8000
-       u_int16_t       reserved;
-       u_int32_t       data_ptr;
-       u_int32_t       data_len;
-       u_int32_t       status_ptr;
-       u_int32_t       link_ptr;
-       u_int32_t       reserved2;
-       u_int32_t       sense_ptr;
-       u_int8_t        sense_len;
-       u_int8_t        cdb_len;
-       u_int16_t       cksum;
-       u_int8_t        cdb[12];
-};
-
-typedef struct {
-       u_int32_t addr;
-       u_int32_t len;
-} ahb_sg_t;
-
-typedef enum {
-       ECB_FREE                = 0x0,
-       ECB_ACTIVE              = 0x1,
-       ECB_DEVICE_RESET        = 0x2,
-       ECB_SCSIBUS_RESET       = 0x4,
-       ECB_RELEASE_SIMQ        = 0x8
-} ecb_state;
-
-struct ecb {
-       struct hardware_ecb      hecb;
-       struct ecb_status        status;
-       struct scsi_sense_data   sense; 
-       ahb_sg_t                 sg_list[AHB_NSEG];
-       SLIST_ENTRY(ecb)         links;
-       ecb_state                state;
-       union ccb               *ccb;
-       bus_dmamap_t             dmamap;
-};
-
-struct ahb_softc {
-       bus_space_tag_t          tag;
-       bus_space_handle_t       bsh;
-       struct  cam_sim         *sim;
-       struct  cam_path        *path;
-       SLIST_HEAD(,ecb)         free_ecbs;
-       LIST_HEAD(,ccb_hdr)      pending_ccbs;
-       struct ecb              *ecb_array;
-       u_int32_t                ecb_physbase;
-       bus_dma_tag_t            buffer_dmat;   /* dmat for buffer I/O */
-       bus_dma_tag_t            ecb_dmat;      /* dmat for our ecb array */
-       bus_dmamap_t             ecb_dmamap;
-       volatile u_int32_t       immed_cmd;
-       struct  ecb             *immed_ecb;
-       struct  ha_inquiry_data *ha_inq_data;
-       u_int32_t                ha_inq_physbase;
-       u_long                   unit;
-       u_int                    init_level;
-       u_int                    scsi_id;
-       u_int                    num_ecbs;
-       u_int                    extended_trans;
-       u_int8_t                 disc_permitted;
-       u_int8_t                 tags_permitted;
-};
index fdc1b05..6c8bc2a 100644 (file)
@@ -1,10 +1,9 @@
 
 # $FreeBSD: src/sys/modules/aic7xxx/ahc/Makefile,v 1.2.2.1 2002/09/02 05:47:44 scottl Exp $
-# $DragonFly: src/sys/dev/disk/aic7xxx/ahc/Makefile,v 1.6 2007/07/06 04:56:22 pavalos Exp $
 
 .PATH: ${.CURDIR}/..
 KMOD=  ahc
-SUBDIR=        ahc_eisa ahc_isa ahc_pci
+SUBDIR=        ahc_pci
 
 BEFORE_DEPEND= aic7xxx_{seq,reg}.h
 
@@ -29,7 +28,7 @@ SRCS= ${GENSRCS}
 SRCS+= aic7xxx_reg_print.c
 CFLAGS+= -DAHC_REG_PRETTY_PRINT=1
 .endif
-SRCS+= aic7xxx.c aic7xxx_93cx6.c aic7xxx_osm.c aic7770.c
+SRCS+= aic7xxx.c aic7xxx_93cx6.c aic7xxx_osm.c
 SRCS+= opt_scsi.h opt_aic7xxx.h opt_cam.h
 SRCS+= device_if.h bus_if.h pci_if.h
 
diff --git a/sys/dev/disk/aic7xxx/ahc/ahc_eisa/Makefile b/sys/dev/disk/aic7xxx/ahc/ahc_eisa/Makefile
deleted file mode 100644 (file)
index a677549..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-
-# $FreeBSD: src/sys/modules/aic7xxx/ahc/ahc_eisa/Makefile,v 1.1.2.1 2002/09/02 05:47:45 scottl Exp $
-# $DragonFly: src/sys/dev/disk/aic7xxx/ahc/ahc_eisa/Makefile,v 1.4 2007/07/06 04:56:22 pavalos Exp $
-
-.PATH: ${.CURDIR}/../..
-KMOD=          ahc_eisa
-
-../aic7xxx_reg.h:
-       ( cd .. ; ${MAKE} aic7xxx_reg.h )
-
-SRCS=  ahc_eisa.c ../aic7xxx_reg.h
-SRCS+= device_if.h bus_if.h
-SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h
-
-CFLAGS+=       -I${.CURDIR}/../../ -I..
-
-CLEANFILES=    ../aic7xxx_reg.h ../aic7xxx_seq.h
-
-.include <bsd.kmod.mk>
diff --git a/sys/dev/disk/aic7xxx/ahc/ahc_isa/Makefile b/sys/dev/disk/aic7xxx/ahc/ahc_isa/Makefile
deleted file mode 100644 (file)
index 987eef0..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-
-# $FreeBSD: src/sys/modules/aic7xxx/ahc/ahc_isa/Makefile,v 1.1 2004/08/17 02:32:30 gibbs Exp $
-# $DragonFly: src/sys/dev/disk/aic7xxx/ahc/ahc_isa/Makefile,v 1.1 2007/07/06 04:56:22 pavalos Exp $
-
-.PATH: ${.CURDIR}/../..
-KMOD=          ahc_isa
-
-../aic7xxx_reg.h:
-       ( cd .. ; ${MAKE} aic7xxx_reg.h )
-
-SRCS=  ahc_isa.c ../aic7xxx_reg.h
-SRCS+= device_if.h bus_if.h pci_if.h isa_if.h
-SRCS+= opt_scsi.h opt_cam.h opt_aic7xxx.h
-
-CFLAGS+=       -I${.CURDIR}/../.. -I..
-
-CLEANFILES=    ../aic7xxx_reg.h ../aic7xxx_seq.h
-
-.include <bsd.kmod.mk>
diff --git a/sys/dev/disk/aic7xxx/ahc_eisa.c b/sys/dev/disk/aic7xxx/ahc_eisa.c
deleted file mode 100644 (file)
index bcf3c24..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * FreeBSD, EISA product support functions
- * 
- *
- * Copyright (c) 1994-1998, 2000, 2001 Justin T. Gibbs.
- * All rights reserved.
- *
- * 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 immediately at the beginning of the file, without modification,
- *    this list of conditions, and the following disclaimer.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $Id: //depot/aic7xxx/freebsd/dev/aic7xxx/ahc_eisa.c#13 $
- *
- * $FreeBSD: src/sys/dev/aic7xxx/ahc_eisa.c,v 1.34 2004/08/17 00:14:30 gibbs Exp $
- * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_eisa.c,v 1.10 2008/05/18 20:30:21 pavalos Exp $
- */
-
-#include "aic7xxx_osm.h"
-
-#include <bus/eisa/eisaconf.h>
-
-static int
-aic7770_probe(device_t dev)
-{
-       struct   aic7770_identity *entry;
-       struct   resource *regs;
-       uint32_t iobase;
-       bus_space_handle_t bsh;
-       bus_space_tag_t tag;
-       u_int    irq;
-       u_int    intdef;
-       u_int    hcntrl;
-       int      shared;
-       int      rid;
-       int      error;
-
-       entry = aic7770_find_device(eisa_get_id(dev));
-       if (entry == NULL)
-               return (ENXIO);
-       device_set_desc(dev, entry->name);
-
-       iobase = (eisa_get_slot(dev) * EISA_SLOT_SIZE) + AHC_EISA_SLOT_OFFSET;
-
-       eisa_add_iospace(dev, iobase, AHC_EISA_IOSIZE, RESVADDR_NONE);
-
-       rid = 0;
-       regs = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE);
-       if (regs == NULL) {
-               device_printf(dev, "Unable to map I/O space?!\n");
-               return ENOMEM;
-       }
-
-       tag = rman_get_bustag(regs);
-       bsh = rman_get_bushandle(regs);
-       error = 0;
-
-       /* Pause the card preseving the IRQ type */
-       hcntrl = bus_space_read_1(tag, bsh, HCNTRL) & IRQMS;
-       bus_space_write_1(tag, bsh, HCNTRL, hcntrl | PAUSE);
-       while ((bus_space_read_1(tag, bsh, HCNTRL) & PAUSE) == 0)
-               ;
-
-       /* Make sure we have a valid interrupt vector */
-       intdef = bus_space_read_1(tag, bsh, INTDEF);
-       shared = (intdef & EDGE_TRIG) ? EISA_TRIGGER_EDGE : EISA_TRIGGER_LEVEL;
-       irq = intdef & VECTOR;
-       switch (irq) {
-       case 9: 
-       case 10:
-       case 11:
-       case 12:
-       case 14:
-       case 15:
-               break;
-       default:
-               kprintf("aic7770 at slot %d: illegal irq setting %d\n",
-                      eisa_get_slot(dev), intdef);
-               error = ENXIO;
-       }
-
-       if (error == 0)
-               eisa_add_intr(dev, irq, shared);
-
-       bus_release_resource(dev, SYS_RES_IOPORT, rid, regs);
-       return (error);
-}
-
-static int
-aic7770_attach(device_t dev)
-{
-       struct   aic7770_identity *entry;
-       struct   ahc_softc *ahc;
-       char    *name;
-       int      error;
-
-       entry = aic7770_find_device(eisa_get_id(dev));
-       if (entry == NULL)
-               return (ENXIO);
-
-       /*
-        * Allocate a softc for this card and
-        * set it up for attachment by our
-        * common detect routine.
-        */
-       name = kmalloc(strlen(device_get_nameunit(dev)) + 1, M_DEVBUF, M_INTWAIT);
-       strcpy(name, device_get_nameunit(dev));
-       ahc = ahc_alloc(dev, name);
-       if (ahc == NULL)
-               return (ENOMEM);
-
-       ahc_set_unit(ahc, device_get_unit(dev));
-
-       /* Allocate a dmatag for our SCB DMA maps */
-       /* XXX Should be a child of the PCI bus dma tag */
-       error = aic_dma_tag_create(ahc, /*parent*/NULL, /*alignment*/1,
-                                  /*boundary*/0,
-                                  /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
-                                  /*highaddr*/BUS_SPACE_MAXADDR,
-                                  /*filter*/NULL, /*filterarg*/NULL,
-                                  /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
-                                  /*nsegments*/AHC_NSEG,
-                                  /*maxsegsz*/AHC_MAXTRANSFER_SIZE,
-                                  /*flags*/0,
-                                  &ahc->parent_dmat);
-
-       if (error != 0) {
-               kprintf("ahc_eisa_attach: Could not allocate DMA tag "
-                      "- error %d\n", error);
-               ahc_free(ahc);
-               return (ENOMEM);
-       }
-       ahc->dev_softc = dev;
-       error = aic7770_config(ahc, entry, /*unused ioport arg*/0);
-       if (error != 0) {
-               ahc_free(ahc);
-               return (error);
-       }
-
-       ahc_attach(ahc);
-       return (0);
-}
-
-
-static device_method_t ahc_eisa_device_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         aic7770_probe),
-       DEVMETHOD(device_attach,        aic7770_attach),
-       DEVMETHOD(device_detach,        ahc_detach),
-       { 0, 0 }
-};
-
-static driver_t ahc_eisa_driver = {
-       "ahc",
-       ahc_eisa_device_methods,
-       sizeof(struct ahc_softc)
-};
-
-DRIVER_MODULE(ahc_eisa, eisa, ahc_eisa_driver, ahc_devclass, 0, 0);
-MODULE_DEPEND(ahc_eisa, ahc, 1, 1, 1);
-MODULE_VERSION(ahc_eisa, 1);
diff --git a/sys/dev/disk/aic7xxx/ahc_isa.c b/sys/dev/disk/aic7xxx/ahc_isa.c
deleted file mode 100644 (file)
index 948ceeb..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * FreeBSD, VLB/ISA product support functions
- *
- * Copyright (c) 2004 Justin T. Gibbs.
- * All rights reserved.
- *
- * 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,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
- *
- * $Id$
- *
- * $FreeBSD: src/sys/dev/aic7xxx/ahc_isa.c,v 1.5 2004/10/15 23:39:52 gibbs Exp $
- * $DragonFly: src/sys/dev/disk/aic7xxx/ahc_isa.c,v 1.4 2008/05/18 20:30:21 pavalos Exp $
- */
-
-#include "aic7xxx_osm.h"
-
-#include <machine/limits.h>    /* For CHAR_BIT */
-#include <bus/isa/isavar.h>    /* For ISA attach glue */
-
-
-static struct aic7770_identity *ahc_isa_find_device(bus_space_tag_t tag,
-                                                   bus_space_handle_t bsh);
-static void                    ahc_isa_identify(driver_t *driver,
-                                                device_t parent);
-static int                     ahc_isa_probe(device_t dev);
-static int                     ahc_isa_attach(device_t dev);
-
-/*
- * Perform an EISA probe of the address with the addition
- * of a "priming" step.  The 284X requires priming (a write
- * to offset 0x80, the first EISA ID register) to ensure it
- * is not mistaken as an EISA card.  Once we have the ID,
- * lookup the controller in the aic7770 table of supported
- * devices.
- */
-static struct aic7770_identity *
-ahc_isa_find_device(bus_space_tag_t tag, bus_space_handle_t bsh) {
-       uint32_t  id;
-       u_int     id_size;
-       int       i;
-
-       id = 0;
-       id_size = sizeof(id);
-       for (i = 0; i < id_size; i++) {
-               bus_space_write_1(tag, bsh, 0x80, 0x80 + i);
-               id |= bus_space_read_1(tag, bsh, 0x80 + i)
-                  << ((id_size - i - 1) * CHAR_BIT);
-       }
-                           
-       return (aic7770_find_device(id));
-}
-
-static void
-ahc_isa_identify(driver_t *driver, device_t parent)
-{
-       int slot;
-       int max_slot;
-
-       max_slot = 14;
-       for (slot = 0; slot <= max_slot; slot++) {
-               struct aic7770_identity *entry;
-               bus_space_tag_t     tag;
-               bus_space_handle_t  bsh;
-               struct resource    *regs;
-               uint32_t            iobase;
-               int                 rid;
-
-               rid = 0;
-               iobase = (slot * AHC_EISA_SLOT_SIZE) + AHC_EISA_SLOT_OFFSET;
-               regs = bus_alloc_resource(parent, SYS_RES_IOPORT, &rid,
-                                         iobase, iobase, AHC_EISA_IOSIZE,
-                                         RF_ACTIVE);
-               if (regs == NULL) {
-                       if (bootverbose)
-                               kprintf("ahc_isa_probe %d: ioport 0x%x "
-                                      "alloc failed\n", slot, iobase);
-                       continue;
-               }
-
-               tag = rman_get_bustag(regs);
-               bsh = rman_get_bushandle(regs);
-
-               entry = ahc_isa_find_device(tag, bsh);
-               if (entry != NULL) {
-                       device_t child;
-
-                       child = BUS_ADD_CHILD(parent, parent, ISA_ORDER_SPECULATIVE,
-                                             "ahc", -1);
-                       if (child != NULL) {
-                               device_set_driver(child, driver);
-                               bus_set_resource(child, SYS_RES_IOPORT,
-                                                0, iobase, AHC_EISA_IOSIZE);
-                       }
-               }
-               bus_release_resource(parent, SYS_RES_IOPORT, rid, regs);
-       }
-}
-
-static int
-ahc_isa_probe(device_t dev)
-{
-       struct    aic7770_identity *entry;
-       bus_space_tag_t     tag;
-       bus_space_handle_t  bsh;
-       struct    resource *regs;
-       struct    resource *irq;
-       uint32_t  iobase;
-       u_int     intdef;
-       u_int     hcntrl;
-       int       irq_num;
-       int       error;
-       int       zero;
-
-       error = ENXIO;
-       zero = 0;
-       regs = NULL;
-       irq = NULL;
-
-       /* Skip probes for ISA PnP devices */
-       if (isa_get_logicalid(dev) != 0)
-               return (error);
-
-       regs = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &zero, RF_ACTIVE);
-       if (regs == NULL) {
-               device_printf(dev, "No resources allocated.\n");
-               return (ENOMEM);
-       }
-
-       iobase = rman_get_start(regs);
-       tag = rman_get_bustag(regs);
-       bsh = rman_get_bushandle(regs);
-
-       entry = ahc_isa_find_device(tag, bsh);
-       if (entry == NULL)
-               goto cleanup;
-
-       /* Pause the card preseving the IRQ type */
-       hcntrl = bus_space_read_1(tag, bsh, HCNTRL) & IRQMS;
-       bus_space_write_1(tag, bsh, HCNTRL, hcntrl | PAUSE);
-       while ((bus_space_read_1(tag, bsh, HCNTRL) & PAUSE) == 0)
-               ;
-
-       /* Make sure we have a valid interrupt vector */
-       intdef = bus_space_read_1(tag, bsh, INTDEF);
-       irq_num = intdef & VECTOR;
-       switch (irq_num) {
-       case 9: 
-       case 10:
-       case 11:
-       case 12:
-       case 14:
-       case 15:
-               break;
-       default:
-               device_printf(dev, "@0x%x: illegal irq setting %d\n",
-                             iobase, irq_num);
-               goto cleanup;
-       }
-
-       if (bus_set_resource(dev, SYS_RES_IRQ, zero, irq_num, 1) != 0)
-               goto cleanup;
-
-       /*
-        * The 284X only supports edge triggered interrupts,
-        * so do not claim RF_SHAREABLE.
-        */
-       irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &zero,
-                                    0 /*!(RF_ACTIVE|RF_SHAREABLE)*/);
-       if (irq != NULL) {
-               error = 0;
-               device_set_desc(dev, entry->name);
-       } else 
-               device_printf(dev, "@0x%x: irq %d allocation failed\n",
-                             iobase, irq_num);
-
-cleanup:
-       if (regs != NULL) {
-               bus_release_resource(dev, SYS_RES_IOPORT, zero, regs);
-               regs = NULL;
-       }
-
-       if (irq != NULL) {
-               bus_release_resource(dev, SYS_RES_IRQ, zero, irq);
-               irq = NULL;
-       }
-
-       return (error);
-}
-
-static int
-ahc_isa_attach(device_t dev)
-{
-       struct   aic7770_identity *entry;
-       bus_space_tag_t     tag;
-       bus_space_handle_t  bsh;
-       struct    resource *regs;
-       struct    ahc_softc *ahc;
-       char     *name;
-       int       zero;
-       int       error;
-
-       zero = 0;
-       regs = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &zero, RF_ACTIVE);
-       if (regs == NULL)
-               return (ENOMEM);
-
-       tag = rman_get_bustag(regs);
-       bsh = rman_get_bushandle(regs);
-       entry = ahc_isa_find_device(tag, bsh);
-       bus_release_resource(dev, SYS_RES_IOPORT, zero, regs);
-       if (entry == NULL)
-               return (ENODEV);
-
-       /*
-        * Allocate a softc for this card and
-        * set it up for attachment by our
-        * common detect routine.
-        */
-       name = kmalloc(strlen(device_get_nameunit(dev)) + 1, M_DEVBUF, M_INTWAIT);
-       strcpy(name, device_get_nameunit(dev));
-       ahc = ahc_alloc(dev, name);
-       if (ahc == NULL)
-               return (ENOMEM);
-
-       ahc_set_unit(ahc, device_get_unit(dev));
-
-       /* Allocate a dmatag for our SCB DMA maps */
-       /* XXX Should be a child of the VLB/ISA bus dma tag */
-       error = aic_dma_tag_create(ahc, /*parent*/NULL, /*alignment*/1,
-                                  /*boundary*/0,
-                                  /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
-                                  /*highaddr*/BUS_SPACE_MAXADDR,
-                                  /*filter*/NULL, /*filterarg*/NULL,
-                                  /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
-                                  /*nsegments*/AHC_NSEG,
-                                  /*maxsegsz*/AHC_MAXTRANSFER_SIZE,
-                                  /*flags*/0,
-                                  &ahc->parent_dmat);
-
-       if (error != 0) {
-               kprintf("ahc_isa_attach: Could not allocate DMA tag "
-                      "- error %d\n", error);
-               ahc_free(ahc);
-               return (ENOMEM);
-       }
-       ahc->dev_softc = dev;
-       error = aic7770_config(ahc, entry, /*unused ioport arg*/0);
-       if (error != 0) {
-               ahc_free(ahc);
-               return (error);
-       }
-
-       ahc_attach(ahc);
-       return (0);
-}
-
-static device_method_t ahc_isa_device_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_identify,      ahc_isa_identify),
-       DEVMETHOD(device_probe,         ahc_isa_probe),
-       DEVMETHOD(device_attach,        ahc_isa_attach),
-       DEVMETHOD(device_detach,        ahc_detach),
-       { 0, 0 }
-};
-
-static driver_t ahc_isa_driver = {
-       "ahc",
-       ahc_isa_device_methods,
-       sizeof(struct ahc_softc)
-};
-
-DRIVER_MODULE(ahc_isa, isa, ahc_isa_driver, ahc_devclass, 0, 0);
-MODULE_DEPEND(ahc_isa, ahc, 1, 1, 1);
-MODULE_VERSION(ahc_isa, 1);
diff --git a/sys/dev/disk/aic7xxx/aic7770.c b/sys/dev/disk/aic7xxx/aic7770.c
deleted file mode 100644 (file)
index 80abbbf..0000000
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Product specific probe and attach routines for:
- *     27/284X and aic7770 motherboard SCSI controllers
- *
- * Copyright (c) 1994-1998, 2000, 2001 Justin T. Gibbs.
- * All rights reserved.
- *
- * 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,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES.
- *
- * $Id: //depot/aic7xxx/aic7xxx/aic7770.c#34 $
- *
- * $FreeBSD: src/sys/dev/aic7xxx/aic7770.c,v 1.16 2003/12/17 00:02:09 gibbs Exp $
- * $DragonFly: src/sys/dev/disk/aic7xxx/aic7770.c,v 1.9 2008/02/09 18:13:13 pavalos Exp $
- */
-
-#ifdef __linux__
-#include "aic7xxx_osm.h"
-#include "aic7xxx_inline.h"
-#include "aic7xxx_93cx6.h"
-#else
-#include "aic7xxx_osm.h"
-#include "aic7xxx_inline.h"
-#include "aic7xxx_93cx6.h"
-#endif
-
-#define ID_AIC7770     0x04907770
-#define ID_AHA_274x    0x04907771
-#define ID_AHA_284xB   0x04907756 /* BIOS enabled */
-#define ID_AHA_284x    0x04907757 /* BIOS disabled*/
-#define        ID_OLV_274x     0x04907782 /* Olivetti OEM */
-#define        ID_OLV_274xD    0x04907783 /* Olivetti OEM (Differential) */
-
-static int aic7770_chip_init(struct ahc_softc *ahc);
-static int aic7770_suspend(struct ahc_softc *ahc);
-static int aic7770_resume(struct ahc_softc *ahc);
-static int aha2840_load_seeprom(struct ahc_softc *ahc);
-static ahc_device_setup_t ahc_aic7770_VL_setup;
-static ahc_device_setup_t ahc_aic7770_EISA_setup;
-static ahc_device_setup_t ahc_aic7770_setup;
-
-struct aic7770_identity aic7770_ident_table[] =
-{
-       {
-               ID_AHA_274x,
-               0xFFFFFFFF,
-               "Adaptec 274X SCSI adapter",
-               ahc_aic7770_EISA_setup
-       },
-       {
-               ID_AHA_284xB,
-               0xFFFFFFFE,
-               "Adaptec 284X SCSI adapter",
-               ahc_aic7770_VL_setup
-       },
-       {
-               ID_AHA_284x,
-               0xFFFFFFFE,
-               "Adaptec 284X SCSI adapter (BIOS Disabled)",
-               ahc_aic7770_VL_setup
-       },
-       {
-               ID_OLV_274x,
-               0xFFFFFFFF,
-               "Adaptec (Olivetti OEM) 274X SCSI adapter",
-               ahc_aic7770_EISA_setup
-       },
-       {
-               ID_OLV_274xD,
-               0xFFFFFFFF,
-               "Adaptec (Olivetti OEM) 274X Differential SCSI adapter",
-               ahc_aic7770_EISA_setup
-       },
-       /* Generic chip probes for devices we don't know 'exactly' */
-       {
-               ID_AIC7770,
-               0xFFFFFFFF,
-               "Adaptec aic7770 SCSI adapter",
-               ahc_aic7770_EISA_setup
-       }
-};
-const int ahc_num_aic7770_devs = NUM_ELEMENTS(aic7770_ident_table);
-
-struct aic7770_identity *
-aic7770_find_device(uint32_t id)
-{
-       struct  aic7770_identity *entry;
-       int     i;
-
-       for (i = 0; i < ahc_num_aic7770_devs; i++) {
-               entry = &aic7770_ident_table[i];
-               if (entry->full_id == (id & entry->id_mask))
-                       return (entry);
-       }
-       return (NULL);
-}
-
-int
-aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
-{
-       int     error;
-       int     have_seeprom;
-       u_int   hostconf;
-       u_int   irq;
-       u_int   intdef;
-
-       error = entry->setup(ahc);
-       have_seeprom = 0;
-       if (error != 0)
-               return (error);
-
-       error = aic7770_map_registers(ahc, io);
-       if (error != 0)
-               return (error);
-
-       /*
-        * Before we continue probing the card, ensure that
-        * its interrupts are *disabled*.  We don't want
-        * a misstep to hang the machine in an interrupt
-        * storm.
-        */
-       ahc_intr_enable(ahc, FALSE);
-
-       ahc->description = entry->name;
-       error = ahc_softc_init(ahc);
-       if (error != 0)
-               return (error);
-
-       ahc->bus_chip_init = aic7770_chip_init;
-       ahc->bus_suspend = aic7770_suspend;
-       ahc->bus_resume = aic7770_resume;
-
-       error = ahc_reset(ahc, /*reinit*/FALSE);
-       if (error != 0)
-               return (error);
-
-       /* Make sure we have a valid interrupt vector */
-       intdef = ahc_inb(ahc, INTDEF);
-       irq = intdef & VECTOR;
-       switch (irq) {
-       case 9:
-       case 10:
-       case 11:
-       case 12:
-       case 14:
-       case 15:
-               break;
-       default:
-               kprintf("aic7770_config: invalid irq setting %d\n", intdef);
-               return (ENXIO);
-       }
-
-       if ((intdef & EDGE_TRIG) != 0)
-               ahc->flags |= AHC_EDGE_INTERRUPT;
-
-       switch (ahc->chip & (AHC_EISA|AHC_VL)) {
-       case AHC_EISA:
-       {
-               u_int biosctrl;
-               u_int scsiconf;
-               u_int scsiconf1;
-
-               biosctrl = ahc_inb(ahc, HA_274_BIOSCTRL);
-               scsiconf = ahc_inb(ahc, SCSICONF);
-               scsiconf1 = ahc_inb(ahc, SCSICONF + 1);
-
-               /* Get the primary channel information */
-               if ((biosctrl & CHANNEL_B_PRIMARY) != 0)
-                       ahc->flags |= 1;
-
-               if ((biosctrl & BIOSMODE) == BIOSDISABLED) {
-                       ahc->flags |= AHC_USEDEFAULTS;
-               } else {
-                       if ((ahc->features & AHC_WIDE) != 0) {
-                               ahc->our_id = scsiconf1 & HWSCSIID;
-                               if (scsiconf & TERM_ENB)
-                                       ahc->flags |= AHC_TERM_ENB_A;
-                       } else {
-                               ahc->our_id = scsiconf & HSCSIID;
-                               ahc->our_id_b = scsiconf1 & HSCSIID;
-                               if (scsiconf & TERM_ENB)
-                                       ahc->flags |= AHC_TERM_ENB_A;
-                               if (scsiconf1 & TERM_ENB)
-                                       ahc->flags |= AHC_TERM_ENB_B;
-                       }
-               }
-               if ((ahc_inb(ahc, HA_274_BIOSGLOBAL) & HA_274_EXTENDED_TRANS))
-                       ahc->flags |= AHC_EXTENDED_TRANS_A|AHC_EXTENDED_TRANS_B;
-               break;
-       }
-       case AHC_VL:
-       {
-               have_seeprom = aha2840_load_seeprom(ahc);
-               break;
-       }
-       default:
-               break;
-       }
-       if (have_seeprom == 0) {
-               kfree(ahc->seep_config, M_DEVBUF);
-               ahc->seep_config = NULL;
-       }
-
-       /*
-        * Ensure autoflush is enabled
-        */
-       ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~AUTOFLUSHDIS);
-
-       /* Setup the FIFO threshold and the bus off time */
-       hostconf = ahc_inb(ahc, HOSTCONF);
-       ahc_outb(ahc, BUSSPD, hostconf & DFTHRSH);
-       ahc_outb(ahc, BUSTIME, (hostconf << 2) & BOFF);
-
-       ahc->bus_softc.aic7770_softc.busspd = hostconf & DFTHRSH;
-       ahc->bus_softc.aic7770_softc.bustime = (hostconf << 2) & BOFF;
-
-       /*
-        * Generic aic7xxx initialization.
-        */
-       error = ahc_init(ahc);
-       if (error != 0)
-               return (error);
-
-       error = aic7770_map_int(ahc, irq);
-       if (error != 0)
-               return (error);
-
-       ahc_lock(ahc);
-       /*
-        * Link this softc in with all other ahc instances.
-        */
-       ahc_softc_insert(ahc);
-
-       /*
-        * Enable the board's BUS drivers
-        */
-       ahc_outb(ahc, BCTL, ENABLE);
-
-       ahc_unlock(ahc);
-
-       return (0);
-}
-
-static int
-aic7770_chip_init(struct ahc_softc *ahc)
-{
-       ahc_outb(ahc, BUSSPD, ahc->bus_softc.aic7770_softc.busspd);
-       ahc_outb(ahc, BUSTIME, ahc->bus_softc.aic7770_softc.bustime);
-       ahc_outb(ahc, SBLKCTL, ahc_inb(ahc, SBLKCTL) & ~AUTOFLUSHDIS);
-       ahc_outb(ahc, BCTL, ENABLE);
-       return (ahc_chip_init(ahc));
-}
-
-static int
-aic7770_suspend(struct ahc_softc *ahc)
-{
-       return (ahc_suspend(ahc));
-}
-
-static int
-aic7770_resume(struct ahc_softc *ahc)
-{
-       return (ahc_resume(ahc));
-}
-
-/*
- * Read the 284x SEEPROM.
- */
-static int
-aha2840_load_seeprom(struct ahc_softc *ahc)
-{
-       struct  seeprom_descriptor sd;
-       struct  seeprom_config *sc;
-       int     have_seeprom;
-       uint8_t scsi_conf;
-
-       sd.sd_ahc = ahc;
-       sd.sd_control_offset = SEECTL_2840;
-       sd.sd_status_offset = STATUS_2840;
-       sd.sd_dataout_offset = STATUS_2840;             
-       sd.sd_chip = C46;
-       sd.sd_MS = 0;
-       sd.sd_RDY = EEPROM_TF;
-       sd.sd_CS = CS_2840;
-       sd.sd_CK = CK_2840;
-       sd.sd_DO = DO_2840;
-       sd.sd_DI = DI_2840;
-       sc = ahc->seep_config;
-
-       if (bootverbose)
-               kprintf("%s: Reading SEEPROM...", ahc_name(ahc));
-       have_seeprom = ahc_read_seeprom(&sd, (uint16_t *)sc,
-                                       /*start_addr*/0, sizeof(*sc)/2);
-
-       if (have_seeprom) {
-
-               if (ahc_verify_cksum(sc) == 0) {
-                       if(bootverbose)
-                               kprintf ("checksum error\n");
-                       have_seeprom = 0;
-               } else if (bootverbose) {
-                       kprintf("done.\n");
-               }
-       }
-
-       if (!have_seeprom) {
-               if (bootverbose)
-                       kprintf("%s: No SEEPROM available\n", ahc_name(ahc));
-               ahc->flags |= AHC_USEDEFAULTS;
-       } else {
-               /*
-                * Put the data we've collected down into SRAM
-                * where ahc_init will find it.
-                */
-               int      i;
-               int      max_targ;
-               uint16_t discenable;
-
-               max_targ = (ahc->features & AHC_WIDE) != 0 ? 16 : 8;
-               discenable = 0;
-               for (i = 0; i < max_targ; i++){
-                       uint8_t target_settings;
-
-                       target_settings = (sc->device_flags[i] & CFXFER) << 4;
-                       if (sc->device_flags[i] & CFSYNCH)
-                               target_settings |= SOFS;
-                       if (sc->device_flags[i] & CFWIDEB)
-                               target_settings |= WIDEXFER;
-                       if (sc->device_flags[i] & CFDISC)
-                               discenable |= (0x01 << i);
-                       ahc_outb(ahc, TARG_SCSIRATE + i, target_settings);
-               }
-               ahc_outb(ahc, DISC_DSB, ~(discenable & 0xff));
-               ahc_outb(ahc, DISC_DSB + 1, ~((discenable >> 8) & 0xff));
-
-               ahc->our_id = sc->brtime_id & CFSCSIID;
-
-               scsi_conf = (ahc->our_id & 0x7);
-               if (sc->adapter_control & CFSPARITY)
-                       scsi_conf |= ENSPCHK;
-               if (sc->adapter_control & CFRESETB)
-                       scsi_conf |= RESET_SCSI;
-
-               if (sc->bios_control & CF284XEXTEND)            
-                       ahc->flags |= AHC_EXTENDED_TRANS_A;
-               /* Set SCSICONF info */
-               ahc_outb(ahc, SCSICONF, scsi_conf);
-
-               if (sc->adapter_control & CF284XSTERM)
-                       ahc->flags |= AHC_TERM_ENB_A;
-       }
-       return (have_seeprom);
-}
-
-static int
-ahc_aic7770_VL_setup(struct ahc_softc *ahc)
-{
-       int error;
-
-       error = ahc_aic7770_setup(ahc);
-       ahc->chip |= AHC_VL;
-       return (error);
-}
-
-static int
-ahc_aic7770_EISA_setup(struct ahc_softc *ahc)
-{
-       int error;
-
-       error = ahc_aic7770_setup(ahc);
-       ahc->chip |= AHC_EISA;
-       return (error);
-}
-
-static int
-ahc_aic7770_setup(struct ahc_softc *ahc)
-{
-       ahc->channel = 'A';
-       ahc->channel_b = 'B';
-       ahc->chip = AHC_AIC7770;
-       ahc->features = AHC_AIC7770_FE;
-       ahc->bugs |= AHC_TMODE_WIDEODD_BUG;
-       ahc->flags |= AHC_PAGESCBS;
-       ahc->instruction_ram_size = 448;
-       return (0);
-}
index 06dee13..05c1fef 100644 (file)
@@ -3936,12 +3936,8 @@ int
 ahc_softc_init(struct ahc_softc *ahc)
 {
 
-       /* The IRQMS bit is only valid on VL and EISA chips */
-       if ((ahc->chip & AHC_PCI) == 0)
-               ahc->unpause = ahc_inb(ahc, HCNTRL) & IRQMS;
-       else
-               ahc->unpause = 0;
-       ahc->pause = ahc->unpause | PAUSE; 
+       ahc->unpause = 0;
+       ahc->pause = PAUSE;
        /* XXX The shared scb data stuff should be deprecated */
        if (ahc->scb_data == NULL) {
                ahc->scb_data = kmalloc(sizeof(*ahc->scb_data),
index 0699bd6..ed8f76f 100644 (file)
@@ -893,14 +893,6 @@ typedef enum {
 /*********************** Software Configuration Structure *********************/
 TAILQ_HEAD(scb_tailq, scb);
 
-struct ahc_aic7770_softc {
-       /*
-        * Saved register state used for chip_init().
-        */
-       uint8_t busspd;
-       uint8_t bustime;
-};
-
 struct ahc_pci_softc {
        /*
         * Saved register state used for chip_init().
@@ -918,7 +910,6 @@ struct ahc_pci_softc {
 };
 
 union ahc_bus_softc {
-       struct ahc_aic7770_softc aic7770_softc;
        struct ahc_pci_softc pci_softc;
 };
 
@@ -1171,20 +1162,6 @@ struct ahc_pci_identity {
 extern struct ahc_pci_identity ahc_pci_ident_table[];
 extern const u_int ahc_num_pci_devs;
 
-/***************************** VL/EISA Declarations ***************************/
-struct aic7770_identity {
-       uint32_t                 full_id;
-       uint32_t                 id_mask;
-       const char              *name;
-       ahc_device_setup_t      *setup;
-};
-extern struct aic7770_identity aic7770_ident_table[];
-extern const int ahc_num_aic7770_devs;
-
-#define AHC_EISA_SLOT_SIZE     0x1000
-#define AHC_EISA_SLOT_OFFSET   0xc00
-#define AHC_EISA_IOSIZE                0x100
-
 /*************************** Function Declarations ****************************/
 /******************************************************************************/
 u_int                  ahc_index_busy_tcl(struct ahc_softc *ahc, u_int tcl);
@@ -1198,12 +1175,6 @@ int                       ahc_pci_config(struct ahc_softc *,
                                        struct ahc_pci_identity *);
 int                     ahc_pci_test_register_access(struct ahc_softc *);
 
-/*************************** EISA/VL Front End ********************************/
-struct aic7770_identity *aic7770_find_device(uint32_t);
-int                     aic7770_config(struct ahc_softc *ahc,
-                                       struct aic7770_identity *,
-                                       u_int port);
-
 /************************** SCB and SCB queue management **********************/
 int            ahc_probe_scbs(struct ahc_softc *);
 void           ahc_run_untagged_queues(struct ahc_softc *ahc);
index 26c02d9..8f9beaa 100644 (file)
@@ -116,27 +116,6 @@ ahc_map_int(struct ahc_softc *ahc)
        return (error);
 }
 
-int
-aic7770_map_registers(struct ahc_softc *ahc, u_int unused_ioport_arg)
-{
-       struct  resource *regs;
-       int     rid;
-
-       rid = 0;
-       regs = bus_alloc_resource_any(ahc->dev_softc, SYS_RES_IOPORT, &rid,
-                                     RF_ACTIVE);
-       if (regs == NULL) {
-               device_printf(ahc->dev_softc, "Unable to map I/O space?!\n");
-               return ENOMEM;
-       }
-       ahc->platform_data->regs_res_type = SYS_RES_IOPORT;
-       ahc->platform_data->regs_res_id = rid,
-       ahc->platform_data->regs = regs;
-       ahc->tag = rman_get_bustag(regs);
-       ahc->bsh = rman_get_bushandle(regs);
-       return (0);
-}
-
 /*
  * Attach all the sub-devices we can find
  */
index fa0f00f..48a7e2b 100644 (file)
@@ -219,22 +219,6 @@ int ahc_pci_map_registers(struct ahc_softc *ahc);
 #define ahc_pci_map_int ahc_map_int
 #endif /*AIC_PCI_CONFIG*/
 
-/******************************** VL/EISA *************************************/
-int aic7770_map_registers(struct ahc_softc *ahc, u_int port);
-static __inline int aic7770_map_int(struct ahc_softc *, int);
-
-static __inline int
-aic7770_map_int(struct ahc_softc *ahc, int irq)
-{
-       /*
-        * The IRQ is unused in the FreeBSD
-        * implementation since the EISA and
-        * ISA attachments register the IRQ
-        * with newbus before the core is called.
-        */
-       return ahc_map_int(ahc);
-}
-
 /********************************* Debug **************************************/
 static __inline void   ahc_print_path(struct ahc_softc *, struct scb *);
 static __inline void   ahc_platform_dump_card_state(struct ahc_softc *ahc);
index 3dc2c1e..fa3dae8 100644 (file)
@@ -2,7 +2,6 @@
  * Generic driver for the BusLogic MultiMaster SCSI host adapters
  * Product specific probe and attach routines can be found in:
  * sys/dev/buslogic/bt_isa.c   BT-54X, BT-445 cards
- * sys/dev/buslogic/bt_eisa.c  BT-74X, BT-75x cards, SDC3222F
  * sys/dev/buslogic/bt_pci.c   BT-946, BT-948, BT-956, BT-958 cards
  *
  * Copyright (c) 1998, 1999 Justin T. Gibbs.
@@ -30,7 +29,6 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/buslogic/bt.c,v 1.25.2.1 2000/08/02 22:32:26 peter Exp $
- * $DragonFly: src/sys/dev/disk/buslogic/bt.c,v 1.19 2008/05/18 20:30:22 pavalos Exp $
  */
 
  /*
@@ -166,7 +164,7 @@ u_long bt_unit = 0;
  * XXX
  * Do our own re-probe protection until a configuration
  * manager can do it for us.  This ensures that we don't
- * reprobe a card already found by the EISA or PCI probes.
+ * reprobe a card already found by the PCI probes.
  */
 struct bt_isa_port bt_isa_ports[] =
 {
@@ -466,7 +464,6 @@ bt_fetch_adapter_info(device_t dev)
         *              BT-542B/742A (revision H)
         *      2.xx    BusLogic "A" Series Host Adapters:
         *              BT-542B/742A (revision G and below)
-        *      0.xx    AMI FastDisk VLB/EISA BusLogic Clone Host Adapter
         */
        length_param = sizeof(esetup_info);
        error = bt_cmd(bt, BOP_INQUIRE_ESETUP_INFO, &length_param, /*parmlen*/1,
@@ -485,10 +482,6 @@ bt_fetch_adapter_info(device_t dev)
                && (strncmp(bt->firmware_ver, "2.1", 3) == 0
                 || strncmp(bt->firmware_ver, "2.20", 4) == 0)) {
                ksnprintf(bt->model, sizeof(bt->model), "742A");
-       } else if (esetup_info.bus_type == 'E'
-               && bt->firmware_ver[0] == '0') {
-               /* AMI FastDisk EISA Series 441 0.x */
-               ksnprintf(bt->model, sizeof(bt->model), "747A");
        } else {
                ha_model_data_t model_data;
                int i;
diff --git a/sys/dev/disk/buslogic/bt_eisa.c b/sys/dev/disk/buslogic/bt_eisa.c
deleted file mode 100644 (file)
index 9c55191..0000000
+++ /dev/null
@@ -1,340 +0,0 @@
-/*
- * Product specific probe and attach routines for:
- *     Buslogic BT74x SCSI controllers
- *
- * Copyright (c) 1995, 1998, 1999 Justin T. Gibbs
- * All rights reserved.
- *
- * 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 immediately at the beginning of the file, without modification,
- *    this list of conditions, and the following disclaimer.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/sys/dev/buslogic/bt_eisa.c,v 1.12 2000/01/29 14:27:26 peter Exp $
- * $DragonFly: src/sys/dev/disk/buslogic/bt_eisa.c,v 1.5 2006/12/22 23:26:16 swildner Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#include <bus/eisa/eisaconf.h>
-
-#include "btreg.h"
-
-#define EISA_DEVICE_ID_BUSLOGIC_74X_B  0x0ab34201
-#define EISA_DEVICE_ID_BUSLOGIC_74X_C  0x0ab34202
-#define EISA_DEVICE_ID_SDC3222F                0x0ab34781
-#define        EISA_DEVICE_ID_AMI_4801         0x05a94801
-
-#define BT_IOSIZE              0x04            /* Move to central header */
-#define BT_EISA_IOSIZE         0x100
-#define        BT_EISA_SLOT_OFFSET     0xc00
-
-#define EISA_IOCONF                    0x08C
-#define                PORTADDR                0x07
-#define                        PORT_330        0x00
-#define                        PORT_334        0x01
-#define                        PORT_230        0x02
-#define                        PORT_234        0x03
-#define                        PORT_130        0x04
-#define                        PORT_134        0x05
-#define                IRQ_CHANNEL             0xe0
-#define                        INT_11          0x40
-#define                        INT_10          0x20
-#define                        INT_15          0xa0
-#define                        INT_12          0x60
-#define                        INT_14          0x80
-#define                        INT_9           0x00
-
-#define EISA_IRQ_TYPE                   0x08D
-#define       LEVEL                     0x40
-
-/* Definitions for the AMI Series 48 controler */
-#define        AMI_EISA_IOSIZE                 0x500   /* Two separate ranges?? */
-#define        AMI_EISA_SLOT_OFFSET            0x800
-#define        AMI_EISA_IOCONF                 0x000
-#define                AMI_DMA_CHANNEL         0x03
-#define                AMI_IRQ_CHANNEL         0x1c
-#define                        AMI_INT_15      0x14
-#define                        AMI_INT_14      0x10
-#define                        AMI_INT_12      0x0c
-#define                        AMI_INT_11      0x00
-#define                        AMI_INT_10      0x08
-#define                        AMI_INT_9       0x04
-#define                AMI_BIOS_ADDR           0xe0
-
-#define        AMI_EISA_IOCONF1                0x001
-#define                AMI_PORTADDR            0x0e
-#define                        AMI_PORT_334    0x08
-#define                        AMI_PORT_330    0x00
-#define                        AMI_PORT_234    0x0c
-#define                        AMI_PORT_230    0x04
-#define                        AMI_PORT_134    0x0a
-#define                        AMI_PORT_130    0x02
-#define                AMI_IRQ_LEVEL           0x01
-
-
-#define        AMI_MISC2_OPTIONS               0x49E
-#define                AMI_ENABLE_ISA_DMA      0x08
-
-static const char *bt_match(eisa_id_t type);
-
-static int
-bt_eisa_alloc_resources(device_t dev)
-{
-       struct  bt_softc *bt = device_get_softc(dev);
-       int rid;
-       struct resource *port;
-       struct resource *irq;
-       int shared;
-
-       /*
-        * XXX assumes that the iospace ranges are sorted in increasing
-        * order.
-        */
-       rid = 0;
-       port = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid,
-                                 0, ~0, 1, RF_ACTIVE);
-       if (!port)
-               return (ENOMEM);
-
-       bt_init_softc(dev, port, 0, 0);
-
-       if (eisa_get_irq(dev) != -1) {
-               shared = bt->level_trigger_ints ? RF_SHAREABLE : 0;
-               rid = 0;
-               irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid,
-                                        0, ~0, 1, shared | RF_ACTIVE);
-               if (!irq) {
-                       if (port)
-                               bus_release_resource(dev, SYS_RES_IOPORT,
-                                                    0, port);
-                       return (ENOMEM);
-               }
-       } else
-               irq = 0;
-       bt->irq = irq;
-
-       return (0);
-}
-
-static void
-bt_eisa_release_resources(device_t dev)
-{
-       struct  bt_softc *bt = device_get_softc(dev);
-
-       if (bt->port)
-               bus_release_resource(dev, SYS_RES_IOPORT, 0, bt->port);
-       if (bt->irq)
-               bus_release_resource(dev, SYS_RES_IRQ, 0, bt->irq);
-       bt_free_softc(dev);
-}
-
-static const char*
-bt_match(eisa_id_t type)
-{
-       switch(type) {
-               case EISA_DEVICE_ID_BUSLOGIC_74X_B:
-                       return ("Buslogic 74xB SCSI host adapter");
-                       break;
-               case EISA_DEVICE_ID_BUSLOGIC_74X_C:
-                       return ("Buslogic 74xC SCSI host adapter");
-                       break;
-               case EISA_DEVICE_ID_SDC3222F:
-                       return ("Storage Dimensions SDC3222F SCSI host adapter");
-                       break;
-               case EISA_DEVICE_ID_AMI_4801:
-                       return ("AMI Series 48 SCSI host adapter");
-                       break;
-               default:
-                       break;
-       }
-       return (NULL);
-}
-
-static int
-bt_eisa_probe(device_t dev)
-{
-       const char *desc;
-       u_long iobase;
-       struct bt_probe_info info;
-       u_long port;
-       u_long iosize;
-       u_int  ioconf;
-       int    result;
-       int    shared;
-
-       desc = bt_match(eisa_get_id(dev));
-       if (!desc)
-               return (ENXIO);
-       device_set_desc(dev, desc);
-
-       iobase = (eisa_get_slot(dev) * EISA_SLOT_SIZE); 
-       if (eisa_get_id(dev) == EISA_DEVICE_ID_AMI_4801) {
-               u_int ioconf1;
-
-               iobase += AMI_EISA_SLOT_OFFSET;
-               iosize = AMI_EISA_IOSIZE;
-               ioconf1 = inb(iobase + AMI_EISA_IOCONF1);
-               /* Determine "ISA" I/O port */
-               switch (ioconf1 & AMI_PORTADDR) {
-               case AMI_PORT_330:
-                       port = 0x330;
-                       break;
-               case AMI_PORT_334:
-                       port = 0x334;
-                       break;
-               case AMI_PORT_230:
-                       port = 0x230;
-                       break;
-               case AMI_PORT_234:
-                       port = 0x234;
-                       break;
-               case AMI_PORT_134:
-                       port = 0x134;
-                       break;
-               case AMI_PORT_130:
-                       port = 0x130;
-                       break;
-               default:
-                       /* Disabled */
-                       kprintf("bt: AMI EISA Adapter at "
-                              "slot %d has a disabled I/O "
-                              "port.  Cannot attach.\n",
-                              eisa_get_slot(dev));
-                       return (ENXIO);
-               }
-               shared = (inb(iobase + AMI_EISA_IOCONF1) & AMI_IRQ_LEVEL) ?
-                               EISA_TRIGGER_LEVEL : EISA_TRIGGER_EDGE;
-       } else {
-               iobase += BT_EISA_SLOT_OFFSET;
-               iosize = BT_EISA_IOSIZE;
-
-               ioconf = inb(iobase + EISA_IOCONF);
-               /* Determine "ISA" I/O port */
-               switch (ioconf & PORTADDR) {
-               case PORT_330:
-                       port = 0x330;
-                       break;
-               case PORT_334:
-                       port = 0x334;
-                       break;
-               case PORT_230:
-                       port = 0x230;
-                       break;
-               case PORT_234:
-                       port = 0x234;
-                       break;
-               case PORT_130:
-                       port = 0x130;
-                       break;
-               case PORT_134:
-                       port = 0x134;
-                       break;
-               default:
-                       /* Disabled */
-                       kprintf("bt: Buslogic EISA Adapter at "
-                              "slot %d has a disabled I/O "
-                              "port.  Cannot attach.\n",
-                              eisa_get_slot(dev));
-                       return (ENXIO);
-               }
-               shared = (inb(iobase + EISA_IRQ_TYPE) & LEVEL) ?
-                               EISA_TRIGGER_LEVEL : EISA_TRIGGER_EDGE;
-       }
-       bt_mark_probed_iop(port);
-
-       /* Tell parent where our resources are going to be */
-       eisa_add_iospace(dev, iobase, iosize, RESVADDR_NONE);
-       eisa_add_iospace(dev, port, BT_IOSIZE, RESVADDR_NONE);
-
-       /* And allocate them */
-       bt_eisa_alloc_resources(dev);
-
-       if (bt_port_probe(dev, &info) != 0) {
-               kprintf("bt_eisa_probe: Probe failed for "
-                      "card at slot 0x%x\n", eisa_get_slot(dev));
-               result = ENXIO;
-       } else {
-               eisa_add_intr(dev, info.irq, shared);
-               result = 0;
-       }
-       bt_eisa_release_resources(dev);
-
-       return (result);
-}
-
-static int
-bt_eisa_attach(device_t dev)
-{
-       struct bt_softc *bt = device_get_softc(dev);
-
-       /* Allocate resources */
-       bt_eisa_alloc_resources(dev);
-
-       /* Allocate a dmatag for our SCB DMA maps */
-       /* XXX Should be a child of the PCI bus dma tag */
-       if (bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, /*boundary*/0,
-                              /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
-                              /*highaddr*/BUS_SPACE_MAXADDR,
-                              /*filter*/NULL, /*filterarg*/NULL,
-                              /*maxsize*/BUS_SPACE_MAXSIZE_32BIT,
-                              /*nsegments*/BUS_SPACE_UNRESTRICTED,
-                              /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT,
-                              /*flags*/0, &bt->parent_dmat) != 0) {
-               bt_eisa_release_resources(dev);
-               return -1;
-       }
-
-       /*
-        * Now that we know we own the resources we need, do the full
-        * card initialization.
-        */
-       if (bt_probe(dev) || bt_fetch_adapter_info(dev) || bt_init(dev)) {
-               bt_eisa_release_resources(dev);
-               return -1;
-       }
-
-       /* Attach sub-devices - always succeeds (sets up intr) */
-       bt_attach(dev);
-
-       return 0;
-}
-
-static device_method_t bt_eisa_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         bt_eisa_probe),
-       DEVMETHOD(device_attach,        bt_eisa_attach),
-
-       { 0, 0 }
-};
-
-static driver_t bt_eisa_driver = {
-       "bt",
-       bt_eisa_methods,
-       sizeof(struct bt_softc),
-};
-
-static devclass_t bt_devclass;
-
-DRIVER_MODULE(bt, eisa, bt_eisa_driver, bt_devclass, 0, 0);
index 8bc267b..979334f 100644 (file)
@@ -42,7 +42,6 @@
 
 #include <bus/cam/scsi/scsi_all.h>
 
-static bus_dma_filter_t btvlbouncefilter;
 static bus_dmamap_callback_t btmapsensebuffers;
 
 static int
@@ -205,30 +204,8 @@ bt_isa_attach(device_t dev)
        filter = NULL;
        filter_arg = NULL;
        lowaddr = BUS_SPACE_MAXADDR_24BIT;
-       if (bt->model[0] == '4') {
-               /*
-                * This is a VL adapter.  Typically, VL devices have access
-                * to the full 32bit address space.  On BT-445S adapters
-                * prior to revision E, there is a hardware bug that causes
-                * corruption of transfers to/from addresses in the range of
-                * the BIOS modulo 16MB.  The only properly functioning
-                * BT-445S Host Adapters have firmware version 3.37.
-                * If we encounter one of these adapters and the BIOS is
-                * installed, install a filter function for our bus_dma_map
-                * that will catch these accesses and bounce them to a safe
-                * region of memory.
-                */
-               if (bt->bios_addr != 0
-                && strcmp(bt->model, "445S") == 0
-                && strcmp(bt->firmware_ver, "3.37") < 0) {
-                       filter = btvlbouncefilter;
-                       filter_arg = bt;
-               } else {
-                       lowaddr = BUS_SPACE_MAXADDR_32BIT;
-               }
-       }
-                       
-       /* XXX Should be a child of the ISA or VL bus dma tag */
+
+       /* XXX Should be a child of the ISA bus dma tag */
        if (bus_dma_tag_create(/*parent*/NULL, /*alignemnt*/1, /*boundary*/0,
                                lowaddr, /*highaddr*/BUS_SPACE_MAXADDR,
                                filter, filter_arg,
@@ -294,22 +271,6 @@ bt_isa_attach(device_t dev)
 
 #define BIOS_MAP_SIZE (16 * 1024)
 
-static int
-btvlbouncefilter(void *arg, bus_addr_t addr)
-{
-       struct bt_softc *bt;
-
-       bt = (struct bt_softc *)arg;
-
-       addr &= BUS_SPACE_MAXADDR_24BIT;
-
-       if (addr == 0
-        || (addr >= bt->bios_addr
-         && addr < (bt->bios_addr + BIOS_MAP_SIZE)))
-               return (1);
-       return (0);
-}
-
 static void
 btmapsensebuffers(void *arg, bus_dma_segment_t *segs, int nseg, int error)
 {
index c2ce897..bc02800 100644 (file)
@@ -3,7 +3,6 @@
  * MultiMaster SCSI host adapters.  Product specific probe and
  * attach routines can be found in:
  * sys/dev/buslogic/bt_isa.c   BT-54X, BT-445 cards
- * sys/dev/buslogic/bt_eisa.c  BT-74X, BT-75x cards, SDC3222F
  * sys/dev/buslogic/bt_pci.c   BT-946, BT-948, BT-956, BT-958 cards
  *
  * Copyright (c) 1998, 1999 Justin T. Gibbs.
@@ -31,7 +30,6 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/buslogic/btreg.h,v 1.10.2.2 2001/09/03 02:45:22 peter Exp $
- * $DragonFly: src/sys/dev/disk/buslogic/btreg.h,v 1.3 2005/06/11 09:03:48 swildner Exp $
  */
 
 #ifndef _BTREG_H_
diff --git a/sys/dev/netif/ep/if_ep_eisa.c b/sys/dev/netif/ep/if_ep_eisa.c
deleted file mode 100644 (file)
index ec1764f..0000000
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Product specific probe and attach routines for:
- *     3COM 3C579 and 3C509(in eisa config mode) ethernet controllers
- *
- * Copyright (c) 1996 Justin T. Gibbs
- * All rights reserved.
- *
- * 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 immediately at the beginning of the file, without modification,
- *    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. Absolutely no warranty of function or purpose is made by the author
- *    Justin T. Gibbs.
- * 4. Modifications may be freely made to this file if the above conditions
- *    are met.
- *
- * $FreeBSD: src/sys/dev/ep/if_ep_eisa.c,v 1.18 2000/01/14 07:14:00 peter Exp $
- * $DragonFly: src/sys/dev/netif/ep/if_ep_eisa.c,v 1.14 2008/08/17 04:32:33 sephe Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-#include <sys/rman.h> 
-#include <sys/interrupt.h>
-
-#include <net/if.h>
-#include <net/if_arp.h>
-#include <net/if_media.h> 
-
-#include <machine/clock.h>
-
-#include <bus/eisa/eisaconf.h>
-
-#include "if_epreg.h"
-#include "if_epvar.h"
-
-#define EISA_DEVICE_ID_3COM_3C509_TP   0x506d5090
-#define EISA_DEVICE_ID_3COM_3C509_BNC  0x506d5091
-#define EISA_DEVICE_ID_3COM_3C579_TP   0x506d5092
-#define EISA_DEVICE_ID_3COM_3C579_BNC  0x506d5093
-#define EISA_DEVICE_ID_3COM_3C509_COMBO        0x506d5094
-#define EISA_DEVICE_ID_3COM_3C509_TPO  0x506d5095
-
-#define        EP_EISA_SLOT_OFFSET             0x0c80
-#define        EP_EISA_IOSIZE                  0x000a
-
-#define EISA_IOCONF                    0x0008
-#define                IRQ_CHANNEL             0xf000
-#define                        INT_3           0x3000
-#define                        INT_5           0x5000
-#define                        INT_7           0x7000
-#define                        INT_9           0x9000
-#define                        INT_10          0xa000
-#define                        INT_11          0xb000
-#define                        INT_12          0xc000
-#define                        INT_15          0xf000
-#define EISA_BPROM_MEDIA_CONF          0x0006
-#define                TRANS_TYPE              0xc000
-#define                        TRANS_TP        0x0000
-#define                        TRANS_AUI       0x4000
-#define                        TRANS_BNC       0xc000
-
-static const char *ep_match (eisa_id_t type);
-
-static const char*
-ep_match(eisa_id_t type)
-{
-       switch(type) {
-               case EISA_DEVICE_ID_3COM_3C509_TP:
-                       return "3Com 3C509-TP Network Adapter";
-                       break;
-               case EISA_DEVICE_ID_3COM_3C509_BNC:
-                       return "3Com 3C509-BNC Network Adapter";
-                       break;
-               case EISA_DEVICE_ID_3COM_3C579_TP:
-                       return "3Com 3C579-TP EISA Network Adapter";
-                       break;
-               case EISA_DEVICE_ID_3COM_3C579_BNC:
-                       return "3Com 3C579-BNC EISA Network Adapter";
-                       break;
-               case EISA_DEVICE_ID_3COM_3C509_COMBO:
-                       return "3Com 3C509-Combo Network Adapter";
-                       break;
-               case EISA_DEVICE_ID_3COM_3C509_TPO:
-                       return "3Com 3C509-TPO Network Adapter";
-                       break;
-               default:
-                       break;
-       }
-       return (NULL);
-}
-
-static int
-ep_eisa_probe(device_t dev)
-{
-       const char *desc;
-       u_long iobase;
-       u_short conf;
-       u_long port;
-       int irq;
-       int int_trig;
-
-       desc = ep_match(eisa_get_id(dev));
-       if (!desc)
-               return (ENXIO);
-       device_set_desc(dev, desc);
-
-       port = (eisa_get_slot(dev) * EISA_SLOT_SIZE);
-       iobase = port + EP_EISA_SLOT_OFFSET;
-
-       /* We must be in EISA configuration mode */
-       if ((inw(iobase + EP_W0_ADDRESS_CFG) & 0x1f) != 0x1f)
-           return ENXIO;
-
-       eisa_add_iospace(dev, iobase, EP_EISA_IOSIZE, RESVADDR_NONE);
-       eisa_add_iospace(dev, port, EP_IOSIZE, RESVADDR_NONE);
-
-       conf = inw(iobase + EISA_IOCONF);
-       /* Determine our IRQ */
-       switch (conf & IRQ_CHANNEL) {
-       case INT_3:
-           irq = 3;
-           break;
-       case INT_5:
-           irq = 5;
-           break;
-       case INT_7:
-           irq = 7;
-           break;
-       case INT_9:
-           irq = 9;
-           break;
-       case INT_10:
-           irq = 10;
-           break;
-       case INT_11:
-           irq = 11;
-           break;
-       case INT_12:
-           irq = 12;
-           break;
-       case INT_15:
-           irq = 15;
-           break;
-       default:
-                               /* Disabled */
-           device_printf(dev, "3COM Network Adapter at "
-                         "slot %d has its IRQ disabled. "
-                         "Probe failed.\n", 
-                         eisa_get_slot(dev));
-           return ENXIO;
-       }
-
-       switch(eisa_get_id(dev)) {
-               case EISA_DEVICE_ID_3COM_3C579_BNC:
-               case EISA_DEVICE_ID_3COM_3C579_TP:
-                       int_trig = EISA_TRIGGER_LEVEL;
-                       break;
-               default:
-                       int_trig = EISA_TRIGGER_EDGE;
-                       break;
-       }
-                       
-       eisa_add_intr(dev, irq, int_trig);
-
-       return 0;
-}
-
-static int
-ep_eisa_attach(device_t dev)
-{
-       struct ep_softc *       sc = device_get_softc(dev);
-       struct ifnet *          ifp = &sc->arpcom.ac_if;
-       struct resource *       eisa_io = NULL;
-       u_int32_t               eisa_iobase;
-       int                     irq;
-       int                     error = 0;
-       int                     rid;
-
-       rid = 1;
-       eisa_io = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE);
-       if (!eisa_io) {
-               device_printf(dev, "No I/O space?!\n");
-               error = ENXIO;
-               goto bad;
-       }
-       eisa_iobase = rman_get_start(eisa_io);
-
-       /* Reset and Enable the card */
-       outb(eisa_iobase + EP_W0_CONFIG_CTRL, W0_P4_CMD_RESET_ADAPTER);
-       DELAY(1000); /* we must wait at least 1 ms */
-       outb(eisa_iobase + EP_W0_CONFIG_CTRL, W0_P4_CMD_ENABLE_ADAPTER);
-       /* Now the registers are availible through the lower ioport */
-
-       if ((error = ep_alloc(dev))) {
-               device_printf(dev, "ep_alloc() failed! (%d)\n", error);
-               goto bad;
-       }
-
-       switch(eisa_get_id(dev)) {
-               case EISA_DEVICE_ID_3COM_3C579_BNC:
-               case EISA_DEVICE_ID_3COM_3C579_TP:
-                       sc->stat = F_ACCESS_32_BITS;
-                       break;
-               default:
-                       break;
-       }
-
-       ep_get_media(sc);
-
-       irq = rman_get_start(sc->irq);
-       if (irq == 9)
-               irq = 2;
-
-       GO_WINDOW(0);
-       SET_IRQ(BASE, irq);
-
-       if ((error = ep_attach(sc))) {
-               device_printf(dev, "ep_attach() failed! (%d)\n", error);
-               goto bad;
-       }
-
-       error = bus_setup_intr(dev, sc->irq, INTR_MPSAFE,
-                              ep_intr, sc, &sc->ep_intrhand, 
-                              ifp->if_serializer);
-       if (error) {
-               device_printf(dev, "bus_setup_intr() failed! (%d)\n", error);
-               goto bad;
-       }
-
-       ifp->if_cpuid = ithread_cpuid(rman_get_start(sc->irq));
-       KKASSERT(ifp->if_cpuid >= 0 && ifp->if_cpuid < ncpus);
-
-       return (0);
-
- bad:
-       if (eisa_io)
-               bus_release_resource(dev, SYS_RES_IOPORT, 0, eisa_io);
-
-       ep_free(dev);
-       return (error);
-}
-
-static device_method_t ep_eisa_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         ep_eisa_probe),
-       DEVMETHOD(device_attach,        ep_eisa_attach),
-
-       { 0, 0 }
-};
-
-static driver_t ep_eisa_driver = {
-       "ep",
-       ep_eisa_methods,
-       sizeof(struct ep_softc),
-};
-
-extern devclass_t ep_devclass;
-
-DRIVER_MODULE(if_ep, eisa, ep_eisa_driver, ep_devclass, 0, 0);
index 17f4c05..d49a14a 100644 (file)
@@ -1,7 +1,5 @@
-# $DragonFly: src/sys/dev/netif/vx/Makefile,v 1.2 2005/07/01 20:14:13 joerg Exp $
 KMOD    = if_vx
-SRCS    = if_vx.c if_vx_eisa.c if_vx_pci.c
+SRCS    = if_vx.c if_vx_pci.c
 SRCS    += device_if.h bus_if.h pci_if.h isa_if.h
-  
+
 .include <bsd.kmod.mk>
diff --git a/sys/dev/netif/vx/if_vx_eisa.c b/sys/dev/netif/vx/if_vx_eisa.c
deleted file mode 100644 (file)
index 248753a..0000000
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (C) 1996 Naoki Hamada <nao@tom-yam.or.jp>
- * All rights reserved.
- *
- * 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. Neither the name of the author nor the names of any co-contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/sys/dev/vx/if_vx_eisa.c,v 1.14 2000/01/29 14:50:31 peter Exp $
- * $DragonFly: src/sys/dev/netif/vx/if_vx_eisa.c,v 1.17 2008/08/17 04:32:35 sephe Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/socket.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-#include <sys/interrupt.h>
-
-#include <net/if.h>
-#include <net/if_arp.h>
-
-#include <bus/eisa/eisaconf.h>
-
-#include "if_vxreg.h"
-
-#define EISA_DEVICE_ID_3COM_3C592      0x506d5920
-#define EISA_DEVICE_ID_3COM_3C597_TX   0x506d5970
-#define EISA_DEVICE_ID_3COM_3C597_T4   0x506d5971
-#define EISA_DEVICE_ID_3COM_3C597_MII  0x506d5972
-
-
-#define        VX_EISA_SLOT_OFFSET             0x0c80
-#define        VX_EISA_IOSIZE                  0x000a
-#define VX_RESOURCE_CONFIG             0x0008
-
-
-static const char *vx_match (eisa_id_t type);
-
-static const char*
-vx_match(eisa_id_t type)
-{
-    switch (type) {
-      case EISA_DEVICE_ID_3COM_3C592:
-       return "3Com 3C592 Network Adapter";
-      case EISA_DEVICE_ID_3COM_3C597_TX:
-       return "3Com 3C597-TX Network Adapter";
-      case EISA_DEVICE_ID_3COM_3C597_T4:
-       return "3Com 3C597-T4 Network Adapter";
-      case EISA_DEVICE_ID_3COM_3C597_MII:
-       return "3Com 3C597-MII Network Adapter";
-      default:
-       return (NULL);
-    }
-}
-
-static int
-vx_eisa_probe(device_t dev)
-{
-    const char    *desc;
-    u_long          iobase;
-    u_long          port;
-
-    desc = vx_match(eisa_get_id(dev));
-    if (!desc)
-       return (ENXIO);
-    device_set_desc(dev, desc);
-
-    port = eisa_get_slot(dev) * EISA_SLOT_SIZE;
-    iobase = port + VX_EISA_SLOT_OFFSET;
-
-    eisa_add_iospace(dev, iobase, VX_EISA_IOSIZE, RESVADDR_NONE);
-    eisa_add_iospace(dev, port, VX_IOSIZE, RESVADDR_NONE);
-
-    /* Set irq */
-    eisa_add_intr(dev, inw(iobase + VX_RESOURCE_CONFIG) >> 12,
-                 EISA_TRIGGER_EDGE);
-
-    return (0);
-}
-
-static int
-vx_eisa_attach(device_t dev)
-{
-    struct vx_softc *sc = device_get_softc(dev);
-    struct ifnet *ifp = &sc->arpcom.ac_if;
-    struct resource *eisa_io = NULL;
-    int                    rid;
-
-    /*
-     * The addresses are sorted in increasing order
-     * so we know the port to pass to the core ep
-     * driver comes first.
-     */
-    rid = 0;
-    sc->vx_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE);
-    if (sc->vx_res == NULL) {
-       device_printf(dev, "No I/O space?!\n");
-       goto bad;
-    }
-
-    rid = 1;
-    eisa_io = bus_alloc_resource_any(dev, SYS_RES_IOPORT, &rid, RF_ACTIVE);
-    if (eisa_io == NULL) {
-       device_printf(dev, "No I/O space?!\n");
-       goto bad;
-    }
-
-    sc->vx_bhandle = rman_get_bushandle(sc->vx_res);
-    sc->vx_btag = rman_get_bustag(sc->vx_res);
-
-    rid = 0;
-    sc->vx_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE);
-    if (sc->vx_irq == NULL) {
-       device_printf(dev, "No irq?!\n");
-       goto bad;
-    }
-
-    /* Now the registers are availible through the lower ioport */
-
-    vxattach(dev);
-
-    if (bus_setup_intr(dev, sc->vx_irq, INTR_MPSAFE, 
-                      vxintr, sc, &sc->vx_intrhand,
-                      ifp->if_serializer)
-    ) {
-       ether_ifdetach(&sc->arpcom.ac_if);
-       goto bad;
-    }
-
-    ifp->if_cpuid = ithread_cpuid(rman_get_start(sc->vx_irq));
-    KKASSERT(ifp->if_cpuid >= 0 && ifp->if_cpuid < ncpus);
-
-    return 0;
-
- bad:
-    if (sc->vx_res)
-       bus_release_resource(dev, SYS_RES_IOPORT, 0, sc->vx_res);
-    if (eisa_io)
-       bus_release_resource(dev, SYS_RES_IOPORT, 0, eisa_io);
-    if (sc->vx_irq)
-       bus_release_resource(dev, SYS_RES_IRQ, 0, sc->vx_irq);
-    return -1;
-}
-
-static device_method_t vx_eisa_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         vx_eisa_probe),
-       DEVMETHOD(device_attach,        vx_eisa_attach),
-
-       { 0, 0 }
-};
-
-static driver_t vx_eisa_driver = {
-       "vx",
-       vx_eisa_methods,
-       sizeof(struct vx_softc)
-};
-
-static devclass_t vx_devclass;
-
-DRIVER_MODULE(if_vx, eisa, vx_eisa_driver, vx_devclass, 0, 0);
diff --git a/sys/dev/raid/dpt/dpt_eisa.c b/sys/dev/raid/dpt/dpt_eisa.c
deleted file mode 100644 (file)
index d7cc00b..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/*-
- * Copyright (c) 1997, 2000 Matthew N. Dodd <winter@jurai.net>
- * All rights reserved.
- *
- * 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.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- *     $FreeBSD: src/sys/dev/dpt/dpt_eisa.c,v 1.12.2.1 2000/08/07 18:48:14 peter Exp $
- *     $DragonFly: src/sys/dev/raid/dpt/dpt_eisa.c,v 1.9 2007/04/12 18:35:08 swildner Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/module.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-#include <sys/thread2.h>
-
-#include <bus/eisa/eisaconf.h>
-
-#include <bus/cam/scsi/scsi_all.h>
-
-#include "dpt.h"
-
-#define DPT_EISA_IOSIZE                        0x100
-#define DPT_EISA_SLOT_OFFSET           0x0c00
-#define DPT_EISA_EATA_REG_OFFSET       0x0088
-
-#define        DPT_EISA_DPT2402        0x12142402      /* DPT PM2012A/9X       */
-#define        DPT_EISA_DPTA401        0x1214A401      /* DPT PM2012B/9X       */
-#define        DPT_EISA_DPTA402        0x1214A402      /* DPT PM2012B2/9X      */
-#define        DPT_EISA_DPTA410        0x1214A410      /* DPT PM2x22A/9X       */
-#define        DPT_EISA_DPTA411        0x1214A411      /* DPT Spectre          */
-#define        DPT_EISA_DPTA412        0x1214A412      /* DPT PM2021A/9X       */
-#define        DPT_EISA_DPTA420        0x1214A420      /* DPT Smart Cache IV (PM2042) */
-#define        DPT_EISA_DPTA501        0x1214A501      /* DPT PM2012B1/9X"     */
-#define        DPT_EISA_DPTA502        0x1214A502      /* DPT PM2012Bx/9X      */
-#define        DPT_EISA_DPTA701        0x1214A701      /* DPT PM2011B1/9X      */
-#define        DPT_EISA_DPTBC01        0x1214BC01      /* DPT PM3011/7X ESDI   */ 
-#define        DPT_EISA_DPT8200        0x12148200      /* NEC EATA SCSI        */
-#define        DPT_EISA_DPT2408        0x12142408      /* ATT EATA SCSI        */
-
-/* Function Prototypes */
-
-static const char *    dpt_eisa_match  (eisa_id_t);
-static int             dpt_eisa_probe  (device_t);
-static int             dpt_eisa_attach (device_t);
-
-
-static int
-dpt_eisa_probe (device_t dev)
-{
-       const char *    desc;
-       u_int32_t       io_base;
-       dpt_conf_t *    conf;
-
-       desc = dpt_eisa_match(eisa_get_id(dev));
-       if (!desc)
-               return (ENXIO);
-       device_set_desc(dev, desc);
-
-       io_base = (eisa_get_slot(dev) * EISA_SLOT_SIZE) + DPT_EISA_SLOT_OFFSET;
-
-       conf = dpt_pio_get_conf(io_base + DPT_EISA_EATA_REG_OFFSET);
-       if (!conf) {
-               kprintf("dpt: dpt_pio_get_conf() failed.\n");
-               return (ENXIO);
-       }
-
-       eisa_add_iospace(dev, io_base, DPT_EISA_IOSIZE, RESVADDR_NONE);
-       eisa_add_intr(dev, conf->IRQ,
-                     (conf->IRQ_TR ? EISA_TRIGGER_LEVEL : EISA_TRIGGER_EDGE));
-
-       return 0;
-}
-
-static int
-dpt_eisa_attach (device_t dev)
-{
-       dpt_softc_t * dpt;
-       struct resource *io = 0;
-       struct resource *irq = 0;
-       int             rid;
-       void *          ih;
-       int             error = 0;
-
-       rid = 0;
-       io = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, 1, RF_ACTIVE);
-       if (!io) {
-               device_printf(dev, "No I/O space?!\n");
-               error = ENOMEM;
-               goto bad;
-       }
-
-       rid = 0;
-       irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, 0, ~0, 1, RF_ACTIVE);
-       if (!irq) {
-               device_printf(dev, "No irq?!\n");
-               error = ENOMEM;
-               goto bad;
-       }
-
-       dpt = dpt_alloc(dev, rman_get_bustag(io),
-                       rman_get_bushandle(io) + DPT_EISA_EATA_REG_OFFSET);
-       if (dpt == NULL) {
-               error = ENOMEM;
-               goto bad;
-       }
-
-       /* Allocate a dmatag representing the capabilities of this attachment */
-       /* XXX Should be a child of the EISA bus dma tag */
-       if (bus_dma_tag_create( /* parent    */ NULL,
-                               /* alignemnt */ 1,
-                               /* boundary  */ 0,
-                               /* lowaddr   */ BUS_SPACE_MAXADDR_32BIT,
-                               /* highaddr  */ BUS_SPACE_MAXADDR,
-                               /* filter    */ NULL,
-                               /* filterarg */ NULL,
-                               /* maxsize   */ BUS_SPACE_MAXSIZE_32BIT,
-                               /* nsegments */ BUS_SPACE_UNRESTRICTED,
-                               /* maxsegsz  */ BUS_SPACE_MAXSIZE_32BIT,
-                               /* flags     */0,
-                               &dpt->parent_dmat) != 0) {
-               dpt_free(dpt);
-               error = ENXIO;
-               goto bad;
-       }
-
-       crit_enter();
-
-       if (dpt_init(dpt) != 0) {
-               dpt_free(dpt);
-               error = ENXIO;
-               goto bad;
-       }
-
-       /* Register with the XPT */
-       dpt_attach(dpt);
-
-       crit_exit();
-
-       error = bus_setup_intr(dev, irq, 0, dpt_intr, dpt, &ih, NULL);
-       if (error) {
-               device_printf(dev, "Unable to register interrupt handler\n");
-               error = ENXIO;
-               goto bad;
-       }
-
-       return (error);
-
- bad:
-       if (io)
-               bus_release_resource(dev, SYS_RES_IOPORT, 0, io);
-       if (irq)
-               bus_release_resource(dev, SYS_RES_IRQ, 0, irq);
-
-       return (error);
-}
-
-static const char *
-dpt_eisa_match(eisa_id_t type)
-{
-       switch (type) {
-               case DPT_EISA_DPT2402:
-               case DPT_EISA_DPTA401:
-               case DPT_EISA_DPTA402:
-               case DPT_EISA_DPTA410:
-               case DPT_EISA_DPTA411:
-               case DPT_EISA_DPTA412:
-               case DPT_EISA_DPTA420:
-               case DPT_EISA_DPTA501:
-               case DPT_EISA_DPTA502:
-               case DPT_EISA_DPTA701:
-               case DPT_EISA_DPTBC01:
-               case DPT_EISA_DPT8200:
-               case DPT_EISA_DPT2408:
-                       return ("DPT SCSI Host Bus Adapter");
-                       break;
-               default:
-                       break;
-       }
-       
-       return (NULL);
-}
-
-static device_method_t dpt_eisa_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         dpt_eisa_probe),
-       DEVMETHOD(device_attach,        dpt_eisa_attach),
-
-       { 0, 0 }
-};
-
-static driver_t dpt_eisa_driver = {
-       "dpt",
-       dpt_eisa_methods,
-       sizeof(dpt_softc_t),
-};
-
-static devclass_t dpt_devclass;
-
-DRIVER_MODULE(dpt, eisa, dpt_eisa_driver, dpt_devclass, 0, 0);
index 3b85036..5a22ef9 100644 (file)
@@ -71,7 +71,7 @@
 
 #include "dpt.h"
 
-/* dpt_isa.c, dpt_eisa.c, and dpt_pci.c need this in a central place */
+/* dpt_isa.c and dpt_pci.c need this in a central place */
 int dpt_controllers_present;
 
 u_long dpt_unit;       /* Next unit number to use */
index 801f60c..18dfc66 100644 (file)
@@ -34,8 +34,7 @@
  * Generic driver for Compaq SMART RAID adapters.
  *
  * Specific probe routines are in:
- *     pci/ida_pci.c           
- *     i386/eisa/ida_eisa.c
+ *     dev/raid/ida/ida_pci.c
  */
 
 #include <sys/param.h>
diff --git a/sys/dev/raid/ida/ida_eisa.c b/sys/dev/raid/ida/ida_eisa.c
deleted file mode 100644 (file)
index f6e4414..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * Copyright (c) 2000 Jonathan Lemon
- * Copyright (c) 1999 by Matthew N. Dodd <winter@jurai.net>
- * All Rights Reserved.
- *
- * 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,
- *    without modification, immediately at the beginning of the file.
- * 2. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
- *
- * $FreeBSD: src/sys/dev/ida/ida_eisa.c,v 1.1.2.4 2001/07/30 20:29:58 jlemon Exp $
- * $DragonFly: src/sys/dev/raid/ida/ida_eisa.c,v 1.6 2006/10/25 20:56:01 dillon Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/kernel.h>
-#include <sys/bus.h>
-#include <sys/buf.h>
-#include <sys/devicestat.h>
-#include <sys/disk.h>
-#include <sys/rman.h>
-
-#include "idavar.h"
-#include "idareg.h"
-
-#include <bus/eisa/eisaconf.h>
-
-#define IDA_EISA_IOPORT_START  0x0c88
-#define IDA_EISA_IOPORT_LEN    0x0017
-
-#define IDA_EISA_IRQ_REG       0x0cc0
-#define IDA_EISA_IRQ_MASK      0xf0
-#define IDA_EISA_IRQ_15                0x80
-#define IDA_EISA_IRQ_14                0x40
-#define IDA_EISA_IRQ_11                0x10
-#define IDA_EISA_IRQ_10                0x20
-
-static int
-ida_v1_fifo_full(struct ida_softc *ida)
-{
-       u_int8_t status;
-
-       status = ida_inb(ida, R_EISA_SYSTEM_DOORBELL);
-       return ((status & EISA_CHANNEL_CLEAR) == 0);
-}
-
-static void
-ida_v1_submit(struct ida_softc *ida, struct ida_qcb *qcb)
-{
-       u_int16_t size;
-
-       /*
-        * On these cards, this location is actually for control flags.
-        * Set them to zero and pass in structure size via an I/O port.
-        */
-       size = qcb->hwqcb->hdr.size << 2;
-       qcb->hwqcb->hdr.size = 0;
-
-       ida_outb(ida, R_EISA_SYSTEM_DOORBELL, EISA_CHANNEL_CLEAR);
-       ida_outl(ida, R_EISA_LIST_ADDR, qcb->hwqcb_busaddr);
-       ida_outw(ida, R_EISA_LIST_LEN, size);
-       ida_outb(ida, R_EISA_LOCAL_DOORBELL, EISA_CHANNEL_BUSY);
-}
-
-static bus_addr_t
-ida_v1_done(struct ida_softc *ida)
-{
-       struct ida_hardware_qcb *hwqcb;
-       bus_addr_t completed;
-       u_int8_t status;
-
-       if ((ida_inb(ida, R_EISA_SYSTEM_DOORBELL) & EISA_CHANNEL_BUSY) == 0)
-               return (0);
-
-       ida_outb(ida, R_EISA_SYSTEM_DOORBELL, EISA_CHANNEL_BUSY);
-       completed = ida_inl(ida, R_EISA_COMPLETE_ADDR);
-       status = ida_inb(ida, R_EISA_LIST_STATUS);
-       ida_outb(ida, R_EISA_LOCAL_DOORBELL, EISA_CHANNEL_CLEAR);
-
-       if (completed != 0) {
-               hwqcb = (struct ida_hardware_qcb *)
-                   ((bus_addr_t)ida->hwqcbs +
-                   ((completed & ~3) - ida->hwqcb_busaddr));
-               hwqcb->req.error = status;
-       }
-
-       return (completed);
-}
-
-static int
-ida_v1_int_pending(struct ida_softc *ida)
-{
-       return (ida_inb(ida, R_EISA_SYSTEM_DOORBELL) & EISA_CHANNEL_BUSY);
-}
-
-static void
-ida_v1_int_enable(struct ida_softc *ida, int enable)
-{
-       if (enable) {
-               ida_outb(ida, R_EISA_SYSTEM_DOORBELL, ~EISA_CHANNEL_CLEAR);
-               ida_outb(ida, R_EISA_LOCAL_DOORBELL, EISA_CHANNEL_BUSY);
-               ida_outb(ida, R_EISA_INT_MASK, INT_ENABLE);
-               ida_outb(ida, R_EISA_SYSTEM_MASK, INT_ENABLE);
-               ida->flags |= IDA_INTERRUPTS;
-       } else {
-               ida_outb(ida, R_EISA_SYSTEM_MASK, INT_DISABLE);
-               ida->flags &= ~IDA_INTERRUPTS;
-       }
-}
-
-static int
-ida_v2_fifo_full(struct ida_softc *ida)
-{
-       return (ida_inl(ida, R_CMD_FIFO) == 0);
-}
-
-static void
-ida_v2_submit(struct ida_softc *ida, struct ida_qcb *qcb)
-{
-       ida_outl(ida, R_CMD_FIFO, qcb->hwqcb_busaddr);
-}
-
-static bus_addr_t
-ida_v2_done(struct ida_softc *ida)
-{
-       return (ida_inl(ida, R_DONE_FIFO));
-}
-
-static int
-ida_v2_int_pending(struct ida_softc *ida)
-{
-       return (ida_inl(ida, R_INT_PENDING));
-}
-
-static void
-ida_v2_int_enable(struct ida_softc *ida, int enable)
-{
-       if (enable)
-               ida->flags |= IDA_INTERRUPTS;
-       else
-               ida->flags &= ~IDA_INTERRUPTS;
-       ida_outl(ida, R_INT_MASK, enable ? INT_ENABLE : INT_DISABLE);
-}
-
-static struct ida_access ida_v1_access = {
-       ida_v1_fifo_full,
-       ida_v1_submit,
-       ida_v1_done,
-       ida_v1_int_pending,
-       ida_v1_int_enable,
-};
-
-static struct ida_access ida_v2_access = {
-       ida_v2_fifo_full,
-       ida_v2_submit,
-       ida_v2_done,
-       ida_v2_int_pending,
-       ida_v2_int_enable,
-};
-
-static struct ida_board board_id[] = {
-       { 0x0e114001, "Compaq IDA controller",
-           &ida_v1_access, 0 },
-       { 0x0e114002, "Compaq IDA-2 controller",
-           &ida_v1_access, 0 },        
-       { 0x0e114010, "Compaq IAES controller",
-           &ida_v1_access, 0 },
-       { 0x0e114020, "Compaq SMART array controller",
-           &ida_v1_access, 0 },
-       { 0x0e114030, "Compaq SMART-2/E array controller",
-           &ida_v2_access, 0 },
-
-       { 0, "", 0, 0 }
-};
-
-static struct  ida_board *ida_eisa_match(eisa_id_t);
-static int     ida_eisa_probe(device_t);
-static int     ida_eisa_attach(device_t);
-
-static device_method_t ida_eisa_methods[] = {
-       DEVMETHOD(device_probe,         ida_eisa_probe),
-       DEVMETHOD(device_attach,        ida_eisa_attach),
-       DEVMETHOD(device_detach,        ida_detach),
-
-       { 0, 0 }
-};
-
-static driver_t ida_eisa_driver = {
-       "ida",
-       ida_eisa_methods,
-       sizeof(struct ida_softc)
-};
-
-static devclass_t ida_devclass;
-
-static struct ida_board *
-ida_eisa_match(eisa_id_t id)
-{
-       int i;
-
-       for (i = 0; board_id[i].board; i++)
-               if (board_id[i].board == id)
-                       return (&board_id[i]);
-       return (NULL);
-}
-
-static int
-ida_eisa_probe(device_t dev)
-{
-       struct ida_board        *board;
-       u_int32_t               io_base;
-       u_int                   irq = 0;
-
-       board = ida_eisa_match(eisa_get_id(dev));
-       if (board == NULL)
-               return (ENXIO);
-       device_set_desc(dev, board->desc);
-
-       io_base = (eisa_get_slot(dev) * EISA_SLOT_SIZE);
-
-       switch (IDA_EISA_IRQ_MASK & (inb(IDA_EISA_IRQ_REG + io_base))) {
-       case IDA_EISA_IRQ_15:
-               irq = 15;
-               break;
-       case IDA_EISA_IRQ_14:
-               irq = 14;
-               break;
-       case IDA_EISA_IRQ_11:
-               irq = 11;
-               break;
-       case IDA_EISA_IRQ_10:
-               irq = 10;
-               break;
-       default:
-               device_printf(dev, "slot %d, illegal irq setting.\n",
-                   eisa_get_slot(dev));
-               return (ENXIO);
-       }
-
-       eisa_add_iospace(dev, (io_base + IDA_EISA_IOPORT_START),
-                        IDA_EISA_IOPORT_LEN, RESVADDR_NONE);
-
-        eisa_add_intr(dev, irq, EISA_TRIGGER_LEVEL);           /* XXX ??? */
-
-       return (0);
-}
-
-static int
-ida_eisa_attach(device_t dev)
-{
-       struct ida_softc        *ida;
-       struct ida_board        *board;
-       int                     error;
-       int                     rid;
-
-       ida = device_get_softc(dev);
-       ida->dev = dev;
-
-       board = ida_eisa_match(eisa_get_id(dev));
-       ida->cmd = *board->accessor;
-       ida->flags = board->flags;
-
-       ida->regs_res_type = SYS_RES_IOPORT;
-       ida->regs_res_id = 0;
-       ida->regs = bus_alloc_resource(dev, ida->regs_res_type,
-           &ida->regs_res_id, 0, ~0, 1, RF_ACTIVE);
-       if (ida->regs == NULL) {
-               device_printf(dev, "can't allocate register resources\n");
-               return (ENOMEM);
-       }
-
-       error = bus_dma_tag_create(
-               /* parent       */      NULL,
-               /* alignment    */      0,
-               /* boundary     */      0,
-               /* lowaddr      */      BUS_SPACE_MAXADDR_32BIT,
-               /* highaddr     */      BUS_SPACE_MAXADDR,
-               /* filter       */      NULL,
-               /* filterarg    */      NULL,
-               /* maxsize      */      MAXBSIZE,
-               /* nsegments    */      IDA_NSEG,
-               /* maxsegsize   */      BUS_SPACE_MAXSIZE_32BIT,
-               /* flags        */      BUS_DMA_ALLOCNOW,
-               &ida->parent_dmat);
-
-       if (error != 0) {
-               device_printf(dev, "can't allocate DMA tag\n");
-               ida_free(ida);
-               return (ENOMEM);
-       }
-
-       rid = 0;
-       ida->irq_res_type = SYS_RES_IRQ;
-       ida->irq = bus_alloc_resource(dev, ida->irq_res_type, &rid,
-           0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
-       if (ida->irq == NULL) {
-               ida_free(ida);
-               return (ENOMEM);
-       }
-
-       error = bus_setup_intr(dev, ida->irq, 0,
-                              ida_intr, ida, &ida->ih, NULL);
-       if (error) {
-               device_printf(dev, "can't setup interrupt\n");
-               ida_free(ida);
-               return (ENOMEM);
-       }
-
-       error = ida_init(ida);
-       if (error) {
-               ida_free(ida);
-               return (error);
-       }
-
-       ida_attach(ida);
-       ida->flags |= IDA_ATTACHED;
-
-       return (0);
-}
-
-DRIVER_MODULE(ida, eisa, ida_eisa_driver, ida_devclass, 0, 0);
diff --git a/sys/dev/serial/si/si_eisa.c b/sys/dev/serial/si/si_eisa.c
deleted file mode 100644 (file)
index 1e31270..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Device driver for Specialix range (SI/XIO) of serial line multiplexors.
- *
- * Copyright (C) 2000, Peter Wemm <peter@netplex.com.au>
- *
- * 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
- *    notices, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notices, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY ``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 AUTHORS BE LIABLE.
- *
- * $FreeBSD: src/sys/dev/si/si_eisa.c,v 1.1 2000/01/24 07:24:01 peter Exp $
- * $DragonFly: src/sys/dev/serial/si/si_eisa.c,v 1.6 2006/10/25 20:56:02 dillon Exp $
- */
-
-#include <sys/param.h>
-#include <sys/systm.h>
-#include <sys/proc.h>
-#include <sys/kernel.h>
-#include <sys/bus.h>
-#include <sys/rman.h>
-
-#include "sireg.h"
-#include "sivar.h"
-
-#include <bus/eisa/eisaconf.h>
-
-static int
-si_eisa_probe(device_t dev)
-{
-       u_long iobase;
-       u_long maddr;
-       int irq;
-
-       if (eisa_get_id(dev) != SIEISADEVID)
-               return ENXIO;
-
-       device_set_desc(dev, "Specialix SI/XIO EISA host card");
-       
-       iobase = (eisa_get_slot(dev) * EISA_SLOT_SIZE) + SIEISABASE;
-       eisa_add_iospace(dev, iobase, SIEISAIOSIZE, RESVADDR_NONE);
-
-       maddr = (inb(iobase+1) << 24) | (inb(iobase) << 16);
-       eisa_add_mspace(dev, maddr, SIEISA_MEMSIZE, RESVADDR_NONE);
-
-       irq  = ((inb(iobase+2) >> 4) & 0xf);
-       eisa_add_intr(dev, irq, EISA_TRIGGER_LEVEL);    /* XXX shared? */
-
-       return (0);
-}
-
-static int
-si_eisa_attach(device_t dev)
-{
-       struct si_softc *sc;
-       void *ih;
-       int error;
-
-       error = 0;
-       ih = NULL;
-       sc = device_get_softc(dev);
-
-       sc->sc_type = SIEISA;
-
-       sc->sc_port_rid = 0;
-       sc->sc_port_res = bus_alloc_resource(dev, SYS_RES_IOPORT,
-                                            &sc->sc_port_rid,
-                                            0, ~0, 1, RF_ACTIVE);
-       if (!sc->sc_port_res) {
-               device_printf(dev, "couldn't allocate ioports\n");
-               goto fail;
-       }
-       sc->sc_iobase = rman_get_start(sc->sc_port_res);
-
-       sc->sc_mem_rid = 0;
-       sc->sc_mem_res = bus_alloc_resource(dev, SYS_RES_MEMORY,
-                                           &sc->sc_mem_rid,
-                                           0, ~0, 1, RF_ACTIVE);
-       if (!sc->sc_mem_res) {
-               device_printf(dev, "couldn't allocate iomemory");
-               goto fail;
-       }
-       sc->sc_paddr = (caddr_t)rman_get_start(sc->sc_mem_res);
-       sc->sc_maddr = rman_get_virtual(sc->sc_mem_res);
-
-       sc->sc_irq_rid = 0;
-       sc->sc_irq_res = bus_alloc_resource(dev, SYS_RES_IRQ, &sc->sc_irq_rid,
-                                           0, ~0, 1, RF_ACTIVE | RF_SHAREABLE);
-       if (!sc->sc_irq_res) {
-               device_printf(dev, "couldn't allocate interrupt");
-               goto fail;
-       }
-       sc->sc_irq = rman_get_start(sc->sc_irq_res);
-       error = bus_setup_intr(dev, sc->sc_irq_res, INTR_MPSAFE, si_intr, sc, &ih, NULL);
-       if (error) {
-               device_printf(dev, "couldn't activate interrupt");
-               goto fail;
-       }
-
-       error = siattach(dev);
-       if (error)
-               goto fail;
-       return (0);             /* success */
-
-fail:
-       if (error == 0)
-               error = ENXIO;
-       if (sc->sc_irq_res) {
-               if (ih)
-                       bus_teardown_intr(dev, sc->sc_irq_res, ih);
-               bus_release_resource(dev, SYS_RES_IRQ,
-                                    sc->sc_irq_rid, sc->sc_irq_res);
-               sc->sc_irq_res = 0;
-       }
-       if (sc->sc_mem_res) {
-               bus_release_resource(dev, SYS_RES_MEMORY,
-                                    sc->sc_mem_rid, sc->sc_mem_res);
-               sc->sc_mem_res = 0;
-       }
-       if (sc->sc_port_res) {
-               bus_release_resource(dev, SYS_RES_IOPORT,
-                                    sc->sc_port_rid, sc->sc_port_res);
-               sc->sc_port_res = 0;
-       }
-       return (error);
-}
-
-static device_method_t si_eisa_methods[] = {
-       /* Device interface */
-       DEVMETHOD(device_probe,         si_eisa_probe),
-       DEVMETHOD(device_attach,        si_eisa_attach),
-
-       { 0, 0 }
-};
-
-static driver_t si_eisa_driver = {
-       "si",
-       si_eisa_methods,
-       sizeof(struct si_softc),
-};
-
-DRIVER_MODULE(si, eisa, si_eisa_driver, si_devclass, 0, 0);
index 58ac68c..c9a7d87 100644 (file)
@@ -332,16 +332,13 @@ static char       *stli_brdnames[] = {
 
 /*
  *     Hardware configuration info for ECP boards. These defines apply
- *     to the directly accessable io ports of the ECP. There is a set of
- *     defines for each ECP board type, ISA and EISA.
+ *     to the directly accessable io ports of the ECP.
  */
 #define        ECP_IOSIZE      4
 #define        ECP_MEMSIZE     (128 * 1024)
 #define        ECP_ATPAGESIZE  (4 * 1024)
 #define        ECP_EIPAGESIZE  (64 * 1024)
 
-#define        STL_EISAID      0x8c4e
-
 /*
  *     Important defines for the ISA class of ECP board.
  */
@@ -356,26 +353,6 @@ static char        *stli_brdnames[] = {
 #define        ECP_ATADDRMASK  0x3f000
 #define        ECP_ATADDRSHFT  12
 
-/*
- *     Important defines for the EISA class of ECP board.
- */
-#define        ECP_EIIREG      0
-#define        ECP_EIMEMARL    1
-#define        ECP_EICONFR     2
-#define        ECP_EIMEMARH    3
-#define        ECP_EIENABLE    0x1
-#define        ECP_EIDISABLE   0x0
-#define        ECP_EISTOP      0x4
-#define        ECP_EIEDGE      0x00
-#define        ECP_EILEVEL     0x80
-#define        ECP_EIADDRMASKL 0x00ff0000
-#define        ECP_EIADDRSHFTL 16
-#define        ECP_EIADDRMASKH 0xff000000
-#define        ECP_EIADDRSHFTH 24
-#define        ECP_EIBRDENAB   0xc84
-
-#define        ECP_EISAID      0x4
-
 /*
  *     Important defines for the Micro-channel class of ECP board.
  *     (It has a lot in common with the ISA boards.)
@@ -411,26 +388,6 @@ static char        *stli_brdnames[] = {
 
 #define        ONB_HIMEMENAB   0x02
 
-/*
- *     Important defines for the EISA class of ONboard board.
- */
-#define        ONB_EIIREG      0
-#define        ONB_EIMEMARL    1
-#define        ONB_EICONFR     2
-#define        ONB_EIMEMARH    3
-#define        ONB_EIENABLE    0x1
-#define        ONB_EIDISABLE   0x0
-#define        ONB_EISTOP      0x4
-#define        ONB_EIEDGE      0x00
-#define        ONB_EILEVEL     0x80
-#define        ONB_EIADDRMASKL 0x00ff0000
-#define        ONB_EIADDRSHFTL 16
-#define        ONB_EIADDRMASKH 0xff000000
-#define        ONB_EIADDRSHFTH 24
-#define        ONB_EIBRDENAB   0xc84
-
-#define        ONB_EISAID      0x1
-
 /*
  *     Important defines for the Brumby boards. They are pretty simple,
  *     there is not much that is programmably configurable.
@@ -538,7 +495,6 @@ STATIC      d_ioctl_t       stliioctl;
  */
 static stliport_t *stli_dev2port(cdev_t dev);
 static int     stli_isaprobe(struct isa_device *idp);
-static int     stli_eisaprobe(struct isa_device *idp);
 static int     stli_brdinit(stlibrd_t *brdp);
 static int     stli_brdattach(stlibrd_t *brdp);
 static int     stli_initecp(stlibrd_t *brdp);
@@ -586,24 +542,12 @@ static void       stli_ecpreset(stlibrd_t *brdp);
 static char    *stli_ecpgetmemptr(stlibrd_t *brdp, unsigned long offset,
                        int line);
 static void    stli_ecpintr(stlibrd_t *brdp);
-static void    stli_ecpeiinit(stlibrd_t *brdp);
-static void    stli_ecpeienable(stlibrd_t *brdp);
-static void    stli_ecpeidisable(stlibrd_t *brdp);
-static void    stli_ecpeireset(stlibrd_t *brdp);
-static char    *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset,
-                       int line);
 static void    stli_onbinit(stlibrd_t *brdp);
 static void    stli_onbenable(stlibrd_t *brdp);
 static void    stli_onbdisable(stlibrd_t *brdp);
 static void    stli_onbreset(stlibrd_t *brdp);
 static char    *stli_onbgetmemptr(stlibrd_t *brdp, unsigned long offset,
                        int line);
-static void    stli_onbeinit(stlibrd_t *brdp);
-static void    stli_onbeenable(stlibrd_t *brdp);
-static void    stli_onbedisable(stlibrd_t *brdp);
-static void    stli_onbereset(stlibrd_t *brdp);
-static char    *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset,
-                       int line);
 static void    stli_bbyinit(stlibrd_t *brdp);
 static void    stli_bbyreset(stlibrd_t *brdp);
 static char    *stli_bbygetmemptr(stlibrd_t *brdp, unsigned long offset,
@@ -707,52 +651,6 @@ static int stli_isaprobe(struct isa_device *idp)
 
 /*****************************************************************************/
 
-/*
- *     Probe for an EISA board type. We should be able to read the EISA ID,
- *     that will tell us if a board is present or not...
- */
-
-static int stli_eisaprobe(struct isa_device *idp)
-{
-       int     btype, eid;
-
-#if STLDEBUG
-       kprintf("stli_eisaprobe(idp=%x): unit=%d iobase=%x flags=%x\n",
-               (int) idp, idp->id_unit, idp->id_iobase, idp->id_flags);
-#endif
-
-/*
- *     Firstly check if this is an EISA system. Do this by probing for
- *     the system board EISA ID. If this is not an EISA system then
- *     don't bother going any further!
- */
-       outb(0xc80, 0xff);
-       if (inb(0xc80) == 0xff)
-               return(0);
-
-/*
- *     Try and read the EISA ID from the board at specified address.
- *     If one is present it will tell us the board type as well.
- */
-       outb((idp->id_iobase + 0xc80), 0xff);
-       eid = inb(idp->id_iobase + 0xc80);
-       eid |= inb(idp->id_iobase + 0xc81) << 8;
-       if (eid != STL_EISAID)
-               return(0);
-
-       btype = 0;
-       eid = inb(idp->id_iobase + 0xc82);
-       if (eid == ECP_EISAID)
-               btype = BRD_ECPE;
-       else if (eid == ONB_EISAID)
-               btype = BRD_ONBOARDE;
-
-       outb((idp->id_iobase + 0xc84), 0x1);
-       return(btype);
-}
-
-/*****************************************************************************/
-
 /*
  *     Probe for a board. This is involved, since we need to enable the
  *     shared memory region to see if the board is really there or not...
@@ -773,14 +671,11 @@ static int stliprobe(struct isa_device *idp)
 
 /*
  *     First up determine what bus type of board we might be dealing
- *     with. It is easy to separate out the ISA from the EISA
- *     boards, based on their IO addresses.
+ *     with.
  */
        bclass = 0;
        if ((idp->id_iobase > 0) && (idp->id_iobase < 0x400))
                bclass |= BRD_ISA;
-       else if ((idp->id_iobase & ~0xf000) == 0)
-               bclass |= BRD_EISA;
 
        if ((bclass == 0) || (idp->id_iobase == 0))
                return(0);
@@ -791,8 +686,6 @@ static int stliprobe(struct isa_device *idp)
        btype = 0;
        if (bclass & BRD_ISA)
                btype = stli_isaprobe(idp);
-       if ((btype == 0) && (bclass & BRD_EISA))
-               btype = stli_eisaprobe(idp);
        if (btype == 0)
                return(0);
 
@@ -2594,85 +2487,6 @@ static void stli_ecpintr(stlibrd_t *brdp)
 
 /*****************************************************************************/
 
-/*
- *     The following set of functions act on ECP EISA boards.
- */
-
-static void stli_ecpeiinit(stlibrd_t *brdp)
-{
-       unsigned long   memconf;
-
-#if STLDEBUG
-       kprintf("stli_ecpeiinit(brdp=%x)\n", (int) brdp);
-#endif
-
-       outb((brdp->iobase + ECP_EIBRDENAB), 0x1);
-       outb((brdp->iobase + ECP_EICONFR), ECP_EISTOP);
-       DELAY(10);
-       outb((brdp->iobase + ECP_EICONFR), ECP_EIDISABLE);
-       DELAY(500);
-
-       memconf = (brdp->paddr & ECP_EIADDRMASKL) >> ECP_EIADDRSHFTL;
-       outb((brdp->iobase + ECP_EIMEMARL), memconf);
-       memconf = (brdp->paddr & ECP_EIADDRMASKH) >> ECP_EIADDRSHFTH;
-       outb((brdp->iobase + ECP_EIMEMARH), memconf);
-}
-
-/*****************************************************************************/
-
-static void stli_ecpeienable(stlibrd_t *brdp)
-{      
-       outb((brdp->iobase + ECP_EICONFR), ECP_EIENABLE);
-}
-
-/*****************************************************************************/
-
-static void stli_ecpeidisable(stlibrd_t *brdp)
-{      
-       outb((brdp->iobase + ECP_EICONFR), ECP_EIDISABLE);
-}
-
-/*****************************************************************************/
-
-static char *stli_ecpeigetmemptr(stlibrd_t *brdp, unsigned long offset, int line)
-{      
-       void            *ptr;
-       unsigned char   val;
-
-#if STLDEBUG
-       kprintf("stli_ecpeigetmemptr(brdp=%x,offset=%x,line=%d)\n",
-               (int) brdp, (int) offset, line);
-#endif
-
-       if (offset > brdp->memsize) {
-               kprintf("STALLION: shared memory pointer=%x out of range at "
-                       "line=%d(%d), brd=%d\n", (int) offset, line,
-                       __LINE__, brdp->brdnr);
-               ptr = 0;
-               val = 0;
-       } else {
-               ptr = (char *) brdp->vaddr + (offset % ECP_EIPAGESIZE);
-               if (offset < ECP_EIPAGESIZE)
-                       val = ECP_EIENABLE;
-               else
-                       val = ECP_EIENABLE | 0x40;
-       }
-       outb((brdp->iobase + ECP_EICONFR), val);
-       return(ptr);
-}
-
-/*****************************************************************************/
-
-static void stli_ecpeireset(stlibrd_t *brdp)
-{      
-       outb((brdp->iobase + ECP_EICONFR), ECP_EISTOP);
-       DELAY(10);
-       outb((brdp->iobase + ECP_EICONFR), ECP_EIDISABLE);
-       DELAY(500);
-}
-
-/*****************************************************************************/
-
 /*
  *     The following routines act on ONboards.
  */
@@ -2759,102 +2573,6 @@ static void stli_onbreset(stlibrd_t *brdp)
 
 /*****************************************************************************/
 
-/*
- *     The following routines act on ONboard EISA.
- */
-
-static void stli_onbeinit(stlibrd_t *brdp)
-{
-       unsigned long   memconf;
-       int             i;
-
-#if STLDEBUG
-       kprintf("stli_onbeinit(brdp=%d)\n", (int) brdp);
-#endif
-
-       outb((brdp->iobase + ONB_EIBRDENAB), 0x1);
-       outb((brdp->iobase + ONB_EICONFR), ONB_EISTOP);
-       DELAY(10);
-       outb((brdp->iobase + ONB_EICONFR), ONB_EIDISABLE);
-       for (i = 0; (i < 1000); i++)
-               DELAY(1000);
-
-       memconf = (brdp->paddr & ONB_EIADDRMASKL) >> ONB_EIADDRSHFTL;
-       outb((brdp->iobase + ONB_EIMEMARL), memconf);
-       memconf = (brdp->paddr & ONB_EIADDRMASKH) >> ONB_EIADDRSHFTH;
-       outb((brdp->iobase + ONB_EIMEMARH), memconf);
-       outb(brdp->iobase, 0x1);
-       DELAY(1000);
-}
-
-/*****************************************************************************/
-
-static void stli_onbeenable(stlibrd_t *brdp)
-{      
-#if STLDEBUG
-       kprintf("stli_onbeenable(brdp=%x)\n", (int) brdp);
-#endif
-       outb((brdp->iobase + ONB_EICONFR), ONB_EIENABLE);
-}
-
-/*****************************************************************************/
-
-static void stli_onbedisable(stlibrd_t *brdp)
-{      
-#if STLDEBUG
-       kprintf("stli_onbedisable(brdp=%x)\n", (int) brdp);
-#endif
-       outb((brdp->iobase + ONB_EICONFR), ONB_EIDISABLE);
-}
-
-/*****************************************************************************/
-
-static char *stli_onbegetmemptr(stlibrd_t *brdp, unsigned long offset, int line)
-{      
-       void            *ptr;
-       unsigned char   val;
-
-#if STLDEBUG
-       kprintf("stli_onbegetmemptr(brdp=%x,offset=%x,line=%d)\n", (int) brdp,
-               (int) offset, line);
-#endif
-
-       if (offset > brdp->memsize) {
-               kprintf("STALLION: shared memory pointer=%x out of range at "
-                       "line=%d(%d), brd=%d\n", (int) offset, line,
-                       __LINE__, brdp->brdnr);
-               ptr = 0;
-               val = 0;
-       } else {
-               ptr = (char *) brdp->vaddr + (offset % ONB_EIPAGESIZE);
-               if (offset < ONB_EIPAGESIZE)
-                       val = ONB_EIENABLE;
-               else
-                       val = ONB_EIENABLE | 0x40;
-       }
-       outb((brdp->iobase + ONB_EICONFR), val);
-       return(ptr);
-}
-
-/*****************************************************************************/
-
-static void stli_onbereset(stlibrd_t *brdp)
-{      
-       int     i;
-
-#if STLDEBUG
-       kprintf("stli_onbereset(brdp=%x)\n", (int) brdp);
-#endif
-
-       outb((brdp->iobase + ONB_EICONFR), ONB_EISTOP);
-       DELAY(10);
-       outb((brdp->iobase + ONB_EICONFR), ONB_EIDISABLE);
-       for (i = 0; (i < 1000); i++)
-               DELAY(1000);
-}
-
-/*****************************************************************************/
-
 /*
  *     The following routines act on Brumby boards.
  */
@@ -3020,18 +2738,6 @@ static int stli_initecp(stlibrd_t *brdp)
                brdp->reset = stli_ecpreset;
                break;
 
-       case BRD_ECPE:
-               brdp->memsize = ECP_MEMSIZE;
-               brdp->pagesize = ECP_EIPAGESIZE;
-               brdp->init = stli_ecpeiinit;
-               brdp->enable = stli_ecpeienable;
-               brdp->reenable = stli_ecpeienable;
-               brdp->disable = stli_ecpeidisable;
-               brdp->getmemptr = stli_ecpeigetmemptr;
-               brdp->intr = stli_ecpintr;
-               brdp->reset = stli_ecpeireset;
-               break;
-
        default:
                return(EINVAL);
        }
@@ -3136,18 +2842,6 @@ static int stli_initonb(stlibrd_t *brdp)
                brdp->confbits = (brdp->paddr > 0x100000) ? ONB_HIMEMENAB : 0;
                break;
 
-       case BRD_ONBOARDE:
-               brdp->memsize = ONB_EIMEMSIZE;
-               brdp->pagesize = ONB_EIPAGESIZE;
-               brdp->init = stli_onbeinit;
-               brdp->enable = stli_onbeenable;
-               brdp->reenable = stli_onbeenable;
-               brdp->disable = stli_onbedisable;
-               brdp->getmemptr = stli_onbegetmemptr;
-               brdp->intr = stli_ecpintr;
-               brdp->reset = stli_onbereset;
-               break;
-
        case BRD_BRUMBY4:
        case BRD_BRUMBY8:
        case BRD_BRUMBY16:
index e77ac5d..123bd25 100644 (file)
@@ -101,7 +101,6 @@ acpi_wakecode.h                             optional        acpi            \
 dev/crypto/glxsb/glxsb.c               optional        glxsb
 dev/crypto/glxsb/glxsb_hash.c          optional        glxsb
 dev/netif/ed/if_ed_isa.c               optional        ed isa
-bus/eisa/eisaconf.c                    optional        eisa
 dev/video/fb/fb.c                      optional        fb
 dev/video/fb/fb.c                      optional        vga
 dev/video/fb/splash.c                  optional        splash
index 657c5d8..f6a3dad 100644 (file)
@@ -113,8 +113,6 @@ USERCONFIG          opt_userconfig.h
 VISUAL_USERCONFIG      opt_userconfig.h
 INTRO_USERCONFIG       opt_userconfig.h
 
-EISA_SLOTS             opt_eisa.h
-
 FE_8BIT_SUPPORT                opt_fe.h
 
 # Video spigot
index d7f6164..abed230 100644 (file)
@@ -2477,16 +2477,6 @@ static int set_pnp_parms(CmdParm *);
 
 static int lineno;
 
-#include "use_eisa.h"
-
-#if NEISA > 0
-
-#include <bus/eisa/eisaconf.h>
-
-static int set_num_eisa_slots(CmdParm *);
-
-#endif /* NEISA > 0 */
-
 static CmdParm addr_parms[] = {
     { PARM_DEVSPEC, {} },
     { PARM_ADDR, {} },
@@ -2511,20 +2501,10 @@ static CmdParm string_arg[] = {
 };
 #endif
 
-#if NEISA > 0
-static CmdParm int_arg[] = {
-    { PARM_INT, {} },
-    { -1, {} },
-};
-#endif /* NEISA > 0 */
-
 static Cmd CmdList[] = {
     { "?",     helpfunc,               NULL },         /* ? (help)     */
     { "di",    set_device_disable,     dev_parms },    /* disable dev  */
     { "dr",    set_device_drq,         int_parms },    /* drq dev #    */
-#if NEISA > 0
-    { "ei",    set_num_eisa_slots,     int_arg },      /* # EISA slots */
-#endif /* NEISA > 0 */
     { "en",    set_device_enable,      dev_parms },    /* enable dev   */
     { "ex",    quitfunc,               NULL },         /* exit (quit)  */
     { "f",     set_device_flags,       int_parms },    /* flags dev mask */
@@ -2697,9 +2677,6 @@ list_devices(CmdParm *parms)
 #if NPNP > 0
     if (lspnp()) return 0;
 #endif
-#if NEISA > 0
-    kprintf("\nNumber of EISA slots to probe: %d\n", num_eisa_slots);
-#endif /* NEISA > 0 */
     return 0;
 }
 
@@ -2898,18 +2875,6 @@ set_pnp_parms(CmdParm *parms)
 }
 #endif /* NPNP */
 
-#if NEISA > 0
-static int
-set_num_eisa_slots(CmdParm *parms)
-{
-    int num_slots;
-
-    num_slots = parms[0].parm.iparm;
-    num_eisa_slots = (num_slots <= 16 ? num_slots : 10);
-    return 0;
-}
-#endif /* NEISA > 0 */
-
 static int
 quitfunc(CmdParm *parms)
 {
@@ -2947,9 +2912,6 @@ helpfunc(CmdParm *parms)
     "pnp <csn> <ldn> [irqX <number>]\tset irq X (0..1) to number, 0=unused\n"
     "pnp <csn> <ldn> [drqX <number>]\tset drq X (0..1) to number, 4=unused\n");
 #endif
-#if NEISA > 0
-    kprintf("eisa <number>\t\tSet the number of EISA slots to probe\n");
-#endif /* NEISA > 0 */
     kprintf(
     "quit\t\t\tExit this configuration utility\n"
     "reset\t\t\tReset CPU\n");
index feaed1f..ea197ad 100644 (file)
@@ -42,7 +42,6 @@
 .Cd "device stl"
 .Cd "device stl0 at isa? port <addr> irq <irq>"
 .Cd "device stli0 at isa? port <io-addr> iomem <mem-addr> iosiz <size> flags <type> "
-.Cd "device stli0 at eisa? port <io-addr> iomem <mem-addr> iosiz <size> flags <type> "
 .Sh DESCRIPTION
 This is a kernel driver for Stallion Technologies multiport serial boards.
 There are two drivers, each supporting a different class of boards.
@@ -54,7 +53,7 @@ EasyConnection 8/64-PCI boards,
 while the
 .Nm stli
 driver supports all other types, including
-ONboard, Brumby and EasyConnection 8/64 (ISA and EISA).
+ONboard, Brumby and EasyConnection 8/64 (ISA).
 .Sh CONFIGURATION
 Each non-PCI board installed in the system needs a configuration entry in the
 kernel configuration file.
@@ -156,7 +155,7 @@ families of boards use the
 .Nm stli
 driver.  The
 .Nm stli
-driver supports the ISA and EISA members of these families.
+driver supports the ISA members of these families.
 .Pp
 ISA board configuration entries for the
 .Nm stli
@@ -196,7 +195,6 @@ Brumby                                2     0x4000
 ONboard                                  4     0x10000
 ONboard/E                        7     0x10000
 EasyConnection 8/64-AT          23     0x1000
-EasyConnection 8/64-EISA        24     0x10000
 .Ed
 .Pp
 Following are some examples of configuration entries for each of the
@@ -219,26 +217,6 @@ The
 parameter specifies a memory region size
 of 4 kbytes.
 .Pp
-The EasyConnection 8/64-EISA board requires a 64 kbyte region of
-memory space.
-This region can be anywhere in the 32 bit memory address space.
-A configuration entry would be like:
-.Pp
-.Cd "device stli0 at eisa? port 0x2000 iomem 0x80000000 iosiz 0x10000 flags 24"
-.Pp
-The flags field is used to specify that this is an EasyConnection 8/64-EISA
-board.
-The I/O (port) address resource is derived from the EISA slot that
-the board is in.
-Each EISA slot is allocated a section of the I/O address space by the
-hardware of the system.
-That address being 0xX000 where X is the slot number.
-The example board is at memory address 0x80000000 which is 2 Gbyte.
-The
-.Ar iosiz
-parameter specifies the size of the memory region,
-in this case 64 kbytes.
-.Pp
 Each ONboard ISA board requires 16 bytes of I/O space and a 64 kbyte
 section of memory address space.
 Valid ONboard I/O addresses are in the range 0x200 to 0x300.
@@ -250,15 +228,6 @@ This entry specifies an ONboard ISA by setting flags to 4.
 It uses I/O address 0x240 and a memory region of 64 kbytes at memory
 address 0xd0000.
 .Pp
-Each ONboard/E board requires a 64 kbyte memory region, and this
-can be anywhere in the 32 bit address space (that is from 0 to 4 Gbyte).
-A configuration entry would look like:
-.Pp
-.Cd "device stli0 at eisa? port 0x3000 iomem 0xc0000000 iosiz 0x10000 flags 7"
-.Pp
-The specifies an ONboard/E in slot 3 using a shared memory address
-of 0xc0000000 (3 Gbyte).
-.Pp
 Each Brumby board requires 16 bytes of I/O address space and a 4 kbyte
 region of shared memory space.
 The valid Brumby I/O addresses are in the range 0x300 to 0x400.
@@ -276,7 +245,7 @@ so even though the port device names are the same for each driver,
 the major number of the device node is different.
 .Pp
 The intelligent board types (ONboard, Brumby and
-EasyConnection 8/64 (ISA and EISA))
+EasyConnection 8/64 (ISA))
 require a firmware download before the ports will be operational.
 This is achieved by using the
 .Nm stlload
index 50abc41..a994f8f 100644 (file)
@@ -50,7 +50,7 @@ The advanced switches configurable through
 .Nm
 are only available on the intelligent boards of the Stallion
 Technologies multiport serial board range.
-This includes the EasyConnection 8/64 (ISA and EISA),
+This includes the EasyConnection 8/64 (ISA),
 ONboard and Brumby boards.
 The switches are not available on the EasyIO, EasyConnection 8/32
 and EasyConnection 8/64-PCI boards.