1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
.\" $NetBSD: si.4,v 1.11 2017/07/03 21:30:58 wiz Exp $
.\"
.\" written from a reading of config files and driver source code
.\" Erik E. Fair <fair@NetBSD.org>
.Dd May 7, 1998
.Dt SI 4
.Os
.Sh NAME
.Nm si ,
.Nm sw
.Nd NCR 5380 SCSI bus host adaptor driver
.Sh SYNOPSIS
.Ss sun3
.Cd "si0 at obio0 addr 0x140000 ipl 2"
.Ss sun3 and sun3x
.Cd "si0 at vme2 addr 0x200000 ipl 2 vect 0x40"
.Cd "si1 at vme2 addr 0x204000 ipl 2 vect 0x41"
.Ss sun3/E
.Cd "sebuf0 at vme2 addr 0x300000 ipl 2 vect 0x74 # and 0x75"
.Cd "sebuf1 at vme2 addr 0x340000 ipl 2 vect 0x76 # and 0x77"
.Cd "si* at sebuf?"
.Ss sun4 and sun2
.Cd "si0 at vme0 addr 0x200000 pri 2 vec 0x40"
.Ss sun4/100
.Cd "sw0 at obio0 addr 0x0a000000 level 3"
.Sh DESCRIPTION
The
.Nm
and
.Nm sw
.Qq Tn SCSI Weird
drivers provide support for the
.Tn NCR
5380
.Tn SCSI
Bus Controller (SBC) chip found on various Sun Microsystems
.Tn CPU
motherboards (obio), and on the
.Qq Sun-3 VME SCSI
.Pq Sun part # 501-1236
board used in systems with
.Tn VME
bus.
.Ss sun3 and sun3x
The
.Tn sun3
and
.Tn sun3x
version of this driver can be configured with a
.Em flags
directive in the
.Xr config 1
file.
The values are bits in a bitfield, and are interpreted as follows:
.Pp
.Bl -tag -offset indent -compact -width 0x000ff
.It 0x000ff
Set bit (1<<target) to disable
.Tn SCSI
disconnect/reselect
.It 0x0ff00
Set bit (1<<(target+8)) to disable
.Tn SCSI
parity checking
.It 0x10000
Set this bit to disable
.Tn DMA
interrupts (poll)
.It 0x20000
Set this bit to disable
.Tn DMA
entirely (use PIO)
.El
.Pp
For example:
.Qq flags 0x1000f
would disable
.Tn DMA
interrupts, and disable disconnect/reselect for targets 0-3.
The
.Qq target
is the
.Tn SCSI
ID number of a particular device on a particular
.Tn SCSI
bus.
.Ss sun4
The
.Tn sun4
version of this driver can also be configured with a
.Em flags
directive in the
.Xr config 1
file.
The values are bits in a bitfield, and are interpreted as follows:
.Pp
.Bl -tag -offset indent -compact -width 0x01
.It 0x01
Use
.Tn DMA
.Pq may be polled
.It 0x02
Use
.Tn DMA
completion interrupts
.It 0x04
Allow
.Tn SCSI
disconnect/reselect
.El
.Pp
For example:
.Qq flags 0x07
would enable
.Tn DMA ,
interrupts, and reselect.
By default,
.Tn DMA
is enabled in the
.Tn sun4
driver.
.Sh SEE ALSO
.Xr cd 4 ,
.Xr ch 4 ,
.Xr intro 4 ,
.Xr scsi 4 ,
.Xr sd 4 ,
.Xr st 4
.Sh AUTHORS
David Jones,
.An Gordon Ross
.Aq gwr@NetBSD.org ,
.An Adam Glass
.Aq glass@NetBSD.org ,
.An Jason R. Thorpe
.Aq thorpej@NetBSD.org .
.Sh BUGS
The
.Tn VME
variant has a bit to enable or disable the
.Tn DMA
engine, but that bit also gates the interrupt line from the
.Tn NCR5380
.Pq !! .
Therefore, in order to get any interrupt from the
.Tn NCR5380 ,
(i.e. for reselect) one must clear the
.Tn DMA
engine transfer count and then enable
.Tn DMA .
This has the further complication that you CAN NOT touch the
.Tn NCR5380
while the
.Tn DMA
enable bit is set, so we have to turn
.Tn DMA
back off before we even look at the
.Tn NCR5380 .
.Pp
Support for the Sun 4/100
.Nm sw
.Qq Tn SCSI Weird
is not complete.
.Tn DMA
works, but interrupts (and, thus, reselection) don't for reasons unknown.
Further progress has halted pending the availability of a machine for testing.
.Pp
.Tn DMA ,
.Tn DMA
completion interrupts, and reselection work fine on a Sun 4/260 with modern
.Tn SCSI-II
disks attached.
There have been reports of reselection failing on
.Tn Sun
Shoebox-type configurations where
there are multiple non-SCSI devices behind
.Tn Emulex
or
.Tn Adaptec
bridges.
These devices pre-date the
.Tn SCSI-I
spec, and might not behave the way the NCR5380 code expects.
For this reason, only
.Tn DMA
is enabled by default in the
.Tn sun4
driver.
|