1 .\" $NetBSD: scsi.4,v 1.28 2006/07/26 10:59:52 cube Exp $
3 .\" Julian Elischer <julian@freebsd.org>. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 .Nd Small Computer Systems Interface (SCSI) bus driver
35 .Cd "scsibus* at scsi?"
36 .Cd "atapibus* at atapi?"
38 .Cd options SCSIVERBOSE
42 driver is the top, machine-independent layer of the two-layer
43 software system that provides an interface for the
44 implementation of drivers to control various
48 bus devices, and to use different
54 bus is capable of supporting a wide variety of peripherals, including
55 hard disks, removable disks,
57 scanners, tape drives, and other miscellaneous high-speed devices.
59 The bottom layer is composed of the drivers for individual
63 bus controller chips (e.g. NCR 5380), accessed through various host bus
64 interfaces, including, but not limited to
71 These individual devices are referred to as
76 because they connect the
78 bus to the host computer.
86 any devices it finds to the appropriate drivers.
88 .Bl -tag -compact -width "sd(4)"
102 If no specific driver matches the device,
105 attaches the device to the
107 driver so that user level
110 calls may still be performed against the device. Currently, only
116 can attach to an atapi bus.
120 manual page to see which
122 bus host adaptors are supported by
124 on your computer system.
125 .Sh KERNEL CONFIGURATION
128 software supports some
134 .Bl -tag -width SCSIVERBOSE
136 Compile in a wide variety of
138 statements that can be turned on by
141 Enable additional and more descriptive error and status messages
149 busses support boot time allocation so that an upper number of
150 devices and controllers does not need to be configured.
152 The devices are either
154 so they appear at a particular device unit number or
156 so that they appear as the next available unused unit number.
158 To configure a driver in the kernel without wiring down the device use a
159 config line similar to
161 .Cd "ch* at scsibus? target ? lun ?"
167 To wire down a unit use a config line similar to
169 .Cd "ch1 at scsibus0 target 4 lun 0"
171 to assign changer 1 as the changer with
173 ID 4, logical unit 0, on bus 0.
176 busses can be wired down to specific controllers with a config line
179 .Cd "scsibus0 at ahc0"
183 bus 0 to the first unit using the
187 When you have a mixture of wired down and counted devices then the counting
188 begins with the first non-wired down unit for a particular type.
189 That is, if you have a disk wired down as
191 .Cd "sd1 at scsibus0 target 1 lun 0"
193 then the first non-wired disk shall come on line as
196 There are a number of
198 calls that work on any
203 and can be applied against any
205 device that permits them.
206 For the tape, it must be applied against the control device.
207 See the manual page for each device type for more information about
211 calls may be applied to a specific device.
212 .Bl -tag -width DIOCSDINFO____
221 operations originating from this device's driver
222 will be traced to the console, along with other information.
223 Debugging is controlled by four bits, described in the header file.
224 If no debugging is configured into the kernel, debugging will have
227 debugging is controlled by the configuration option
232 command and data from a user process and apply them to the
235 Return all status information and return data to the process.
238 call will return a successful status even if the device rejected the command.
239 As all status is returned to the user, it is up to the user
240 process to examine this information to decide the success of the command.
242 Ask the system to probe the
244 busses for any new devices.
245 If it finds any, they will be attached to the appropriate drivers.
246 The search can be narrowed to a specific bus, target or Logical
248 The new device may or may not be related to the device on which
249 the ioctl was performed.
251 Ask the driver what its bus, target and LUN are.
253 Ask the device to disappear.
254 This may not happen if the device is in use.
257 The system allows common device drivers to work through many different
259 The adapters take requests from the upper layers and do all IO between the
262 The maximum size of a transfer is governed by the adapter.
263 Most adapters can transfer 64KB in a single operation, however
264 many can transfer larger amounts.
266 Some adapters support
268 in which the system is capable of operating as a device, responding to
269 operations initiated by another system.
270 Target Mode will be supported for
271 some host adapters, but is not yet complete for this version of the
275 When the kernel is compiled with option
280 can be used to enable various amounts of tracing information on any
282 Devices not being traced will not produce trace information.
283 The four bits that make up the debug level, each control certain types
284 of debugging information.
285 .Bl -tag -width "Bit 0"
289 bus operations including
292 error information and the first 48 bytes of any data transferred.
294 shows routines called.
296 shows information about what branches are taken and often some
297 of the return values of functions.
299 shows more detailed information including
318 system appeared in MACH 2.5 at TRW.
320 This man page was originally written by Julian Elischer
321 .Aq julian@freebsd.org
324 and extensively modified by
330 Not every device obeys the
332 specification as faithfully as it should.
333 As such devices are discovered by the
335 Project, their names are added to a
339 driver along a list of flags indicating which particular bad behaviors the
340 device exhibits (and that the driver should be prepared to work around).