]>
Commit | Line | Data |
---|---|---|
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 | |
20 | The | |
21 | .Em scsi | |
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 | |
25 | .Em SCSI | |
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. | |
32 | .Pp | |
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. | |
37 | .Pp | |
38 | The devices are either | |
39 | .Em wired | |
40 | so they appear as a particular device unit or | |
41 | .Em counted | |
42 | so that they appear as the next available unused unit. | |
43 | .Pp | |
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. | |
48 | .Pp | |
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. | |
61 | .Pp | |
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 | |
67 | .Em sd2 . | |
68 | .Sh IOCTLS | |
69 | There are a number of ioctls that work on any | |
70 | .Em SCSI | |
71 | device. They are defined in | |
72 | .Em sys/scsiio.h | |
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____ | |
78 | .It Dv SCIOCRESET* | |
79 | reset a device. | |
80 | .It Dv SCIOCDEBUG | |
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. | |
85 | .Em SCSI | |
86 | debugging is controlled by the configuration option | |
87 | .Em SCSIDEBUG. | |
88 | .It Dv SCIOCCOMMAND | |
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. | |
94 | .It Dv SCIOCREPROBE | |
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. | |
99 | .It Dv SCIOCIDENTIFY | |
100 | Ask the driver what it's bus, target and lun are. | |
101 | .It Dv SCIOCDECONFIG | |
102 | Ask the device to disappear. This may not happen if the device is in use. | |
103 | .El | |
104 | .Sh NOTES | |
105 | the generic scsi part of the system is still being mapped out. | |
106 | Watch 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 | |
110 | yet decided yet whether this device will be able to open a device that is | |
111 | already controlled by an explicit driver. | |
112 | .Sh ADAPTERS | |
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 | |
115 | all IO between the | |
116 | .Em SCSI | |
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. | |
120 | .Sh TARGET MODE | |
121 | Some adapters support | |
122 | .Em target mode | |
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. | |
126 | .Sh DIAGNOSTICS | |
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" | |
133 | .It Dv Bit 0 | |
134 | shows all scsi bus operations including scsi commands, | |
135 | error information and the first 48 bytes of any data transferred. | |
136 | .It Dv Bit 1 | |
137 | shows routines called. | |
138 | .It Dv Bit 2 | |
139 | shows information about what branches are taken and often some | |
140 | of the return values of functions. | |
141 | .It Dv Bit 3 | |
142 | shows 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 | |
151 | and | |
152 | .Xr uk 4 | |
153 | .Sh HISTORY | |
154 | This | |
155 | .Nm | |
156 | system appeared in MACH 2.5 at TRW. |