]> git.saurik.com Git - apple/xnu.git/blame - bsd/man/man4/scsi.4
xnu-344.49.tar.gz
[apple/xnu.git] / bsd / man / man4 / scsi.4
CommitLineData
9bccf70c
A
1.\" $OpenBSD: scsi.4,v 1.1 1996/08/04 20:28:20 tholo Exp $
2.\"
3.Dd August 4, 1996
4.Dt SD 4
5.Os OpenBSD
6.Sh NAME
7.Nm scsi
8.Nd scsi system
9.Sh SYNOPSIS
10.Nm scsibus* at aha?
11.Nm scsibus* at ncr?
12.Nm device cd* at scsibus? target ? lun ?
13.Nm device ch* at scsibus? target ? lun ?
14.Nm device sd* at scsibus? target ? lun ?
15.Nm device st* at scsibus? target ? lun ?
16.Nm device ss* at scsibus? target ? lun ?
17.Nm device su* at scsibus? target ? lun ?
18.Nm device uk* at scsibus? target ? lun ?
19.Sh DESCRIPTION
20The
21.Em scsi
22system provides a uniform and modular system for the implementation
23of drivers to control various scsi devices, and to utilize different
24scsi host adapters through host adapter drivers. When the system probes the
25.Em SCSI
26busses, it attaches any devices it finds to the appropriate
27drivers. If no driver seems appropriate, then it attaches the device to the
28uk (unknown) driver so that user level scsi ioctls may
29still be performed against the device.
30.Sh KERNEL CONFIGURATION
31The option SCSIDEBUG enables the debug ioctl.
32.Pp
33All devices and the SCSI busses support boot time allocation so that
34an upper number of devices and controllers does not need to be configured;
35.Em "device sd* at scsibus? target ? lun ?"
36will suffice for any number of disk drivers.
37.Pp
38The devices are either
39.Em wired
40so they appear as a particular device unit or
41.Em counted
42so that they appear as the next available unused unit.
43.Pp
44To configure a driver in the kernel without wiring down the device use a
45config line similar to
46.Em "device ch* at scsibus? target ? lun ?"
47to include the changer driver.
48.Pp
49To wire down a unit use a config line similar to
50.Em "device ch1 at scsibus0 target 4 lun 0"
51to assign changer 1 as the changer with SCSI ID 4,
52SCSI logical unit 0 on SCSI bus 0.
53Individual scsibuses can be wired down to specific controllers with
54a config line similar to
55.Em "scsibus0 at ahc0"
56which assigns scsi bus 0 to the first unit using the ahc driver.
57For controllers supporting more than one bus,
58the particular bus can be specified as in
59.Em "scsibus3 at ahc1 bus 1"
60which assigns scsibus 1 to the second bus probed on the ahc1 device.
61.Pp
62When you have a mixture of wired down and counted devices then the
63counting begins with the first non-wired down unit for a particular
64type. That is, if you have a disk wired down as
65.Em "disk sd1 at scsibus? target ? lun ?" ,
66then the first non-wired disk shall come on line as
67.Em sd2 .
68.Sh IOCTLS
69There are a number of ioctls that work on any
70.Em SCSI
71device. They are defined in
72.Em sys/scsiio.h
73and can be applied against any scsi device that permits them.
74For the tape, it must be applied against the control
75device. See the manual page for each device type for more information about
76how generic scsi ioctls may be applied to a specific device.
77.Bl -tag -width DIOCSDINFO____
78.It Dv SCIOCRESET*
79reset a device.
80.It Dv SCIOCDEBUG
81Turn on debugging.. All scsi operations originating from this device's driver
82will be traced to the console, along with other information. Debugging is
83controlled by four bits, described in the header file. If no debugging is
84configured into the kernel, debugging will have no effect.
85.Em SCSI
86debugging is controlled by the configuration option
87.Em SCSIDEBUG.
88.It Dv SCIOCCOMMAND
89Take a scsi command and data from a user process and apply them to the scsi
90device. Return all status information and return data to the process. The
91ioctl will return a successful status even if the device rejected the
92command. As all status is returned to the user, it is up to the user
93process to examine this information to decide the success of the command.
94.It Dv SCIOCREPROBE
95Ask the system to probe the scsi busses for any new devices. If it finds
96any, they will be attached to the appropriate drivers. The search can be
97narrowed to a specific bus, target or lun. The new device may or may not
98be related to the device on which the ioctl was performed.
99.It Dv SCIOCIDENTIFY
100Ask the driver what it's bus, target and lun are.
101.It Dv SCIOCDECONFIG
102Ask the device to disappear. This may not happen if the device is in use.
103.El
104.Sh NOTES
105the generic scsi part of the system is still being mapped out.
106Watch this space for changes.
107.Pp
108 A device by the name of su (scsi_user)
109(e.g su0-0-0) will map bus, target and lun to minor numbers. It has not
110yet decided yet whether this device will be able to open a device that is
111already controlled by an explicit driver.
112.Sh ADAPTERS
113The system allows common device drivers to work through many different
114types of adapters. The adapters take requests from the upper layers and do
115all IO between the
116.Em SCSI
117bus and the system. The maximum size of a transfer is governed by the
118adapter. Most adapters can transfer 64KB in a single operation, however
119many can transfer larger amounts.
120.Sh TARGET MODE
121Some adapters support
122.Em target mode
123in which the system is capable of operating as a device, responding to
124operations initiated by another system. Target mode will be supported for
125some adapters, but is not yet complete for this version of the scsi system.
126.Sh DIAGNOSTICS
127When the kernel is compiled with option SCSIDEBUG, the SCIOCDEBUG ioctl
128can be used to enable various amounts of tracing information on any
129specific device. Devices not being traced will not produce trace information.
130The four bits that make up the debug level, each control certain types
131of debugging information.
132.Bl -tag -width "Bit 0"
133.It Dv Bit 0
134shows all scsi bus operations including scsi commands,
135error information and the first 48 bytes of any data transferred.
136.It Dv Bit 1
137shows routines called.
138.It Dv Bit 2
139shows information about what branches are taken and often some
140of the return values of functions.
141.It Dv Bit 3
142shows more detailed information including DMA scatter-gather logs.
143.El
144.Sh SEE ALSO
145.Xr ch 4 ,
146.Xr cd 4 ,
147.Xr sd 4 ,
148.Xr ss 4 ,
149.Xr st 4 ,
150.Xr su 4
151and
152.Xr uk 4
153.Sh HISTORY
154This
155.Nm
156system appeared in MACH 2.5 at TRW.