mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
New and far better NCR5380/NCR53400 scsi-driver.
Handles at least Trantor T130 and ProAudioSpectrum adapters. The pas driver has consequently been removed. This driver can be configured without without interrupts. Manpage to follow when PAS16 has been edited in. Reviewed by: phk Submitted by: Serge Vakulenko, <vak@cronyx.ru>
This commit is contained in:
parent
f8577f8e51
commit
e05407d84b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5952
@ -1,7 +1,7 @@
|
||||
#
|
||||
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
|
||||
#
|
||||
# $Id: GENERIC,v 1.27 1995/01/24 20:38:27 paul Exp $
|
||||
# $Id: GENERIC,v 1.28 1995/01/26 05:04:34 ache Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -50,7 +50,8 @@ controller ahc1 at isa? bio irq ? vector ahcintr
|
||||
controller ahb0 at isa? bio irq ? vector ahbintr
|
||||
controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr
|
||||
controller aic0 at isa? port 0x340 bio irq 11 vector aicintr
|
||||
controller pas0 at isa? port 0x1f88 bio
|
||||
controller nca0 at isa? port 0x1f88 bio irq 10 vector ncaintr
|
||||
controller nca1 at isa? port 0x350 bio irq 5 vector ncaintr
|
||||
controller sea0 at isa? bio irq 5 iomem 0xc8000 iosiz 0x2000 vector seaintr
|
||||
|
||||
controller scbus0
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.130 1995/01/26 05:04:37 ache Exp $
|
||||
# $Id: LINT,v 1.131 1995/01/26 11:00:12 ache Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -370,14 +370,14 @@ device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
|
||||
#
|
||||
|
||||
#
|
||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `pas'
|
||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
||||
#
|
||||
# aha: Adaptec 154x
|
||||
# ahb: Adaptec 174x
|
||||
# ahc: Adaptec 274x
|
||||
# aic: Adaptec 152x and sound cards using the Adaptec AIC-6360 (slow!)
|
||||
# bt: Most Buslogic controllers
|
||||
# pas: ProAudioSpectrum cards using the NCR 5380 (slow!)
|
||||
# nca: ProAudioSpectrum cards using the NCR 5380 or Trantor T130
|
||||
# uha: UltraStore 14F and 34F
|
||||
# sea: Seagate ST01/02 8 bit controller (slow!)
|
||||
# wds: Western Digital WD7000 controller (no scatter/gather!).
|
||||
@ -393,10 +393,11 @@ controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr
|
||||
controller uha0 at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr
|
||||
|
||||
controller aic0 at isa? port 0x340 bio irq 11 vector aicintr
|
||||
controller pas0 at isa? port 0x1f88
|
||||
controller pas1 at isa? port 0x1f84
|
||||
controller pas2 at isa? port 0x1f8c
|
||||
controller pas3 at isa? port 0x1e88
|
||||
controller nca0 at isa? port 0x1f88 bio irq 10 vector ncaintr
|
||||
controller nca1 at isa? port 0x1f84
|
||||
controller nca2 at isa? port 0x1f8c
|
||||
controller nca3 at isa? port 0x1e88
|
||||
controller nca4 at isa? port 0x350 bio irq 5 vector ncaintr
|
||||
|
||||
controller sea0 at isa? bio irq 5 iomem 0xdc000 iosiz 0x2000 vector seaintr
|
||||
controller wds0 at isa? port 0x350 bio irq 15 drq 6 vector wdsintr
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This file tells config what files go into building a kernel,
|
||||
# files marked standard are always included.
|
||||
#
|
||||
# $Id: files.i386,v 1.73 1995/01/23 00:25:03 jkh Exp $
|
||||
# $Id: files.i386,v 1.74 1995/01/25 21:04:15 jmz Exp $
|
||||
#
|
||||
i386/apm/apm.c optional apm device-driver
|
||||
i386/apm/apm_setup.s optional apm
|
||||
@ -87,8 +87,8 @@ i386/isa/joy.c optional joy device-driver
|
||||
i386/isa/lpt.c optional lpt device-driver
|
||||
i386/isa/mcd.c optional mcd device-driver
|
||||
i386/isa/mse.c optional mse device-driver
|
||||
i386/isa/ncr5380.c optional nca device-driver
|
||||
i386/isa/npx.c optional npx device-driver
|
||||
i386/isa/pas.c optional pas device-driver
|
||||
i386/isa/readMBR.c standard
|
||||
i386/isa/syscons.c optional sc device-driver
|
||||
i386/isa/pcaudio.c optional pca device-driver
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# GENERIC -- Generic machine with WD/AHx/NCR/BTx family disks
|
||||
#
|
||||
# $Id: GENERIC,v 1.27 1995/01/24 20:38:27 paul Exp $
|
||||
# $Id: GENERIC,v 1.28 1995/01/26 05:04:34 ache Exp $
|
||||
#
|
||||
|
||||
machine "i386"
|
||||
@ -50,7 +50,8 @@ controller ahc1 at isa? bio irq ? vector ahcintr
|
||||
controller ahb0 at isa? bio irq ? vector ahbintr
|
||||
controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr
|
||||
controller aic0 at isa? port 0x340 bio irq 11 vector aicintr
|
||||
controller pas0 at isa? port 0x1f88 bio
|
||||
controller nca0 at isa? port 0x1f88 bio irq 10 vector ncaintr
|
||||
controller nca1 at isa? port 0x350 bio irq 5 vector ncaintr
|
||||
controller sea0 at isa? bio irq 5 iomem 0xc8000 iosiz 0x2000 vector seaintr
|
||||
|
||||
controller scbus0
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.130 1995/01/26 05:04:37 ache Exp $
|
||||
# $Id: LINT,v 1.131 1995/01/26 11:00:12 ache Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -370,14 +370,14 @@ device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
|
||||
#
|
||||
|
||||
#
|
||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `pas'
|
||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
||||
#
|
||||
# aha: Adaptec 154x
|
||||
# ahb: Adaptec 174x
|
||||
# ahc: Adaptec 274x
|
||||
# aic: Adaptec 152x and sound cards using the Adaptec AIC-6360 (slow!)
|
||||
# bt: Most Buslogic controllers
|
||||
# pas: ProAudioSpectrum cards using the NCR 5380 (slow!)
|
||||
# nca: ProAudioSpectrum cards using the NCR 5380 or Trantor T130
|
||||
# uha: UltraStore 14F and 34F
|
||||
# sea: Seagate ST01/02 8 bit controller (slow!)
|
||||
# wds: Western Digital WD7000 controller (no scatter/gather!).
|
||||
@ -393,10 +393,11 @@ controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr
|
||||
controller uha0 at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr
|
||||
|
||||
controller aic0 at isa? port 0x340 bio irq 11 vector aicintr
|
||||
controller pas0 at isa? port 0x1f88
|
||||
controller pas1 at isa? port 0x1f84
|
||||
controller pas2 at isa? port 0x1f8c
|
||||
controller pas3 at isa? port 0x1e88
|
||||
controller nca0 at isa? port 0x1f88 bio irq 10 vector ncaintr
|
||||
controller nca1 at isa? port 0x1f84
|
||||
controller nca2 at isa? port 0x1f8c
|
||||
controller nca3 at isa? port 0x1e88
|
||||
controller nca4 at isa? port 0x350 bio irq 5 vector ncaintr
|
||||
|
||||
controller sea0 at isa? bio irq 5 iomem 0xdc000 iosiz 0x2000 vector seaintr
|
||||
controller wds0 at isa? port 0x350 bio irq 15 drq 6 vector wdsintr
|
||||
|
@ -2,7 +2,7 @@
|
||||
# LINT -- config file for checking all the sources, tries to pull in
|
||||
# as much of the source tree as it can.
|
||||
#
|
||||
# $Id: LINT,v 1.130 1995/01/26 05:04:37 ache Exp $
|
||||
# $Id: LINT,v 1.131 1995/01/26 11:00:12 ache Exp $
|
||||
#
|
||||
# NB: You probably don't want to try running a kernel built from this
|
||||
# file. Instead, you should start from GENERIC, and add options from
|
||||
@ -370,14 +370,14 @@ device npx0 at isa? port "IO_NPX" irq 13 vector npxintr
|
||||
#
|
||||
|
||||
#
|
||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `pas'
|
||||
# SCSI host adapters: `aha', `ahb', `aic', `bt', `nca'
|
||||
#
|
||||
# aha: Adaptec 154x
|
||||
# ahb: Adaptec 174x
|
||||
# ahc: Adaptec 274x
|
||||
# aic: Adaptec 152x and sound cards using the Adaptec AIC-6360 (slow!)
|
||||
# bt: Most Buslogic controllers
|
||||
# pas: ProAudioSpectrum cards using the NCR 5380 (slow!)
|
||||
# nca: ProAudioSpectrum cards using the NCR 5380 or Trantor T130
|
||||
# uha: UltraStore 14F and 34F
|
||||
# sea: Seagate ST01/02 8 bit controller (slow!)
|
||||
# wds: Western Digital WD7000 controller (no scatter/gather!).
|
||||
@ -393,10 +393,11 @@ controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr
|
||||
controller uha0 at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr
|
||||
|
||||
controller aic0 at isa? port 0x340 bio irq 11 vector aicintr
|
||||
controller pas0 at isa? port 0x1f88
|
||||
controller pas1 at isa? port 0x1f84
|
||||
controller pas2 at isa? port 0x1f8c
|
||||
controller pas3 at isa? port 0x1e88
|
||||
controller nca0 at isa? port 0x1f88 bio irq 10 vector ncaintr
|
||||
controller nca1 at isa? port 0x1f84
|
||||
controller nca2 at isa? port 0x1f8c
|
||||
controller nca3 at isa? port 0x1e88
|
||||
controller nca4 at isa? port 0x350 bio irq 5 vector ncaintr
|
||||
|
||||
controller sea0 at isa? bio irq 5 iomem 0xdc000 iosiz 0x2000 vector seaintr
|
||||
controller wds0 at isa? port 0x350 bio irq 15 drq 6 vector wdsintr
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This file tells config what files go into building a kernel,
|
||||
# files marked standard are always included.
|
||||
#
|
||||
# $Id: files.i386,v 1.73 1995/01/23 00:25:03 jkh Exp $
|
||||
# $Id: files.i386,v 1.74 1995/01/25 21:04:15 jmz Exp $
|
||||
#
|
||||
i386/apm/apm.c optional apm device-driver
|
||||
i386/apm/apm_setup.s optional apm
|
||||
@ -87,8 +87,8 @@ i386/isa/joy.c optional joy device-driver
|
||||
i386/isa/lpt.c optional lpt device-driver
|
||||
i386/isa/mcd.c optional mcd device-driver
|
||||
i386/isa/mse.c optional mse device-driver
|
||||
i386/isa/ncr5380.c optional nca device-driver
|
||||
i386/isa/npx.c optional npx device-driver
|
||||
i386/isa/pas.c optional pas device-driver
|
||||
i386/isa/readMBR.c standard
|
||||
i386/isa/syscons.c optional sc device-driver
|
||||
i386/isa/pcaudio.c optional pca device-driver
|
||||
|
49
sys/i386/isa/ic/ncr53400.h
Normal file
49
sys/i386/isa/ic/ncr53400.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Definitions for 53C400 SCSI-controller chip.
|
||||
*
|
||||
* Derived from Linux NCR-5380 generic driver sources (by Drew Eckhardt).
|
||||
*
|
||||
* Copyright (C) 1994 Serge Vakulenko (vak@cronyx.ru)
|
||||
*
|
||||
* 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 DEVELOPERS ``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 DEVELOPERS 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 _IC_NCR_53C400_H_
|
||||
#define _IC_NCR_53C400_H_
|
||||
|
||||
#define C400_CSR 0 /* rw - Control and Status Reg. */
|
||||
#define CSR_5380_ENABLE 0x80
|
||||
#define CSR_TRANSFER_DIRECTION 0x40
|
||||
#define CSR_TRANSFER_READY_INTR 0x20
|
||||
#define CSR_5380_INTR 0x10
|
||||
#define CSR_SHARED_INTR 0x08
|
||||
#define CSR_HOST_BUF_NOT_READY 0x04 /* read only */
|
||||
#define CSR_SCSI_BUF_READY 0x02 /* read only */
|
||||
#define CSR_5380_GATED_IRQ 0x01 /* read only */
|
||||
#define CSR_BITS "\20\1irq\2sbrdy\3hbrdy\4shintr\5intr\6tintr\7tdir\10enable"
|
||||
|
||||
#define C400_CCR 1 /* rw - Clock Counter Reg. */
|
||||
#define C400_HBR 4 /* rw - Host Buffer Reg. */
|
||||
|
||||
#define C400_5380_REG_OFFSET 8 /* Offset of 5380 registers. */
|
||||
|
||||
#endif /* _IC_NCR_53C400_H_ */
|
90
sys/i386/isa/ic/ncr5380.h
Normal file
90
sys/i386/isa/ic/ncr5380.h
Normal file
@ -0,0 +1,90 @@
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
* "THE BEER-WARE LICENSE" (Revision 42):
|
||||
* <phk@login.dkuug.dk> wrote this file. As long as you retain this notice you
|
||||
* can do whatever you want with this stuff. If we meet some day, and you think
|
||||
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
|
||||
* ----------------------------------------------------------------------------
|
||||
* Modified by Serge Vakulenko (vak@cronyx.ru)
|
||||
*
|
||||
* ncr_5380.h,v 1.2 1994/09/11 20:29:18 phk Exp
|
||||
*
|
||||
* Definitions for 5380 SCSI-controller chip.
|
||||
*
|
||||
* Derived from "NCR 53C80 Family SCSI Protocol Controller Data Manual"
|
||||
*/
|
||||
|
||||
#ifndef _IC_NCR_5380_H_
|
||||
#define _IC_NCR_5380_H_
|
||||
|
||||
#define C80_CSDR 0 /* ro - Current SCSI Data Reg. */
|
||||
#define C80_ODR 0 /* wo - Output Data Reg. */
|
||||
|
||||
#define C80_ICR 1 /* rw - Initiator Command Reg. */
|
||||
#define ICR_ASSERT_RST 0x80
|
||||
#define ICR_ARBITRATION_IN_PROGRESS 0x40 /* read only */
|
||||
#define ICR_TRI_STATE_MODE 0x40 /* write only */
|
||||
#define ICR_LOST_ARBITRATION 0x20 /* read only */
|
||||
#define ICR_DIFF_ENABLE 0x20 /* write only */
|
||||
#define ICR_ASSERT_ACK 0x10
|
||||
#define ICR_ASSERT_BSY 0x08
|
||||
#define ICR_ASSERT_SEL 0x04
|
||||
#define ICR_ASSERT_ATN 0x02
|
||||
#define ICR_ASSERT_DATA_BUS 0x01
|
||||
#define ICR_BITS "\20\1dbus\2atn\3sel\4bsy\5ack\6arblost\7arb\10rst"
|
||||
|
||||
/*
|
||||
* The mask to use when doing read_modify_write on ICR.
|
||||
*/
|
||||
#define ICR_MASK (~(ICR_DIFF_ENABLE | ICR_TRI_STATE_MODE))
|
||||
|
||||
#define C80_MR 2 /* rw - Mode Reg. */
|
||||
#define MR_BLOCK_MODE_DMA 0x80
|
||||
#define MR_TARGET_MODE 0x40
|
||||
#define MR_ENABLE_PARITY_CHECKING 0x20
|
||||
#define MR_ENABLE_PARITY_INTERRUPT 0x10
|
||||
#define MR_ENABLE_EOP_INTERRUPT 0x08
|
||||
#define MR_MONITOR_BUSY 0x04
|
||||
#define MR_DMA_MODE 0x02
|
||||
#define MR_ARBITRATE 0x01
|
||||
#define MR_BITS "\20\1arb\2dma\3mbusy\4eopintr\5parintr\6pcheck\7targ\10blk"
|
||||
|
||||
#define C80_TCR 3 /* rw - Target Command Reg. */
|
||||
#define TCR_LAST_BYTE_SENT 0x80 /* read only */
|
||||
#define TCR_ASSERT_REQ 0x08
|
||||
#define TCR_ASSERT_MSG 0x04
|
||||
#define TCR_ASSERT_CD 0x02
|
||||
#define TCR_ASSERT_IO 0x01
|
||||
#define TCR_BITS "\20\1i/o\2c/d\3msg\4req\10lastbyte"
|
||||
|
||||
#define C80_CSBR 4 /* ro - Current SCSI Bus Status Reg. */
|
||||
#define CSBR_RST 0x80
|
||||
#define CSBR_BSY 0x40
|
||||
#define CSBR_REQ 0x20
|
||||
#define CSBR_MSG 0x10
|
||||
#define CSBR_CD 0x08
|
||||
#define CSBR_IO 0x04
|
||||
#define CSBR_SEL 0x02
|
||||
#define CSBR_ACK 0x01
|
||||
#define CSBR_BITS "\20\1ack\2sel\3i/o\4c/d\5msg\6req\7bsy\10rst"
|
||||
|
||||
#define C80_SER 4 /* wo - Select Enable Reg. */
|
||||
|
||||
#define C80_BSR 5 /* ro - Bus and Status Reg. */
|
||||
#define BSR_END_OF_DMA_XFER 0x80
|
||||
#define BSR_DMA_REQUEST 0x40
|
||||
#define BSR_PARITY_ERROR 0x20
|
||||
#define BSR_INTERRUPT_REQUEST_ACTIVE 0x10
|
||||
#define BSR_PHASE_MISMATCH 0x08
|
||||
#define BSR_BUSY_ERROR 0x04
|
||||
#define BSR_ATN 0x02
|
||||
#define BSR_ACK 0x01
|
||||
#define BSR_BITS "\20\1ack\2atn\3busyerr\4pherr\5irq\6parerr\7drq\10dend"
|
||||
|
||||
#define C80_SDSR 5 /* wo - Start DMA Send Reg. */
|
||||
#define C80_IDR 6 /* ro - Input Data Reg. */
|
||||
#define C80_SDTR 6 /* wo - Start DMA Target Receive Reg. */
|
||||
#define C80_RPIR 7 /* ro - Reset Parity/Interrupt Reg. */
|
||||
#define C80_SDIR 7 /* wo - Start DMA Initiator Receive Reg. */
|
||||
|
||||
#endif /* _IC_NCR_5380_H_ */
|
1544
sys/i386/isa/ncr5380.c
Normal file
1544
sys/i386/isa/ncr5380.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user