2005-01-11 06:22:48 +00:00
|
|
|
/*
|
1998-09-15 07:39:55 +00:00
|
|
|
* Product specific probe and attach routines for:
|
|
|
|
* Adaptec 154x.
|
2005-01-11 06:22:48 +00:00
|
|
|
*/
|
|
|
|
/*-
|
2003-11-09 20:01:36 +00:00
|
|
|
* Copyright (c) 1999-2003 M. Warner Losh
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* Derived from bt isa from end, written by:
|
1998-09-15 07:39:55 +00:00
|
|
|
*
|
|
|
|
* 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, 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.
|
|
|
|
*/
|
|
|
|
|
2003-08-24 17:55:58 +00:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
__FBSDID("$FreeBSD$");
|
|
|
|
|
1998-09-15 07:39:55 +00:00
|
|
|
#include <sys/param.h>
|
|
|
|
#include <sys/systm.h>
|
1999-01-20 06:21:27 +00:00
|
|
|
#include <sys/kernel.h>
|
2003-07-01 15:52:06 +00:00
|
|
|
#include <sys/lock.h>
|
|
|
|
#include <sys/mutex.h>
|
1998-09-15 07:39:55 +00:00
|
|
|
|
|
|
|
#include <machine/bus.h>
|
1999-09-28 02:39:45 +00:00
|
|
|
#include <machine/resource.h>
|
|
|
|
#include <sys/module.h>
|
|
|
|
#include <sys/bus.h>
|
|
|
|
#include <sys/rman.h>
|
|
|
|
|
|
|
|
#include <isa/isavar.h>
|
1998-09-15 07:39:55 +00:00
|
|
|
|
|
|
|
#include <dev/aha/ahareg.h>
|
|
|
|
|
|
|
|
#include <cam/scsi/scsi_all.h>
|
|
|
|
|
1999-09-28 02:39:45 +00:00
|
|
|
static struct isa_pnp_id aha_ids[] = {
|
2000-03-25 03:24:43 +00:00
|
|
|
{ADP0100_PNP, "Adaptec 1540/1542 ISA SCSI"}, /* ADP0100 */
|
2003-11-10 02:47:11 +00:00
|
|
|
{AHA1540_PNP, "Adaptec 1540/aha-1640/aha-1535"},/* ADP1540 */
|
2000-03-25 03:24:43 +00:00
|
|
|
{AHA1542_PNP, "Adaptec 1542/aha-1535"}, /* ADP1542 */
|
|
|
|
{AHA1542_PNPCOMPAT, "Adaptec 1542 compatible"}, /* PNP00A0 */
|
|
|
|
{ICU0091_PNP, "Adaptec AHA-1540/1542 SCSI"}, /* ICU0091 */
|
1999-09-28 02:39:45 +00:00
|
|
|
{0}
|
1998-09-15 07:39:55 +00:00
|
|
|
};
|
|
|
|
|
2003-11-10 02:47:11 +00:00
|
|
|
/*
|
|
|
|
* I/O ports listed in the order enumerated by the card for certain op codes.
|
|
|
|
*/
|
|
|
|
static bus_addr_t aha_board_ports[] =
|
|
|
|
{
|
|
|
|
0x330,
|
|
|
|
0x334,
|
|
|
|
0x230,
|
|
|
|
0x234,
|
|
|
|
0x130,
|
|
|
|
0x134
|
|
|
|
};
|
|
|
|
|
1998-09-15 07:39:55 +00:00
|
|
|
/*
|
|
|
|
* Check if the device can be found at the port given
|
|
|
|
*/
|
|
|
|
static int
|
1999-09-28 02:39:45 +00:00
|
|
|
aha_isa_probe(device_t dev)
|
1998-09-15 07:39:55 +00:00
|
|
|
{
|
|
|
|
/*
|
|
|
|
* find unit and check we have that many defined
|
|
|
|
*/
|
2003-11-09 19:51:16 +00:00
|
|
|
struct aha_softc *aha = device_get_softc(dev);
|
1999-09-28 02:39:45 +00:00
|
|
|
int error;
|
2003-11-10 02:47:11 +00:00
|
|
|
u_long port_start;
|
1999-09-28 02:39:45 +00:00
|
|
|
int port_rid;
|
|
|
|
int drq;
|
|
|
|
int irq;
|
2003-11-10 02:47:11 +00:00
|
|
|
config_data_t config_data;
|
1998-09-15 07:39:55 +00:00
|
|
|
|
2003-11-13 04:14:53 +00:00
|
|
|
aha->dev = dev;
|
1999-09-28 02:39:45 +00:00
|
|
|
/* Check isapnp ids */
|
|
|
|
if (ISA_PNP_PROBE(device_get_parent(dev), dev, aha_ids) == ENXIO)
|
|
|
|
return (ENXIO);
|
|
|
|
|
2003-11-10 02:47:11 +00:00
|
|
|
port_rid = 0;
|
2016-02-27 03:38:01 +00:00
|
|
|
aha->port = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &port_rid,
|
|
|
|
AHA_NREGS, RF_ACTIVE);
|
1998-09-15 07:39:55 +00:00
|
|
|
|
2012-10-15 15:59:13 +00:00
|
|
|
if (aha->port == NULL)
|
2003-11-10 02:47:11 +00:00
|
|
|
return (ENXIO);
|
1998-09-15 07:39:55 +00:00
|
|
|
|
2012-10-16 08:40:09 +00:00
|
|
|
port_start = rman_get_start(aha->port);
|
2012-10-15 15:59:13 +00:00
|
|
|
aha_alloc(aha);
|
1998-09-15 07:39:55 +00:00
|
|
|
|
2003-11-10 02:47:11 +00:00
|
|
|
/* See if there is really a card present */
|
|
|
|
if (aha_probe(aha) || aha_fetch_adapter_info(aha)) {
|
|
|
|
aha_free(aha);
|
2012-10-15 15:59:13 +00:00
|
|
|
bus_release_resource(dev, SYS_RES_IOPORT, port_rid, aha->port);
|
2003-11-10 02:47:11 +00:00
|
|
|
return (ENXIO);
|
|
|
|
}
|
1999-09-28 02:39:45 +00:00
|
|
|
|
2003-11-10 02:47:11 +00:00
|
|
|
/*
|
|
|
|
* Determine our IRQ, and DMA settings and
|
|
|
|
* export them to the configuration system.
|
|
|
|
*/
|
|
|
|
error = aha_cmd(aha, AOP_INQUIRE_CONFIG, NULL, /*parmlen*/0,
|
|
|
|
(uint8_t*)&config_data, sizeof(config_data), DEFAULT_CMD_TIMEOUT);
|
|
|
|
|
|
|
|
if (error != 0) {
|
|
|
|
device_printf(dev, "Could not determine IRQ or DMA "
|
|
|
|
"settings for adapter at %#jx. Failing probe\n",
|
|
|
|
(uintmax_t)port_start);
|
|
|
|
aha_free(aha);
|
2004-11-12 02:18:42 +00:00
|
|
|
bus_release_resource(dev, SYS_RES_IOPORT, port_rid,
|
2012-10-15 15:59:13 +00:00
|
|
|
aha->port);
|
2003-11-10 02:47:11 +00:00
|
|
|
return (ENXIO);
|
|
|
|
}
|
|
|
|
|
2012-10-15 15:59:13 +00:00
|
|
|
bus_release_resource(dev, SYS_RES_IOPORT, port_rid, aha->port);
|
|
|
|
aha->port = NULL;
|
2003-11-10 02:47:11 +00:00
|
|
|
|
|
|
|
switch (config_data.dma_chan) {
|
|
|
|
case DMA_CHAN_5:
|
|
|
|
drq = 5;
|
|
|
|
break;
|
|
|
|
case DMA_CHAN_6:
|
|
|
|
drq = 6;
|
|
|
|
break;
|
|
|
|
case DMA_CHAN_7:
|
|
|
|
drq = 7;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
device_printf(dev, "Invalid DMA setting for adapter at %#jx.",
|
|
|
|
(uintmax_t)port_start);
|
|
|
|
return (ENXIO);
|
1998-09-15 07:39:55 +00:00
|
|
|
}
|
2003-11-10 02:47:11 +00:00
|
|
|
error = bus_set_resource(dev, SYS_RES_DRQ, 0, drq, 1);
|
|
|
|
if (error)
|
|
|
|
return error;
|
1998-09-15 07:39:55 +00:00
|
|
|
|
2003-11-10 02:47:11 +00:00
|
|
|
irq = ffs(config_data.irq) + 8;
|
|
|
|
error = bus_set_resource(dev, SYS_RES_IRQ, 0, irq, 1);
|
|
|
|
return (error);
|
1998-09-15 07:39:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Attach all the sub-devices we can find
|
|
|
|
*/
|
|
|
|
static int
|
1999-09-28 02:39:45 +00:00
|
|
|
aha_isa_attach(device_t dev)
|
1998-09-15 07:39:55 +00:00
|
|
|
{
|
2003-11-09 19:51:16 +00:00
|
|
|
struct aha_softc *aha = device_get_softc(dev);
|
2005-01-19 06:54:10 +00:00
|
|
|
int error = ENOMEM;
|
1999-09-28 02:39:45 +00:00
|
|
|
|
2003-11-13 04:14:53 +00:00
|
|
|
aha->dev = dev;
|
2000-01-24 07:08:40 +00:00
|
|
|
aha->portrid = 0;
|
2016-02-27 03:38:01 +00:00
|
|
|
aha->port = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT,
|
|
|
|
&aha->portrid, AHA_NREGS, RF_ACTIVE);
|
2000-01-24 07:08:40 +00:00
|
|
|
if (!aha->port) {
|
1999-09-28 02:39:45 +00:00
|
|
|
device_printf(dev, "Unable to allocate I/O ports\n");
|
2005-01-19 06:54:10 +00:00
|
|
|
goto fail;
|
1999-09-28 02:39:45 +00:00
|
|
|
}
|
|
|
|
|
2000-01-24 07:08:40 +00:00
|
|
|
aha->irqrid = 0;
|
2004-03-17 17:50:55 +00:00
|
|
|
aha->irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &aha->irqrid,
|
1999-09-28 02:39:45 +00:00
|
|
|
RF_ACTIVE);
|
2000-01-24 07:08:40 +00:00
|
|
|
if (!aha->irq) {
|
1999-09-28 02:39:45 +00:00
|
|
|
device_printf(dev, "Unable to allocate excluse use of irq\n");
|
2005-01-19 06:54:10 +00:00
|
|
|
goto fail;
|
1999-09-28 02:39:45 +00:00
|
|
|
}
|
1998-09-15 07:39:55 +00:00
|
|
|
|
2000-01-24 07:08:40 +00:00
|
|
|
aha->drqrid = 0;
|
2004-03-17 17:50:55 +00:00
|
|
|
aha->drq = bus_alloc_resource_any(dev, SYS_RES_DRQ, &aha->drqrid,
|
1999-09-28 02:39:45 +00:00
|
|
|
RF_ACTIVE);
|
2000-01-24 07:08:40 +00:00
|
|
|
if (!aha->drq) {
|
1999-09-28 02:39:45 +00:00
|
|
|
device_printf(dev, "Unable to allocate drq\n");
|
2005-01-19 06:54:10 +00:00
|
|
|
goto fail;
|
1999-09-28 02:39:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#if 0 /* is the drq ever unset? */
|
1998-09-15 07:39:55 +00:00
|
|
|
if (dev->id_drq != -1)
|
|
|
|
isa_dmacascade(dev->id_drq);
|
1999-09-28 02:39:45 +00:00
|
|
|
#endif
|
2000-01-24 07:08:40 +00:00
|
|
|
isa_dmacascade(rman_get_start(aha->drq));
|
1998-09-15 07:39:55 +00:00
|
|
|
|
|
|
|
/* Allocate our parent dmatag */
|
2008-10-07 23:55:32 +00:00
|
|
|
if (bus_dma_tag_create( /* parent */ bus_get_dma_tag(dev),
|
2003-03-29 09:46:10 +00:00
|
|
|
/* alignemnt */ 1,
|
|
|
|
/* boundary */ 0,
|
2012-10-15 15:59:13 +00:00
|
|
|
/* lowaddr */ BUS_SPACE_MAXADDR_24BIT,
|
2003-03-29 09:46:10 +00:00
|
|
|
/* highaddr */ BUS_SPACE_MAXADDR,
|
2012-10-15 15:59:13 +00:00
|
|
|
/* filter */ NULL,
|
|
|
|
/* filterarg */ NULL,
|
2003-03-29 09:46:10 +00:00
|
|
|
/* maxsize */ BUS_SPACE_MAXSIZE_24BIT,
|
|
|
|
/* nsegments */ ~0,
|
|
|
|
/* maxsegsz */ BUS_SPACE_MAXSIZE_24BIT,
|
|
|
|
/* flags */ 0,
|
2012-10-15 15:59:13 +00:00
|
|
|
/* lockfunc */ NULL,
|
|
|
|
/* lockarg */ NULL,
|
2003-03-29 09:46:10 +00:00
|
|
|
&aha->parent_dmat) != 0) {
|
2005-01-19 06:54:10 +00:00
|
|
|
device_printf(dev, "dma tag create failed.\n");
|
|
|
|
goto fail;
|
|
|
|
}
|
1998-09-15 07:39:55 +00:00
|
|
|
|
2004-11-12 02:18:42 +00:00
|
|
|
if (aha_init(aha)) {
|
1999-09-28 02:39:45 +00:00
|
|
|
device_printf(dev, "init failed\n");
|
2005-01-19 06:54:10 +00:00
|
|
|
goto fail;
|
|
|
|
}
|
2005-01-11 01:17:07 +00:00
|
|
|
/*
|
|
|
|
* The 1542A and B look the same. So we guess based on
|
|
|
|
* the firmware revision. It appears that only rev 0 is on
|
|
|
|
* the A cards.
|
|
|
|
*/
|
|
|
|
if (aha->boardid <= BOARD_1542 && aha->fw_major == 0) {
|
|
|
|
device_printf(dev, "154xA may not work\n");
|
|
|
|
aha->ccb_sg_opcode = INITIATOR_SG_CCB;
|
|
|
|
aha->ccb_ccb_opcode = INITIATOR_CCB;
|
2004-11-12 02:18:42 +00:00
|
|
|
}
|
2005-01-11 01:17:07 +00:00
|
|
|
|
1999-09-28 02:39:45 +00:00
|
|
|
error = aha_attach(aha);
|
|
|
|
if (error) {
|
|
|
|
device_printf(dev, "attach failed\n");
|
2005-01-19 06:54:10 +00:00
|
|
|
goto fail;
|
1999-09-28 02:39:45 +00:00
|
|
|
}
|
1999-01-20 06:21:27 +00:00
|
|
|
|
2012-10-15 15:59:13 +00:00
|
|
|
error = bus_setup_intr(dev, aha->irq, INTR_TYPE_CAM|INTR_ENTROPY|
|
|
|
|
INTR_MPSAFE, NULL, aha_intr, aha, &aha->ih);
|
1999-09-28 02:39:45 +00:00
|
|
|
if (error) {
|
|
|
|
device_printf(dev, "Unable to register interrupt handler\n");
|
2012-10-15 15:59:13 +00:00
|
|
|
aha_detach(aha);
|
2005-01-19 06:54:10 +00:00
|
|
|
goto fail;
|
1999-01-20 06:21:27 +00:00
|
|
|
}
|
|
|
|
|
1999-09-28 02:39:45 +00:00
|
|
|
return (0);
|
2005-01-19 06:54:10 +00:00
|
|
|
fail: ;
|
2012-10-15 15:59:13 +00:00
|
|
|
aha_free(aha);
|
2005-01-19 06:54:10 +00:00
|
|
|
bus_free_resource(dev, SYS_RES_IOPORT, aha->port);
|
|
|
|
bus_free_resource(dev, SYS_RES_IRQ, aha->irq);
|
|
|
|
bus_free_resource(dev, SYS_RES_DRQ, aha->drq);
|
|
|
|
return (error);
|
1999-01-20 06:21:27 +00:00
|
|
|
}
|
|
|
|
|
2000-01-24 07:08:40 +00:00
|
|
|
static int
|
|
|
|
aha_isa_detach(device_t dev)
|
|
|
|
{
|
2003-11-09 19:51:16 +00:00
|
|
|
struct aha_softc *aha = (struct aha_softc *)device_get_softc(dev);
|
2000-01-24 07:08:40 +00:00
|
|
|
int error;
|
|
|
|
|
|
|
|
error = bus_teardown_intr(dev, aha->irq, aha->ih);
|
2005-01-19 06:54:10 +00:00
|
|
|
if (error)
|
2000-01-24 07:08:40 +00:00
|
|
|
device_printf(dev, "failed to unregister interrupt handler\n");
|
|
|
|
|
|
|
|
error = aha_detach(aha);
|
|
|
|
if (error) {
|
|
|
|
device_printf(dev, "detach failed\n");
|
|
|
|
return (error);
|
|
|
|
}
|
|
|
|
aha_free(aha);
|
2012-10-15 15:59:13 +00:00
|
|
|
bus_free_resource(dev, SYS_RES_IOPORT, aha->port);
|
|
|
|
bus_free_resource(dev, SYS_RES_IRQ, aha->irq);
|
|
|
|
bus_free_resource(dev, SYS_RES_DRQ, aha->drq);
|
2000-01-24 07:08:40 +00:00
|
|
|
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
aha_isa_identify(driver_t *driver, device_t parent)
|
|
|
|
{
|
2003-11-10 02:47:11 +00:00
|
|
|
int i;
|
|
|
|
bus_addr_t ioport;
|
|
|
|
struct aha_softc aha;
|
|
|
|
int rid;
|
|
|
|
device_t child;
|
|
|
|
|
|
|
|
/* Attempt to find an adapter */
|
2016-04-19 23:37:24 +00:00
|
|
|
for (i = 0; i < nitems(aha_board_ports); i++) {
|
2003-11-10 02:47:11 +00:00
|
|
|
bzero(&aha, sizeof(aha));
|
|
|
|
ioport = aha_board_ports[i];
|
|
|
|
/*
|
|
|
|
* XXX Check to see if we have a hard-wired aha device at
|
|
|
|
* XXX this port, if so, skip. This should also cover the
|
|
|
|
* XXX case where we are run multiple times due to, eg,
|
|
|
|
* XXX kldload/kldunload.
|
|
|
|
*/
|
|
|
|
rid = 0;
|
2012-10-16 08:40:09 +00:00
|
|
|
aha.port = bus_alloc_resource(parent, SYS_RES_IOPORT, &rid,
|
2003-11-10 02:47:11 +00:00
|
|
|
ioport, ioport, AHA_NREGS, RF_ACTIVE);
|
2012-10-16 08:40:09 +00:00
|
|
|
if (aha.port == NULL)
|
2003-11-10 02:47:11 +00:00
|
|
|
continue;
|
2012-10-15 15:59:13 +00:00
|
|
|
aha_alloc(&aha);
|
2003-11-10 02:47:11 +00:00
|
|
|
/* See if there is really a card present */
|
|
|
|
if (aha_probe(&aha) || aha_fetch_adapter_info(&aha))
|
|
|
|
goto not_this_one;
|
|
|
|
child = BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "aha", -1);
|
|
|
|
bus_set_resource(child, SYS_RES_IOPORT, 0, ioport, AHA_NREGS);
|
|
|
|
/*
|
|
|
|
* Could query the board and set IRQ/DRQ, but probe does
|
|
|
|
* that.
|
|
|
|
*/
|
2012-10-16 08:40:09 +00:00
|
|
|
not_this_one:
|
|
|
|
bus_release_resource(parent, SYS_RES_IOPORT, rid, aha.port);
|
2003-11-10 02:47:11 +00:00
|
|
|
aha_free(&aha);
|
|
|
|
}
|
2000-01-24 07:08:40 +00:00
|
|
|
}
|
|
|
|
|
1999-09-28 02:39:45 +00:00
|
|
|
static device_method_t aha_isa_methods[] = {
|
|
|
|
/* Device interface */
|
|
|
|
DEVMETHOD(device_probe, aha_isa_probe),
|
|
|
|
DEVMETHOD(device_attach, aha_isa_attach),
|
2000-01-24 07:08:40 +00:00
|
|
|
DEVMETHOD(device_detach, aha_isa_detach),
|
|
|
|
DEVMETHOD(device_identify, aha_isa_identify),
|
1999-01-20 06:21:27 +00:00
|
|
|
|
1999-09-28 02:39:45 +00:00
|
|
|
{ 0, 0 }
|
|
|
|
};
|
1999-01-20 06:21:27 +00:00
|
|
|
|
1999-09-28 02:39:45 +00:00
|
|
|
static driver_t aha_isa_driver = {
|
|
|
|
"aha",
|
|
|
|
aha_isa_methods,
|
2003-11-09 19:51:16 +00:00
|
|
|
sizeof(struct aha_softc),
|
1999-09-28 02:39:45 +00:00
|
|
|
};
|
1999-01-20 06:21:27 +00:00
|
|
|
|
1999-09-28 02:39:45 +00:00
|
|
|
static devclass_t aha_devclass;
|
1999-01-20 06:21:27 +00:00
|
|
|
|
1999-09-28 02:39:45 +00:00
|
|
|
DRIVER_MODULE(aha, isa, aha_isa_driver, aha_devclass, 0, 0);
|
2006-12-11 18:28:31 +00:00
|
|
|
MODULE_DEPEND(aha, isa, 1, 1, 1);
|