Remove ncv(4) driver

ncv(4) is marked as gone in 12. Remove it. There are no sightings of
it in the nycbug dmesg database. It was for an obscure SCSI card that
sold mostly in Japan, and was especially popilar among pc98 hackers in
the 4.x time frame..

Relnote: Yes
This commit is contained in:
Warner Losh 2018-10-22 02:35:26 +00:00
parent e9b5375b04
commit 2dfd358865
13 changed files with 1 additions and 2127 deletions

View File

@ -305,7 +305,6 @@ MAN= aac.4 \
nand.4 \
nandsim.4 \
ncr.4 \
ncv.4 \
${_ndis.4} \
net80211.4 \
netdump.4 \

View File

@ -1,131 +0,0 @@
.\" Copyright (C) 2003 The FreeBSD Project. All rights reserved.
.\" Copyright (c) 2003 Noriaki Mitsunaga. 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 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 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$
.\"
.Dd August 10, 2004
.Dt NCV 4
.Os
.Sh NAME
.Nm ncv
.Nd "NCR 53C500 based SCSI host adapter driver"
.Sh SYNOPSIS
To compile this driver into the kernel,
place the following lines in your
kernel configuration file:
.Bd -ragged -offset indent
.Cd "device scbus"
.Cd "device ncv"
.Ed
.Pp
Alternatively, to load the driver as a
module at boot time, place the following line in
.Xr loader.conf 5 :
.Bd -literal -offset indent
ncv_load="YES"
.Ed
.Sh DESCRIPTION
The
.Nm
driver provides access to the
.Tn SCSI
bus
connected to an NCR 53C500 based
PC-Card
.Tn SCSI
host adapter or an Adaptec AHA-2920 on the
.Tn PCI
bus.
.Sh HARDWARE
The following devices are currently supported by the
.Nm
driver:
.Pp
.Bl -bullet -compact
.It
I-O DATA PCSC-DV
.It
KME KXLC002 (TAXAN ICD-400PN, etc.), KXLC004, and UJDCD450
.It
Macnica Miracle SCSI-II mPS110
.It
Media Intelligent MSC-110, MSC-200
.It
New Media Corporation BASICS SCSI
.It
Qlogic Fast SCSI
.It
RATOC REX-9530, REX-5572 (SCSI only)
.El
.Sh DIAGNOSTICS
The following error messages are sometimes returned:
.Bl -diag
.It "SCSI BUS RESET failed"
Usually returned when a failure occurs during
the bus reset.
.It "CMD_NOP failed"
No operation or the operation has failed.
.It "CMD_NOP|CMD_DMA"
A failure occurred during the
.Tn DMA
read/write operations.
.El
.Pp
The
.Nm
driver should return
.Bq Er ENODEV
when any of the previously noted failures occur.
.Sh SEE ALSO
.Xr cardbus 4 ,
.Xr cd 4 ,
.Xr da 4 ,
.Xr pccard 4 ,
.Xr sa 4 ,
.Xr scsi 4
.Sh HISTORY
The
.Nm
device driver has been developed for
.Nx Ns / Ns Tn pc98
and ported to
.Fx .
The
.Nm
driver first appeared in
.Fx 2.2
with
.Tn PAO
and merged in
.Fx 4.2 .
.Sh AUTHORS
.An -nosplit
The
.Nm
driver was written by
.An Naofumi Honda .
This manual page was written by
.An Tom Rhodes Aq Mt trhodes@FreeBSD.org
and
.An Noriaki Mitsunaga Aq Mt non@FreeBSD.org .

View File

@ -428,11 +428,9 @@ device twa # 3ware 9000 series PATA/SATA RAID
#
# SCSI host adapters:
#
# ncv: NCR 53C500 based SCSI host adapters.
# nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters.
# stg: TMC 18C30, 18C50 based SCSI host adapters.
device ncv
device nsp
device stg

View File

@ -113,7 +113,7 @@ cam/ctl/scsi_ctl.c optional ctl
cam/mmc/mmc_xpt.c optional scbus mmccam
cam/mmc/mmc_da.c optional scbus mmccam da
cam/scsi/scsi_da.c optional da
cam/scsi/scsi_low.c optional ncv | nsp | stg
cam/scsi/scsi_low.c optional nsp | stg
cam/scsi/scsi_pass.c optional pass
cam/scsi/scsi_pt.c optional pt
cam/scsi/scsi_sa.c optional sa
@ -2511,8 +2511,6 @@ dev/nand/nandsim_log.c optional nandsim nand
dev/nand/nandsim_swap.c optional nandsim nand
dev/nand/nfc_if.m optional nand
dev/ncr/ncr.c optional ncr pci
dev/ncv/ncr53c500.c optional ncv
dev/ncv/ncr53c500_pccard.c optional ncv pccard
dev/netmap/if_ptnet.c optional netmap inet
dev/netmap/netmap.c optional netmap
dev/netmap/netmap_freebsd.c optional netmap

File diff suppressed because it is too large Load Diff

View File

@ -1,340 +0,0 @@
/* $NecBSD: ncr53c500_pisa.c,v 1.28 1998/11/26 01:59:11 honda Exp $ */
/* $NetBSD$ */
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* [Ported for FreeBSD]
* Copyright (c) 2000
* Noriaki Mitsunaga, Mitsuru Iwasaki and Takanori Watanabe.
* All rights reserved.
* [NetBSD for NEC PC-98 series]
* Copyright (c) 1995, 1996, 1997, 1998
* NetBSD/pc98 porting staff. All rights reserved.
* Copyright (c) 1995, 1996, 1997, 1998
* Naofumi HONDA. 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.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/systm.h>
#include <machine/bus.h>
#include <machine/resource.h>
#include <sys/rman.h>
#include <compat/netbsd/dvcfg.h>
#include <sys/bus.h>
#include <dev/pccard/pccardvar.h>
#include <cam/scsi/scsi_low.h>
#include <dev/ncv/ncr53c500reg.h>
#include <dev/ncv/ncr53c500hw.h>
#include <dev/ncv/ncr53c500var.h>
#define KME_KXLC004_01 0x100
#define OFFSET_KME_KXLC004_01 0x10
#include "pccarddevs.h"
static int ncvprobe(device_t devi);
static int ncvattach(device_t devi);
static void ncv_card_unload(device_t);
static const struct ncv_product {
struct pccard_product prod;
int flags;
} ncv_products[] = {
{ PCMCIA_CARD(EPSON, SC200), 0},
{ PCMCIA_CARD(PANASONIC, KXLC002), 0xb4d00000 },
{ PCMCIA_CARD(PANASONIC, KXLC003), 0xb4d00000 }, /* untested */
{ PCMCIA_CARD(PANASONIC, KXLC004), 0xb4d00100 },
{ PCMCIA_CARD(MACNICA, MPS100), 0xb6250000 },
{ PCMCIA_CARD(MACNICA, MPS110), 0 },
{ PCMCIA_CARD(NEC, PC9801N_J03R), 0 },
{ PCMCIA_CARD(NEWMEDIA, BASICS_SCSI), 0 },
{ PCMCIA_CARD(QLOGIC, PC05), 0x84d00000 },
#define FLAGS_REX5572 0x84d00000
{ PCMCIA_CARD(RATOC, REX5572), FLAGS_REX5572 },
{ PCMCIA_CARD(RATOC, REX9530), 0x84d00000 },
{ { NULL }, 0 }
};
/*
* Additional code for FreeBSD new-bus PCCard frontend
*/
static void
ncv_pccard_intr(void * arg)
{
struct ncv_softc *sc;
sc = arg;
SCSI_LOW_LOCK(&sc->sc_sclow);
ncvintr(arg);
SCSI_LOW_UNLOCK(&sc->sc_sclow);
}
static void
ncv_release_resource(device_t dev)
{
struct ncv_softc *sc = device_get_softc(dev);
if (sc->ncv_intrhand) {
bus_teardown_intr(dev, sc->irq_res, sc->ncv_intrhand);
}
if (sc->port_res) {
bus_release_resource(dev, SYS_RES_IOPORT,
sc->port_rid, sc->port_res);
}
if (sc->port_res_dmy) {
bus_release_resource(dev, SYS_RES_IOPORT,
sc->port_rid_dmy, sc->port_res_dmy);
}
if (sc->irq_res) {
bus_release_resource(dev, SYS_RES_IRQ,
sc->irq_rid, sc->irq_res);
}
if (sc->mem_res) {
bus_release_resource(dev, SYS_RES_MEMORY,
sc->mem_rid, sc->mem_res);
}
mtx_destroy(&sc->sc_sclow.sl_lock);
}
static int
ncv_alloc_resource(device_t dev)
{
struct ncv_softc *sc = device_get_softc(dev);
u_int32_t flags = device_get_flags(dev);
rman_res_t ioaddr, iosize, maddr, msize;
int error;
bus_addr_t offset = 0;
if(flags & KME_KXLC004_01)
offset = OFFSET_KME_KXLC004_01;
error = bus_get_resource(dev, SYS_RES_IOPORT, 0, &ioaddr, &iosize);
if (error || (iosize < (offset + NCVIOSZ))) {
return(ENOMEM);
}
mtx_init(&sc->sc_sclow.sl_lock, "ncv", NULL, MTX_DEF);
sc->port_rid = 0;
sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->port_rid,
ioaddr+offset, ioaddr+iosize-offset,
iosize-offset, RF_ACTIVE);
if (sc->port_res == NULL) {
ncv_release_resource(dev);
return(ENOMEM);
}
if (offset != 0) {
sc->port_rid_dmy = 0;
sc->port_res_dmy = bus_alloc_resource(dev, SYS_RES_IOPORT,
&sc->port_rid_dmy,
ioaddr, ioaddr+offset, offset,
RF_ACTIVE);
if (sc->port_res_dmy == NULL) {
printf("Warning: cannot allocate IOPORT partially.\n");
}
} else {
sc->port_rid_dmy = 0;
sc->port_res_dmy = NULL;
}
sc->irq_rid = 0;
sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &sc->irq_rid,
RF_ACTIVE);
if (sc->irq_res == NULL) {
ncv_release_resource(dev);
return(ENOMEM);
}
error = bus_get_resource(dev, SYS_RES_MEMORY, 0, &maddr, &msize);
if (error) {
return(0); /* XXX */
}
/* no need to allocate memory if not configured */
if (maddr == 0 || msize == 0) {
return(0);
}
sc->mem_rid = 0;
sc->mem_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &sc->mem_rid,
RF_ACTIVE);
if (sc->mem_res == NULL) {
ncv_release_resource(dev);
return(ENOMEM);
}
return(0);
}
static int
ncv_pccard_probe(device_t dev)
{
const struct ncv_product *pp;
const char *vendorstr;
const char *prodstr;
if ((pp = (const struct ncv_product *) pccard_product_lookup(dev,
(const struct pccard_product *) ncv_products,
sizeof(ncv_products[0]), NULL)) != NULL) {
if (pp->prod.pp_name != NULL)
device_set_desc(dev, pp->prod.pp_name);
device_set_flags(dev, pp->flags);
return(0);
}
if (pccard_get_vendor_str(dev, &vendorstr))
return(EIO);
if (pccard_get_product_str(dev, &prodstr))
return(EIO);
if (strcmp(vendorstr, "RATOC System Inc.") == 0 &&
strncmp(prodstr, "SOUND/SCSI2 CARD", 16) == 0) {
device_set_desc(dev, "RATOC REX-5572");
device_set_flags(dev, FLAGS_REX5572);
return (BUS_PROBE_DEFAULT);
}
return(EIO);
}
static int
ncv_pccard_attach(device_t dev)
{
struct ncv_softc *sc = device_get_softc(dev);
int error;
error = ncv_alloc_resource(dev);
if (error) {
return(error);
}
if (ncvprobe(dev) == 0) {
ncv_release_resource(dev);
return(ENXIO);
}
error = bus_setup_intr(dev, sc->irq_res, INTR_TYPE_CAM | INTR_ENTROPY |
INTR_MPSAFE, NULL, ncv_pccard_intr, sc, &sc->ncv_intrhand);
if (error) {
ncv_release_resource(dev);
return(error);
}
if (ncvattach(dev) == 0) {
ncv_release_resource(dev);
return(ENXIO);
}
gone_in_dev(dev, 12, "ncv(4) driver");
return(0);
}
static int
ncv_pccard_detach(device_t dev)
{
ncv_card_unload(dev);
ncv_release_resource(dev);
return (0);
}
static device_method_t ncv_pccard_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ncv_pccard_probe),
DEVMETHOD(device_attach, ncv_pccard_attach),
DEVMETHOD(device_detach, ncv_pccard_detach),
{ 0, 0 }
};
static driver_t ncv_pccard_driver = {
"ncv",
ncv_pccard_methods,
sizeof(struct ncv_softc),
};
static devclass_t ncv_devclass;
MODULE_DEPEND(ncv, scsi_low, 1, 1, 1);
DRIVER_MODULE(ncv, pccard, ncv_pccard_driver, ncv_devclass, 0, 0);
PCCARD_PNP_INFO(ncv_products);
static void
ncv_card_unload(device_t devi)
{
struct ncv_softc *sc = device_get_softc(devi);
scsi_low_deactivate(&sc->sc_sclow);
scsi_low_detach(&sc->sc_sclow);
}
static int
ncvprobe(device_t devi)
{
int rv;
struct ncv_softc *sc = device_get_softc(devi);
u_int32_t flags = device_get_flags(devi);
rv = ncvprobesubr(sc->port_res,
flags, NCV_HOSTID);
return rv;
}
static int
ncvattach(device_t devi)
{
struct ncv_softc *sc;
struct scsi_low_softc *slp;
u_int32_t flags = device_get_flags(devi);
sc = device_get_softc(devi);
slp = &sc->sc_sclow;
slp->sl_dev = devi;
slp->sl_hostid = NCV_HOSTID;
slp->sl_cfgflags = flags;
ncvattachsubr(sc);
return(NCVIOSZ);
}

View File

@ -1,71 +0,0 @@
/* $FreeBSD$ */
/* $NecBSD: ncr53c500hw.h,v 1.6.18.1 2001/06/08 06:27:44 honda Exp $ */
/* $NetBSD$ */
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* [NetBSD for NEC PC-98 series]
* Copyright (c) 1996, 1997, 1998
* NetBSD/pc98 porting staff. All rights reserved.
* Copyright (c) 1996, 1997, 1998
* Naofumi HONDA. 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.
*/
#ifndef __NCR53C500HW_H_
#define __NCR53C500HW_H_
#define NCV_HOSTID 7
#define NCV_NTARGETS 8
#define NCV_NLUNS 8
struct ncv_hw {
/* configuration images */
u_int8_t hw_cfg1;
u_int8_t hw_cfg2;
u_int8_t hw_cfg3;
u_int8_t hw_cfg4;
u_int8_t hw_cfg5;
/* synch */
u_int8_t hw_clk;
u_int8_t hw_mperiod;
u_int8_t hw_moffset;
/* cfg3 quirks */
u_int8_t hw_cfg3_fscsi;
u_int8_t hw_cfg3_fclk;
};
/* dvcfg */
#define NCV_C5IMG(flags) ((DVCFG_MAJOR(flags) >> 8) & 0xff)
#define NCV_CLKFACTOR(flags) (DVCFG_MAJOR(flags) & 0x0f)
#define NCVHWCFG_MAX10M 0x01
#define NCVHWCFG_SCSI1 0x02
#define NCVHWCFG_SLOW 0x04
#define NCVHWCFG_FIFOBUG 0x08
#define NCV_SPECIAL(flags) ((DVCFG_MAJOR(flags) >> 4) & 0x0f)
#endif /* !__NCR53C500HW_H_ */

View File

@ -1,51 +0,0 @@
/* $FreeBSD$ */
/* $NecBSD: ncr53c500hwtab.h,v 1.2.18.1 2001/06/08 06:27:44 honda Exp $ */
/* $NetBSD$ */
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* [NetBSD for NEC PC-98 series]
* Copyright (c) 1996, 1997, 1998
* NetBSD/pc98 porting staff. All rights reserved.
* Copyright (c) 1996, 1997, 1998
* Naofumi HONDA. 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.
*/
static struct ncv_hw ncv_template = {
0, /* CFG1 img */
C2_FE | C2_SCSI2, /* CFG2 img */
0, /* CFG3 img */
C4_ANE, /* CFG4 img */
0x80, /* CFG5 img */
CLK_40M_F, /* clock */
200 / 4, /* max period */
15, /* max offset */
0x10, /* CFG3_FSCSI bit */
0x08, /* CFG3_FCLK bit */
};

View File

@ -1,189 +0,0 @@
/* $FreeBSD$ */
/* $NecBSD: ncr53c500reg.h,v 1.5.14.1 2001/06/08 06:27:44 honda Exp $ */
/* $NetBSD$ */
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* [NetBSD for NEC PC-98 series]
* Copyright (c) 1995, 1996, 1997, 1998
* NetBSD/pc98 porting staff. All rights reserved.
* Copyright (c) 1995, 1996, 1997, 1998
* Naofumi HONDA. All rights reserved.
* Copyright (c) 1995, 1996, 1997, 1998
* Kouichi Matsuda. 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.
*/
#ifndef _NCR53C500REG_H_
#define _NCR53C500REG_H_
/* Control Register Set 0 */
#define NCVIOSZ 0x10
#define cr0_tclsb 0x00 /* RW - Transfer Count Low */
#define cr0_tcmsb 0x01 /* RW - Transfer Count Mid */
#define cr0_sfifo 0x02 /* RW - FIFO data */
#define cr0_cmd 0x03 /* RW - Command (2 deep) */
#define cr0_stat 0x04 /* RO - Status */
#define cr0_dstid 0x04 /* WO - Select/Reselect Bus ID */
#define cr0_istat 0x05 /* RO - Interrupt */
#define cr0_srtout 0x05 /* WO - Select/Reselect Timeout */
#define cr0_seq 0x06 /* RO - Sequence Step */
#define cr0_period 0x06 /* WO - Synch Transfer Period */
#define cr0_sffl 0x07 /* RO - FIFO FLags */
#define cr0_offs 0x07 /* WO - Synch Ofset */
#define cr0_cfg1 0x08 /* RW - Configuration #1 */
#define cr0_clk 0x09 /* WO - Clock Conversion Factor */
#define cr0_tst 0x0a /* WO - Test (Chip Test Only) */
#define cr0_cfg2 0x0b /* RW - Configuration #2 */
#define cr0_cfg3 0x0c /* RW - Configuration #3 */
#define cr0_cfg4 0x0d /* RW - Configuration #4 */
#define cr0_tchsb 0x0e /* RW - Transfer Count High */
#define cr0_fifo_bottom 0x0f /* WO - FIFO bottom */
/* Control Register Set 1 */
#define cr1_jumper 0x00 /* RW - Jumper Sense Port */
#define cr1_sram_ptr 0x01 /* RW - SRAM Address Pointer */
#define cr1_sram_data 0x02 /* RW - SRAM Data */
#define cr1_fdata 0x04 /* RW - PIO FIFO */
#define cr1_fstat 0x08 /* RW - PIO Status */
#define cr1_atacmd 0x09 /* RW - ATA Command/Status */
#define cr1_ataerr 0x0a /* RW - ATA Features/Error */
#define cr1_pflag 0x0b /* RW - PIO Flag Interrupt Enable */
#define cr1_cfg5 0x0d /* RW - Configuration #5 */
#define cr1_sig 0x0e /* RO - Signature */
#define cr1_cfg6 0x0f /* RW - Configuration #6 */
/* atacmd (MPS110 ONLY) */
#define ATACMD_POWDOWN 0x2d
#define ATACMD_ENGAGE 0x24
/* cr0_sffl regster */
#define CR0_SFFLR_BMASK 0x1f /* scsi fifo byte mask */
/* cfg4 */
#define C4_ANE 0x04
/* cfg2 */
#define C2_SCSI2 0x08 /* SCSI-2 Enable */
#define C2_FE 0x40 /* Features Enable */
/* cfg1 */
#define C1_SLOW 0x80 /* Slow Cable Mode */
#define C1_SRR 0x40 /* SCSI Reset Rep Int Dis */
#define C1_PARENB 0x10 /* Enable Parity Check */
/* clk factor */
#define CLK_40M_F 0x00
#define CLK_25M_F 0x05
#define CLK_30M_F 0x06
#define CLK_35M_F 0x07
/* interrupt status register */
#define INTR_SBR 0x80 /* SCSI Bus Reset */
#define INTR_ILL 0x40 /* Illegal Command */
#define INTR_DIS 0x20 /* Disconnect */
#define INTR_BS 0x10 /* Bus Service */
#define INTR_FC 0x08 /* Function Complete */
#define INTR_RESEL 0x04 /* Reselected */
#define INTR_SELATN 0x02 /* Select with ATN */
#define INTR_SEL 0x01 /* Selected */
#define INTR_RESELECT (INTR_RESEL | INTR_FC)
/* status register */
#define STAT_INT 0x80 /* Interrupt */
#define STAT_GE 0x40 /* Gross Error */
#define STAT_PE 0x20 /* Parity Error */
#define STAT_TC 0x10 /* Terminal Count */
/* phase bits */
#define IOI 0x01
#define CDI 0x02
#define MSGI 0x04
/* Information transfer phases */
#define DATA_OUT_PHASE (0)
#define DATA_IN_PHASE (IOI)
#define COMMAND_PHASE (CDI)
#define STATUS_PHASE (CDI|IOI)
#define MESSAGE_OUT_PHASE (MSGI|CDI)
#define MESSAGE_IN_PHASE (MSGI|CDI|IOI)
#define PHASE_MASK (MSGI|CDI|IOI)
/* fifo status register */
#define FIFO_SMASK 0x1e
#define FIFO_E 0x10 /* fifo empty */
#define FIFO_B 0x00 /* there exists any */
#define FIFO_1 0x08 /* 1/3 <= bytes < 2/3 */
#define FIFO_2 0x04 /* 2/3 <= bytes < full */
#define FIFO_F 0x02 /* full */
#define FIFO_EN 0x01 /* fifo direction */
#define FIFO_BRK 0x40 /* phase miss */
#define FIFO_F_SZ 128
#define FIFO_1_SZ 44
#define FIFO_2_SZ 84
/* pflags */
#define PFR_WRITE 0x01
/* Commands */
#define CMD_DMA 0x80 /* DMA Bit */
#define CMD_NOP 0x00 /* No Operation */
#define CMD_FLUSH 0x01 /* Flush FIFO */
#define CMD_RSTCHIP 0x02 /* Reset Chip */
#define CMD_RSTSCSI 0x03 /* Reset SCSI Bus */
#define CMD_RESEL 0x40 /* Reselect Sequence */
#define CMD_SELNATN 0x41 /* Select without ATN */
#define CMD_SELATN 0x42 /* Select with ATN */
#define CMD_SELATNS 0x43 /* Select with ATN & Stop */
#define CMD_ENSEL 0x44 /* Enable (Re)Selection */
#define CMD_DISSEL 0x45 /* Disable (Re)Selection */
#define CMD_SELATN3 0x46 /* Select with ATN3 */
#define CMD_RESEL3 0x47 /* Reselect3 Sequence */
#define CMD_SNDMSG 0x20 /* Send Message */
#define CMD_SNDSTAT 0x21 /* Send Status */
#define CMD_SNDDATA 0x22 /* Send Data */
#define CMD_DISCSEQ 0x23 /* Disconnect Sequence */
#define CMD_TERMSEQ 0x24 /* Terminate Sequence */
#define CMD_TCCS 0x25 /* Target Command Comp Seq */
#define CMD_DISC 0x27 /* Disconnect */
#define CMD_RECMSG 0x28 /* Receive Message */
#define CMD_RECCMD 0x29 /* Receive Command */
#define CMD_RECDATA 0x2a /* Receive Data */
#define CMD_RECCSEQ 0x2b /* Receive Command Sequence */
#define CMD_ABORT 0x04 /* Target Abort DMA */
#define CMD_TRANS 0x10 /* Transfer Information */
#define CMD_ICCS 0x11 /* Initiator Cmd Comp Seq */
#define CMD_MSGOK 0x12 /* Message Accepted */
#define CMD_TRPAD 0x18 /* Transfer Pad */
#define CMD_SETATN 0x1a /* Set ATN */
#define CMD_RSTATN 0x1b /* Reset ATN */
/* Default timeout */
#define SEL_TOUT 0xa3
#endif /* !_NCR53C500REG_H_ */

View File

@ -1,85 +0,0 @@
/* $FreeBSD$ */
/* $NecBSD: ncr53c500var.h,v 1.11.18.1 2001/06/08 06:27:45 honda Exp $ */
/* $NetBSD$ */
/*-
* SPDX-License-Identifier: BSD-3-Clause
*
* [NetBSD for NEC PC-98 series]
* Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001
* NetBSD/pc98 porting staff. All rights reserved.
* Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000, 2001
* Naofumi HONDA. 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.
*/
#ifndef _NCR53C500VAR_H_
#define _NCR53C500VAR_H_
/*****************************************************************
* Host adapter structure
*****************************************************************/
struct ncv_softc {
struct scsi_low_softc sc_sclow; /* generic data */
int port_rid;
int port_rid_dmy;
int irq_rid;
int mem_rid;
struct resource *port_res;
struct resource *port_res_dmy;
struct resource *irq_res;
struct resource *mem_res;
void *ncv_intrhand;
int sc_tmaxcnt;
int sc_selstop; /* sel atn stop asserted */
int sc_compseq; /* completion seq cmd asserted */
int sc_sdatalen; /* start datalen */
int sc_tdatalen; /* temp xfer data len */
struct ncv_hw sc_hw; /* hardware register images */
};
/*****************************************************************
* Lun information
*****************************************************************/
struct ncv_targ_info {
struct targ_info nti_ti;
u_int8_t nti_reg_cfg3; /* cfg3 images per lun */
u_int8_t nti_reg_offset; /* synch offset register per lun */
u_int8_t nti_reg_period; /* synch period register per lun */
};
/*****************************************************************
* Proto
*****************************************************************/
int ncvprobesubr(struct resource *, u_int, int);
void ncvattachsubr(struct ncv_softc *);
int ncvintr(void *);
#endif /* !_NCR53C500VAR_H_ */

View File

@ -659,11 +659,9 @@ device twa # 3ware 9000 series PATA/SATA RAID
#
# SCSI host adapters:
#
# ncv: NCR 53C500 based SCSI host adapters.
# nsp: Workbit Ninja SCSI-3 based PC Card SCSI host adapters.
# stg: TMC 18C30, 18C50 based SCSI host adapters.
device ncv
device nsp
device stg
hint.stg.0.at="isa"

View File

@ -268,7 +268,6 @@ SUBDIR= \
${_nandsim} \
${_ncr} \
${_nctgpio} \
${_ncv} \
${_ndis} \
${_netgraph} \
${_nfe} \
@ -757,7 +756,6 @@ _glxiic= glxiic
_glxsb= glxsb
#_ibcs2= ibcs2
_ncr= ncr
_ncv= ncv
_nsp= nsp
_pcfclock= pcfclock
_pst= pst

View File

@ -1,10 +0,0 @@
# $FreeBSD$
.PATH: ${SRCTOP}/sys/dev/ncv
KMOD= ncv
SRCS= ncr53c500_pccard.c ncr53c500.c
SRCS+= device_if.h bus_if.h pci_if.h isa_if.h card_if.h pccarddevs.h
SRCS+= opt_cam.h opt_scsi.h opt_ddb.h
.include <bsd.kmod.mk>