1 .\" $OpenBSD: scsi.4,v 1.1 1996/08/04 20:28:20 tholo Exp $
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 ?
22 system provides a uniform and modular system for the implementation
23 of drivers to control various scsi devices, and to utilize different
24 scsi host adapters through host adapter drivers. When the system probes the
26 busses, it attaches any devices it finds to the appropriate
27 drivers. If no driver seems appropriate, then it attaches the device to the
28 uk (unknown) driver so that user level scsi ioctls may
29 still be performed against the device.
30 .Sh KERNEL CONFIGURATION
31 The option SCSIDEBUG enables the debug ioctl.
33 All devices and the SCSI busses support boot time allocation so that
34 an upper number of devices and controllers does not need to be configured;
35 .Em "device sd* at scsibus? target ? lun ?"
36 will suffice for any number of disk drivers.
38 The devices are either
40 so they appear as a particular device unit or
42 so that they appear as the next available unused unit.
44 To configure a driver in the kernel without wiring down the device use a
45 config line similar to
46 .Em "device ch* at scsibus? target ? lun ?"
47 to include the changer driver.
49 To wire down a unit use a config line similar to
50 .Em "device ch1 at scsibus0 target 4 lun 0"
51 to assign changer 1 as the changer with SCSI ID 4,
52 SCSI logical unit 0 on SCSI bus 0.
53 Individual scsibuses can be wired down to specific controllers with
54 a config line similar to
55 .Em "scsibus0 at ahc0"
56 which assigns scsi bus 0 to the first unit using the ahc driver.
57 For controllers supporting more than one bus,
58 the particular bus can be specified as in
59 .Em "scsibus3 at ahc1 bus 1"
60 which assigns scsibus 1 to the second bus probed on the ahc1 device.
62 When you have a mixture of wired down and counted devices then the
63 counting begins with the first non-wired down unit for a particular
64 type. That is, if you have a disk wired down as
65 .Em "disk sd1 at scsibus? target ? lun ?" ,
66 then the first non-wired disk shall come on line as
69 There are a number of ioctls that work on any
71 device. They are defined in
73 and can be applied against any scsi device that permits them.
74 For the tape, it must be applied against the control
75 device. See the manual page for each device type for more information about
76 how generic scsi ioctls may be applied to a specific device.
77 .Bl -tag -width DIOCSDINFO____
81 Turn on debugging.. All scsi operations originating from this device's driver
82 will be traced to the console, along with other information. Debugging is
83 controlled by four bits, described in the header file. If no debugging is
84 configured into the kernel, debugging will have no effect.
86 debugging is controlled by the configuration option
89 Take a scsi command and data from a user process and apply them to the scsi
90 device. Return all status information and return data to the process. The
91 ioctl will return a successful status even if the device rejected the
92 command. As all status is returned to the user, it is up to the user
93 process to examine this information to decide the success of the command.
95 Ask the system to probe the scsi busses for any new devices. If it finds
96 any, they will be attached to the appropriate drivers. The search can be
97 narrowed to a specific bus, target or lun. The new device may or may not
98 be related to the device on which the ioctl was performed.
100 Ask the driver what it's bus, target and lun are.
102 Ask the device to disappear. This may not happen if the device is in use.
105 the generic scsi part of the system is still being mapped out.
106 Watch this space for changes.
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
110 yet decided yet whether this device will be able to open a device that is
111 already controlled by an explicit driver.
113 The system allows common device drivers to work through many different
114 types of adapters. The adapters take requests from the upper layers and do
117 bus and the system. The maximum size of a transfer is governed by the
118 adapter. Most adapters can transfer 64KB in a single operation, however
119 many can transfer larger amounts.
121 Some adapters support
123 in which the system is capable of operating as a device, responding to
124 operations initiated by another system. Target mode will be supported for
125 some adapters, but is not yet complete for this version of the scsi system.
127 When the kernel is compiled with option SCSIDEBUG, the SCIOCDEBUG ioctl
128 can be used to enable various amounts of tracing information on any
129 specific device. Devices not being traced will not produce trace information.
130 The four bits that make up the debug level, each control certain types
131 of debugging information.
132 .Bl -tag -width "Bit 0"
134 shows all scsi bus operations including scsi commands,
135 error information and the first 48 bytes of any data transferred.
137 shows routines called.
139 shows information about what branches are taken and often some
140 of the return values of functions.
142 shows more detailed information including DMA scatter-gather logs.
156 system appeared in MACH 2.5 at TRW.